Navigation.jrag 986 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
aspect Navigation {

  inh Program ASTNode.program();
  eq Program.getChild().program() = this;

  coll java.util.Set<TypeDecl> Program.typeDecls() [new java.util.HashSet<>()] root Program;
  TypeDecl contributes this
    to Program.typeDecls()
    for program();

  coll java.util.Set<Relation> Program.relations() [new java.util.HashSet<>()] root Program;
  Relation contributes this
    to Program.relations()
    for program();

  inh TypeDecl Component.containingTypeDecl();
  eq TypeDecl.getChild().containingTypeDecl() = this;

//  syn boolean RelationComponent.multiplicityOne() = false;
//  eq OneRelationComponent.multiplicityOne() = true;
//  syn boolean RelationComponent.multiplicityOpt() = false;
//  eq OptionalRelationComponent.multiplicityOpt() = true;
//  syn boolean RelationComponent.multiplicityMany() = false;
//  eq ManyRelationComponent.multiplicityMany() = true;

  inh GrammarFile ASTNode.containedFile();
  eq GrammarFile.getChild().containedFile() = this;
}