diff options
author | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2019-09-08 16:12:55 -0400 |
---|---|---|
committer | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2019-09-08 16:12:55 -0400 |
commit | 71108d462c2695d917e87acea6f49d3f2954c6f4 (patch) | |
tree | 755962edeb635f46f1c860e2ff4dcc0235099597 /Domains/Examples/ModelGenExampleFAM_plugin/src | |
parent | VAMPIRE: complete first version of VampireModelInterpretation (diff) | |
download | VIATRA-Generator-71108d462c2695d917e87acea6f49d3f2954c6f4.tar.gz VIATRA-Generator-71108d462c2695d917e87acea6f49d3f2954c6f4.tar.zst VIATRA-Generator-71108d462c2695d917e87acea6f49d3f2954c6f4.zip |
VAMPIRE: Implement wf constraint handling
Diffstat (limited to 'Domains/Examples/ModelGenExampleFAM_plugin/src')
-rw-r--r-- | Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql index f0e48d42..15f70963 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql +++ b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql | |||
@@ -11,45 +11,46 @@ pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { | |||
11 | FunctionalInput.terminator(In,T); | 11 | FunctionalInput.terminator(In,T); |
12 | } | 12 | } |
13 | 13 | ||
14 | @QueryBasedFeature | 14 | //@QueryBasedFeature |
15 | pattern type(This : Function, Target : FunctionType) = { | 15 | //pattern type(This : Function, Target : FunctionType) = { |
16 | find rootElements(_Model, This); | 16 | // find rootElements(_Model, This); |
17 | Target == FunctionType::Root; | 17 | // Target == FunctionType::Root; |
18 | } or { | 18 | //} or { |
19 | neg find parent(_Child, This); | 19 | // neg find parent(_Child, This); |
20 | neg find rootElements(_Model, This); | 20 | // neg find rootElements(_Model, This); |
21 | Target == FunctionType::Leaf; | 21 | // Target == FunctionType::Leaf; |
22 | } or { | 22 | //} or { |
23 | find parent(This, _Par); | 23 | // find parent(This, _Par); |
24 | find parent(_Child, This); | 24 | // find parent(_Child, This); |
25 | Target == FunctionType::Intermediate; | 25 | // Target == FunctionType::Intermediate; |
26 | } | 26 | //} |
27 | 27 | // | |
28 | pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { | 28 | ////@Constraint |
29 | FunctionalArchitectureModel.rootElements(Model, Root); | 29 | //pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { |
30 | } | 30 | // FunctionalArchitectureModel.rootElements(Model, Root); |
31 | 31 | //} | |
32 | pattern parent(Func : Function, Par : Function) = { | 32 | // |
33 | Function.parent(Func, Par); | 33 | //pattern parent(Func : Function, Par : Function) = { |
34 | } | 34 | // Function.parent(Func, Par); |
35 | 35 | //} | |
36 | @QueryBasedFeature | 36 | // |
37 | pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { | 37 | //@QueryBasedFeature |
38 | FunctionalElement(This); | 38 | //pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { |
39 | FunctionalArchitectureModel(Target); | 39 | // FunctionalElement(This); |
40 | } | 40 | // FunctionalArchitectureModel(Target); |
41 | 41 | //} | |
42 | pattern hasRoot(F : Function) { | 42 | // |
43 | find rootElements(_Model, F); | 43 | //pattern hasRoot(F : Function) { |
44 | } | 44 | // find rootElements(_Model, F); |
45 | pattern hasInt(F : Function) { | 45 | //} |
46 | neg find parent(_Child, F); | 46 | //pattern hasInt(F : Function) { |
47 | neg find rootElements(_Model, F); | 47 | // neg find parent(_Child, F); |
48 | } | 48 | // neg find rootElements(_Model, F); |
49 | pattern hasLeaf(F : Function) { | 49 | //} |
50 | find parent(F, _Par); | 50 | //pattern hasLeaf(F : Function) { |
51 | find parent(_Child, F); | 51 | // find parent(F, _Par); |
52 | } | 52 | // find parent(_Child, F); |
53 | //} | ||
53 | /* | 54 | /* |
54 | @Constraint(message="noRoot", severity="error", key={fam}) | 55 | @Constraint(message="noRoot", severity="error", key={fam}) |
55 | pattern noRoot(fam: FunctionalArchitectureModel) { | 56 | pattern noRoot(fam: FunctionalArchitectureModel) { |