AGL is an experiment in Adaptive Programming. While the programmer is allowed to think about operations and properties of abstract types, the AGL library itself will take care of mapping the programmers intent to an implementation. It does this using a simple rule engine. An interesting aspect of the library is that AGL operations may modify the implementation type or even substitute another implementation if needed. The library attempts to optimize it's behavior over the lifetime of the program based on the programmer declared properties and those properties inferred by the program.
A graph is useful tool in many disciplines. A graph is represented by the pair (V,E) where V is the set of vertices and E is the set of edges. AGL provides users with a high level graph concept driven by properties. It also supplies a library of algorithms to operate on transperently on the abstract data types.
Some Examples:
Getting started:
Properties represent known or requested facts about the graph, for example the type of the graph or a known root.
Properties may have values such as integer, String, boolean or Object
Every graph has a set of property maps. Each Map represents the a function that binds vertices/edges to some data data such as node labels. Some maps are termed "natural" in that the representation may provide the map without programmer help. Others are simply java maps. All maps support the standard java map interface.
The graph library will choose the best representation for the graph. This choice is based on a set of requested graph properties.
For example
gb = new UngraphBuilder(new GraphTag[] { OBJECT_VERTEX });
would request a undirected graph which uses java Objects as
verteces. Therefore, based on the requested properties, a bit
matrix representation might be chosen.
Adding a request for an Edge data map, then we would prefer the use
of Adjecency matrix or even Adjecency list.
gb = new UngraphBuilder(new GraphTag[] { OBJECT_VERTEX, EDGE_DATA });
Currently the following representation are supported:
See the package
for complete list.
Any object may be a vertex, but the graph library must represent connection betweens objects. Currently the library supports the following edge representations, each having specific properties discussed later.
Below are listed some important feature/concepts of AGL.