diff options
Diffstat (limited to 'Domains/crossingScenario/queries/crossingScenarioQueries.vql')
-rw-r--r-- | Domains/crossingScenario/queries/crossingScenarioQueries.vql | 83 |
1 files changed, 46 insertions, 37 deletions
diff --git a/Domains/crossingScenario/queries/crossingScenarioQueries.vql b/Domains/crossingScenario/queries/crossingScenarioQueries.vql index fbd68472..7089d0da 100644 --- a/Domains/crossingScenario/queries/crossingScenarioQueries.vql +++ b/Domains/crossingScenario/queries/crossingScenarioQueries.vql | |||
@@ -3,51 +3,60 @@ package queries | |||
3 | import "http://www.example.com/crossingScenario" | 3 | import "http://www.example.com/crossingScenario" |
4 | import "http://www.eclipse.org/emf/2002/Ecore" | 4 | import "http://www.eclipse.org/emf/2002/Ecore" |
5 | 5 | ||
6 | //Minimal Failing Example | 6 | ////Minimal Failing Example |
7 | @Constraint(severity = "error", key = {l}, message = "this defines the placedOn relation") | 7 | @Constraint(severity = "error", key = {l}, message = "this defines the placedOn relation") |
8 | pattern patterThatOnlyWorksWithInt(l : Lane) { | 8 | pattern patterThatOnlyWorksWithInt(l : Lane) { |
9 | Lane.referenceCoord(l, w); | 9 | Lane.referenceCoord(l, w); |
10 | check(w <= 2.0); | 10 | check(w <= 0-10.0); |
11 | } | 11 | } |
12 | 12 | ||
13 | //////////////// | 13 | ////////////// |
14 | ////Lane | 14 | //Lane |
15 | //////////////// | 15 | ////////////// |
16 | // | 16 | |
17 | ///////////width, numWidth | 17 | /////////width, numWidth |
18 | //@Constraint(severity="error", key={l}, message="x") | ||
19 | //pattern define_numWidth_small(l : Lane) { | ||
20 | // Lane.width(l, Size::Small); | ||
21 | // Lane.numWidth(l, nw); | ||
22 | // check(nw <= 5); | ||
23 | //} or { | ||
24 | // Lane.width(l, Size::Small); | ||
25 | // Lane.numWidth(l, nw); | ||
26 | // check(nw >= 10); | ||
27 | //} | ||
28 | // | ||
29 | //@Constraint(severity="error", key={l}, message="x") | ||
30 | //pattern define_numWidth_medium(l : Lane) { | ||
31 | // Lane.width(l, Size::Medium); | ||
32 | // Lane.numWidth(l, nw); | ||
33 | // check(nw <= 10); | ||
34 | //} or { | ||
35 | // Lane.width(l, Size::Medium); | ||
36 | // Lane.numWidth(l, nw); | ||
37 | // check(nw >= 15); | ||
38 | //} | ||
39 | // | ||
40 | //@Constraint(severity="error", key={l}, message="x") | 18 | //@Constraint(severity="error", key={l}, message="x") |
41 | //pattern define_numWidth_large(l : Lane) { | 19 | //pattern define_numWidth_small1(l : Lane) { |
42 | // Lane.width(l, Size::Large); | 20 | // Lane.width(l, Size::S_Small); |
43 | // Lane.numWidth(l, nw); | ||
44 | // check(nw <= 15); | ||
45 | //} or { | ||
46 | // Lane.width(l, Size::Large); | ||
47 | // Lane.numWidth(l, nw); | 21 | // Lane.numWidth(l, nw); |
48 | // check(nw >= 20); | 22 | // check(nw >= 5.0); |
49 | //} | 23 | //} |
50 | // | 24 | |
25 | @Constraint(severity="error", key={l}, message="x") | ||
26 | pattern define_numWidth_small(l : Lane) { | ||
27 | Lane.width(l, Size::S_Small); | ||
28 | Lane.numWidth(l, nw); | ||
29 | check(nw <= 5.0); | ||
30 | } or { | ||
31 | Lane.width(l, Size::S_Small); | ||
32 | Lane.numWidth(l, nw); | ||
33 | check(nw >= 10.0); | ||
34 | } | ||
35 | |||
36 | @Constraint(severity="error", key={l}, message="x") | ||
37 | pattern define_numWidth_medium(l : Lane) { | ||
38 | Lane.width(l, ::S_Med); | ||
39 | Lane.numWidth(l, nw); | ||
40 | check(nw <= 10.0); | ||
41 | } | ||
42 | or { | ||
43 | Lane.width(l, Size::S_Med); | ||
44 | Lane.numWidth(l, nw); | ||
45 | check(nw >= 15.0); | ||
46 | } | ||
47 | |||
48 | @Constraint(severity="error", key={l}, message="x") | ||
49 | pattern define_numWidth_large(l : Lane) { | ||
50 | Lane.width(l, Size::S_Large); | ||
51 | Lane.numWidth(l, nw); | ||
52 | check(nw <= 15.0); | ||
53 | } | ||
54 | or { | ||
55 | Lane.width(l, Size::S_Large); | ||
56 | Lane.numWidth(l, nw); | ||
57 | check(nw >= 20.0); | ||
58 | } | ||
59 | |||
51 | ///////////referenceCoord | 60 | ///////////referenceCoord |
52 | //@Constraint(severity="error", key={l}, message="x") | 61 | //@Constraint(severity="error", key={l}, message="x") |
53 | //pattern define_referenceCoord_horizontalAtOrigin(l:Lane) { | 62 | //pattern define_referenceCoord_horizontalAtOrigin(l:Lane) { |