User Tools

Site Tools


01_user_documentation:06_graph:06_extent:01_structure

Table of Contents

Structure

Extents are double linked lists. They could be used for any type of java classes. But, in GroIMP they are only created for Nodes in the graph. Thus, the elements of the extents will be referred as Node (and their subclasses). To be part of the project graph an object needs to extends Node. Thus, the highest level of Extent is the one wrapping the type Node. Then, for each new type of Node added in the graph, an extent is created and linked to its direct super class. The type of Node is described by its NType. The NType is an internal class defined by each Node. In java it is usually created with the code enhancer to ensure that all the required attributes for the persistence management are created. In RGG, the NType is automatically created for all modules. If a Node is added to the graph and it extends several level of Nodes, an extent for each intermediate NTypes is created.

Extent implements the following methods:

  • getType(): return the type of the node of this extent.
  • getSubExtents(): return the list of extents whose type is a sub type.
  • getFirstNode(): return the first element added to this extent.
  • getNextNode(): return the next element in the chain.
  • getTotalSize(): return the size of the extent including the size of its sub extent.

Example

E.g. in the following: (the init method is simplified, and we assume that there are not other nodes in the graph)

module A;
module B extends A;
module C extends B;
 
init()[ Axiom ==> C; ]

the graph only contains the root: Node, the RGGRoot, and one C node. GroIMP will create the following extents:

  • one for Node of size 1
  • one for RGGRoot of size 1
  • one for A of size 0
  • one for B of size 0
  • one for C of size 1
01_user_documentation/06_graph/06_extent/01_structure.txt · Last modified: 2025/10/13 09:41 by gaetan