aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/language/src/main/resources
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-15 12:35:06 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-15 16:56:29 +0200
commitc4757c72887d0d83a51099c9f33d3e027f55a4e6 (patch)
tree0cf4a86036be9cca1fd940492001e973d174e4c7 /subprojects/language/src/main/resources
parentfix: concrete supertype translation (diff)
downloadrefinery-c4757c72887d0d83a51099c9f33d3e027f55a4e6.tar.gz
refinery-c4757c72887d0d83a51099c9f33d3e027f55a4e6.tar.zst
refinery-c4757c72887d0d83a51099c9f33d3e027f55a4e6.zip
refactor(language): invalid multiplicity trace
Also simplifies attributes and flags for now, as we don't translate them to abstractions.
Diffstat (limited to 'subprojects/language/src/main/resources')
-rw-r--r--subprojects/language/src/main/resources/tools/refinery/language/builtin.problem41
1 files changed, 6 insertions, 35 deletions
diff --git a/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem b/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem
index 9c1d7669..8570e363 100644
--- a/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem
+++ b/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem
@@ -3,43 +3,14 @@
3% SPDX-License-Identifier: EPL-2.0 3% SPDX-License-Identifier: EPL-2.0
4problem builtin. 4problem builtin.
5 5
6abstract class node { 6abstract class node.
7 refers node[] equals opposite equals
8}
9 7
10pred exists(node node). 8pred exists(node).
11 9
12% class Integer { 10pred equals(left, right).
13% int intValue
14% }
15%
16% class Real {
17% real realValue
18% }
19%
20% class String {
21% string stringValue
22% }
23%
24% enum Boolean {
25% TRUE, FALSE
26% }
27 11
28pred contained(node node). 12abstract class contained extends node.
29 13
30pred contains(node container, node contained). 14pred contains(container, contained contained).
31 15
32pred root(node node). 16error invalidNumberOfContainers(contained contained).
33
34% error missingContainer(contained node) <->
35% !contains(node, _), !root(node).
36%
37% error tooManyContainers(contained node) <->
38% #contains(_, node) > 1
39% ;
40% contains(_, node), root(node)
41% ;
42% contains(_, node), !contained(node).
43%
44% error containmentCycle(node node) <->
45% contains+(node, node).