diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp')
3 files changed, 18 insertions, 8 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html index 112adb74..3fb66d62 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html | |||
@@ -21,14 +21,17 @@ | |||
21 | } | 21 | } |
22 | 22 | ||
23 | class Person { | 23 | class Person { |
24 | refers Person[] children opposite parent | 24 | Person[] children opposite parent |
25 | refers Person parent opposite children | 25 | Person parent opposite children |
26 | TaxStatus[1] taxStatus | ||
26 | } | 27 | } |
27 | 28 | ||
28 | error loop(Person p) :- children+(p, p). | 29 | enum TaxStatus { |
30 | child, student, adult, retired | ||
31 | } | ||
29 | 32 | ||
30 | error multipleRoots(Person p, Person q) :- | 33 | error invalidTaxStatus(Person p) :- |
31 | !equals(p, q), !parent(p, _), !parent(q, _). | 34 | taxStatus(p, child), children(p, _q). |
32 | 35 | ||
33 | Family('family'). | 36 | Family('family'). |
34 | members('family', anne). | 37 | members('family', anne). |
@@ -36,6 +39,7 @@ members('family', bob). | |||
36 | members('family', ciri). | 39 | members('family', ciri). |
37 | children(anne, ciri). | 40 | children(anne, ciri). |
38 | ?children(bob, ciri). | 41 | ?children(bob, ciri). |
42 | taxStatus(anne, adult). | ||
39 | 43 | ||
40 | scope Family = 1, Person += 5..10.</pre></div> | 44 | scope Family = 1, Person += 5..10.</pre></div> |
41 | </div> | 45 | </div> |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css index b24610f4..9a89dd81 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css | |||
@@ -70,6 +70,10 @@ a:hover { | |||
70 | color: #8b8816; | 70 | color: #8b8816; |
71 | } | 71 | } |
72 | 72 | ||
73 | .problem-enum { | ||
74 | color: #644632; | ||
75 | } | ||
76 | |||
73 | .problem-reference { | 77 | .problem-reference { |
74 | color: #0000c0; | 78 | color: #0000c0; |
75 | } | 79 | } |
@@ -78,11 +82,13 @@ a:hover { | |||
78 | font-weight: bold; | 82 | font-weight: bold; |
79 | } | 83 | } |
80 | 84 | ||
81 | .problem-node { | 85 | |
82 | color: inherit !important; | 86 | .CodeMirror .problem-node { |
87 | color: inherit; | ||
83 | } | 88 | } |
84 | 89 | ||
85 | .problem-enum-node { | 90 | .problem-enum-node { |
91 | color: #1a1a1a !important; | ||
86 | font-weight: bold; | 92 | font-weight: bold; |
87 | } | 93 | } |
88 | 94 | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js index 0abfa5ee..84515ad6 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js | |||
@@ -1,5 +1,5 @@ | |||
1 | define(["codemirror", "codemirror/addon/mode/simple"], function(CodeMirror, SimpleMode) { | 1 | define(["codemirror", "codemirror/addon/mode/simple"], function(CodeMirror, SimpleMode) { |
2 | var keywords = "abstract|class|contains|error|extends|false|opposite|pred|problem|refers|scope|true|unknown"; | 2 | var keywords = "abstract|class|contains|enum|error|extends|false|opposite|pred|problem|refers|scope|true|unknown"; |
3 | CodeMirror.defineSimpleMode("xtext/problem", { | 3 | CodeMirror.defineSimpleMode("xtext/problem", { |
4 | start: [ | 4 | start: [ |
5 | {token: "comment", regex: "\\/\\/.*$"}, | 5 | {token: "comment", regex: "\\/\\/.*$"}, |