AGs as well as the Extended DCGs available in other logic languages
intend to overcome a major deficiency of declarative languages
everyone knows about and nobody says it: the lack of OBJECTS.
The package library(objects) is BinProlog's first attempt to get it right. It's a mixture of ideas and syntax from Java, SELF. It's prototype (not class!) based and dynamic. As objects ultimately benefit from dynamic recompilation the package should not be unusually slow, although no effort has been made to optimize it.
Take a look at file obtest.pl which calls library(objects) and library(obtools).
A tentative distributed version is given in file library(dobjects) which keeps distributed state using Multi-BinProlog's Linda blackboard.