User Tools

Site Tools


tutorials:custom_storing_node

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorials:custom_storing_node [2025/07/16 14:33] gaetantutorials:custom_storing_node [2025/11/25 11:58] (current) gaetan
Line 214: Line 214:
  
 **Note:** In the example we used EDGE_O, there are actually 13 usable unique bit-wise edge type defined in Library: EDGE_0 to EDGE_12. But it is also possible to use any Integer as "unique" edge bit. It is still important to know that the edge bit is used for bit wise operations. Thus if the edge bit you use contains the bit SUCCESSOR, the edge will be a successor. **Note:** In the example we used EDGE_O, there are actually 13 usable unique bit-wise edge type defined in Library: EDGE_0 to EDGE_12. But it is also possible to use any Integer as "unique" edge bit. It is still important to know that the edge bit is used for bit wise operations. Thus if the edge bit you use contains the bit SUCCESSOR, the edge will be a successor.
 +
 +==== Example code ====
 +
 +<code java>
 +module A;
 +static int e = Library.EDGE_0;
 +module B {
 + public A* getA(){
 + yield (* @128; this -e-> A*);
 + }
 +}
 +
 + 
 +protected void init ()
 +[
 + Axiom ==> A F ;
 +]
 + 
 +public void grow()[
 + a:A ==>  B [-e->a], a.setExtentIndex(7);
 +]
 +
 +public void printParent()[
 + b:B ::> println(b.getA());
 +]
 +</code>
tutorials/custom_storing_node.txt · Last modified: 2025/11/25 11:58 by gaetan