diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2024-04-07 15:16:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-07 15:16:53 +0200 |
commit | daa787eddc786b49528ee6962515f37720fdf579 (patch) | |
tree | c11c8df3dca1653643b3941de19e5dbb0cef85b1 | |
parent | fix(test): Windows line endings comparison (diff) | |
parent | refactor(logic): abstract domain interface (diff) | |
download | refinery-daa787eddc786b49528ee6962515f37720fdf579.tar.gz refinery-daa787eddc786b49528ee6962515f37720fdf579.tar.zst refinery-daa787eddc786b49528ee6962515f37720fdf579.zip |
Merge pull request #57 from kris7t/logic-extract
Refactor logic expressions
472 files changed, 6713 insertions, 3807 deletions
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts index 3df17d67..b149a483 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts | |||
@@ -101,6 +101,14 @@ tasks { | |||
101 | publishing.publications { | 101 | publishing.publications { |
102 | create<MavenPublication>("mavenJava") { | 102 | create<MavenPublication>("mavenJava") { |
103 | from(components["java"]) | 103 | from(components["java"]) |
104 | pom { | ||
105 | licenses { | ||
106 | license { | ||
107 | name = "Eclipse Public License - v 2.0" | ||
108 | url = "https://www.eclipse.org/legal/epl-2.0/" | ||
109 | } | ||
110 | } | ||
111 | } | ||
104 | } | 112 | } |
105 | } | 113 | } |
106 | 114 | ||
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/interpreter-library.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/interpreter-library.gradle.kts index ae30ff1b..8bafa1a5 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/interpreter-library.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/interpreter-library.gradle.kts | |||
@@ -8,7 +8,6 @@ package tools.refinery.gradle | |||
8 | import tools.refinery.gradle.utils.SonarPropertiesUtils | 8 | import tools.refinery.gradle.utils.SonarPropertiesUtils |
9 | 9 | ||
10 | plugins { | 10 | plugins { |
11 | id("maven-publish") | ||
12 | id("tools.refinery.gradle.java-library") | 11 | id("tools.refinery.gradle.java-library") |
13 | id("tools.refinery.gradle.sonarqube") | 12 | id("tools.refinery.gradle.sonarqube") |
14 | } | 13 | } |
diff --git a/gradle.properties b/gradle.properties index bcdef824..9c20dde8 100644 --- a/gradle.properties +++ b/gradle.properties | |||
@@ -1,4 +1,4 @@ | |||
1 | # SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 1 | # SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
2 | # | 2 | # |
3 | # SPDX-License-Identifier: EPL-2.0 | 3 | # SPDX-License-Identifier: EPL-2.0 |
4 | 4 | ||
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5f9dde6e..9c4d686a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml | |||
@@ -41,6 +41,7 @@ mwe-utils = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe.utils", ver | |||
41 | mwe2-launch = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.launch", version.ref = "mwe2" } | 41 | mwe2-launch = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.launch", version.ref = "mwe2" } |
42 | mwe2-lib = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.lib", version.ref = "mwe2" } | 42 | mwe2-lib = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.lib", version.ref = "mwe2" } |
43 | ortools = { group = "com.google.ortools", name = "ortools-java", version = "9.9.3963" } | 43 | ortools = { group = "com.google.ortools", name = "ortools-java", version = "9.9.3963" } |
44 | refinery-z3 = { group = "tools.refinery.z3", name = "refinery-z3-solver", version = "4.12.6" } | ||
44 | slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" } | 45 | slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" } |
45 | slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" } | 46 | slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" } |
46 | slf4j-log4j = { group = "org.slf4j", name = "log4j-over-slf4j", version.ref = "slf4j" } | 47 | slf4j-log4j = { group = "org.slf4j", name = "log4j-over-slf4j", version.ref = "slf4j" } |
diff --git a/settings.gradle.kts b/settings.gradle.kts index 6e5a72e9..50ca1f24 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts | |||
@@ -19,6 +19,7 @@ include( | |||
19 | "language-model", | 19 | "language-model", |
20 | "language-semantics", | 20 | "language-semantics", |
21 | "language-web", | 21 | "language-web", |
22 | "logic", | ||
22 | "store", | 23 | "store", |
23 | "store-dse", | 24 | "store-dse", |
24 | "store-dse-visualization", | 25 | "store-dse-visualization", |
@@ -26,6 +27,7 @@ include( | |||
26 | "store-query-interpreter", | 27 | "store-query-interpreter", |
27 | "store-reasoning", | 28 | "store-reasoning", |
28 | "store-reasoning-scope", | 29 | "store-reasoning-scope", |
30 | "store-reasoning-smt", | ||
29 | ) | 31 | ) |
30 | 32 | ||
31 | for (project in rootProject.children) { | 33 | for (project in rootProject.children) { |
@@ -33,3 +35,5 @@ for (project in rootProject.children) { | |||
33 | project.name = "${rootProject.name}-$projectName" | 35 | project.name = "${rootProject.name}-$projectName" |
34 | project.projectDir = file("subprojects/$projectName") | 36 | project.projectDir = file("subprojects/$projectName") |
35 | } | 37 | } |
38 | |||
39 | includeBuild("z3") | ||
diff --git a/subprojects/frontend/src/editor/EditorTheme.ts b/subprojects/frontend/src/editor/EditorTheme.ts index 6deda080..1f8152d3 100644 --- a/subprojects/frontend/src/editor/EditorTheme.ts +++ b/subprojects/frontend/src/editor/EditorTheme.ts | |||
@@ -166,6 +166,11 @@ export default styled('div', { | |||
166 | '.tok-problem-abstract': { | 166 | '.tok-problem-abstract': { |
167 | fontStyle: 'italic', | 167 | fontStyle: 'italic', |
168 | }, | 168 | }, |
169 | '.tok-problem-datatype, .tok-problem-aggregator': { | ||
170 | '&, & .tok-typeName': { | ||
171 | color: theme.palette.primary.main, | ||
172 | }, | ||
173 | }, | ||
169 | '.tok-problem-containment': { | 174 | '.tok-problem-containment': { |
170 | fontWeight: theme.typography.fontWeightEditorBold, | 175 | fontWeight: theme.typography.fontWeightEditorBold, |
171 | textDecorationSkipInk: 'none', | 176 | textDecorationSkipInk: 'none', |
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar index b69ee73f..7949f90c 100644 --- a/subprojects/frontend/src/language/problem.grammar +++ b/subprojects/frontend/src/language/problem.grammar | |||
@@ -9,13 +9,16 @@ | |||
9 | @external prop implicitCompletion from './props' | 9 | @external prop implicitCompletion from './props' |
10 | 10 | ||
11 | @precedence { | 11 | @precedence { |
12 | cast, | ||
12 | prefix, | 13 | prefix, |
14 | range @left, | ||
13 | exponential @right, | 15 | exponential @right, |
14 | multiplicative @left, | 16 | multiplicative @left, |
15 | additive @left, | 17 | additive @left, |
16 | range @left, | ||
17 | lattice @left, | 18 | lattice @left, |
18 | comparison @left, | 19 | comparison @left, |
20 | boolean @left, | ||
21 | assignment, | ||
19 | feature @cut | 22 | feature @cut |
20 | } | 23 | } |
21 | 24 | ||
@@ -42,6 +45,12 @@ statement { | |||
42 | kw<"enum"> RelationName | 45 | kw<"enum"> RelationName |
43 | (EnumBody { "{" sep<",", AtomNodeName> "}" } | ".") | 46 | (EnumBody { "{" sep<",", AtomNodeName> "}" } | ".") |
44 | } | | 47 | } | |
48 | DatatypeDeclaration { | ||
49 | kw<"extern"> ckw<"datatype"> DatatypeName "." | ||
50 | } | | ||
51 | AggregatorDeclaration { | ||
52 | kw<"extern"> ckw<"aggregator"> AggregatorName "." | ||
53 | } | | ||
45 | PredicateDefinition { | 54 | PredicateDefinition { |
46 | ( | 55 | ( |
47 | (kw<"error"> | ckw<"contained"> | kw<"containment">)? kw<"pred"> | | 56 | (kw<"error"> | ckw<"contained"> | kw<"containment">)? kw<"pred"> | |
@@ -50,10 +59,10 @@ statement { | |||
50 | RelationName ParameterList<Parameter>? | 59 | RelationName ParameterList<Parameter>? |
51 | PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } | 60 | PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } |
52 | } | | 61 | } | |
53 | FunctionDefinition { | 62 | // FunctionDefinition { |
54 | kw<"fn"> PrimitiveType RelationName ParameterList<Parameter>? | 63 | // kw<"fn"> RelationName RelationName ParameterList<Parameter>? |
55 | FunctionBody { ("=" sep<OrOp, Case>)? "." } | 64 | // FunctionBody { ("=" sep<OrOp, Case>)? "." } |
56 | } | | 65 | // } | |
57 | //RuleDefinition { | 66 | //RuleDefinition { |
58 | // kw<"rule"> | 67 | // kw<"rule"> |
59 | // RuleName ParameterList<Parameter>? | 68 | // RuleName ParameterList<Parameter>? |
@@ -77,7 +86,7 @@ FeatureDeclaration { | |||
77 | ReferenceKind !feature ~featureHead | 86 | ReferenceKind !feature ~featureHead |
78 | } | | 87 | } | |
79 | FeatureDeclarationHeadWithoutKind { | 88 | FeatureDeclarationHeadWithoutKind { |
80 | (PrimitiveType | kw<"bool">)? ~featureHead | 89 | ~featureHead |
81 | } | 90 | } |
82 | ) | 91 | ) |
83 | RelationName | 92 | RelationName |
@@ -87,36 +96,42 @@ FeatureDeclaration { | |||
87 | ";"? | 96 | ";"? |
88 | } | 97 | } |
89 | 98 | ||
90 | Parameter { Modality? RelationName? VariableName } | 99 | Parameter { RelationName? VariableName } |
91 | 100 | ||
92 | // Use @dynamicPrecedence to prevent a(b) from being parsed as Expr { a } Expr { b } | 101 | // Use @dynamicPrecedence to prevent a(b) from being parsed as Expr { a } Expr { b } |
93 | // instead of Atom { a(b) } | 102 | // instead of Atom { a(b) } |
94 | // Being looser with token sequencing enables more consistent syntactic highlighting. | 103 | // Being looser with token sequencing enables more consistent syntactic highlighting. |
95 | Conjunction { ("," | NextConjunction[@dynamicPrecedence=-10] { Expr })+ } | 104 | Conjunction { ("," | NextConjunction[@dynamicPrecedence=-10] { Expr })+ } |
96 | 105 | ||
97 | Case { Conjunction ("->" Expr)? } | 106 | // Case { Conjunction ("->" Expr)? } |
98 | 107 | ||
99 | OrOp { ";" } | 108 | OrOp { ";" } |
100 | 109 | ||
101 | Expr { | 110 | Expr { |
102 | UnaryExpr | BinaryExpr | Aggregation | VariableName | Atom | Constant | "(" Expr ")" | 111 | AssignmentExpr | UnaryExpr | BinaryExpr | CastExpr | Aggregation | |
112 | VariableName | Atom | Constant | "(" Expr ")" | ||
103 | } | 113 | } |
104 | 114 | ||
115 | AssignmentExpr { !assignment VariableName kw<"is"> Expr } | ||
116 | |||
105 | BinaryExpr { | 117 | BinaryExpr { |
118 | Expr !boolean ("&&" | "||" | "^^") Expr | | ||
106 | Expr !comparison ComparisonOp Expr | | 119 | Expr !comparison ComparisonOp Expr | |
107 | Expr !lattice (LatticeMeet | "\\/") Expr | | 120 | Expr !lattice (LatticeMeet | "\\/") Expr | |
108 | Expr !range ".." Expr | | ||
109 | Expr !additive ("+" | "-") Expr | | 121 | Expr !additive ("+" | "-") Expr | |
110 | Expr !multiplicative (StarMult | Divide) Expr | | 122 | Expr !multiplicative (Star | Divide) Expr | |
111 | Expr !exponential "**" Expr | 123 | Expr !exponential "**" Expr | |
124 | Expr !range ".." Expr | ||
112 | } | 125 | } |
113 | 126 | ||
114 | UnaryExpr { | 127 | UnaryExpr { |
115 | !prefix ("+" | "-" | "!" | kw<"count"> | Modality) Expr | 128 | !prefix ("+" | "-" | "!" | kw<"count">) Expr |
116 | } | 129 | } |
117 | 130 | ||
131 | CastExpr { !cast Expr kw<"as"> DatatypeName } | ||
132 | |||
118 | Aggregation { | 133 | Aggregation { |
119 | AggregationOp "{" Expr "|" Expr "}" | 134 | AggregatorName "{" Expr "|" Expr "}" |
120 | } | 135 | } |
121 | 136 | ||
122 | Atom { RelationName "+"? ParameterList<Expr> } | 137 | Atom { RelationName "+"? ParameterList<Expr> } |
@@ -137,22 +152,10 @@ ReferenceKind { | |||
137 | kw<"refers"> | ckw<"contains"> | kw<"container"> | 152 | kw<"refers"> | ckw<"contains"> | kw<"container"> |
138 | } | 153 | } |
139 | 154 | ||
140 | PrimitiveType { | ||
141 | kw<"int"> | kw<"real"> | kw<"string"> | ||
142 | } | ||
143 | |||
144 | LogicValue { | 155 | LogicValue { |
145 | kw<"true"> | kw<"false"> | kw<"unknown"> | kw<"error"> | 156 | kw<"true"> | kw<"false"> | kw<"unknown"> | kw<"error"> |
146 | } | 157 | } |
147 | 158 | ||
148 | Modality { | ||
149 | kw<"must"> | kw<"may"> | kw<"current"> | ||
150 | } | ||
151 | |||
152 | AggregationOp { | ||
153 | ckw<"sum"> | ckw<"prod"> | ckw<"min"> | ckw<"max"> | ||
154 | } | ||
155 | |||
156 | ComparisonOp { SymbolicComparisonOp | kw<"in"> } | 159 | ComparisonOp { SymbolicComparisonOp | kw<"in"> } |
157 | 160 | ||
158 | ScopeElement { RelationName ("=" | "+=") Multiplicity } | 161 | ScopeElement { RelationName ("=" | "+=") Multiplicity } |
@@ -165,6 +168,8 @@ Multiplicity { (IntMult "..")? (IntMult | StarMult)} | |||
165 | // but will go with the transtive closure (and highlight `a` as a relation) if forced. | 168 | // but will go with the transtive closure (and highlight `a` as a relation) if forced. |
166 | RelationName { QualifiedName ~name } | 169 | RelationName { QualifiedName ~name } |
167 | 170 | ||
171 | DatatypeName { QualifiedName } | ||
172 | |||
168 | //RuleName { QualifiedName } | 173 | //RuleName { QualifiedName } |
169 | 174 | ||
170 | AtomNodeName { QualifiedName } | 175 | AtomNodeName { QualifiedName } |
@@ -175,8 +180,12 @@ NodeName { QualifiedName } | |||
175 | 180 | ||
176 | ModuleName { QualifiedName } | 181 | ModuleName { QualifiedName } |
177 | 182 | ||
183 | AggregatorName { QualifiedName } | ||
184 | |||
178 | QualifiedName[implicitCompletion=true] { "::"? identifier (QualifiedNameSeparator "::" identifier)* } | 185 | QualifiedName[implicitCompletion=true] { "::"? identifier (QualifiedNameSeparator "::" identifier)* } |
179 | 186 | ||
187 | StarMult { Star } | ||
188 | |||
180 | kw<term> { @specialize[@name={term},implicitCompletion=true]<identifier, term> } | 189 | kw<term> { @specialize[@name={term},implicitCompletion=true]<identifier, term> } |
181 | 190 | ||
182 | ckw<term> { @extend[@name={term},implicitCompletion=true]<identifier, term> } | 191 | ckw<term> { @extend[@name={term},implicitCompletion=true]<identifier, term> } |
@@ -216,7 +225,7 @@ sep1<separator, content> { content (separator content)* } | |||
216 | 225 | ||
217 | IntMult { int } | 226 | IntMult { int } |
218 | 227 | ||
219 | StarMult { "*" } | 228 | Star { "*" } |
220 | 229 | ||
221 | Real { (exponential | int ("." (int | exponential))?) } | 230 | Real { (exponential | int ("." (int | exponential))?) } |
222 | 231 | ||
@@ -229,7 +238,7 @@ sep1<separator, content> { content (separator content)* } | |||
229 | 238 | ||
230 | SymbolicComparisonOp { | 239 | SymbolicComparisonOp { |
231 | ">" | ">=" | "<" | "<=" | "==" | "!=" | | 240 | ">" | ">=" | "<" | "<=" | "==" | "!=" | |
232 | "<:" | ":>" | "===" | "!==" | 241 | "===" | "!==" |
233 | } | 242 | } |
234 | 243 | ||
235 | NotOp { "!" } | 244 | NotOp { "!" } |
diff --git a/subprojects/frontend/src/language/problemLanguageSupport.ts b/subprojects/frontend/src/language/problemLanguageSupport.ts index 14826363..dd5d6347 100644 --- a/subprojects/frontend/src/language/problemLanguageSupport.ts +++ b/subprojects/frontend/src/language/problemLanguageSupport.ts | |||
@@ -29,21 +29,22 @@ const parserWithMetadata = parser.configure({ | |||
29 | BlockComment: t.blockComment, | 29 | BlockComment: t.blockComment, |
30 | 'module problem class enum pred fn scope': t.definitionKeyword, | 30 | 'module problem class enum pred fn scope': t.definitionKeyword, |
31 | 'import as declare atom multi': t.definitionKeyword, | 31 | 'import as declare atom multi': t.definitionKeyword, |
32 | 'extern datatype aggregator': t.definitionKeyword, | ||
32 | 'abstract extends refers contains container opposite': t.modifier, | 33 | 'abstract extends refers contains container opposite': t.modifier, |
33 | 'default error contained containment': t.modifier, | 34 | default: t.modifier, |
34 | 'true false unknown error': t.keyword, | 35 | 'true false unknown error': t.keyword, |
35 | 'int real string bool': t.keyword, | 36 | 'count in is': t.operatorKeyword, |
36 | 'may must current count': t.operatorKeyword, | ||
37 | 'sum prod min max in': t.operatorKeyword, | ||
38 | // 'new delete': t.keyword, | 37 | // 'new delete': t.keyword, |
39 | NotOp: t.operator, | 38 | NotOp: t.operator, |
40 | UnknownOp: t.operator, | 39 | UnknownOp: t.operator, |
41 | OrOp: t.separator, | 40 | OrOp: t.separator, |
42 | StarArgument: t.keyword, | 41 | StarArgument: t.keyword, |
43 | 'IntMult StarMult Real': t.number, | 42 | 'IntMult Real': t.number, |
44 | StarMult: t.number, | 43 | 'StarMult/Star': t.number, |
45 | String: t.string, | 44 | String: t.string, |
46 | 'RelationName/QualifiedName': t.typeName, | 45 | 'RelationName/QualifiedName': t.typeName, |
46 | 'DatatypeName/QualifiedName': t.keyword, | ||
47 | 'AggregatorName/QualifiedName': t.operatorKeyword, | ||
47 | // 'RuleName/QualifiedName': t.typeName, | 48 | // 'RuleName/QualifiedName': t.typeName, |
48 | 'AtomNodeName/QualifiedName': t.atom, | 49 | 'AtomNodeName/QualifiedName': t.atom, |
49 | 'VariableName/QualifiedName': t.variableName, | 50 | 'VariableName/QualifiedName': t.variableName, |
@@ -60,7 +61,7 @@ const parserWithMetadata = parser.configure({ | |||
60 | NodeDeclaration: indentDeclaration, | 61 | NodeDeclaration: indentDeclaration, |
61 | ScopeDeclaration: indentDeclaration, | 62 | ScopeDeclaration: indentDeclaration, |
62 | PredicateBody: indentPredicateOrRule, | 63 | PredicateBody: indentPredicateOrRule, |
63 | FunctionBody: indentPredicateOrRule, | 64 | // FunctionBody: indentPredicateOrRule, |
64 | // RuleBody: indentPredicateOrRule, | 65 | // RuleBody: indentPredicateOrRule, |
65 | BlockComment: indentBlockComment, | 66 | BlockComment: indentBlockComment, |
66 | }), | 67 | }), |
@@ -69,7 +70,7 @@ const parserWithMetadata = parser.configure({ | |||
69 | EnumBody: foldInside, | 70 | EnumBody: foldInside, |
70 | ParameterList: foldInside, | 71 | ParameterList: foldInside, |
71 | PredicateBody: foldInside, | 72 | PredicateBody: foldInside, |
72 | FunctionBody: foldInside, | 73 | // FunctionBody: foldInside, |
73 | // RuleBody: foldInside, | 74 | // RuleBody: foldInside, |
74 | Conjunction: foldConjunction, | 75 | Conjunction: foldConjunction, |
75 | // Consequent: foldWholeNode, | 76 | // Consequent: foldWholeNode, |
diff --git a/subprojects/generator/src/main/java/tools/refinery/generator/ModelFacade.java b/subprojects/generator/src/main/java/tools/refinery/generator/ModelFacade.java index a00ddc46..eaf60082 100644 --- a/subprojects/generator/src/main/java/tools/refinery/generator/ModelFacade.java +++ b/subprojects/generator/src/main/java/tools/refinery/generator/ModelFacade.java | |||
@@ -6,6 +6,7 @@ | |||
6 | package tools.refinery.generator; | 6 | package tools.refinery.generator; |
7 | 7 | ||
8 | import tools.refinery.language.semantics.ProblemTrace; | 8 | import tools.refinery.language.semantics.ProblemTrace; |
9 | import tools.refinery.logic.AbstractValue; | ||
9 | import tools.refinery.store.model.Model; | 10 | import tools.refinery.store.model.Model; |
10 | import tools.refinery.store.model.ModelStore; | 11 | import tools.refinery.store.model.ModelStore; |
11 | import tools.refinery.store.reasoning.ReasoningAdapter; | 12 | import tools.refinery.store.reasoning.ReasoningAdapter; |
@@ -52,7 +53,8 @@ public abstract class ModelFacade { | |||
52 | return concreteness; | 53 | return concreteness; |
53 | } | 54 | } |
54 | 55 | ||
55 | public <A, C> PartialInterpretation<A, C> getPartialInterpretation(PartialSymbol<A, C> partialSymbol) { | 56 | public <A extends AbstractValue<A, C>, C> PartialInterpretation<A, C> getPartialInterpretation( |
57 | PartialSymbol<A, C> partialSymbol) { | ||
56 | return reasoningAdapter.getPartialInterpretation(concreteness, partialSymbol); | 58 | return reasoningAdapter.getPartialInterpretation(concreteness, partialSymbol); |
57 | } | 59 | } |
58 | } | 60 | } |
diff --git a/subprojects/generator/src/main/java/tools/refinery/generator/ModelGenerator.java b/subprojects/generator/src/main/java/tools/refinery/generator/ModelGenerator.java index 1515dceb..36190b76 100644 --- a/subprojects/generator/src/main/java/tools/refinery/generator/ModelGenerator.java +++ b/subprojects/generator/src/main/java/tools/refinery/generator/ModelGenerator.java | |||
@@ -9,6 +9,7 @@ import com.google.inject.Provider; | |||
9 | import tools.refinery.language.model.problem.Problem; | 9 | import tools.refinery.language.model.problem.Problem; |
10 | import tools.refinery.language.semantics.ProblemTrace; | 10 | import tools.refinery.language.semantics.ProblemTrace; |
11 | import tools.refinery.language.semantics.SolutionSerializer; | 11 | import tools.refinery.language.semantics.SolutionSerializer; |
12 | import tools.refinery.logic.AbstractValue; | ||
12 | import tools.refinery.store.dse.strategy.BestFirstStoreManager; | 13 | import tools.refinery.store.dse.strategy.BestFirstStoreManager; |
13 | import tools.refinery.store.map.Version; | 14 | import tools.refinery.store.map.Version; |
14 | import tools.refinery.store.model.ModelStore; | 15 | import tools.refinery.store.model.ModelStore; |
@@ -24,7 +25,7 @@ public class ModelGenerator extends ModelFacade { | |||
24 | private boolean lastGenerationSuccessful; | 25 | private boolean lastGenerationSuccessful; |
25 | 26 | ||
26 | ModelGenerator(ProblemTrace problemTrace, ModelStore store, ModelSeed modelSeed, | 27 | ModelGenerator(ProblemTrace problemTrace, ModelStore store, ModelSeed modelSeed, |
27 | Provider<SolutionSerializer> solutionSerializerProvider) { | 28 | Provider<SolutionSerializer> solutionSerializerProvider) { |
28 | super(problemTrace, store, modelSeed, Concreteness.CANDIDATE); | 29 | super(problemTrace, store, modelSeed, Concreteness.CANDIDATE); |
29 | this.solutionSerializerProvider = solutionSerializerProvider; | 30 | this.solutionSerializerProvider = solutionSerializerProvider; |
30 | initialVersion = getModel().commit(); | 31 | initialVersion = getModel().commit(); |
@@ -66,7 +67,8 @@ public class ModelGenerator extends ModelFacade { | |||
66 | } | 67 | } |
67 | 68 | ||
68 | @Override | 69 | @Override |
69 | public <A, C> PartialInterpretation<A, C> getPartialInterpretation(PartialSymbol<A, C> partialSymbol) { | 70 | public <A extends AbstractValue<A, C>, C> PartialInterpretation<A, C> getPartialInterpretation( |
71 | PartialSymbol<A, C> partialSymbol) { | ||
70 | checkSuccessfulGeneration(); | 72 | checkSuccessfulGeneration(); |
71 | return super.getPartialInterpretation(partialSymbol); | 73 | return super.getPartialInterpretation(partialSymbol); |
72 | } | 74 | } |
diff --git a/subprojects/generator/src/main/java/tools/refinery/generator/ProblemLoader.java b/subprojects/generator/src/main/java/tools/refinery/generator/ProblemLoader.java index 580a87b6..c76fb7aa 100644 --- a/subprojects/generator/src/main/java/tools/refinery/generator/ProblemLoader.java +++ b/subprojects/generator/src/main/java/tools/refinery/generator/ProblemLoader.java | |||
@@ -12,7 +12,10 @@ import org.eclipse.emf.ecore.resource.Resource; | |||
12 | import org.eclipse.emf.ecore.util.EcoreUtil; | 12 | import org.eclipse.emf.ecore.util.EcoreUtil; |
13 | import org.eclipse.xtext.diagnostics.Severity; | 13 | import org.eclipse.xtext.diagnostics.Severity; |
14 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | 14 | import org.eclipse.xtext.naming.IQualifiedNameConverter; |
15 | import org.eclipse.xtext.resource.*; | 15 | import org.eclipse.xtext.resource.FileExtensionProvider; |
16 | import org.eclipse.xtext.resource.IEObjectDescription; | ||
17 | import org.eclipse.xtext.resource.IResourceFactory; | ||
18 | import org.eclipse.xtext.resource.XtextResourceSet; | ||
16 | import org.eclipse.xtext.scoping.impl.GlobalResourceDescriptionProvider; | 19 | import org.eclipse.xtext.scoping.impl.GlobalResourceDescriptionProvider; |
17 | import org.eclipse.xtext.util.CancelIndicator; | 20 | import org.eclipse.xtext.util.CancelIndicator; |
18 | import org.eclipse.xtext.util.LazyStringInputStream; | 21 | import org.eclipse.xtext.util.LazyStringInputStream; |
@@ -25,7 +28,7 @@ import tools.refinery.language.model.problem.ScopeDeclaration; | |||
25 | import tools.refinery.language.naming.NamingUtil; | 28 | import tools.refinery.language.naming.NamingUtil; |
26 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; | 29 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; |
27 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy.ShadowingKey; | 30 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy.ShadowingKey; |
28 | import tools.refinery.language.scoping.imports.ImportAdapter; | 31 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; |
29 | import tools.refinery.language.scoping.imports.ImportCollector; | 32 | import tools.refinery.language.scoping.imports.ImportCollector; |
30 | import tools.refinery.store.util.CancellationToken; | 33 | import tools.refinery.store.util.CancellationToken; |
31 | 34 | ||
@@ -61,6 +64,9 @@ public class ProblemLoader { | |||
61 | @Inject | 64 | @Inject |
62 | private IQualifiedNameConverter qualifiedNameConverter; | 65 | private IQualifiedNameConverter qualifiedNameConverter; |
63 | 66 | ||
67 | @Inject | ||
68 | private ImportAdapterProvider importAdapterProvider; | ||
69 | |||
64 | private CancellationToken cancellationToken = CancellationToken.NONE; | 70 | private CancellationToken cancellationToken = CancellationToken.NONE; |
65 | 71 | ||
66 | private final List<Path> extraPaths = new ArrayList<>(); | 72 | private final List<Path> extraPaths = new ArrayList<>(); |
@@ -125,7 +131,7 @@ public class ProblemLoader { | |||
125 | 131 | ||
126 | private XtextResourceSet createResourceSet() { | 132 | private XtextResourceSet createResourceSet() { |
127 | var resourceSet = resourceSetProvider.get(); | 133 | var resourceSet = resourceSetProvider.get(); |
128 | var adapter = ImportAdapter.getOrInstall(resourceSet); | 134 | var adapter = importAdapterProvider.getOrInstall(resourceSet); |
129 | adapter.getLibraryPaths().addAll(0, extraPaths); | 135 | adapter.getLibraryPaths().addAll(0, extraPaths); |
130 | return resourceSet; | 136 | return resourceSet; |
131 | } | 137 | } |
diff --git a/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore b/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore index 6b8f10ea..23ee5a77 100644 --- a/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore +++ b/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore | |||
@@ -399,4 +399,15 @@ | |||
399 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="connectivity" eType="#//Connectivity"/> | 399 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="connectivity" eType="#//Connectivity"/> |
400 | </eClassifiers> | 400 | </eClassifiers> |
401 | <eClassifiers xsi:type="ecore:EDataType" name="Connectivity" instanceClassName="tools.refinery.interpreter.matchers.psystem.basicenumerables.Connectivity"/> | 401 | <eClassifiers xsi:type="ecore:EDataType" name="Connectivity" instanceClassName="tools.refinery.interpreter.matchers.psystem.basicenumerables.Connectivity"/> |
402 | <eClassifiers xsi:type="ecore:EClass" name="OuterJoinNodeRecipe" eSuperTypes="#//ReteNodeRecipe"> | ||
403 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
404 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
405 | <details key="body" value="<%tools.refinery.interpreter.rete.recipes.ProjectionIndexerRecipe%> _parent = this.getParent();
<%tools.refinery.interpreter.rete.recipes.Mask%> _mask = _parent.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
return _sourceIndices.size();"/> | ||
406 | </eAnnotations> | ||
407 | </eOperations> | ||
408 | <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//ProjectionIndexerRecipe" | ||
409 | containment="true" resolveProxies="false"/> | ||
410 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> | ||
411 | </eClassifiers> | ||
412 | <eClassifiers xsi:type="ecore:EClass" name="OuterJoinIndexerRecipe" eSuperTypes="#//IndexerRecipe"/> | ||
402 | </ecore:EPackage> | 413 | </ecore:EPackage> |
diff --git a/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore.license b/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore.license index 03d1d42b..22023c2c 100644 --- a/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore.license +++ b/subprojects/interpreter-rete-recipes/src/main/resources/model/recipes.ecore.license | |||
@@ -1,4 +1,4 @@ | |||
1 | Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro | 1 | Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro |
2 | Copyright (c) 2023 The Refinery Authors <https://refinery.tools> | 2 | Copyright (c) 2023-2024 The Refinery Authors <https://refinery.tools> |
3 | 3 | ||
4 | SPDX-License-Identifier: EPL-2.0 | 4 | SPDX-License-Identifier: EPL-2.0 |
diff --git a/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel b/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel index f7dc7a4e..f156b1a2 100644 --- a/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel +++ b/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | 2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" |
3 | xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-v20.html.

SPDX-License-Identifier: EPL-2.0" | 3 | xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
Copyright (c) 2023-2024 The Refinery Authors <https://refinery.tools>
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-v20.html.

SPDX-License-Identifier: EPL-2.0" |
4 | modelDirectory="/tools.refinery.refinery-interpreter-rete-recipes/src/main/emf-gen" | 4 | modelDirectory="/tools.refinery.refinery-interpreter-rete-recipes/src/main/emf-gen" |
5 | modelPluginID="tools.refinery.refinery-interpreter-rete-recipes" runtimeJar="true" | 5 | modelPluginID="tools.refinery.refinery-interpreter-rete-recipes" runtimeJar="true" |
6 | forceOverwrite="true" modelName="Rete-recipes" updateClasspath="false" nonNLSMarkers="true" | 6 | forceOverwrite="true" modelName="Rete-recipes" updateClasspath="false" nonNLSMarkers="true" |
@@ -170,5 +170,12 @@ | |||
170 | <genOperations ecoreOperation="recipes.ecore#//RepresentativeElectionRecipe/getArity" | 170 | <genOperations ecoreOperation="recipes.ecore#//RepresentativeElectionRecipe/getArity" |
171 | body="return 2;"/> | 171 | body="return 2;"/> |
172 | </genClasses> | 172 | </genClasses> |
173 | <genClasses ecoreClass="recipes.ecore#//OuterJoinNodeRecipe"> | ||
174 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//OuterJoinNodeRecipe/parent"/> | ||
175 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//OuterJoinNodeRecipe/defaultValue"/> | ||
176 | <genOperations ecoreOperation="recipes.ecore#//OuterJoinNodeRecipe/getArity" | ||
177 | body="<%tools.refinery.interpreter.rete.recipes.ProjectionIndexerRecipe%> _parent = this.getParent();
<%tools.refinery.interpreter.rete.recipes.Mask%> _mask = _parent.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
return _sourceIndices.size();"/> | ||
178 | </genClasses> | ||
179 | <genClasses ecoreClass="recipes.ecore#//OuterJoinIndexerRecipe"/> | ||
173 | </genPackages> | 180 | </genPackages> |
174 | </genmodel:GenModel> | 181 | </genmodel:GenModel> |
diff --git a/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license b/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license index 03d1d42b..22023c2c 100644 --- a/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license +++ b/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license | |||
@@ -1,4 +1,4 @@ | |||
1 | Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro | 1 | Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro |
2 | Copyright (c) 2023 The Refinery Authors <https://refinery.tools> | 2 | Copyright (c) 2023-2024 The Refinery Authors <https://refinery.tools> |
3 | 3 | ||
4 | SPDX-License-Identifier: EPL-2.0 | 4 | SPDX-License-Identifier: EPL-2.0 |
diff --git a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/aggregation/LeftJoinNode.java b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/aggregation/LeftJoinNode.java new file mode 100644 index 00000000..9871e3bc --- /dev/null +++ b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/aggregation/LeftJoinNode.java | |||
@@ -0,0 +1,167 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro | ||
3 | * Copyright (c) 2024 The Refinery Authors <https://refinery.tools/> | ||
4 | * This program and the accompanying materials are made available under the | ||
5 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
6 | * http://www.eclipse.org/legal/epl-v20.html. | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package tools.refinery.interpreter.rete.aggregation; | ||
10 | |||
11 | import tools.refinery.interpreter.matchers.tuple.ITuple; | ||
12 | import tools.refinery.interpreter.matchers.tuple.Tuple; | ||
13 | import tools.refinery.interpreter.matchers.tuple.TupleMask; | ||
14 | import tools.refinery.interpreter.matchers.tuple.Tuples; | ||
15 | import tools.refinery.interpreter.matchers.util.Direction; | ||
16 | import tools.refinery.interpreter.matchers.util.timeline.Timeline; | ||
17 | import tools.refinery.interpreter.rete.index.DefaultIndexerListener; | ||
18 | import tools.refinery.interpreter.rete.index.Indexer; | ||
19 | import tools.refinery.interpreter.rete.index.ProjectionIndexer; | ||
20 | import tools.refinery.interpreter.rete.index.StandardIndexer; | ||
21 | import tools.refinery.interpreter.rete.network.Node; | ||
22 | import tools.refinery.interpreter.rete.network.ReteContainer; | ||
23 | import tools.refinery.interpreter.rete.network.StandardNode; | ||
24 | import tools.refinery.interpreter.rete.network.communication.Timestamp; | ||
25 | |||
26 | import java.util.Collection; | ||
27 | import java.util.List; | ||
28 | import java.util.Map; | ||
29 | import java.util.Set; | ||
30 | |||
31 | public class LeftJoinNode extends StandardNode { | ||
32 | private final Object defaultValue; | ||
33 | private ProjectionIndexer projectionIndexer; | ||
34 | private TupleMask projectionMask; | ||
35 | private boolean leftInheritanceOutputMask; | ||
36 | private OuterIndexer outerIndexer = null; | ||
37 | |||
38 | public LeftJoinNode(ReteContainer reteContainer, Object defaultValue) { | ||
39 | super(reteContainer); | ||
40 | this.defaultValue = defaultValue; | ||
41 | } | ||
42 | |||
43 | @Override | ||
44 | public void networkStructureChanged() { | ||
45 | if (reteContainer.isTimelyEvaluation() && reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) { | ||
46 | throw new IllegalStateException(this + " cannot be used in recursive differential dataflow evaluation!"); | ||
47 | } | ||
48 | super.networkStructureChanged(); | ||
49 | } | ||
50 | |||
51 | public void initializeWith(ProjectionIndexer projectionIndexer) { | ||
52 | this.projectionIndexer = projectionIndexer; | ||
53 | projectionMask = projectionIndexer.getMask(); | ||
54 | leftInheritanceOutputMask = isLeftInheritanceOutputMask(projectionMask); | ||
55 | projectionIndexer.attachListener(new DefaultIndexerListener(this) { | ||
56 | @Override | ||
57 | public void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change, | ||
58 | Timestamp timestamp) { | ||
59 | update(direction, updateElement, signature, change, timestamp); | ||
60 | } | ||
61 | }); | ||
62 | } | ||
63 | |||
64 | private static boolean isLeftInheritanceOutputMask(TupleMask mask) { | ||
65 | int size = mask.getSize(); | ||
66 | int sourceWidth = mask.getSourceWidth(); | ||
67 | if (size != sourceWidth - 1) { | ||
68 | throw new IllegalArgumentException("projectionMask should omit a single index, got " + mask); | ||
69 | } | ||
70 | int[] repetitions = new int[sourceWidth]; | ||
71 | for (int i = 0; i < size; i++) { | ||
72 | int index = mask.indices[i]; | ||
73 | int repetition = repetitions[index] + 1; | ||
74 | if (repetition >= 2) { | ||
75 | throw new IllegalArgumentException("Repeated index %d in projectionMask %s".formatted(index, mask)); | ||
76 | } | ||
77 | repetitions[index] = repetition; | ||
78 | } | ||
79 | for (int i = 0; i < size; i++) { | ||
80 | int index = mask.indices[i]; | ||
81 | if (index != i) { | ||
82 | return false; | ||
83 | } | ||
84 | } | ||
85 | return true; | ||
86 | } | ||
87 | |||
88 | protected void update(Direction direction, Tuple updateElement, Tuple signature, boolean change, | ||
89 | Timestamp timestamp) { | ||
90 | propagateUpdate(direction, updateElement, timestamp); | ||
91 | if (outerIndexer != null) { | ||
92 | outerIndexer.update(direction, updateElement, signature, change, timestamp); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | protected Tuple getDefaultTuple(ITuple key) { | ||
97 | if (leftInheritanceOutputMask) { | ||
98 | return Tuples.staticArityFlatTupleOf(key, defaultValue); | ||
99 | } | ||
100 | var objects = new Object[projectionMask.sourceWidth]; | ||
101 | int targetLength = projectionMask.indices.length; | ||
102 | for (int i = 0; i < targetLength; i++) { | ||
103 | int j = projectionMask.indices[i]; | ||
104 | objects[j] = key.get(j); | ||
105 | } | ||
106 | return Tuples.flatTupleOf(objects); | ||
107 | } | ||
108 | |||
109 | @Override | ||
110 | public void pullInto(Collection<Tuple> collector, boolean flush) { | ||
111 | projectionIndexer.getParent().pullInto(collector, flush); | ||
112 | } | ||
113 | |||
114 | @Override | ||
115 | public void pullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) { | ||
116 | projectionIndexer.getParent().pullIntoWithTimeline(collector, flush); | ||
117 | } | ||
118 | |||
119 | @Override | ||
120 | public Set<Tuple> getPulledContents(boolean flush) { | ||
121 | return projectionIndexer.getParent().getPulledContents(flush); | ||
122 | } | ||
123 | |||
124 | public Indexer getOuterIndexer() { | ||
125 | if (outerIndexer == null) { | ||
126 | outerIndexer = new OuterIndexer(); | ||
127 | getCommunicationTracker().registerDependency(this, outerIndexer); | ||
128 | } | ||
129 | return outerIndexer; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * A special non-iterable index that retrieves the aggregated, packed result (signature+aggregate) for the original | ||
134 | * signature. | ||
135 | * | ||
136 | * @author Gabor Bergmann | ||
137 | */ | ||
138 | class OuterIndexer extends StandardIndexer { | ||
139 | public OuterIndexer() { | ||
140 | super(LeftJoinNode.this.reteContainer, LeftJoinNode.this.projectionMask); | ||
141 | this.parent = LeftJoinNode.this; | ||
142 | } | ||
143 | |||
144 | @Override | ||
145 | public Collection<Tuple> get(Tuple signature) { | ||
146 | var collection = projectionIndexer.get(signature); | ||
147 | if (collection == null || collection.isEmpty()) { | ||
148 | return List.of(getDefaultTuple(signature)); | ||
149 | } | ||
150 | return collection; | ||
151 | } | ||
152 | |||
153 | public void update(Direction direction, Tuple updateElement, Tuple signature, boolean change, | ||
154 | Timestamp timestamp) { | ||
155 | propagate(direction, updateElement, signature, false, timestamp); | ||
156 | if (change) { | ||
157 | var defaultTuple = getDefaultTuple(signature); | ||
158 | propagate(direction.opposite(), defaultTuple, signature, false, timestamp); | ||
159 | } | ||
160 | } | ||
161 | |||
162 | @Override | ||
163 | public Node getActiveNode() { | ||
164 | return projectionIndexer.getActiveNode(); | ||
165 | } | ||
166 | } | ||
167 | } | ||
diff --git a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/construction/plancompiler/ReteRecipeCompiler.java b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/construction/plancompiler/ReteRecipeCompiler.java index f84eae0a..52a4de41 100644 --- a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/construction/plancompiler/ReteRecipeCompiler.java +++ b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/construction/plancompiler/ReteRecipeCompiler.java | |||
@@ -10,6 +10,7 @@ | |||
10 | package tools.refinery.interpreter.rete.construction.plancompiler; | 10 | package tools.refinery.interpreter.rete.construction.plancompiler; |
11 | 11 | ||
12 | import org.apache.log4j.Logger; | 12 | import org.apache.log4j.Logger; |
13 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
13 | import tools.refinery.interpreter.matchers.InterpreterRuntimeException; | 14 | import tools.refinery.interpreter.matchers.InterpreterRuntimeException; |
14 | import tools.refinery.interpreter.matchers.backend.CommonQueryHintOptions; | 15 | import tools.refinery.interpreter.matchers.backend.CommonQueryHintOptions; |
15 | import tools.refinery.interpreter.matchers.backend.IQueryBackendHintProvider; | 16 | import tools.refinery.interpreter.matchers.backend.IQueryBackendHintProvider; |
@@ -53,782 +54,843 @@ import java.util.function.Function; | |||
53 | * {@link CompiledSubPlan}. | 54 | * {@link CompiledSubPlan}. |
54 | * | 55 | * |
55 | * @author Bergmann Gabor | 56 | * @author Bergmann Gabor |
56 | * | ||
57 | */ | 57 | */ |
58 | public class ReteRecipeCompiler { | 58 | public class ReteRecipeCompiler { |
59 | 59 | ||
60 | private final IQueryPlannerStrategy plannerStrategy; | 60 | private final IQueryPlannerStrategy plannerStrategy; |
61 | private final IQueryMetaContext metaContext; | 61 | private final IQueryMetaContext metaContext; |
62 | private final IQueryBackendHintProvider hintProvider; | 62 | private final IQueryBackendHintProvider hintProvider; |
63 | private final PDisjunctionRewriter normalizer; | 63 | private final PDisjunctionRewriter normalizer; |
64 | private final QueryAnalyzer queryAnalyzer; | 64 | private final QueryAnalyzer queryAnalyzer; |
65 | private final Logger logger; | 65 | private final Logger logger; |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * @since 2.2 | 68 | * @since 2.2 |
69 | */ | 69 | */ |
70 | protected final boolean deleteAndRederiveEvaluation; | 70 | protected final boolean deleteAndRederiveEvaluation; |
71 | /** | 71 | /** |
72 | * @since 2.4 | 72 | * @since 2.4 |
73 | */ | 73 | */ |
74 | protected final TimelyConfiguration timelyEvaluation; | 74 | protected final TimelyConfiguration timelyEvaluation; |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * @since 1.5 | 77 | * @since 1.5 |
78 | */ | 78 | */ |
79 | public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, Logger logger, IQueryMetaContext metaContext, | 79 | public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, Logger logger, IQueryMetaContext metaContext, |
80 | IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer) { | 80 | IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, |
81 | this(plannerStrategy, logger, metaContext, queryCacheContext, hintProvider, queryAnalyzer, false, null); | 81 | QueryAnalyzer queryAnalyzer) { |
82 | } | 82 | this(plannerStrategy, logger, metaContext, queryCacheContext, hintProvider, queryAnalyzer, false, null); |
83 | 83 | } | |
84 | /** | 84 | |
85 | * @since 2.4 | 85 | /** |
86 | */ | 86 | * @since 2.4 |
87 | public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, Logger logger, IQueryMetaContext metaContext, | 87 | */ |
88 | IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer, | 88 | public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, Logger logger, IQueryMetaContext metaContext, |
89 | boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyEvaluation) { | 89 | IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, |
90 | super(); | 90 | QueryAnalyzer queryAnalyzer, |
91 | this.deleteAndRederiveEvaluation = deleteAndRederiveEvaluation; | 91 | boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyEvaluation) { |
92 | this.timelyEvaluation = timelyEvaluation; | 92 | super(); |
93 | this.plannerStrategy = plannerStrategy; | 93 | this.deleteAndRederiveEvaluation = deleteAndRederiveEvaluation; |
94 | this.logger = logger; | 94 | this.timelyEvaluation = timelyEvaluation; |
95 | this.metaContext = metaContext; | 95 | this.plannerStrategy = plannerStrategy; |
96 | this.queryAnalyzer = queryAnalyzer; | 96 | this.logger = logger; |
97 | this.normalizer = new PDisjunctionRewriterCacher(new SurrogateQueryRewriter(), | 97 | this.metaContext = metaContext; |
98 | new PBodyNormalizer(metaContext) { | 98 | this.queryAnalyzer = queryAnalyzer; |
99 | 99 | this.normalizer = new PDisjunctionRewriterCacher(new SurrogateQueryRewriter(), | |
100 | @Override | 100 | new PBodyNormalizer(metaContext) { |
101 | protected boolean shouldExpandWeakenedAlternatives(PQuery query) { | 101 | |
102 | QueryEvaluationHint hint = ReteRecipeCompiler.this.hintProvider.getQueryEvaluationHint(query); | 102 | @Override |
103 | Boolean expandWeakenedAlternativeConstraints = ReteHintOptions.expandWeakenedAlternativeConstraints | 103 | protected boolean shouldExpandWeakenedAlternatives(PQuery query) { |
104 | .getValueOrDefault(hint); | 104 | QueryEvaluationHint hint = ReteRecipeCompiler.this.hintProvider.getQueryEvaluationHint(query); |
105 | return expandWeakenedAlternativeConstraints; | 105 | Boolean expandWeakenedAlternativeConstraints = |
106 | } | 106 | ReteHintOptions.expandWeakenedAlternativeConstraints |
107 | 107 | .getValueOrDefault(hint); | |
108 | }); | 108 | return expandWeakenedAlternativeConstraints; |
109 | this.hintProvider = hintProvider; | 109 | } |
110 | } | 110 | |
111 | 111 | }); | |
112 | static final RecipesFactory FACTORY = RecipesFactory.eINSTANCE; | 112 | this.hintProvider = hintProvider; |
113 | 113 | } | |
114 | // INTERNALLY CACHED | 114 | |
115 | private Map<PBody, SubPlan> plannerCache = new HashMap<PBody, SubPlan>(); | 115 | static final RecipesFactory FACTORY = RecipesFactory.eINSTANCE; |
116 | private Set<PBody> planningInProgress = new HashSet<PBody>(); | 116 | |
117 | 117 | // INTERNALLY CACHED | |
118 | private Map<PQuery, CompiledQuery> queryCompilerCache = new HashMap<PQuery, CompiledQuery>(); | 118 | private Map<PBody, SubPlan> plannerCache = new HashMap<PBody, SubPlan>(); |
119 | private Set<PQuery> compilationInProgress = new HashSet<PQuery>(); | 119 | private Set<PBody> planningInProgress = new HashSet<PBody>(); |
120 | private IMultiLookup<PQuery, RecursionCutoffPoint> recursionCutoffPoints = CollectionsFactory.createMultiLookup(Object.class, MemoryType.SETS, Object.class); | 120 | |
121 | private Map<SubPlan, CompiledSubPlan> subPlanCompilerCache = new HashMap<SubPlan, CompiledSubPlan>(); | 121 | private Map<PQuery, CompiledQuery> queryCompilerCache = new HashMap<PQuery, CompiledQuery>(); |
122 | private Map<ReteNodeRecipe, SubPlan> compilerBackTrace = new HashMap<ReteNodeRecipe, SubPlan>(); | 122 | private Set<PQuery> compilationInProgress = new HashSet<PQuery>(); |
123 | 123 | private IMultiLookup<PQuery, RecursionCutoffPoint> recursionCutoffPoints = | |
124 | /** | 124 | CollectionsFactory.createMultiLookup(Object.class, MemoryType.SETS, Object.class); |
125 | * Clears internal state | 125 | private Map<SubPlan, CompiledSubPlan> subPlanCompilerCache = new HashMap<SubPlan, CompiledSubPlan>(); |
126 | */ | 126 | private Map<ReteNodeRecipe, SubPlan> compilerBackTrace = new HashMap<ReteNodeRecipe, SubPlan>(); |
127 | public void reset() { | 127 | |
128 | plannerCache.clear(); | 128 | /** |
129 | planningInProgress.clear(); | 129 | * Clears internal state |
130 | queryCompilerCache.clear(); | 130 | */ |
131 | subPlanCompilerCache.clear(); | 131 | public void reset() { |
132 | compilerBackTrace.clear(); | 132 | plannerCache.clear(); |
133 | } | 133 | planningInProgress.clear(); |
134 | 134 | queryCompilerCache.clear(); | |
135 | /** | 135 | subPlanCompilerCache.clear(); |
136 | * Returns a {@link CompiledQuery} compiled from a query | 136 | compilerBackTrace.clear(); |
137 | * @throws InterpreterRuntimeException | 137 | } |
138 | */ | 138 | |
139 | public CompiledQuery getCompiledForm(PQuery query) { | 139 | /** |
140 | CompiledQuery compiled = queryCompilerCache.get(query); | 140 | * Returns a {@link CompiledQuery} compiled from a query |
141 | if (compiled == null) { | 141 | * |
142 | 142 | * @throws InterpreterRuntimeException | |
143 | IRewriterTraceCollector traceCollector = CommonQueryHintOptions.normalizationTraceCollector | 143 | */ |
144 | .getValueOrDefault(hintProvider.getQueryEvaluationHint(query)); | 144 | public CompiledQuery getCompiledForm(PQuery query) { |
145 | if (traceCollector != null) { | 145 | CompiledQuery compiled = queryCompilerCache.get(query); |
146 | traceCollector.addTrace(query, query); | 146 | if (compiled == null) { |
147 | } | 147 | |
148 | 148 | IRewriterTraceCollector traceCollector = CommonQueryHintOptions.normalizationTraceCollector | |
149 | boolean reentrant = !compilationInProgress.add(query); | 149 | .getValueOrDefault(hintProvider.getQueryEvaluationHint(query)); |
150 | if (reentrant) { // oops, recursion into body in progress | 150 | if (traceCollector != null) { |
151 | RecursionCutoffPoint cutoffPoint = new RecursionCutoffPoint(query, getHints(query), metaContext, | 151 | traceCollector.addTrace(query, query); |
152 | deleteAndRederiveEvaluation, timelyEvaluation); | 152 | } |
153 | recursionCutoffPoints.addPair(query, cutoffPoint); | 153 | |
154 | return cutoffPoint.getCompiledQuery(); | 154 | boolean reentrant = !compilationInProgress.add(query); |
155 | } else { // not reentrant, therefore no recursion, do the compilation | 155 | if (reentrant) { // oops, recursion into body in progress |
156 | try { | 156 | RecursionCutoffPoint cutoffPoint = new RecursionCutoffPoint(query, getHints(query), metaContext, |
157 | compiled = compileProduction(query); | 157 | deleteAndRederiveEvaluation, timelyEvaluation); |
158 | queryCompilerCache.put(query, compiled); | 158 | recursionCutoffPoints.addPair(query, cutoffPoint); |
159 | // backTrace.put(compiled.getRecipe(), plan); | 159 | return cutoffPoint.getCompiledQuery(); |
160 | 160 | } else { // not reentrant, therefore no recursion, do the compilation | |
161 | // if this was a recursive query, mend all points where recursion was cut off | 161 | try { |
162 | for (RecursionCutoffPoint cutoffPoint : recursionCutoffPoints.lookupOrEmpty(query)) { | 162 | compiled = compileProduction(query); |
163 | cutoffPoint.mend(compiled); | 163 | queryCompilerCache.put(query, compiled); |
164 | } | 164 | // backTrace.put(compiled.getRecipe(), plan); |
165 | } finally { | 165 | |
166 | compilationInProgress.remove(query); | 166 | // if this was a recursive query, mend all points where recursion was cut off |
167 | } | 167 | for (RecursionCutoffPoint cutoffPoint : recursionCutoffPoints.lookupOrEmpty(query)) { |
168 | } | 168 | cutoffPoint.mend(compiled); |
169 | } | 169 | } |
170 | return compiled; | 170 | } finally { |
171 | } | 171 | compilationInProgress.remove(query); |
172 | 172 | } | |
173 | /** | 173 | } |
174 | * Returns a {@link CompiledSubPlan} compiled from a query plan | 174 | } |
175 | * @throws InterpreterRuntimeException | 175 | return compiled; |
176 | */ | 176 | } |
177 | public CompiledSubPlan getCompiledForm(SubPlan plan) { | 177 | |
178 | CompiledSubPlan compiled = subPlanCompilerCache.get(plan); | 178 | /** |
179 | if (compiled == null) { | 179 | * Returns a {@link CompiledSubPlan} compiled from a query plan |
180 | compiled = doCompileDispatch(plan); | 180 | * |
181 | subPlanCompilerCache.put(plan, compiled); | 181 | * @throws InterpreterRuntimeException |
182 | compilerBackTrace.put(compiled.getRecipe(), plan); | 182 | */ |
183 | } | 183 | public CompiledSubPlan getCompiledForm(SubPlan plan) { |
184 | return compiled; | 184 | CompiledSubPlan compiled = subPlanCompilerCache.get(plan); |
185 | } | 185 | if (compiled == null) { |
186 | 186 | compiled = doCompileDispatch(plan); | |
187 | /** | 187 | subPlanCompilerCache.put(plan, compiled); |
188 | * @throws InterpreterRuntimeException | 188 | compilerBackTrace.put(compiled.getRecipe(), plan); |
189 | */ | 189 | } |
190 | public SubPlan getPlan(PBody pBody) { | 190 | return compiled; |
191 | // if the query is not marked as being compiled, initiate compilation | 191 | } |
192 | // (this is useful in case of recursion if getPlan() is the entry point) | 192 | |
193 | PQuery pQuery = pBody.getPattern(); | 193 | /** |
194 | if (!compilationInProgress.contains(pQuery)) | 194 | * @throws InterpreterRuntimeException |
195 | getCompiledForm(pQuery); | 195 | */ |
196 | 196 | public SubPlan getPlan(PBody pBody) { | |
197 | // Is the plan already cached? | 197 | // if the query is not marked as being compiled, initiate compilation |
198 | SubPlan plan = plannerCache.get(pBody); | 198 | // (this is useful in case of recursion if getPlan() is the entry point) |
199 | if (plan == null) { | 199 | PQuery pQuery = pBody.getPattern(); |
200 | boolean reentrant = !planningInProgress.add(pBody); | 200 | if (!compilationInProgress.contains(pQuery)) |
201 | if (reentrant) { // oops, recursion into body in progress | 201 | getCompiledForm(pQuery); |
202 | throw new IllegalArgumentException( | 202 | |
203 | "Planning-level recursion unsupported: " + pBody.getPattern().getFullyQualifiedName()); | 203 | // Is the plan already cached? |
204 | } else { // not reentrant, therefore no recursion, do the planning | 204 | SubPlan plan = plannerCache.get(pBody); |
205 | try { | 205 | if (plan == null) { |
206 | plan = plannerStrategy.plan(pBody, logger, metaContext); | 206 | boolean reentrant = !planningInProgress.add(pBody); |
207 | plannerCache.put(pBody, plan); | 207 | if (reentrant) { // oops, recursion into body in progress |
208 | } finally { | 208 | throw new IllegalArgumentException( |
209 | planningInProgress.remove(pBody); | 209 | "Planning-level recursion unsupported: " + pBody.getPattern().getFullyQualifiedName()); |
210 | } | 210 | } else { // not reentrant, therefore no recursion, do the planning |
211 | } | 211 | try { |
212 | } | 212 | plan = plannerStrategy.plan(pBody, logger, metaContext); |
213 | return plan; | 213 | plannerCache.put(pBody, plan); |
214 | } | 214 | } finally { |
215 | 215 | planningInProgress.remove(pBody); | |
216 | private CompiledQuery compileProduction(PQuery query) { | 216 | } |
217 | Collection<SubPlan> bodyPlans = new ArrayList<SubPlan>(); | 217 | } |
218 | normalizer.setTraceCollector(CommonQueryHintOptions.normalizationTraceCollector | 218 | } |
219 | .getValueOrDefault(hintProvider.getQueryEvaluationHint(query))); | 219 | return plan; |
220 | for (PBody pBody : normalizer.rewrite(query).getBodies()) { | 220 | } |
221 | SubPlan bodyPlan = getPlan(pBody); | 221 | |
222 | bodyPlans.add(bodyPlan); | 222 | private CompiledQuery compileProduction(PQuery query) { |
223 | } | 223 | Collection<SubPlan> bodyPlans = new ArrayList<SubPlan>(); |
224 | return doCompileProduction(query, bodyPlans); | 224 | normalizer.setTraceCollector(CommonQueryHintOptions.normalizationTraceCollector |
225 | } | 225 | .getValueOrDefault(hintProvider.getQueryEvaluationHint(query))); |
226 | 226 | for (PBody pBody : normalizer.rewrite(query).getBodies()) { | |
227 | private CompiledQuery doCompileProduction(PQuery query, Collection<SubPlan> bodies) { | 227 | SubPlan bodyPlan = getPlan(pBody); |
228 | // TODO skip production node if there is just one body and no projection needed? | 228 | bodyPlans.add(bodyPlan); |
229 | Map<PBody, RecipeTraceInfo> bodyFinalTraces = new HashMap<PBody, RecipeTraceInfo>(); | 229 | } |
230 | Collection<ReteNodeRecipe> bodyFinalRecipes = new HashSet<ReteNodeRecipe>(); | 230 | return doCompileProduction(query, bodyPlans); |
231 | 231 | } | |
232 | for (SubPlan bodyFinalPlan : bodies) { | 232 | |
233 | // skip over any projections at the end | 233 | private CompiledQuery doCompileProduction(PQuery query, Collection<SubPlan> bodies) { |
234 | bodyFinalPlan = BuildHelper.eliminateTrailingProjections(bodyFinalPlan); | 234 | // TODO skip production node if there is just one body and no projection needed? |
235 | 235 | Map<PBody, RecipeTraceInfo> bodyFinalTraces = new HashMap<PBody, RecipeTraceInfo>(); | |
236 | // TODO checkAndTrimEqualVariables may introduce superfluous trim, | 236 | Collection<ReteNodeRecipe> bodyFinalRecipes = new HashSet<ReteNodeRecipe>(); |
237 | // but whatever (no uniqueness enforcer needed) | 237 | |
238 | 238 | for (SubPlan bodyFinalPlan : bodies) { | |
239 | // compile body | 239 | // skip over any projections at the end |
240 | final CompiledSubPlan compiledBody = getCompiledForm(bodyFinalPlan); | 240 | bodyFinalPlan = BuildHelper.eliminateTrailingProjections(bodyFinalPlan); |
241 | 241 | ||
242 | // project to parameter list | 242 | // TODO checkAndTrimEqualVariables may introduce superfluous trim, |
243 | RecipeTraceInfo finalTrace = projectBodyFinalToParameters(compiledBody, false); | 243 | // but whatever (no uniqueness enforcer needed) |
244 | 244 | ||
245 | bodyFinalTraces.put(bodyFinalPlan.getBody(), finalTrace); | 245 | // compile body |
246 | bodyFinalRecipes.add(finalTrace.getRecipe()); | 246 | final CompiledSubPlan compiledBody = getCompiledForm(bodyFinalPlan); |
247 | } | 247 | |
248 | 248 | // project to parameter list | |
249 | CompiledQuery compiled = CompilerHelper.makeQueryTrace(query, bodyFinalTraces, bodyFinalRecipes, | 249 | RecipeTraceInfo finalTrace = projectBodyFinalToParameters(compiledBody, false); |
250 | getHints(query), metaContext, deleteAndRederiveEvaluation, timelyEvaluation); | 250 | |
251 | 251 | bodyFinalTraces.put(bodyFinalPlan.getBody(), finalTrace); | |
252 | return compiled; | 252 | bodyFinalRecipes.add(finalTrace.getRecipe()); |
253 | } | 253 | } |
254 | 254 | ||
255 | private CompiledSubPlan doCompileDispatch(SubPlan plan) { | 255 | CompiledQuery compiled = CompilerHelper.makeQueryTrace(query, bodyFinalTraces, bodyFinalRecipes, |
256 | final POperation operation = plan.getOperation(); | 256 | getHints(query), metaContext, deleteAndRederiveEvaluation, timelyEvaluation); |
257 | if (operation instanceof PEnumerate) { | 257 | |
258 | return doCompileEnumerate(((PEnumerate) operation).getEnumerablePConstraint(), plan); | 258 | return compiled; |
259 | } else if (operation instanceof PApply) { | 259 | } |
260 | final PConstraint pConstraint = ((PApply) operation).getPConstraint(); | 260 | |
261 | if (pConstraint instanceof EnumerablePConstraint) { | 261 | private CompiledSubPlan doCompileDispatch(SubPlan plan) { |
262 | CompiledSubPlan primaryParent = getCompiledForm(plan.getParentPlans().get(0)); | 262 | final POperation operation = plan.getOperation(); |
263 | PlanningTrace secondaryParent = doEnumerateDispatch(plan, (EnumerablePConstraint) pConstraint); | 263 | if (operation instanceof PEnumerate) { |
264 | return compileToNaturalJoin(plan, primaryParent, secondaryParent); | 264 | return doCompileEnumerate(((PEnumerate) operation).getEnumerablePConstraint(), plan); |
265 | } else if (pConstraint instanceof DeferredPConstraint) { | 265 | } else if (operation instanceof PApply) { |
266 | return doDeferredDispatch((DeferredPConstraint) pConstraint, plan); | 266 | final PConstraint pConstraint = ((PApply) operation).getPConstraint(); |
267 | } else { | 267 | if (pConstraint instanceof EnumerablePConstraint) { |
268 | throw new IllegalArgumentException("Unsupported PConstraint in query plan: " + plan.toShortString()); | 268 | CompiledSubPlan primaryParent = getCompiledForm(plan.getParentPlans().get(0)); |
269 | } | 269 | PlanningTrace secondaryParent = doEnumerateDispatch(plan, (EnumerablePConstraint) pConstraint); |
270 | } else if (operation instanceof PJoin) { | 270 | return compileToNaturalJoin(plan, primaryParent, secondaryParent); |
271 | return doCompileJoin((PJoin) operation, plan); | 271 | } else if (pConstraint instanceof DeferredPConstraint) { |
272 | } else if (operation instanceof PProject) { | 272 | return doDeferredDispatch((DeferredPConstraint) pConstraint, plan); |
273 | return doCompileProject((PProject) operation, plan); | 273 | } else { |
274 | } else if (operation instanceof PStart) { | 274 | throw new IllegalArgumentException("Unsupported PConstraint in query plan: " + plan.toShortString()); |
275 | return doCompileStart((PStart) operation, plan); | 275 | } |
276 | } else { | 276 | } else if (operation instanceof PJoin) { |
277 | throw new IllegalArgumentException("Unsupported POperation in query plan: " + plan.toShortString()); | 277 | return doCompileJoin((PJoin) operation, plan); |
278 | } | 278 | } else if (operation instanceof PProject) { |
279 | } | 279 | return doCompileProject((PProject) operation, plan); |
280 | 280 | } else if (operation instanceof PStart) { | |
281 | private CompiledSubPlan doDeferredDispatch(DeferredPConstraint constraint, SubPlan plan) { | 281 | return doCompileStart((PStart) operation, plan); |
282 | final SubPlan parentPlan = plan.getParentPlans().get(0); | 282 | } else { |
283 | final CompiledSubPlan parentCompiled = getCompiledForm(parentPlan); | 283 | throw new IllegalArgumentException("Unsupported POperation in query plan: " + plan.toShortString()); |
284 | if (constraint instanceof Equality) { | 284 | } |
285 | return compileDeferred((Equality) constraint, plan, parentPlan, parentCompiled); | 285 | } |
286 | } else if (constraint instanceof ExportedParameter) { | 286 | |
287 | return compileDeferred((ExportedParameter) constraint, plan, parentPlan, parentCompiled); | 287 | private CompiledSubPlan doDeferredDispatch(DeferredPConstraint constraint, SubPlan plan) { |
288 | } else if (constraint instanceof Inequality) { | 288 | final SubPlan parentPlan = plan.getParentPlans().get(0); |
289 | return compileDeferred((Inequality) constraint, plan, parentPlan, parentCompiled); | 289 | final CompiledSubPlan parentCompiled = getCompiledForm(parentPlan); |
290 | } else if (constraint instanceof NegativePatternCall) { | 290 | if (constraint instanceof Equality) { |
291 | return compileDeferred((NegativePatternCall) constraint, plan, parentPlan, parentCompiled); | 291 | return compileDeferred((Equality) constraint, plan, parentPlan, parentCompiled); |
292 | } else if (constraint instanceof PatternMatchCounter) { | 292 | } else if (constraint instanceof ExportedParameter) { |
293 | return compileDeferred((PatternMatchCounter) constraint, plan, parentPlan, parentCompiled); | 293 | return compileDeferred((ExportedParameter) constraint, plan, parentPlan, parentCompiled); |
294 | } else if (constraint instanceof AggregatorConstraint) { | 294 | } else if (constraint instanceof Inequality) { |
295 | return compileDeferred((AggregatorConstraint) constraint, plan, parentPlan, parentCompiled); | 295 | return compileDeferred((Inequality) constraint, plan, parentPlan, parentCompiled); |
296 | } else if (constraint instanceof ExpressionEvaluation) { | 296 | } else if (constraint instanceof NegativePatternCall) { |
297 | return compileDeferred((ExpressionEvaluation) constraint, plan, parentPlan, parentCompiled); | 297 | return compileDeferred((NegativePatternCall) constraint, plan, parentPlan, parentCompiled); |
298 | } else if (constraint instanceof TypeFilterConstraint) { | 298 | } else if (constraint instanceof PatternMatchCounter) { |
299 | return compileDeferred((TypeFilterConstraint) constraint, plan, parentPlan, parentCompiled); | 299 | return compileDeferred((PatternMatchCounter) constraint, plan, parentPlan, parentCompiled); |
300 | } | 300 | } else if (constraint instanceof AggregatorConstraint) { |
301 | throw new UnsupportedOperationException("Unknown deferred constraint " + constraint); | 301 | return compileDeferred((AggregatorConstraint) constraint, plan, parentPlan, parentCompiled); |
302 | } | 302 | } else if (constraint instanceof LeftJoinConstraint leftJoinConstraint) { |
303 | 303 | return compileDeferred(leftJoinConstraint, plan, parentCompiled); | |
304 | private CompiledSubPlan compileDeferred(Equality constraint, SubPlan plan, SubPlan parentPlan, | 304 | } else if (constraint instanceof ExpressionEvaluation) { |
305 | CompiledSubPlan parentCompiled) { | 305 | return compileDeferred((ExpressionEvaluation) constraint, plan, parentPlan, parentCompiled); |
306 | if (constraint.isMoot()) | 306 | } else if (constraint instanceof TypeFilterConstraint) { |
307 | return parentCompiled.cloneFor(plan); | 307 | return compileDeferred((TypeFilterConstraint) constraint, plan, parentPlan, parentCompiled); |
308 | 308 | } | |
309 | Integer index1 = parentCompiled.getPosMapping().get(constraint.getWho()); | 309 | throw new UnsupportedOperationException("Unknown deferred constraint " + constraint); |
310 | Integer index2 = parentCompiled.getPosMapping().get(constraint.getWithWhom()); | 310 | } |
311 | 311 | ||
312 | if (index1 != null && index2 != null && index1.intValue() != index2.intValue()) { | 312 | private CompiledSubPlan compileDeferred(Equality constraint, SubPlan plan, SubPlan parentPlan, |
313 | Integer indexLower = Math.min(index1, index2); | 313 | CompiledSubPlan parentCompiled) { |
314 | Integer indexHigher = Math.max(index1, index2); | 314 | if (constraint.isMoot()) |
315 | 315 | return parentCompiled.cloneFor(plan); | |
316 | EqualityFilterRecipe equalityFilterRecipe = FACTORY.createEqualityFilterRecipe(); | 316 | |
317 | equalityFilterRecipe.setParent(parentCompiled.getRecipe()); | 317 | Integer index1 = parentCompiled.getPosMapping().get(constraint.getWho()); |
318 | equalityFilterRecipe.getIndices().add(indexLower); | 318 | Integer index2 = parentCompiled.getPosMapping().get(constraint.getWithWhom()); |
319 | equalityFilterRecipe.getIndices().add(indexHigher); | 319 | |
320 | 320 | if (index1 != null && index2 != null && index1.intValue() != index2.intValue()) { | |
321 | return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), equalityFilterRecipe, parentCompiled); | 321 | Integer indexLower = Math.min(index1, index2); |
322 | } else { | 322 | Integer indexHigher = Math.max(index1, index2); |
323 | throw new IllegalArgumentException(String.format("Unable to interpret %s after compiled parent %s", | 323 | |
324 | plan.toShortString(), parentCompiled.toString())); | 324 | EqualityFilterRecipe equalityFilterRecipe = FACTORY.createEqualityFilterRecipe(); |
325 | } | 325 | equalityFilterRecipe.setParent(parentCompiled.getRecipe()); |
326 | } | 326 | equalityFilterRecipe.getIndices().add(indexLower); |
327 | 327 | equalityFilterRecipe.getIndices().add(indexHigher); | |
328 | /** | 328 | |
329 | * Precondition: constantTrace must map to a ConstantRecipe, and all of its variables must be contained in | 329 | return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), equalityFilterRecipe, parentCompiled); |
330 | * toFilterTrace. | 330 | } else { |
331 | */ | 331 | throw new IllegalArgumentException(String.format("Unable to interpret %s after compiled parent %s", |
332 | private CompiledSubPlan compileConstantFiltering(SubPlan plan, PlanningTrace toFilterTrace, | 332 | plan.toShortString(), parentCompiled.toString())); |
333 | ConstantRecipe constantRecipe, List<PVariable> filteredVariables) { | 333 | } |
334 | PlanningTrace resultTrace = toFilterTrace; | 334 | } |
335 | 335 | ||
336 | int constantVariablesSize = filteredVariables.size(); | 336 | /** |
337 | for (int i = 0; i < constantVariablesSize; ++i) { | 337 | * Precondition: constantTrace must map to a ConstantRecipe, and all of its variables must be contained in |
338 | Object constantValue = constantRecipe.getConstantValues().get(i); | 338 | * toFilterTrace. |
339 | PVariable filteredVariable = filteredVariables.get(i); | 339 | */ |
340 | int filteredColumn = resultTrace.getVariablesTuple().indexOf(filteredVariable); | 340 | private CompiledSubPlan compileConstantFiltering(SubPlan plan, PlanningTrace toFilterTrace, |
341 | 341 | ConstantRecipe constantRecipe, List<PVariable> filteredVariables) { | |
342 | DiscriminatorDispatcherRecipe dispatcherRecipe = FACTORY.createDiscriminatorDispatcherRecipe(); | 342 | PlanningTrace resultTrace = toFilterTrace; |
343 | dispatcherRecipe.setDiscriminationColumnIndex(filteredColumn); | 343 | |
344 | dispatcherRecipe.setParent(resultTrace.getRecipe()); | 344 | int constantVariablesSize = filteredVariables.size(); |
345 | 345 | for (int i = 0; i < constantVariablesSize; ++i) { | |
346 | PlanningTrace dispatcherTrace = new PlanningTrace(plan, resultTrace.getVariablesTuple(), dispatcherRecipe, | 346 | Object constantValue = constantRecipe.getConstantValues().get(i); |
347 | resultTrace); | 347 | PVariable filteredVariable = filteredVariables.get(i); |
348 | 348 | int filteredColumn = resultTrace.getVariablesTuple().indexOf(filteredVariable); | |
349 | DiscriminatorBucketRecipe bucketRecipe = FACTORY.createDiscriminatorBucketRecipe(); | 349 | |
350 | bucketRecipe.setBucketKey(constantValue); | 350 | DiscriminatorDispatcherRecipe dispatcherRecipe = FACTORY.createDiscriminatorDispatcherRecipe(); |
351 | bucketRecipe.setParent(dispatcherRecipe); | 351 | dispatcherRecipe.setDiscriminationColumnIndex(filteredColumn); |
352 | 352 | dispatcherRecipe.setParent(resultTrace.getRecipe()); | |
353 | PlanningTrace bucketTrace = new PlanningTrace(plan, dispatcherTrace.getVariablesTuple(), bucketRecipe, | 353 | |
354 | dispatcherTrace); | 354 | PlanningTrace dispatcherTrace = new PlanningTrace(plan, resultTrace.getVariablesTuple(), dispatcherRecipe, |
355 | 355 | resultTrace); | |
356 | resultTrace = bucketTrace; | 356 | |
357 | } | 357 | DiscriminatorBucketRecipe bucketRecipe = FACTORY.createDiscriminatorBucketRecipe(); |
358 | 358 | bucketRecipe.setBucketKey(constantValue); | |
359 | return resultTrace.cloneFor(plan); | 359 | bucketRecipe.setParent(dispatcherRecipe); |
360 | } | 360 | |
361 | 361 | PlanningTrace bucketTrace = new PlanningTrace(plan, dispatcherTrace.getVariablesTuple(), bucketRecipe, | |
362 | private CompiledSubPlan compileDeferred(ExportedParameter constraint, SubPlan plan, SubPlan parentPlan, | 362 | dispatcherTrace); |
363 | CompiledSubPlan parentCompiled) { | 363 | |
364 | return parentCompiled.cloneFor(plan); | 364 | resultTrace = bucketTrace; |
365 | } | 365 | } |
366 | 366 | ||
367 | private CompiledSubPlan compileDeferred(Inequality constraint, SubPlan plan, SubPlan parentPlan, | 367 | return resultTrace.cloneFor(plan); |
368 | CompiledSubPlan parentCompiled) { | 368 | } |
369 | if (constraint.isEliminable()) | 369 | |
370 | return parentCompiled.cloneFor(plan); | 370 | private CompiledSubPlan compileDeferred(ExportedParameter constraint, SubPlan plan, SubPlan parentPlan, |
371 | 371 | CompiledSubPlan parentCompiled) { | |
372 | Integer index1 = parentCompiled.getPosMapping().get(constraint.getWho()); | 372 | return parentCompiled.cloneFor(plan); |
373 | Integer index2 = parentCompiled.getPosMapping().get(constraint.getWithWhom()); | 373 | } |
374 | 374 | ||
375 | if (index1 != null && index2 != null && index1.intValue() != index2.intValue()) { | 375 | private CompiledSubPlan compileDeferred(Inequality constraint, SubPlan plan, SubPlan parentPlan, |
376 | Integer indexLower = Math.min(index1, index2); | 376 | CompiledSubPlan parentCompiled) { |
377 | Integer indexHigher = Math.max(index1, index2); | 377 | if (constraint.isEliminable()) |
378 | 378 | return parentCompiled.cloneFor(plan); | |
379 | InequalityFilterRecipe inequalityFilterRecipe = FACTORY.createInequalityFilterRecipe(); | 379 | |
380 | inequalityFilterRecipe.setParent(parentCompiled.getRecipe()); | 380 | Integer index1 = parentCompiled.getPosMapping().get(constraint.getWho()); |
381 | inequalityFilterRecipe.setSubject(indexLower); | 381 | Integer index2 = parentCompiled.getPosMapping().get(constraint.getWithWhom()); |
382 | inequalityFilterRecipe.getInequals().add(indexHigher); | 382 | |
383 | 383 | if (index1 != null && index2 != null && index1.intValue() != index2.intValue()) { | |
384 | return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), inequalityFilterRecipe, | 384 | Integer indexLower = Math.min(index1, index2); |
385 | parentCompiled); | 385 | Integer indexHigher = Math.max(index1, index2); |
386 | } else { | 386 | |
387 | throw new IllegalArgumentException(String.format("Unable to interpret %s after compiled parent %s", | 387 | InequalityFilterRecipe inequalityFilterRecipe = FACTORY.createInequalityFilterRecipe(); |
388 | plan.toShortString(), parentCompiled.toString())); | 388 | inequalityFilterRecipe.setParent(parentCompiled.getRecipe()); |
389 | } | 389 | inequalityFilterRecipe.setSubject(indexLower); |
390 | } | 390 | inequalityFilterRecipe.getInequals().add(indexHigher); |
391 | 391 | ||
392 | private CompiledSubPlan compileDeferred(TypeFilterConstraint constraint, SubPlan plan, SubPlan parentPlan, | 392 | return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), inequalityFilterRecipe, |
393 | CompiledSubPlan parentCompiled) { | 393 | parentCompiled); |
394 | final IInputKey inputKey = constraint.getInputKey(); | 394 | } else { |
395 | if (!metaContext.isStateless(inputKey)) | 395 | throw new IllegalArgumentException(String.format("Unable to interpret %s after compiled parent %s", |
396 | throw new UnsupportedOperationException( | 396 | plan.toShortString(), parentCompiled.toString())); |
397 | "Non-enumerable input keys are currently supported in Rete only if they are stateless, unlike " | 397 | } |
398 | + inputKey); | 398 | } |
399 | 399 | ||
400 | final Tuple constraintVariables = constraint.getVariablesTuple(); | 400 | private CompiledSubPlan compileDeferred(TypeFilterConstraint constraint, SubPlan plan, SubPlan parentPlan, |
401 | final List<PVariable> parentVariables = parentCompiled.getVariablesTuple(); | 401 | CompiledSubPlan parentCompiled) { |
402 | 402 | final IInputKey inputKey = constraint.getInputKey(); | |
403 | Mask mask; // select elements of the tuple to check against extensional relation | 403 | if (!metaContext.isStateless(inputKey)) |
404 | if (Tuples.flatTupleOf(parentVariables.toArray()).equals(constraintVariables)) { | 404 | throw new UnsupportedOperationException( |
405 | mask = null; // lucky case, parent signature equals that of input key | 405 | "Non-enumerable input keys are currently supported in Rete only if they are stateless, unlike " |
406 | } else { | 406 | + inputKey); |
407 | List<PVariable> variables = new ArrayList<PVariable>(); | 407 | |
408 | for (Object variable : constraintVariables.getElements()) { | 408 | final Tuple constraintVariables = constraint.getVariablesTuple(); |
409 | variables.add((PVariable) variable); | 409 | final List<PVariable> parentVariables = parentCompiled.getVariablesTuple(); |
410 | } | 410 | |
411 | mask = CompilerHelper.makeProjectionMask(parentCompiled, variables); | 411 | Mask mask; // select elements of the tuple to check against extensional relation |
412 | } | 412 | if (Tuples.flatTupleOf(parentVariables.toArray()).equals(constraintVariables)) { |
413 | InputFilterRecipe inputFilterRecipe = RecipesHelper.inputFilterRecipe(parentCompiled.getRecipe(), inputKey, | 413 | mask = null; // lucky case, parent signature equals that of input key |
414 | inputKey.getStringID(), mask); | 414 | } else { |
415 | return new CompiledSubPlan(plan, parentVariables, inputFilterRecipe, parentCompiled); | 415 | List<PVariable> variables = new ArrayList<PVariable>(); |
416 | } | 416 | for (Object variable : constraintVariables.getElements()) { |
417 | 417 | variables.add((PVariable) variable); | |
418 | private CompiledSubPlan compileDeferred(NegativePatternCall constraint, SubPlan plan, SubPlan parentPlan, | 418 | } |
419 | CompiledSubPlan parentCompiled) { | 419 | mask = CompilerHelper.makeProjectionMask(parentCompiled, variables); |
420 | final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan, | 420 | } |
421 | constraint.getActualParametersTuple()); | 421 | InputFilterRecipe inputFilterRecipe = RecipesHelper.inputFilterRecipe(parentCompiled.getRecipe(), inputKey, |
422 | 422 | inputKey.getStringID(), mask); | |
423 | CompilerHelper.JoinHelper joinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); | 423 | return new CompiledSubPlan(plan, parentVariables, inputFilterRecipe, parentCompiled); |
424 | final RecipeTraceInfo primaryIndexer = joinHelper.getPrimaryIndexer(); | 424 | } |
425 | final RecipeTraceInfo secondaryIndexer = joinHelper.getSecondaryIndexer(); | 425 | |
426 | 426 | private CompiledSubPlan compileDeferred(NegativePatternCall constraint, SubPlan plan, SubPlan parentPlan, | |
427 | AntiJoinRecipe antiJoinRecipe = FACTORY.createAntiJoinRecipe(); | 427 | CompiledSubPlan parentCompiled) { |
428 | antiJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); | 428 | final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan, |
429 | antiJoinRecipe.setRightParent((IndexerRecipe) secondaryIndexer.getRecipe()); | 429 | constraint.getActualParametersTuple()); |
430 | 430 | ||
431 | return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), antiJoinRecipe, primaryIndexer, | 431 | CompilerHelper.JoinHelper joinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); |
432 | secondaryIndexer); | 432 | final RecipeTraceInfo primaryIndexer = joinHelper.getPrimaryIndexer(); |
433 | } | 433 | final RecipeTraceInfo secondaryIndexer = joinHelper.getSecondaryIndexer(); |
434 | 434 | ||
435 | private CompiledSubPlan compileDeferred(PatternMatchCounter constraint, SubPlan plan, SubPlan parentPlan, | 435 | AntiJoinRecipe antiJoinRecipe = FACTORY.createAntiJoinRecipe(); |
436 | CompiledSubPlan parentCompiled) { | 436 | antiJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); |
437 | final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan, | 437 | antiJoinRecipe.setRightParent((IndexerRecipe) secondaryIndexer.getRecipe()); |
438 | constraint.getActualParametersTuple()); | 438 | |
439 | 439 | return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), antiJoinRecipe, primaryIndexer, | |
440 | // hack: use some mask computations (+ the indexers) from a fake natural join against the called query | 440 | secondaryIndexer); |
441 | CompilerHelper.JoinHelper fakeJoinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); | 441 | } |
442 | final RecipeTraceInfo primaryIndexer = fakeJoinHelper.getPrimaryIndexer(); | 442 | |
443 | final RecipeTraceInfo callProjectionIndexer = fakeJoinHelper.getSecondaryIndexer(); | 443 | private CompiledSubPlan compileDeferred(PatternMatchCounter constraint, SubPlan plan, SubPlan parentPlan, |
444 | 444 | CompiledSubPlan parentCompiled) { | |
445 | final List<PVariable> sideVariablesTuple = new ArrayList<PVariable>( | 445 | final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan, |
446 | fakeJoinHelper.getSecondaryMask().transform(callTrace.getVariablesTuple())); | 446 | constraint.getActualParametersTuple()); |
447 | /* if (!booleanCheck) */ sideVariablesTuple.add(constraint.getResultVariable()); | 447 | |
448 | 448 | // hack: use some mask computations (+ the indexers) from a fake natural join against the called query | |
449 | CountAggregatorRecipe aggregatorRecipe = FACTORY.createCountAggregatorRecipe(); | 449 | CompilerHelper.JoinHelper fakeJoinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); |
450 | aggregatorRecipe.setParent((ProjectionIndexerRecipe) callProjectionIndexer.getRecipe()); | 450 | final RecipeTraceInfo primaryIndexer = fakeJoinHelper.getPrimaryIndexer(); |
451 | PlanningTrace aggregatorTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorRecipe, | 451 | final RecipeTraceInfo callProjectionIndexer = fakeJoinHelper.getSecondaryIndexer(); |
452 | callProjectionIndexer); | 452 | |
453 | 453 | final List<PVariable> sideVariablesTuple = new ArrayList<PVariable>( | |
454 | IndexerRecipe aggregatorIndexerRecipe = FACTORY.createAggregatorIndexerRecipe(); | 454 | fakeJoinHelper.getSecondaryMask().transform(callTrace.getVariablesTuple())); |
455 | aggregatorIndexerRecipe.setParent(aggregatorRecipe); | 455 | /* if (!booleanCheck) */ |
456 | // aggregatorIndexerRecipe.setMask(RecipesHelper.mask( | 456 | sideVariablesTuple.add(constraint.getResultVariable()); |
457 | // sideVariablesTuple.size(), | 457 | |
458 | // //use same indices as in the projection indexer | 458 | CountAggregatorRecipe aggregatorRecipe = FACTORY.createCountAggregatorRecipe(); |
459 | // // EVEN if result variable already visible in left parent | 459 | aggregatorRecipe.setParent((ProjectionIndexerRecipe) callProjectionIndexer.getRecipe()); |
460 | // fakeJoinHelper.getSecondaryMask().indices | 460 | PlanningTrace aggregatorTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorRecipe, |
461 | // )); | 461 | callProjectionIndexer); |
462 | 462 | ||
463 | int aggregatorWidth = sideVariablesTuple.size(); | 463 | IndexerRecipe aggregatorIndexerRecipe = FACTORY.createAggregatorIndexerRecipe(); |
464 | int aggregateResultIndex = aggregatorWidth - 1; | 464 | aggregatorIndexerRecipe.setParent(aggregatorRecipe); |
465 | 465 | // aggregatorIndexerRecipe.setMask(RecipesHelper.mask( | |
466 | aggregatorIndexerRecipe.setMask(CompilerHelper.toRecipeMask(TupleMask.omit( | 466 | // sideVariablesTuple.size(), |
467 | // aggregate according all but the last index | 467 | // //use same indices as in the projection indexer |
468 | aggregateResultIndex, aggregatorWidth))); | 468 | // // EVEN if result variable already visible in left parent |
469 | PlanningTrace aggregatorIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorIndexerRecipe, | 469 | // fakeJoinHelper.getSecondaryMask().indices |
470 | aggregatorTrace); | 470 | // )); |
471 | 471 | ||
472 | JoinRecipe naturalJoinRecipe = FACTORY.createJoinRecipe(); | 472 | int aggregatorWidth = sideVariablesTuple.size(); |
473 | naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); | 473 | int aggregateResultIndex = aggregatorWidth - 1; |
474 | naturalJoinRecipe.setRightParent(aggregatorIndexerRecipe); | 474 | |
475 | naturalJoinRecipe.setRightParentComplementaryMask(RecipesHelper.mask(aggregatorWidth, | 475 | aggregatorIndexerRecipe.setMask(CompilerHelper.toRecipeMask(TupleMask.omit( |
476 | // extend with last element only - the computation value | 476 | // aggregate according all but the last index |
477 | aggregateResultIndex)); | 477 | aggregateResultIndex, aggregatorWidth))); |
478 | 478 | PlanningTrace aggregatorIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorIndexerRecipe, | |
479 | // what if the new variable already has a value? | 479 | aggregatorTrace); |
480 | // even if already known, we add the new result variable, so that it can be filtered at the end | 480 | |
481 | // boolean alreadyKnown = parentPlan.getVisibleVariables().contains(constraint.getResultVariable()); | 481 | JoinRecipe naturalJoinRecipe = FACTORY.createJoinRecipe(); |
482 | 482 | naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); | |
483 | final List<PVariable> aggregatedVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple()); | 483 | naturalJoinRecipe.setRightParent(aggregatorIndexerRecipe); |
484 | aggregatedVariablesTuple.add(constraint.getResultVariable()); | 484 | naturalJoinRecipe.setRightParentComplementaryMask(RecipesHelper.mask(aggregatorWidth, |
485 | 485 | // extend with last element only - the computation value | |
486 | PlanningTrace joinTrace = new PlanningTrace(plan, aggregatedVariablesTuple, naturalJoinRecipe, primaryIndexer, | 486 | aggregateResultIndex)); |
487 | aggregatorIndexerTrace); | 487 | |
488 | 488 | // what if the new variable already has a value? | |
489 | return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan); | 489 | // even if already known, we add the new result variable, so that it can be filtered at the end |
490 | // if (!alreadyKnown) { | 490 | // boolean alreadyKnown = parentPlan.getVisibleVariables().contains(constraint.getResultVariable()); |
491 | // return joinTrace.cloneFor(plan); | 491 | |
492 | // } else { | 492 | final List<PVariable> aggregatedVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple()); |
493 | // //final Integer equalsWithIndex = parentCompiled.getPosMapping().get(parentCompiled.getVariablesTuple()); | 493 | aggregatedVariablesTuple.add(constraint.getResultVariable()); |
494 | // } | 494 | |
495 | } | 495 | PlanningTrace joinTrace = new PlanningTrace(plan, aggregatedVariablesTuple, naturalJoinRecipe, primaryIndexer, |
496 | 496 | aggregatorIndexerTrace); | |
497 | private CompiledSubPlan compileDeferred(AggregatorConstraint constraint, SubPlan plan, SubPlan parentPlan, | 497 | |
498 | CompiledSubPlan parentCompiled) { | 498 | return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan); |
499 | final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan, | 499 | // if (!alreadyKnown) { |
500 | constraint.getActualParametersTuple()); | 500 | // return joinTrace.cloneFor(plan); |
501 | 501 | // } else { | |
502 | // hack: use some mask computations (+ the indexers) from a fake natural join against the called query | 502 | // //final Integer equalsWithIndex = parentCompiled.getPosMapping().get(parentCompiled.getVariablesTuple()); |
503 | CompilerHelper.JoinHelper fakeJoinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); | 503 | // } |
504 | final RecipeTraceInfo primaryIndexer = fakeJoinHelper.getPrimaryIndexer(); | 504 | } |
505 | TupleMask callGroupMask = fakeJoinHelper.getSecondaryMask(); | 505 | |
506 | 506 | private CompiledSubPlan compileDeferred(AggregatorConstraint constraint, SubPlan plan, SubPlan parentPlan, | |
507 | final List<PVariable> sideVariablesTuple = new ArrayList<PVariable>( | 507 | CompiledSubPlan parentCompiled) { |
508 | callGroupMask.transform(callTrace.getVariablesTuple())); | 508 | final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan, |
509 | /* if (!booleanCheck) */ sideVariablesTuple.add(constraint.getResultVariable()); | 509 | constraint.getActualParametersTuple()); |
510 | 510 | ||
511 | IMultisetAggregationOperator<?, ?, ?> operator = constraint.getAggregator().getOperator(); | 511 | // hack: use some mask computations (+ the indexers) from a fake natural join against the called query |
512 | 512 | CompilerHelper.JoinHelper fakeJoinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); | |
513 | SingleColumnAggregatorRecipe columnAggregatorRecipe = FACTORY.createSingleColumnAggregatorRecipe(); | 513 | final RecipeTraceInfo primaryIndexer = fakeJoinHelper.getPrimaryIndexer(); |
514 | columnAggregatorRecipe.setParent(callTrace.getRecipe()); | 514 | TupleMask callGroupMask = fakeJoinHelper.getSecondaryMask(); |
515 | columnAggregatorRecipe.setMultisetAggregationOperator(operator); | 515 | |
516 | 516 | final List<PVariable> sideVariablesTuple = new ArrayList<PVariable>( | |
517 | int columnIndex = constraint.getAggregatedColumn(); | 517 | callGroupMask.transform(callTrace.getVariablesTuple())); |
518 | IPosetComparator posetComparator = null; | 518 | /* if (!booleanCheck) */ |
519 | Mask groupMask = CompilerHelper.toRecipeMask(callGroupMask); | 519 | sideVariablesTuple.add(constraint.getResultVariable()); |
520 | 520 | ||
521 | // temporary solution to support the deprecated option for now | 521 | IMultisetAggregationOperator<?, ?, ?> operator = constraint.getAggregator().getOperator(); |
522 | final boolean deleteAndRederiveEvaluationDep = this.deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(getHints(plan)); | 522 | |
523 | 523 | SingleColumnAggregatorRecipe columnAggregatorRecipe = FACTORY.createSingleColumnAggregatorRecipe(); | |
524 | columnAggregatorRecipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep); | 524 | columnAggregatorRecipe.setParent(callTrace.getRecipe()); |
525 | if (deleteAndRederiveEvaluationDep || (this.timelyEvaluation != null)) { | 525 | columnAggregatorRecipe.setMultisetAggregationOperator(operator); |
526 | List<PParameter> parameters = constraint.getReferredQuery().getParameters(); | 526 | |
527 | IInputKey key = parameters.get(columnIndex).getDeclaredUnaryType(); | 527 | int columnIndex = constraint.getAggregatedColumn(); |
528 | if (key != null && metaContext.isPosetKey(key)) { | 528 | IPosetComparator posetComparator = null; |
529 | posetComparator = metaContext.getPosetComparator(Collections.singleton(key)); | 529 | Mask groupMask = CompilerHelper.toRecipeMask(callGroupMask); |
530 | } | 530 | |
531 | } | 531 | // temporary solution to support the deprecated option for now |
532 | 532 | final boolean deleteAndRederiveEvaluationDep = | |
533 | if (posetComparator == null) { | 533 | this.deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(getHints(plan)); |
534 | columnAggregatorRecipe.setGroupByMask(groupMask); | 534 | |
535 | columnAggregatorRecipe.setAggregableIndex(columnIndex); | 535 | columnAggregatorRecipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep); |
536 | } else { | 536 | if (deleteAndRederiveEvaluationDep || (this.timelyEvaluation != null)) { |
537 | MonotonicityInfo monotonicityInfo = FACTORY.createMonotonicityInfo(); | 537 | List<PParameter> parameters = constraint.getReferredQuery().getParameters(); |
538 | monotonicityInfo.setCoreMask(groupMask); | 538 | IInputKey key = parameters.get(columnIndex).getDeclaredUnaryType(); |
539 | monotonicityInfo.setPosetMask(CompilerHelper.toRecipeMask( | 539 | if (key != null && metaContext.isPosetKey(key)) { |
540 | TupleMask.selectSingle(columnIndex, constraint.getActualParametersTuple().getSize()))); | 540 | posetComparator = metaContext.getPosetComparator(Collections.singleton(key)); |
541 | monotonicityInfo.setPosetComparator(posetComparator); | 541 | } |
542 | columnAggregatorRecipe.setOptionalMonotonicityInfo(monotonicityInfo); | 542 | } |
543 | } | 543 | |
544 | 544 | if (posetComparator == null) { | |
545 | ReteNodeRecipe aggregatorRecipe = columnAggregatorRecipe; | 545 | columnAggregatorRecipe.setGroupByMask(groupMask); |
546 | PlanningTrace aggregatorTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorRecipe, callTrace); | 546 | columnAggregatorRecipe.setAggregableIndex(columnIndex); |
547 | 547 | } else { | |
548 | IndexerRecipe aggregatorIndexerRecipe = FACTORY.createAggregatorIndexerRecipe(); | 548 | MonotonicityInfo monotonicityInfo = FACTORY.createMonotonicityInfo(); |
549 | aggregatorIndexerRecipe.setParent(aggregatorRecipe); | 549 | monotonicityInfo.setCoreMask(groupMask); |
550 | 550 | monotonicityInfo.setPosetMask(CompilerHelper.toRecipeMask( | |
551 | int aggregatorWidth = sideVariablesTuple.size(); | 551 | TupleMask.selectSingle(columnIndex, constraint.getActualParametersTuple().getSize()))); |
552 | int aggregateResultIndex = aggregatorWidth - 1; | 552 | monotonicityInfo.setPosetComparator(posetComparator); |
553 | 553 | columnAggregatorRecipe.setOptionalMonotonicityInfo(monotonicityInfo); | |
554 | aggregatorIndexerRecipe.setMask(CompilerHelper.toRecipeMask(TupleMask.omit( | 554 | } |
555 | // aggregate according all but the last index | 555 | |
556 | aggregateResultIndex, aggregatorWidth))); | 556 | ReteNodeRecipe aggregatorRecipe = columnAggregatorRecipe; |
557 | PlanningTrace aggregatorIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorIndexerRecipe, | 557 | PlanningTrace aggregatorTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorRecipe, callTrace); |
558 | aggregatorTrace); | 558 | |
559 | 559 | IndexerRecipe aggregatorIndexerRecipe = FACTORY.createAggregatorIndexerRecipe(); | |
560 | JoinRecipe naturalJoinRecipe = FACTORY.createJoinRecipe(); | 560 | aggregatorIndexerRecipe.setParent(aggregatorRecipe); |
561 | naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); | 561 | |
562 | naturalJoinRecipe.setRightParent(aggregatorIndexerRecipe); | 562 | int aggregatorWidth = sideVariablesTuple.size(); |
563 | naturalJoinRecipe.setRightParentComplementaryMask(RecipesHelper.mask(aggregatorWidth, | 563 | int aggregateResultIndex = aggregatorWidth - 1; |
564 | // extend with last element only - the computation value | 564 | |
565 | aggregateResultIndex)); | 565 | aggregatorIndexerRecipe.setMask(CompilerHelper.toRecipeMask(TupleMask.omit( |
566 | 566 | // aggregate according all but the last index | |
567 | // what if the new variable already has a value? | 567 | aggregateResultIndex, aggregatorWidth))); |
568 | // even if already known, we add the new result variable, so that it can be filtered at the end | 568 | PlanningTrace aggregatorIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorIndexerRecipe, |
569 | // boolean alreadyKnown = parentPlan.getVisibleVariables().contains(constraint.getResultVariable()); | 569 | aggregatorTrace); |
570 | 570 | ||
571 | final List<PVariable> finalVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple()); | 571 | JoinRecipe naturalJoinRecipe = FACTORY.createJoinRecipe(); |
572 | finalVariablesTuple.add(constraint.getResultVariable()); | 572 | naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); |
573 | 573 | naturalJoinRecipe.setRightParent(aggregatorIndexerRecipe); | |
574 | PlanningTrace joinTrace = new PlanningTrace(plan, finalVariablesTuple, naturalJoinRecipe, primaryIndexer, | 574 | naturalJoinRecipe.setRightParentComplementaryMask(RecipesHelper.mask(aggregatorWidth, |
575 | aggregatorIndexerTrace); | 575 | // extend with last element only - the computation value |
576 | 576 | aggregateResultIndex)); | |
577 | return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan); | 577 | |
578 | // if (!alreadyKnown) { | 578 | // what if the new variable already has a value? |
579 | // return joinTrace.cloneFor(plan); | 579 | // even if already known, we add the new result variable, so that it can be filtered at the end |
580 | // } else { | 580 | // boolean alreadyKnown = parentPlan.getVisibleVariables().contains(constraint.getResultVariable()); |
581 | // //final Integer equalsWithIndex = parentCompiled.getPosMapping().get(parentCompiled.getVariablesTuple()); | 581 | |
582 | // } | 582 | final List<PVariable> finalVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple()); |
583 | } | 583 | finalVariablesTuple.add(constraint.getResultVariable()); |
584 | 584 | ||
585 | private CompiledSubPlan compileDeferred(ExpressionEvaluation constraint, SubPlan plan, SubPlan parentPlan, | 585 | PlanningTrace joinTrace = new PlanningTrace(plan, finalVariablesTuple, naturalJoinRecipe, primaryIndexer, |
586 | CompiledSubPlan parentCompiled) { | 586 | aggregatorIndexerTrace); |
587 | Map<String, Integer> tupleNameMap = new HashMap<String, Integer>(); | 587 | |
588 | for (String name : constraint.getEvaluator().getInputParameterNames()) { | 588 | return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan); |
589 | Map<? extends Object, Integer> index = parentCompiled.getPosMapping(); | 589 | // if (!alreadyKnown) { |
590 | PVariable variable = constraint.getPSystem().getVariableByNameChecked(name); | 590 | // return joinTrace.cloneFor(plan); |
591 | Integer position = index.get(variable); | 591 | // } else { |
592 | tupleNameMap.put(name, position); | 592 | // //final Integer equalsWithIndex = parentCompiled.getPosMapping().get(parentCompiled.getVariablesTuple()); |
593 | } | 593 | // } |
594 | 594 | } | |
595 | final PVariable outputVariable = constraint.getOutputVariable(); | 595 | |
596 | final boolean booleanCheck = outputVariable == null; | 596 | private CompiledSubPlan compileDeferred(LeftJoinConstraint constraint, SubPlan plan, |
597 | 597 | CompiledSubPlan parentCompiled) { | |
598 | // TODO determine whether expression is costly | 598 | var callTrace = referQuery(constraint.getReferredQuery(), plan, constraint.getActualParametersTuple()); |
599 | boolean cacheOutput = ReteHintOptions.cacheOutputOfEvaluatorsByDefault.getValueOrDefault(getHints(plan)); | 599 | var fakeJoinHelper = new CompilerHelper.JoinHelper(plan, parentCompiled, callTrace); |
600 | // for (PAnnotation pAnnotation : | 600 | var primaryIndexer = fakeJoinHelper.getPrimaryIndexer(); |
601 | // plan.getBody().getPattern().getAnnotationsByName(EXPRESSION_EVALUATION_ANNOTATION"")) { | 601 | var secondaryIndexer = fakeJoinHelper.getSecondaryIndexer(); |
602 | // for (Object value : pAnnotation.getAllValues("expensive")) { | 602 | |
603 | // if (value instanceof Boolean) | 603 | var sideVariablesTuple = CompilerHelper.convertVariablesTuple(constraint.getActualParametersTuple()); |
604 | // cacheOutput = (boolean) value; | 604 | var resultVariable = constraint.getResultVariable(); |
605 | // } | 605 | sideVariablesTuple.set(constraint.getOptionalColumn(), resultVariable); |
606 | // } | 606 | |
607 | 607 | var leftNodeRecipe = FACTORY.createOuterJoinNodeRecipe(); | |
608 | ExpressionEnforcerRecipe enforcerRecipe = booleanCheck ? FACTORY.createCheckRecipe() | 608 | var secondaryIndexerRecipe = (ProjectionIndexerRecipe) secondaryIndexer.getRecipe(); |
609 | : FACTORY.createEvalRecipe(); | 609 | leftNodeRecipe.setParent(secondaryIndexerRecipe); |
610 | enforcerRecipe.setParent(parentCompiled.getRecipe()); | 610 | leftNodeRecipe.setDefaultValue(constraint.getDefaultValue()); |
611 | enforcerRecipe.setExpression(RecipesHelper.expressionDefinition(constraint.getEvaluator())); | 611 | var leftNodeTrace = new PlanningTrace(plan, sideVariablesTuple, leftNodeRecipe, secondaryIndexer); |
612 | enforcerRecipe.setCacheOutput(cacheOutput); | 612 | |
613 | if (enforcerRecipe instanceof EvalRecipe) { | 613 | var leftIndexerRecipe = FACTORY.createOuterJoinIndexerRecipe(); |
614 | ((EvalRecipe) enforcerRecipe).setUnwinding(constraint.isUnwinding()); | 614 | leftIndexerRecipe.setParent(leftIndexerRecipe); |
615 | } | 615 | // Must make a copy of the mask here, because we are already using secondaryIndexerRecipe in the plan an mask |
616 | for (Entry<String, Integer> entry : tupleNameMap.entrySet()) { | 616 | // is a containment reference. |
617 | enforcerRecipe.getMappedIndices().put(entry.getKey(), entry.getValue()); | 617 | var copyOfMask = EcoreUtil.copy(secondaryIndexerRecipe.getMask()); |
618 | } | 618 | leftIndexerRecipe.setMask(copyOfMask); |
619 | 619 | var leftIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, leftIndexerRecipe, leftNodeTrace); | |
620 | final List<PVariable> enforcerVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple()); | 620 | |
621 | if (!booleanCheck) | 621 | var naturalJoinRecipe = FACTORY.createJoinRecipe(); |
622 | enforcerVariablesTuple.add(outputVariable); | 622 | naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe()); |
623 | PlanningTrace enforcerTrace = new PlanningTrace(plan, enforcerVariablesTuple, enforcerRecipe, parentCompiled); | 623 | naturalJoinRecipe.setRightParent(leftIndexerRecipe); |
624 | 624 | var complementaryMask = fakeJoinHelper.getNaturalJoinRecipe().getRightParentComplementaryMask(); | |
625 | return CompilerHelper.checkAndTrimEqualVariables(plan, enforcerTrace).cloneFor(plan); | 625 | naturalJoinRecipe.setRightParentComplementaryMask(complementaryMask); |
626 | } | 626 | |
627 | 627 | var primaryVariablesTuple = parentCompiled.getVariablesTuple(); | |
628 | private CompiledSubPlan doCompileJoin(PJoin operation, SubPlan plan) { | 628 | var joinedVariablesTuple = new ArrayList<PVariable>(primaryVariablesTuple.size() + 1); |
629 | final List<CompiledSubPlan> compiledParents = getCompiledFormOfParents(plan); | 629 | joinedVariablesTuple.addAll(primaryVariablesTuple); |
630 | final CompiledSubPlan leftCompiled = compiledParents.get(0); | 630 | joinedVariablesTuple.add(resultVariable); |
631 | final CompiledSubPlan rightCompiled = compiledParents.get(1); | 631 | var joinTrace = new PlanningTrace(plan, joinedVariablesTuple, naturalJoinRecipe, primaryIndexer, |
632 | 632 | leftIndexerTrace); | |
633 | return compileToNaturalJoin(plan, leftCompiled, rightCompiled); | 633 | |
634 | } | 634 | return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan); |
635 | 635 | } | |
636 | private CompiledSubPlan compileToNaturalJoin(SubPlan plan, final PlanningTrace leftCompiled, | 636 | |
637 | final PlanningTrace rightCompiled) { | 637 | private CompiledSubPlan compileDeferred(ExpressionEvaluation constraint, SubPlan plan, SubPlan parentPlan, |
638 | // CHECK IF SPECIAL CASE | 638 | CompiledSubPlan parentCompiled) { |
639 | 639 | Map<String, Integer> tupleNameMap = new HashMap<String, Integer>(); | |
640 | // Is constant filtering applicable? | 640 | for (String name : constraint.getEvaluator().getInputParameterNames()) { |
641 | if (ReteHintOptions.useDiscriminatorDispatchersForConstantFiltering.getValueOrDefault(getHints(plan))) { | 641 | Map<? extends Object, Integer> index = parentCompiled.getPosMapping(); |
642 | if (leftCompiled.getRecipe() instanceof ConstantRecipe | 642 | PVariable variable = constraint.getPSystem().getVariableByNameChecked(name); |
643 | && rightCompiled.getVariablesTuple().containsAll(leftCompiled.getVariablesTuple())) { | 643 | Integer position = index.get(variable); |
644 | return compileConstantFiltering(plan, rightCompiled, (ConstantRecipe) leftCompiled.getRecipe(), | 644 | tupleNameMap.put(name, position); |
645 | leftCompiled.getVariablesTuple()); | 645 | } |
646 | } | 646 | |
647 | if (rightCompiled.getRecipe() instanceof ConstantRecipe | 647 | final PVariable outputVariable = constraint.getOutputVariable(); |
648 | && leftCompiled.getVariablesTuple().containsAll(rightCompiled.getVariablesTuple())) { | 648 | final boolean booleanCheck = outputVariable == null; |
649 | return compileConstantFiltering(plan, leftCompiled, (ConstantRecipe) rightCompiled.getRecipe(), | 649 | |
650 | rightCompiled.getVariablesTuple()); | 650 | // TODO determine whether expression is costly |
651 | } | 651 | boolean cacheOutput = ReteHintOptions.cacheOutputOfEvaluatorsByDefault.getValueOrDefault(getHints(plan)); |
652 | } | 652 | // for (PAnnotation pAnnotation : |
653 | 653 | // plan.getBody().getPattern().getAnnotationsByName(EXPRESSION_EVALUATION_ANNOTATION"")) { | |
654 | // ELSE: ACTUAL JOIN | 654 | // for (Object value : pAnnotation.getAllValues("expensive")) { |
655 | CompilerHelper.JoinHelper joinHelper = new CompilerHelper.JoinHelper(plan, leftCompiled, rightCompiled); | 655 | // if (value instanceof Boolean) |
656 | return new CompiledSubPlan(plan, joinHelper.getNaturalJoinVariablesTuple(), joinHelper.getNaturalJoinRecipe(), | 656 | // cacheOutput = (boolean) value; |
657 | joinHelper.getPrimaryIndexer(), joinHelper.getSecondaryIndexer()); | 657 | // } |
658 | } | 658 | // } |
659 | 659 | ||
660 | private CompiledSubPlan doCompileProject(PProject operation, SubPlan plan) { | 660 | ExpressionEnforcerRecipe enforcerRecipe = booleanCheck ? FACTORY.createCheckRecipe() |
661 | final List<CompiledSubPlan> compiledParents = getCompiledFormOfParents(plan); | 661 | : FACTORY.createEvalRecipe(); |
662 | final CompiledSubPlan compiledParent = compiledParents.get(0); | 662 | enforcerRecipe.setParent(parentCompiled.getRecipe()); |
663 | 663 | enforcerRecipe.setExpression(RecipesHelper.expressionDefinition(constraint.getEvaluator())); | |
664 | List<PVariable> projectedVariables = new ArrayList<PVariable>(operation.getToVariables()); | 664 | enforcerRecipe.setCacheOutput(cacheOutput); |
665 | // Determinizing projection: try to keep original order (hopefully facilitates node reuse) | 665 | if (enforcerRecipe instanceof EvalRecipe) { |
666 | Map<PVariable, Integer> parentPosMapping = compiledParent.getPosMapping(); | 666 | ((EvalRecipe) enforcerRecipe).setUnwinding(constraint.isUnwinding()); |
667 | Collections.sort(projectedVariables, Comparator.comparing(parentPosMapping::get)); | 667 | } |
668 | 668 | for (Entry<String, Integer> entry : tupleNameMap.entrySet()) { | |
669 | return doProjectPlan(compiledParent, projectedVariables, true, | 669 | enforcerRecipe.getMappedIndices().put(entry.getKey(), entry.getValue()); |
670 | parentTrace -> parentTrace.cloneFor(plan), | 670 | } |
671 | (recipe, parentTrace) -> new PlanningTrace(plan, projectedVariables, recipe, parentTrace), | 671 | |
672 | (recipe, parentTrace) -> new CompiledSubPlan(plan, projectedVariables, recipe, parentTrace) | 672 | final List<PVariable> enforcerVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple()); |
673 | ); | 673 | if (!booleanCheck) |
674 | } | 674 | enforcerVariablesTuple.add(outputVariable); |
675 | 675 | PlanningTrace enforcerTrace = new PlanningTrace(plan, enforcerVariablesTuple, enforcerRecipe, parentCompiled); | |
676 | /** | 676 | |
677 | * Projects a subplan onto the specified variable tuple | 677 | return CompilerHelper.checkAndTrimEqualVariables(plan, enforcerTrace).cloneFor(plan); |
678 | * @param compiledParentPlan the compiled form of the subplan | 678 | } |
679 | * @param targetVariables list of variables to project to | 679 | |
680 | * @param enforceUniqueness whether distinctness shall be enforced after the projection. | 680 | private CompiledSubPlan doCompileJoin(PJoin operation, SubPlan plan) { |
681 | * Specify false only if directly connecting to a production node. | 681 | final List<CompiledSubPlan> compiledParents = getCompiledFormOfParents(plan); |
682 | * @param reinterpretTraceFactory constructs a reinterpreted trace that simply relabels the compiled parent plan, in case it is sufficient | 682 | final CompiledSubPlan leftCompiled = compiledParents.get(0); |
683 | * @param intermediateTraceFactory constructs a recipe trace for an intermediate node, given the recipe of the node and its parent trace | 683 | final CompiledSubPlan rightCompiled = compiledParents.get(1); |
684 | * @param finalTraceFactory constructs a recipe trace for the final resulting node, given the recipe of the node and its parent trace | 684 | |
685 | * @since 2.1 | 685 | return compileToNaturalJoin(plan, leftCompiled, rightCompiled); |
686 | */ | 686 | } |
687 | <ResultTrace extends RecipeTraceInfo> ResultTrace doProjectPlan( | 687 | |
688 | final CompiledSubPlan compiledParentPlan, | 688 | private CompiledSubPlan compileToNaturalJoin(SubPlan plan, final PlanningTrace leftCompiled, |
689 | final List<PVariable> targetVariables, | 689 | final PlanningTrace rightCompiled) { |
690 | boolean enforceUniqueness, | 690 | // CHECK IF SPECIAL CASE |
691 | Function<CompiledSubPlan, ResultTrace> reinterpretTraceFactory, | 691 | |
692 | BiFunction<ReteNodeRecipe, RecipeTraceInfo, RecipeTraceInfo> intermediateTraceFactory, | 692 | // Is constant filtering applicable? |
693 | BiFunction<ReteNodeRecipe, RecipeTraceInfo, ResultTrace> finalTraceFactory) | 693 | if (ReteHintOptions.useDiscriminatorDispatchersForConstantFiltering.getValueOrDefault(getHints(plan))) { |
694 | { | 694 | if (leftCompiled.getRecipe() instanceof ConstantRecipe |
695 | if (targetVariables.equals(compiledParentPlan.getVariablesTuple())) // no projection needed | 695 | && rightCompiled.getVariablesTuple().containsAll(leftCompiled.getVariablesTuple())) { |
696 | return reinterpretTraceFactory.apply(compiledParentPlan); | 696 | return compileConstantFiltering(plan, rightCompiled, (ConstantRecipe) leftCompiled.getRecipe(), |
697 | 697 | leftCompiled.getVariablesTuple()); | |
698 | // otherwise, we need at least a trimmer | 698 | } |
699 | TrimmerRecipe trimmerRecipe = CompilerHelper.makeTrimmerRecipe(compiledParentPlan, targetVariables); | 699 | if (rightCompiled.getRecipe() instanceof ConstantRecipe |
700 | 700 | && leftCompiled.getVariablesTuple().containsAll(rightCompiled.getVariablesTuple())) { | |
701 | // do we need to eliminate duplicates? | 701 | return compileConstantFiltering(plan, leftCompiled, (ConstantRecipe) rightCompiled.getRecipe(), |
702 | SubPlan parentPlan = compiledParentPlan.getSubPlan(); | 702 | rightCompiled.getVariablesTuple()); |
703 | if (!enforceUniqueness || BuildHelper.areAllVariablesDetermined( | 703 | } |
704 | parentPlan, | 704 | } |
705 | targetVariables, | 705 | |
706 | queryAnalyzer, | 706 | // ELSE: ACTUAL JOIN |
707 | true)) | 707 | CompilerHelper.JoinHelper joinHelper = new CompilerHelper.JoinHelper(plan, leftCompiled, rightCompiled); |
708 | { | 708 | return new CompiledSubPlan(plan, joinHelper.getNaturalJoinVariablesTuple(), joinHelper.getNaturalJoinRecipe(), |
709 | // if uniqueness enforcess is unwanted or unneeeded, skip it | 709 | joinHelper.getPrimaryIndexer(), joinHelper.getSecondaryIndexer()); |
710 | return finalTraceFactory.apply(trimmerRecipe, compiledParentPlan); | 710 | } |
711 | } else { | 711 | |
712 | // add a uniqueness enforcer | 712 | private CompiledSubPlan doCompileProject(PProject operation, SubPlan plan) { |
713 | UniquenessEnforcerRecipe recipe = FACTORY.createUniquenessEnforcerRecipe(); | 713 | final List<CompiledSubPlan> compiledParents = getCompiledFormOfParents(plan); |
714 | recipe.getParents().add(trimmerRecipe); | 714 | final CompiledSubPlan compiledParent = compiledParents.get(0); |
715 | 715 | ||
716 | // temporary solution to support the deprecated option for now | 716 | List<PVariable> projectedVariables = new ArrayList<PVariable>(operation.getToVariables()); |
717 | final boolean deleteAndRederiveEvaluationDep = this.deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(getHints(parentPlan)); | 717 | // Determinizing projection: try to keep original order (hopefully facilitates node reuse) |
718 | 718 | Map<PVariable, Integer> parentPosMapping = compiledParent.getPosMapping(); | |
719 | recipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep); | 719 | Collections.sort(projectedVariables, Comparator.comparing(parentPosMapping::get)); |
720 | if (deleteAndRederiveEvaluationDep || (this.timelyEvaluation != null)) { | 720 | |
721 | CompilerHelper.PosetTriplet triplet = CompilerHelper.computePosetInfo(targetVariables, parentPlan.getBody(), metaContext); | 721 | return doProjectPlan(compiledParent, projectedVariables, true, |
722 | 722 | parentTrace -> parentTrace.cloneFor(plan), | |
723 | if (triplet.comparator != null) { | 723 | (recipe, parentTrace) -> new PlanningTrace(plan, projectedVariables, recipe, parentTrace), |
724 | MonotonicityInfo info = FACTORY.createMonotonicityInfo(); | 724 | (recipe, parentTrace) -> new CompiledSubPlan(plan, projectedVariables, recipe, parentTrace) |
725 | info.setCoreMask(triplet.coreMask); | 725 | ); |
726 | info.setPosetMask(triplet.posetMask); | 726 | } |
727 | info.setPosetComparator(triplet.comparator); | 727 | |
728 | recipe.setOptionalMonotonicityInfo(info); | 728 | /** |
729 | } | 729 | * Projects a subplan onto the specified variable tuple |
730 | } | 730 | * |
731 | 731 | * @param compiledParentPlan the compiled form of the subplan | |
732 | RecipeTraceInfo trimmerTrace = intermediateTraceFactory.apply(trimmerRecipe, compiledParentPlan); | 732 | * @param targetVariables list of variables to project to |
733 | return finalTraceFactory.apply(recipe, trimmerTrace); | 733 | * @param enforceUniqueness whether distinctness shall be enforced after the projection. |
734 | } | 734 | * Specify false only if directly connecting to a production node. |
735 | } | 735 | * @param reinterpretTraceFactory constructs a reinterpreted trace that simply relabels the compiled parent plan, |
736 | 736 | * in case it is sufficient | |
737 | /** | 737 | * @param intermediateTraceFactory constructs a recipe trace for an intermediate node, given the recipe of the |
738 | * Projects the final compiled form of a PBody onto the parameter tuple | 738 | * node and its parent trace |
739 | * @param compiledBody the compiled form of the body, with all constraints enforced, not yet projected to query parameters | 739 | * @param finalTraceFactory constructs a recipe trace for the final resulting node, given the recipe of the |
740 | * @param enforceUniqueness whether distinctness shall be enforced after the projection. | 740 | * node and its parent trace |
741 | * Specify false only if directly connecting to a production node. | 741 | * @since 2.1 |
742 | * @since 2.1 | 742 | */ |
743 | */ | 743 | <ResultTrace extends RecipeTraceInfo> ResultTrace doProjectPlan( |
744 | RecipeTraceInfo projectBodyFinalToParameters( | 744 | final CompiledSubPlan compiledParentPlan, |
745 | final CompiledSubPlan compiledBody, | 745 | final List<PVariable> targetVariables, |
746 | boolean enforceUniqueness) | 746 | boolean enforceUniqueness, |
747 | { | 747 | Function<CompiledSubPlan, ResultTrace> reinterpretTraceFactory, |
748 | final PBody body = compiledBody.getSubPlan().getBody(); | 748 | BiFunction<ReteNodeRecipe, RecipeTraceInfo, RecipeTraceInfo> intermediateTraceFactory, |
749 | final List<PVariable> parameterList = body.getSymbolicParameterVariables(); | 749 | BiFunction<ReteNodeRecipe, RecipeTraceInfo, ResultTrace> finalTraceFactory) { |
750 | 750 | if (targetVariables.equals(compiledParentPlan.getVariablesTuple())) // no projection needed | |
751 | return doProjectPlan(compiledBody, parameterList, enforceUniqueness, | 751 | return reinterpretTraceFactory.apply(compiledParentPlan); |
752 | parentTrace -> parentTrace, | 752 | |
753 | (recipe, parentTrace) -> new ParameterProjectionTrace(body, recipe, parentTrace), | 753 | // otherwise, we need at least a trimmer |
754 | (recipe, parentTrace) -> new ParameterProjectionTrace(body, recipe, parentTrace) | 754 | TrimmerRecipe trimmerRecipe = CompilerHelper.makeTrimmerRecipe(compiledParentPlan, targetVariables); |
755 | ); | 755 | |
756 | } | 756 | // do we need to eliminate duplicates? |
757 | 757 | SubPlan parentPlan = compiledParentPlan.getSubPlan(); | |
758 | private CompiledSubPlan doCompileStart(PStart operation, SubPlan plan) { | 758 | if (!enforceUniqueness || BuildHelper.areAllVariablesDetermined( |
759 | if (!operation.getAPrioriVariables().isEmpty()) { | 759 | parentPlan, |
760 | throw new IllegalArgumentException("Input variables unsupported by Rete: " + plan.toShortString()); | 760 | targetVariables, |
761 | } | 761 | queryAnalyzer, |
762 | final ConstantRecipe recipe = FACTORY.createConstantRecipe(); | 762 | true)) { |
763 | recipe.getConstantValues().clear(); | 763 | // if uniqueness enforcess is unwanted or unneeeded, skip it |
764 | 764 | return finalTraceFactory.apply(trimmerRecipe, compiledParentPlan); | |
765 | return new CompiledSubPlan(plan, new ArrayList<PVariable>(), recipe); | 765 | } else { |
766 | } | 766 | // add a uniqueness enforcer |
767 | 767 | UniquenessEnforcerRecipe recipe = FACTORY.createUniquenessEnforcerRecipe(); | |
768 | private CompiledSubPlan doCompileEnumerate(EnumerablePConstraint constraint, SubPlan plan) { | 768 | recipe.getParents().add(trimmerRecipe); |
769 | final PlanningTrace trimmedTrace = doEnumerateAndDeduplicate(constraint, plan); | 769 | |
770 | 770 | // temporary solution to support the deprecated option for now | |
771 | return trimmedTrace.cloneFor(plan); | 771 | final boolean deleteAndRederiveEvaluationDep = |
772 | } | 772 | this.deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(getHints(parentPlan)); |
773 | 773 | ||
774 | private PlanningTrace doEnumerateAndDeduplicate(EnumerablePConstraint constraint, SubPlan plan) { | 774 | recipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep); |
775 | final PlanningTrace coreTrace = doEnumerateDispatch(plan, constraint); | 775 | if (deleteAndRederiveEvaluationDep || (this.timelyEvaluation != null)) { |
776 | final PlanningTrace trimmedTrace = CompilerHelper.checkAndTrimEqualVariables(plan, coreTrace); | 776 | CompilerHelper.PosetTriplet triplet = CompilerHelper.computePosetInfo(targetVariables, |
777 | return trimmedTrace; | 777 | parentPlan.getBody(), metaContext); |
778 | } | 778 | |
779 | 779 | if (triplet.comparator != null) { | |
780 | private PlanningTrace doEnumerateDispatch(SubPlan plan, EnumerablePConstraint constraint) { | 780 | MonotonicityInfo info = FACTORY.createMonotonicityInfo(); |
781 | if (constraint instanceof RelationEvaluation) { | 781 | info.setCoreMask(triplet.coreMask); |
782 | return compileEnumerable(plan, (RelationEvaluation) constraint); | 782 | info.setPosetMask(triplet.posetMask); |
783 | } else if (constraint instanceof BinaryTransitiveClosure) { | 783 | info.setPosetComparator(triplet.comparator); |
784 | return compileEnumerable(plan, (BinaryTransitiveClosure) constraint); | 784 | recipe.setOptionalMonotonicityInfo(info); |
785 | } else if (constraint instanceof BinaryReflexiveTransitiveClosure) { | 785 | } |
786 | return compileEnumerable(plan, (BinaryReflexiveTransitiveClosure) constraint); | 786 | } |
787 | |||
788 | RecipeTraceInfo trimmerTrace = intermediateTraceFactory.apply(trimmerRecipe, compiledParentPlan); | ||
789 | return finalTraceFactory.apply(recipe, trimmerTrace); | ||
790 | } | ||
791 | } | ||
792 | |||
793 | /** | ||
794 | * Projects the final compiled form of a PBody onto the parameter tuple | ||
795 | * | ||
796 | * @param compiledBody the compiled form of the body, with all constraints enforced, not yet projected to | ||
797 | * query parameters | ||
798 | * @param enforceUniqueness whether distinctness shall be enforced after the projection. | ||
799 | * Specify false only if directly connecting to a production node. | ||
800 | * @since 2.1 | ||
801 | */ | ||
802 | RecipeTraceInfo projectBodyFinalToParameters( | ||
803 | final CompiledSubPlan compiledBody, | ||
804 | boolean enforceUniqueness) { | ||
805 | final PBody body = compiledBody.getSubPlan().getBody(); | ||
806 | final List<PVariable> parameterList = body.getSymbolicParameterVariables(); | ||
807 | |||
808 | return doProjectPlan(compiledBody, parameterList, enforceUniqueness, | ||
809 | parentTrace -> parentTrace, | ||
810 | (recipe, parentTrace) -> new ParameterProjectionTrace(body, recipe, parentTrace), | ||
811 | (recipe, parentTrace) -> new ParameterProjectionTrace(body, recipe, parentTrace) | ||
812 | ); | ||
813 | } | ||
814 | |||
815 | private CompiledSubPlan doCompileStart(PStart operation, SubPlan plan) { | ||
816 | if (!operation.getAPrioriVariables().isEmpty()) { | ||
817 | throw new IllegalArgumentException("Input variables unsupported by Rete: " + plan.toShortString()); | ||
818 | } | ||
819 | final ConstantRecipe recipe = FACTORY.createConstantRecipe(); | ||
820 | recipe.getConstantValues().clear(); | ||
821 | |||
822 | return new CompiledSubPlan(plan, new ArrayList<PVariable>(), recipe); | ||
823 | } | ||
824 | |||
825 | private CompiledSubPlan doCompileEnumerate(EnumerablePConstraint constraint, SubPlan plan) { | ||
826 | final PlanningTrace trimmedTrace = doEnumerateAndDeduplicate(constraint, plan); | ||
827 | |||
828 | return trimmedTrace.cloneFor(plan); | ||
829 | } | ||
830 | |||
831 | private PlanningTrace doEnumerateAndDeduplicate(EnumerablePConstraint constraint, SubPlan plan) { | ||
832 | final PlanningTrace coreTrace = doEnumerateDispatch(plan, constraint); | ||
833 | final PlanningTrace trimmedTrace = CompilerHelper.checkAndTrimEqualVariables(plan, coreTrace); | ||
834 | return trimmedTrace; | ||
835 | } | ||
836 | |||
837 | private PlanningTrace doEnumerateDispatch(SubPlan plan, EnumerablePConstraint constraint) { | ||
838 | if (constraint instanceof RelationEvaluation) { | ||
839 | return compileEnumerable(plan, (RelationEvaluation) constraint); | ||
840 | } else if (constraint instanceof BinaryTransitiveClosure) { | ||
841 | return compileEnumerable(plan, (BinaryTransitiveClosure) constraint); | ||
842 | } else if (constraint instanceof BinaryReflexiveTransitiveClosure) { | ||
843 | return compileEnumerable(plan, (BinaryReflexiveTransitiveClosure) constraint); | ||
787 | } else if (constraint instanceof RepresentativeElectionConstraint) { | 844 | } else if (constraint instanceof RepresentativeElectionConstraint) { |
788 | return compileEnumerable(plan, (RepresentativeElectionConstraint) constraint); | 845 | return compileEnumerable(plan, (RepresentativeElectionConstraint) constraint); |
789 | } else if (constraint instanceof ConstantValue) { | 846 | } else if (constraint instanceof ConstantValue) { |
790 | return compileEnumerable(plan, (ConstantValue) constraint); | 847 | return compileEnumerable(plan, (ConstantValue) constraint); |
791 | } else if (constraint instanceof PositivePatternCall) { | 848 | } else if (constraint instanceof PositivePatternCall) { |
792 | return compileEnumerable(plan, (PositivePatternCall) constraint); | 849 | return compileEnumerable(plan, (PositivePatternCall) constraint); |
793 | } else if (constraint instanceof TypeConstraint) { | 850 | } else if (constraint instanceof TypeConstraint) { |
794 | return compileEnumerable(plan, (TypeConstraint) constraint); | 851 | return compileEnumerable(plan, (TypeConstraint) constraint); |
795 | } | 852 | } |
796 | throw new UnsupportedOperationException("Unknown enumerable constraint " + constraint); | 853 | throw new UnsupportedOperationException("Unknown enumerable constraint " + constraint); |
797 | } | 854 | } |
798 | 855 | ||
799 | private PlanningTrace compileEnumerable(SubPlan plan, BinaryReflexiveTransitiveClosure constraint) { | 856 | private PlanningTrace compileEnumerable(SubPlan plan, BinaryReflexiveTransitiveClosure constraint) { |
800 | // TODO the implementation would perform better if an inequality check would be used after tcRecipe and | 857 | // TODO the implementation would perform better if an inequality check would be used after tcRecipe and |
801 | // uniqueness enforcer be replaced by a transparent node with multiple parents, but such a node is not available | 858 | // uniqueness enforcer be replaced by a transparent node with multiple parents, but such a node is not |
802 | // in recipe metamodel in VIATRA 2.0 | 859 | // available |
803 | 860 | // in recipe metamodel in VIATRA 2.0 | |
804 | // Find called query | 861 | |
805 | final PQuery referredQuery = constraint.getSupplierKey(); | 862 | // Find called query |
806 | final PlanningTrace callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple()); | 863 | final PQuery referredQuery = constraint.getSupplierKey(); |
807 | 864 | final PlanningTrace callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple()); | |
808 | // Calculate irreflexive transitive closure | 865 | |
809 | final TransitiveClosureRecipe tcRecipe = FACTORY.createTransitiveClosureRecipe(); | 866 | // Calculate irreflexive transitive closure |
810 | tcRecipe.setParent(callTrace.getRecipe()); | 867 | final TransitiveClosureRecipe tcRecipe = FACTORY.createTransitiveClosureRecipe(); |
811 | final PlanningTrace tcTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), tcRecipe, callTrace); | 868 | tcRecipe.setParent(callTrace.getRecipe()); |
812 | 869 | final PlanningTrace tcTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), | |
813 | // Enumerate universe type | 870 | tcRecipe, callTrace); |
814 | final IInputKey inputKey = constraint.getUniverseType(); | 871 | |
815 | final InputRecipe universeTypeRecipe = RecipesHelper.inputRecipe(inputKey, inputKey.getStringID(), inputKey.getArity()); | 872 | // Enumerate universe type |
816 | final PlanningTrace universeTypeTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple( | 873 | final IInputKey inputKey = constraint.getUniverseType(); |
817 | Tuples.staticArityFlatTupleOf(constraint.getVariablesTuple().get(0))), universeTypeRecipe); | 874 | final InputRecipe universeTypeRecipe = RecipesHelper.inputRecipe(inputKey, inputKey.getStringID(), |
818 | 875 | inputKey.getArity()); | |
819 | // Calculate reflexive access by duplicating universe type column | 876 | final PlanningTrace universeTypeTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple( |
820 | final TrimmerRecipe reflexiveRecipe = FACTORY.createTrimmerRecipe(); | 877 | Tuples.staticArityFlatTupleOf(constraint.getVariablesTuple().get(0))), universeTypeRecipe); |
821 | reflexiveRecipe.setMask(RecipesHelper.mask(1, 0, 0)); | 878 | |
822 | reflexiveRecipe.setParent(universeTypeRecipe); | 879 | // Calculate reflexive access by duplicating universe type column |
823 | final PlanningTrace reflexiveTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), reflexiveRecipe, universeTypeTrace); | 880 | final TrimmerRecipe reflexiveRecipe = FACTORY.createTrimmerRecipe(); |
824 | 881 | reflexiveRecipe.setMask(RecipesHelper.mask(1, 0, 0)); | |
825 | // Finally, reduce duplicates after a join | 882 | reflexiveRecipe.setParent(universeTypeRecipe); |
826 | final UniquenessEnforcerRecipe brtcRecipe = FACTORY.createUniquenessEnforcerRecipe(); | 883 | final PlanningTrace reflexiveTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), |
827 | brtcRecipe.getParents().add(tcRecipe); | 884 | reflexiveRecipe, universeTypeTrace); |
828 | brtcRecipe.getParents().add(reflexiveRecipe); | 885 | |
829 | 886 | // Finally, reduce duplicates after a join | |
830 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), brtcRecipe, reflexiveTrace, tcTrace); | 887 | final UniquenessEnforcerRecipe brtcRecipe = FACTORY.createUniquenessEnforcerRecipe(); |
831 | } | 888 | brtcRecipe.getParents().add(tcRecipe); |
889 | brtcRecipe.getParents().add(reflexiveRecipe); | ||
890 | |||
891 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), brtcRecipe, reflexiveTrace, | ||
892 | tcTrace); | ||
893 | } | ||
832 | 894 | ||
833 | private PlanningTrace compileEnumerable(SubPlan plan, RepresentativeElectionConstraint constraint) { | 895 | private PlanningTrace compileEnumerable(SubPlan plan, RepresentativeElectionConstraint constraint) { |
834 | var referredQuery = constraint.getSupplierKey(); | 896 | var referredQuery = constraint.getSupplierKey(); |
@@ -839,109 +901,110 @@ public class ReteRecipeCompiler { | |||
839 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, callTrace); | 901 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, callTrace); |
840 | } | 902 | } |
841 | 903 | ||
842 | private PlanningTrace compileEnumerable(SubPlan plan, BinaryTransitiveClosure constraint) { | 904 | private PlanningTrace compileEnumerable(SubPlan plan, BinaryTransitiveClosure constraint) { |
843 | final PQuery referredQuery = constraint.getSupplierKey(); | 905 | final PQuery referredQuery = constraint.getSupplierKey(); |
844 | final PlanningTrace callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple()); | 906 | final PlanningTrace callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple()); |
845 | 907 | ||
846 | final TransitiveClosureRecipe recipe = FACTORY.createTransitiveClosureRecipe(); | 908 | final TransitiveClosureRecipe recipe = FACTORY.createTransitiveClosureRecipe(); |
847 | recipe.setParent(callTrace.getRecipe()); | 909 | recipe.setParent(callTrace.getRecipe()); |
848 | 910 | ||
849 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, callTrace); | 911 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, callTrace); |
850 | } | 912 | } |
851 | 913 | ||
852 | private PlanningTrace compileEnumerable(SubPlan plan, RelationEvaluation constraint) { | 914 | private PlanningTrace compileEnumerable(SubPlan plan, RelationEvaluation constraint) { |
853 | final List<ReteNodeRecipe> parentRecipes = new ArrayList<ReteNodeRecipe>(); | 915 | final List<ReteNodeRecipe> parentRecipes = new ArrayList<ReteNodeRecipe>(); |
854 | final List<RecipeTraceInfo> parentTraceInfos = new ArrayList<RecipeTraceInfo>(); | 916 | final List<RecipeTraceInfo> parentTraceInfos = new ArrayList<RecipeTraceInfo>(); |
855 | for (final PQuery inputQuery : constraint.getReferredQueries()) { | 917 | for (final PQuery inputQuery : constraint.getReferredQueries()) { |
856 | final CompiledQuery compiledQuery = getCompiledForm(inputQuery); | 918 | final CompiledQuery compiledQuery = getCompiledForm(inputQuery); |
857 | parentRecipes.add(compiledQuery.getRecipe()); | 919 | parentRecipes.add(compiledQuery.getRecipe()); |
858 | parentTraceInfos.add(compiledQuery); | 920 | parentTraceInfos.add(compiledQuery); |
859 | } | 921 | } |
860 | final RelationEvaluationRecipe recipe = FACTORY.createRelationEvaluationRecipe(); | 922 | final RelationEvaluationRecipe recipe = FACTORY.createRelationEvaluationRecipe(); |
861 | recipe.getParents().addAll(parentRecipes); | 923 | recipe.getParents().addAll(parentRecipes); |
862 | recipe.setEvaluator(RecipesHelper.expressionDefinition(constraint.getEvaluator())); | 924 | recipe.setEvaluator(RecipesHelper.expressionDefinition(constraint.getEvaluator())); |
863 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, parentTraceInfos); | 925 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, parentTraceInfos); |
864 | } | 926 | } |
865 | 927 | ||
866 | private PlanningTrace compileEnumerable(SubPlan plan, PositivePatternCall constraint) { | 928 | private PlanningTrace compileEnumerable(SubPlan plan, PositivePatternCall constraint) { |
867 | final PQuery referredQuery = constraint.getReferredQuery(); | 929 | final PQuery referredQuery = constraint.getReferredQuery(); |
868 | return referQuery(referredQuery, plan, constraint.getVariablesTuple()); | 930 | return referQuery(referredQuery, plan, constraint.getVariablesTuple()); |
869 | } | 931 | } |
870 | 932 | ||
871 | private PlanningTrace compileEnumerable(SubPlan plan, TypeConstraint constraint) { | 933 | private PlanningTrace compileEnumerable(SubPlan plan, TypeConstraint constraint) { |
872 | final IInputKey inputKey = constraint.getSupplierKey(); | 934 | final IInputKey inputKey = constraint.getSupplierKey(); |
873 | final InputRecipe recipe = RecipesHelper.inputRecipe(inputKey, inputKey.getStringID(), inputKey.getArity()); | 935 | final InputRecipe recipe = RecipesHelper.inputRecipe(inputKey, inputKey.getStringID(), inputKey.getArity()); |
874 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe); | 936 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe); |
875 | } | 937 | } |
876 | 938 | ||
877 | private PlanningTrace compileEnumerable(SubPlan plan, ConstantValue constraint) { | 939 | private PlanningTrace compileEnumerable(SubPlan plan, ConstantValue constraint) { |
878 | final ConstantRecipe recipe = FACTORY.createConstantRecipe(); | 940 | final ConstantRecipe recipe = FACTORY.createConstantRecipe(); |
879 | recipe.getConstantValues().add(constraint.getSupplierKey()); | 941 | recipe.getConstantValues().add(constraint.getSupplierKey()); |
880 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe); | 942 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe); |
881 | } | 943 | } |
882 | 944 | ||
883 | // TODO handle recursion | 945 | // TODO handle recursion |
884 | private PlanningTrace referQuery(PQuery query, SubPlan plan, Tuple actualParametersTuple) { | 946 | private PlanningTrace referQuery(PQuery query, SubPlan plan, Tuple actualParametersTuple) { |
885 | RecipeTraceInfo referredQueryTrace = originalTraceOfReferredQuery(query); | 947 | RecipeTraceInfo referredQueryTrace = originalTraceOfReferredQuery(query); |
886 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(actualParametersTuple), | 948 | return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(actualParametersTuple), |
887 | referredQueryTrace.getRecipe(), referredQueryTrace.getParentRecipeTracesForCloning()); | 949 | referredQueryTrace.getRecipe(), referredQueryTrace.getParentRecipeTracesForCloning()); |
888 | } | 950 | } |
889 | 951 | ||
890 | private RecipeTraceInfo originalTraceOfReferredQuery(PQuery query) { | 952 | private RecipeTraceInfo originalTraceOfReferredQuery(PQuery query) { |
891 | // eliminate superfluous production node? | 953 | // eliminate superfluous production node? |
892 | if (PVisibility.EMBEDDED == query.getVisibility()) { // currently inline patterns only | 954 | if (PVisibility.EMBEDDED == query.getVisibility()) { // currently inline patterns only |
893 | Set<PBody> rewrittenBodies = normalizer.rewrite(query).getBodies(); | 955 | Set<PBody> rewrittenBodies = normalizer.rewrite(query).getBodies(); |
894 | if (1 == rewrittenBodies.size()) { // non-disjunctive | 956 | if (1 == rewrittenBodies.size()) { // non-disjunctive |
895 | // TODO in the future, check if non-recursive - (not currently permitted) | 957 | // TODO in the future, check if non-recursive - (not currently permitted) |
896 | 958 | ||
897 | PBody pBody = rewrittenBodies.iterator().next(); | 959 | PBody pBody = rewrittenBodies.iterator().next(); |
898 | SubPlan bodyFinalPlan = getPlan(pBody); | 960 | SubPlan bodyFinalPlan = getPlan(pBody); |
899 | 961 | ||
900 | // skip over any projections at the end | 962 | // skip over any projections at the end |
901 | bodyFinalPlan = BuildHelper.eliminateTrailingProjections(bodyFinalPlan); | 963 | bodyFinalPlan = BuildHelper.eliminateTrailingProjections(bodyFinalPlan); |
902 | 964 | ||
903 | // TODO checkAndTrimEqualVariables may introduce superfluous trim, | 965 | // TODO checkAndTrimEqualVariables may introduce superfluous trim, |
904 | // but whatever (no uniqueness enforcer needed) | 966 | // but whatever (no uniqueness enforcer needed) |
905 | 967 | ||
906 | // compile body | 968 | // compile body |
907 | final CompiledSubPlan compiledBody = getCompiledForm(bodyFinalPlan); | 969 | final CompiledSubPlan compiledBody = getCompiledForm(bodyFinalPlan); |
908 | 970 | ||
909 | // project to parameter list, add uniqueness enforcer if necessary | 971 | // project to parameter list, add uniqueness enforcer if necessary |
910 | return projectBodyFinalToParameters(compiledBody, true /* ensure uniqueness, as no production node is used */); | 972 | return projectBodyFinalToParameters(compiledBody, true /* ensure uniqueness, as no production node is |
911 | } | 973 | used */); |
912 | } | 974 | } |
913 | 975 | } | |
914 | // otherwise, regular reference to recipe realizing the query | 976 | |
915 | return getCompiledForm(query); | 977 | // otherwise, regular reference to recipe realizing the query |
916 | } | 978 | return getCompiledForm(query); |
917 | 979 | } | |
918 | protected List<CompiledSubPlan> getCompiledFormOfParents(SubPlan plan) { | 980 | |
919 | List<CompiledSubPlan> results = new ArrayList<CompiledSubPlan>(); | 981 | protected List<CompiledSubPlan> getCompiledFormOfParents(SubPlan plan) { |
920 | for (SubPlan parentPlan : plan.getParentPlans()) { | 982 | List<CompiledSubPlan> results = new ArrayList<CompiledSubPlan>(); |
921 | results.add(getCompiledForm(parentPlan)); | 983 | for (SubPlan parentPlan : plan.getParentPlans()) { |
922 | } | 984 | results.add(getCompiledForm(parentPlan)); |
923 | return results; | 985 | } |
924 | } | 986 | return results; |
925 | 987 | } | |
926 | /** | 988 | |
927 | * Returns an unmodifiable view of currently cached compiled queries. | 989 | /** |
928 | */ | 990 | * Returns an unmodifiable view of currently cached compiled queries. |
929 | public Map<PQuery, CompiledQuery> getCachedCompiledQueries() { | 991 | */ |
930 | return Collections.unmodifiableMap(queryCompilerCache); | 992 | public Map<PQuery, CompiledQuery> getCachedCompiledQueries() { |
931 | } | 993 | return Collections.unmodifiableMap(queryCompilerCache); |
932 | 994 | } | |
933 | /** | 995 | |
934 | * Returns an unmodifiable view of currently cached query plans. | 996 | /** |
935 | */ | 997 | * Returns an unmodifiable view of currently cached query plans. |
936 | public Map<PBody, SubPlan> getCachedQueryPlans() { | 998 | */ |
937 | return Collections.unmodifiableMap(plannerCache); | 999 | public Map<PBody, SubPlan> getCachedQueryPlans() { |
938 | } | 1000 | return Collections.unmodifiableMap(plannerCache); |
939 | 1001 | } | |
940 | private QueryEvaluationHint getHints(SubPlan plan) { | 1002 | |
941 | return getHints(plan.getBody().getPattern()); | 1003 | private QueryEvaluationHint getHints(SubPlan plan) { |
942 | } | 1004 | return getHints(plan.getBody().getPattern()); |
943 | 1005 | } | |
944 | private QueryEvaluationHint getHints(PQuery pattern) { | 1006 | |
945 | return hintProvider.getQueryEvaluationHint(pattern); | 1007 | private QueryEvaluationHint getHints(PQuery pattern) { |
946 | } | 1008 | return hintProvider.getQueryEvaluationHint(pattern); |
1009 | } | ||
947 | } | 1010 | } |
diff --git a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/ConnectionFactory.java b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/ConnectionFactory.java index c69757b6..fe70cbc3 100644 --- a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/ConnectionFactory.java +++ b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/ConnectionFactory.java | |||
@@ -11,6 +11,7 @@ package tools.refinery.interpreter.rete.network; | |||
11 | 11 | ||
12 | import tools.refinery.interpreter.matchers.tuple.Tuple; | 12 | import tools.refinery.interpreter.matchers.tuple.Tuple; |
13 | import tools.refinery.interpreter.rete.aggregation.IndexerBasedAggregatorNode; | 13 | import tools.refinery.interpreter.rete.aggregation.IndexerBasedAggregatorNode; |
14 | import tools.refinery.interpreter.rete.aggregation.LeftJoinNode; | ||
14 | import tools.refinery.interpreter.rete.boundary.InputConnector; | 15 | import tools.refinery.interpreter.rete.boundary.InputConnector; |
15 | import tools.refinery.interpreter.rete.eval.RelationEvaluatorNode; | 16 | import tools.refinery.interpreter.rete.eval.RelationEvaluatorNode; |
16 | import tools.refinery.interpreter.rete.index.DualInputNode; | 17 | import tools.refinery.interpreter.rete.index.DualInputNode; |
@@ -78,9 +79,12 @@ class ConnectionFactory { | |||
78 | Slots slots = avoidActiveNodeConflict(parentTraces.get(0), parentTraces.get(1)); | 79 | Slots slots = avoidActiveNodeConflict(parentTraces.get(0), parentTraces.get(1)); |
79 | beta.connectToIndexers(slots.primary, slots.secondary); | 80 | beta.connectToIndexers(slots.primary, slots.secondary); |
80 | } else if (recipe instanceof IndexerBasedAggregatorRecipe) { | 81 | } else if (recipe instanceof IndexerBasedAggregatorRecipe) { |
81 | final IndexerBasedAggregatorNode aggregator = (IndexerBasedAggregatorNode) freshNode; | 82 | final IndexerBasedAggregatorNode aggregator = (IndexerBasedAggregatorNode) freshNode; |
82 | final IndexerBasedAggregatorRecipe aggregatorRecipe = (IndexerBasedAggregatorRecipe) recipe; | 83 | final IndexerBasedAggregatorRecipe aggregatorRecipe = (IndexerBasedAggregatorRecipe) recipe; |
83 | aggregator.initializeWith((ProjectionIndexer) resolveIndexer(aggregatorRecipe.getParent())); | 84 | aggregator.initializeWith((ProjectionIndexer) resolveIndexer(aggregatorRecipe.getParent())); |
85 | } else if (recipe instanceof OuterJoinNodeRecipe outerJoinNodeRecipe) { | ||
86 | var leftJoinNode = (LeftJoinNode) freshNode; | ||
87 | leftJoinNode.initializeWith((ProjectionIndexer) resolveIndexer(outerJoinNodeRecipe.getParent())); | ||
84 | } else if (recipe instanceof MultiParentNodeRecipe) { | 88 | } else if (recipe instanceof MultiParentNodeRecipe) { |
85 | final Receiver receiver = (Receiver) freshNode; | 89 | final Receiver receiver = (Receiver) freshNode; |
86 | List<ReteNodeRecipe> parentRecipes = ((MultiParentNodeRecipe) recipe).getParents(); | 90 | List<ReteNodeRecipe> parentRecipes = ((MultiParentNodeRecipe) recipe).getParents(); |
diff --git a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/NodeFactory.java b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/NodeFactory.java index 301b757d..1f6a01ae 100644 --- a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/NodeFactory.java +++ b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/NodeFactory.java | |||
@@ -20,6 +20,7 @@ import tools.refinery.interpreter.matchers.tuple.Tuples; | |||
20 | import tools.refinery.interpreter.rete.aggregation.ColumnAggregatorNode; | 20 | import tools.refinery.interpreter.rete.aggregation.ColumnAggregatorNode; |
21 | import tools.refinery.interpreter.rete.aggregation.CountNode; | 21 | import tools.refinery.interpreter.rete.aggregation.CountNode; |
22 | import tools.refinery.interpreter.rete.aggregation.IAggregatorNode; | 22 | import tools.refinery.interpreter.rete.aggregation.IAggregatorNode; |
23 | import tools.refinery.interpreter.rete.aggregation.LeftJoinNode; | ||
23 | import tools.refinery.interpreter.rete.aggregation.timely.FaithfulParallelTimelyColumnAggregatorNode; | 24 | import tools.refinery.interpreter.rete.aggregation.timely.FaithfulParallelTimelyColumnAggregatorNode; |
24 | import tools.refinery.interpreter.rete.aggregation.timely.FaithfulSequentialTimelyColumnAggregatorNode; | 25 | import tools.refinery.interpreter.rete.aggregation.timely.FaithfulSequentialTimelyColumnAggregatorNode; |
25 | import tools.refinery.interpreter.rete.aggregation.timely.FirstOnlyParallelTimelyColumnAggregatorNode; | 26 | import tools.refinery.interpreter.rete.aggregation.timely.FirstOnlyParallelTimelyColumnAggregatorNode; |
@@ -72,18 +73,25 @@ class NodeFactory { | |||
72 | return parentNode.constructIndex(toMask(recipe.getMask()), traces); | 73 | return parentNode.constructIndex(toMask(recipe.getMask()), traces); |
73 | // already traced | 74 | // already traced |
74 | } else if (recipe instanceof AggregatorIndexerRecipe) { | 75 | } else if (recipe instanceof AggregatorIndexerRecipe) { |
75 | int indexOfAggregateResult = recipe.getParent().getArity(); | 76 | int indexOfAggregateResult = recipe.getParent().getArity(); |
76 | int resultPosition = recipe.getMask().getSourceIndices().lastIndexOf(indexOfAggregateResult); | 77 | int resultPosition = recipe.getMask().getSourceIndices().lastIndexOf(indexOfAggregateResult); |
77 | 78 | ||
78 | IAggregatorNode aggregatorNode = (IAggregatorNode) parentNode; | 79 | IAggregatorNode aggregatorNode = (IAggregatorNode) parentNode; |
79 | final Indexer result = (resultPosition == -1) ? aggregatorNode.getAggregatorOuterIndexer() | 80 | final Indexer result = (resultPosition == -1) ? aggregatorNode.getAggregatorOuterIndexer() |
80 | : aggregatorNode.getAggregatorOuterIdentityIndexer(resultPosition); | 81 | : aggregatorNode.getAggregatorOuterIdentityIndexer(resultPosition); |
81 | 82 | ||
82 | for (TraceInfo traceInfo : traces) | 83 | for (TraceInfo traceInfo : traces) |
83 | result.assignTraceInfo(traceInfo); | 84 | result.assignTraceInfo(traceInfo); |
84 | return result; | 85 | return result; |
85 | } else | 86 | } else if (recipe instanceof OuterJoinIndexerRecipe) { |
86 | throw new IllegalArgumentException("Unkown Indexer recipe: " + recipe); | 87 | var leftJoinNode = (LeftJoinNode) parentNode; |
88 | var result = leftJoinNode.getOuterIndexer(); | ||
89 | for (TraceInfo traceInfo : traces) | ||
90 | result.assignTraceInfo(traceInfo); | ||
91 | return result; | ||
92 | } else { | ||
93 | throw new IllegalArgumentException("Unkown Indexer recipe: " + recipe); | ||
94 | } | ||
87 | } | 95 | } |
88 | 96 | ||
89 | /** | 97 | /** |
@@ -134,6 +142,8 @@ class NodeFactory { | |||
134 | return instantiateNode(reteContainer, (CountAggregatorRecipe) recipe); | 142 | return instantiateNode(reteContainer, (CountAggregatorRecipe) recipe); |
135 | if (recipe instanceof SingleColumnAggregatorRecipe) | 143 | if (recipe instanceof SingleColumnAggregatorRecipe) |
136 | return instantiateNode(reteContainer, (SingleColumnAggregatorRecipe) recipe); | 144 | return instantiateNode(reteContainer, (SingleColumnAggregatorRecipe) recipe); |
145 | if (recipe instanceof OuterJoinNodeRecipe outerJoinNodeRecipe) | ||
146 | return instantiateNode(reteContainer, outerJoinNodeRecipe); | ||
137 | if (recipe instanceof DiscriminatorDispatcherRecipe) | 147 | if (recipe instanceof DiscriminatorDispatcherRecipe) |
138 | return instantiateNode(reteContainer, (DiscriminatorDispatcherRecipe) recipe); | 148 | return instantiateNode(reteContainer, (DiscriminatorDispatcherRecipe) recipe); |
139 | if (recipe instanceof DiscriminatorBucketRecipe) | 149 | if (recipe instanceof DiscriminatorBucketRecipe) |
@@ -246,6 +256,10 @@ class NodeFactory { | |||
246 | } | 256 | } |
247 | } | 257 | } |
248 | 258 | ||
259 | private Supplier instantiateNode(ReteContainer reteContainer, OuterJoinNodeRecipe recipe) { | ||
260 | return new LeftJoinNode(reteContainer, recipe.getDefaultValue()); | ||
261 | } | ||
262 | |||
249 | private Supplier instantiateNode(ReteContainer reteContainer, TransitiveClosureRecipe recipe) { | 263 | private Supplier instantiateNode(ReteContainer reteContainer, TransitiveClosureRecipe recipe) { |
250 | return new TransitiveClosureNode(reteContainer); | 264 | return new TransitiveClosureNode(reteContainer); |
251 | } | 265 | } |
diff --git a/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/basicdeferred/LeftJoinConstraint.java b/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/basicdeferred/LeftJoinConstraint.java new file mode 100644 index 00000000..1c1a895e --- /dev/null +++ b/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/basicdeferred/LeftJoinConstraint.java | |||
@@ -0,0 +1,82 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro | ||
3 | * Copyright (c) 2024 The Refinery Authors <https://refinery.tools/> | ||
4 | * This program and the accompanying materials are made available under the | ||
5 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
6 | * http://www.eclipse.org/legal/epl-v20.html. | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package tools.refinery.interpreter.matchers.psystem.basicdeferred; | ||
10 | |||
11 | import tools.refinery.interpreter.matchers.context.IQueryMetaContext; | ||
12 | import tools.refinery.interpreter.matchers.psystem.ITypeInfoProviderConstraint; | ||
13 | import tools.refinery.interpreter.matchers.psystem.PBody; | ||
14 | import tools.refinery.interpreter.matchers.psystem.PVariable; | ||
15 | import tools.refinery.interpreter.matchers.psystem.TypeJudgement; | ||
16 | import tools.refinery.interpreter.matchers.psystem.queries.PQuery; | ||
17 | import tools.refinery.interpreter.matchers.tuple.Tuple; | ||
18 | import tools.refinery.interpreter.matchers.tuple.Tuples; | ||
19 | |||
20 | import java.util.Collections; | ||
21 | import java.util.Set; | ||
22 | |||
23 | public class LeftJoinConstraint extends PatternCallBasedDeferred implements ITypeInfoProviderConstraint { | ||
24 | protected PVariable resultVariable; | ||
25 | protected int optionalColumn; | ||
26 | protected Object defaultValue; | ||
27 | |||
28 | public LeftJoinConstraint(PBody pBody, Tuple actualParametersTuple, PQuery query, PVariable resultVariable, | ||
29 | int optionalColumn, Object defaultValue) { | ||
30 | super(pBody, actualParametersTuple, query, Collections.singleton(resultVariable)); | ||
31 | this.resultVariable = resultVariable; | ||
32 | this.optionalColumn = optionalColumn; | ||
33 | this.defaultValue = defaultValue; | ||
34 | } | ||
35 | |||
36 | public PVariable getResultVariable() { | ||
37 | return resultVariable; | ||
38 | } | ||
39 | |||
40 | public int getOptionalColumn() { | ||
41 | return optionalColumn; | ||
42 | } | ||
43 | |||
44 | public Object getDefaultValue() { | ||
45 | return defaultValue; | ||
46 | } | ||
47 | |||
48 | @Override | ||
49 | public Set<PVariable> getDeducedVariables() { | ||
50 | return Collections.singleton(resultVariable); | ||
51 | } | ||
52 | |||
53 | @Override | ||
54 | protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement) { | ||
55 | if (resultVariable.equals(obsolete)) { | ||
56 | resultVariable = replacement; | ||
57 | } | ||
58 | } | ||
59 | |||
60 | @Override | ||
61 | protected Set<PVariable> getCandidateQuantifiedVariables() { | ||
62 | return actualParametersTuple.getDistinctElements(); | ||
63 | } | ||
64 | |||
65 | @Override | ||
66 | protected String toStringRest() { | ||
67 | return query.getFullyQualifiedName() + "@" + actualParametersTuple.toString() + "->" | ||
68 | + resultVariable.toString(); | ||
69 | } | ||
70 | |||
71 | @Override | ||
72 | public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) { | ||
73 | var optionalParameter = getReferredQuery().getParameters().get(optionalColumn); | ||
74 | var unaryType = optionalParameter.getDeclaredUnaryType(); | ||
75 | if (unaryType != null && !context.isEnumerable(unaryType)) { | ||
76 | // The outer join makes the result variable non-enumerable, since the default value might not be present in | ||
77 | // the model. | ||
78 | return Set.of(new TypeJudgement(unaryType, Tuples.staticArityFlatTupleOf(resultVariable))); | ||
79 | } | ||
80 | return Set.of(); | ||
81 | } | ||
82 | } | ||
diff --git a/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/rewriters/PBodyCopier.java b/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/rewriters/PBodyCopier.java index 99350185..1e580599 100644 --- a/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/rewriters/PBodyCopier.java +++ b/subprojects/interpreter/src/main/java/tools/refinery/interpreter/matchers/psystem/rewriters/PBodyCopier.java | |||
@@ -137,7 +137,9 @@ public class PBodyCopier extends AbstractRewriterTraceSource { | |||
137 | } else if (constraint instanceof PatternMatchCounter) { | 137 | } else if (constraint instanceof PatternMatchCounter) { |
138 | copyPatternMatchCounterConstraint((PatternMatchCounter) constraint); | 138 | copyPatternMatchCounterConstraint((PatternMatchCounter) constraint); |
139 | } else if (constraint instanceof AggregatorConstraint) { | 139 | } else if (constraint instanceof AggregatorConstraint) { |
140 | copyAggregatorConstraint((AggregatorConstraint) constraint); | 140 | copyAggregatorConstraint((AggregatorConstraint) constraint); |
141 | } else if (constraint instanceof LeftJoinConstraint leftJoinConstraint) { | ||
142 | copyLeftJoinConstraint((LeftJoinConstraint) constraint); | ||
141 | } else if (constraint instanceof ExpressionEvaluation) { | 143 | } else if (constraint instanceof ExpressionEvaluation) { |
142 | copyExpressionEvaluationConstraint((ExpressionEvaluation) constraint); | 144 | copyExpressionEvaluationConstraint((ExpressionEvaluation) constraint); |
143 | } else { | 145 | } else { |
@@ -256,6 +258,15 @@ public class PBodyCopier extends AbstractRewriterTraceSource { | |||
256 | constraint.getReferredQuery(), mappedResultVariable, constraint.getAggregatedColumn())); | 258 | constraint.getReferredQuery(), mappedResultVariable, constraint.getAggregatedColumn())); |
257 | } | 259 | } |
258 | 260 | ||
261 | protected void copyLeftJoinConstraint(LeftJoinConstraint constraint) { | ||
262 | PVariable[] mappedVariables = extractMappedVariables(constraint); | ||
263 | PVariable mappedResultVariable = variableMapping.get(constraint.getResultVariable()); | ||
264 | Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables); | ||
265 | addTrace(constraint, new LeftJoinConstraint(body, variablesTuple, | ||
266 | constraint.getReferredQuery(), mappedResultVariable, constraint.getOptionalColumn(), | ||
267 | constraint.getDefaultValue())); | ||
268 | } | ||
269 | |||
259 | protected void copyExpressionEvaluationConstraint(ExpressionEvaluation expressionEvaluation) { | 270 | protected void copyExpressionEvaluationConstraint(ExpressionEvaluation expressionEvaluation) { |
260 | PVariable mappedOutputVariable = variableMapping.get(expressionEvaluation.getOutputVariable()); | 271 | PVariable mappedOutputVariable = variableMapping.get(expressionEvaluation.getOutputVariable()); |
261 | addTrace(expressionEvaluation, new ExpressionEvaluation(body, | 272 | addTrace(expressionEvaluation, new ExpressionEvaluation(body, |
diff --git a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java index a09a475b..8dad8f8a 100644 --- a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java +++ b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java | |||
@@ -24,9 +24,9 @@ import tools.refinery.language.model.problem.*; | |||
24 | import tools.refinery.language.naming.NamingUtil; | 24 | import tools.refinery.language.naming.NamingUtil; |
25 | import tools.refinery.language.naming.ProblemQualifiedNameConverter; | 25 | import tools.refinery.language.naming.ProblemQualifiedNameConverter; |
26 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; | 26 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; |
27 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; | ||
27 | import tools.refinery.language.scoping.imports.ImportCollector; | 28 | import tools.refinery.language.scoping.imports.ImportCollector; |
28 | import tools.refinery.language.utils.BuiltinSymbols; | 29 | import tools.refinery.language.utils.BuiltinSymbols; |
29 | import tools.refinery.language.utils.ProblemDesugarer; | ||
30 | import tools.refinery.language.utils.ProblemUtil; | 30 | import tools.refinery.language.utils.ProblemUtil; |
31 | import tools.refinery.language.validation.ReferenceCounter; | 31 | import tools.refinery.language.validation.ReferenceCounter; |
32 | 32 | ||
@@ -43,10 +43,10 @@ public class ProblemCrossrefProposalProvider extends IdeCrossrefProposalProvider | |||
43 | private ReferenceCounter referenceCounter; | 43 | private ReferenceCounter referenceCounter; |
44 | 44 | ||
45 | @Inject | 45 | @Inject |
46 | private ProblemDesugarer desugarer; | 46 | private ImportCollector importCollector; |
47 | 47 | ||
48 | @Inject | 48 | @Inject |
49 | private ImportCollector importCollector; | 49 | private ImportAdapterProvider importAdapterProvider; |
50 | 50 | ||
51 | @Override | 51 | @Override |
52 | protected Iterable<IEObjectDescription> queryScope(IScope scope, CrossReference crossReference, | 52 | protected Iterable<IEObjectDescription> queryScope(IScope scope, CrossReference crossReference, |
@@ -125,16 +125,27 @@ public class ProblemCrossrefProposalProvider extends IdeCrossrefProposalProvider | |||
125 | return oppositeShouldBeVisible(candidateReferenceDeclaration, context); | 125 | return oppositeShouldBeVisible(candidateReferenceDeclaration, context); |
126 | } | 126 | } |
127 | 127 | ||
128 | var builtinSymbolsOption = desugarer.getBuiltinSymbols(context.getRootModel()); | 128 | if (eReference.equals(ProblemPackage.Literals.VARIABLE_OR_NODE_EXPR__VARIABLE_OR_NODE)) { |
129 | if (builtinSymbolsOption.isEmpty()) { | 129 | var assignedVariable = getAssignedVariable(context.getCurrentModel()); |
130 | return true; | 130 | if (assignedVariable != null && Objects.equals(assignedVariable, candidate.getEObjectOrProxy())) { |
131 | return false; | ||
132 | } | ||
131 | } | 133 | } |
132 | var builtinSymbols = builtinSymbolsOption.get(); | 134 | |
135 | var builtinSymbols = importAdapterProvider.getBuiltinSymbols(context.getResource()); | ||
133 | 136 | ||
134 | return builtinSymbolAwareShouldBeVisible(candidate, context, eReference, builtinSymbols, | 137 | return builtinSymbolAwareShouldBeVisible(candidate, context, eReference, builtinSymbols, |
135 | candidateEObjectOrProxy); | 138 | candidateEObjectOrProxy); |
136 | } | 139 | } |
137 | 140 | ||
141 | private VariableOrNode getAssignedVariable(EObject context) { | ||
142 | var assignmentExpr = EcoreUtil2.getContainerOfType(context, AssignmentExpr.class); | ||
143 | if (assignmentExpr != null && assignmentExpr.getLeft() instanceof VariableOrNodeExpr variableOrNodeExpr) { | ||
144 | return variableOrNodeExpr.getVariableOrNode(); | ||
145 | } | ||
146 | return null; | ||
147 | } | ||
148 | |||
138 | private boolean importedModuleShouldBeVisible(IEObjectDescription candidate, ContentAssistContext context) { | 149 | private boolean importedModuleShouldBeVisible(IEObjectDescription candidate, ContentAssistContext context) { |
139 | var moduleKind = candidate.getUserData(ProblemResourceDescriptionStrategy.MODULE_KIND); | 150 | var moduleKind = candidate.getUserData(ProblemResourceDescriptionStrategy.MODULE_KIND); |
140 | if (!ModuleKind.MODULE.getName().equals(moduleKind)) { | 151 | if (!ModuleKind.MODULE.getName().equals(moduleKind)) { |
@@ -187,8 +198,8 @@ public class ProblemCrossrefProposalProvider extends IdeCrossrefProposalProvider | |||
187 | if (builtinSymbols.exists().equals(candidateEObjectOrProxy)) { | 198 | if (builtinSymbols.exists().equals(candidateEObjectOrProxy)) { |
188 | return false; | 199 | return false; |
189 | } | 200 | } |
190 | var arity = candidate.getUserData(ProblemResourceDescriptionStrategy.ARITY); | 201 | return ProblemResourceDescriptionStrategy.TYPE_LIKE_TRUE.equals( |
191 | return arity == null || arity.equals("1"); | 202 | candidate.getUserData(ProblemResourceDescriptionStrategy.TYPE_LIKE)); |
192 | } | 203 | } |
193 | 204 | ||
194 | if (eReference.equals(ProblemPackage.Literals.CLASS_DECLARATION__SUPER_TYPES)) { | 205 | if (eReference.equals(ProblemPackage.Literals.CLASS_DECLARATION__SUPER_TYPES)) { |
diff --git a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java index 891c73c7..06f0e758 100644 --- a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java +++ b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java | |||
@@ -18,7 +18,6 @@ import org.eclipse.xtext.service.OperationCanceledManager; | |||
18 | import org.eclipse.xtext.util.CancelIndicator; | 18 | import org.eclipse.xtext.util.CancelIndicator; |
19 | import org.jetbrains.annotations.NotNull; | 19 | import org.jetbrains.annotations.NotNull; |
20 | import tools.refinery.language.model.problem.*; | 20 | import tools.refinery.language.model.problem.*; |
21 | import tools.refinery.language.utils.ProblemDesugarer; | ||
22 | import tools.refinery.language.utils.ProblemUtil; | 21 | import tools.refinery.language.utils.ProblemUtil; |
23 | 22 | ||
24 | import java.util.List; | 23 | import java.util.List; |
@@ -26,6 +25,8 @@ import java.util.List; | |||
26 | public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighlightingCalculator { | 25 | public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighlightingCalculator { |
27 | private static final String BUILTIN_CLASS = "builtin"; | 26 | private static final String BUILTIN_CLASS = "builtin"; |
28 | private static final String ABSTRACT_CLASS = "abstract"; | 27 | private static final String ABSTRACT_CLASS = "abstract"; |
28 | private static final String DATATYPE_CLASS = "datatype"; | ||
29 | private static final String AGGREGATOR_CLASS = "aggregator"; | ||
29 | private static final String CONTAINMENT_CLASS = "containment"; | 30 | private static final String CONTAINMENT_CLASS = "containment"; |
30 | private static final String ERROR_CLASS = "error"; | 31 | private static final String ERROR_CLASS = "error"; |
31 | private static final String NODE_CLASS = "node"; | 32 | private static final String NODE_CLASS = "node"; |
@@ -36,9 +37,6 @@ public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighli | |||
36 | private OperationCanceledManager operationCanceledManager; | 37 | private OperationCanceledManager operationCanceledManager; |
37 | 38 | ||
38 | @Inject | 39 | @Inject |
39 | private ProblemDesugarer desugarer; | ||
40 | |||
41 | @Inject | ||
42 | private TypeHashProvider typeHashProvider; | 40 | private TypeHashProvider typeHashProvider; |
43 | 41 | ||
44 | @Override | 42 | @Override |
@@ -112,8 +110,14 @@ public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighli | |||
112 | if (eObject instanceof ClassDeclaration classDeclaration && classDeclaration.isAbstract()) { | 110 | if (eObject instanceof ClassDeclaration classDeclaration && classDeclaration.isAbstract()) { |
113 | classesBuilder.add(ABSTRACT_CLASS); | 111 | classesBuilder.add(ABSTRACT_CLASS); |
114 | } | 112 | } |
113 | if (eObject instanceof DatatypeDeclaration) { | ||
114 | classesBuilder.add(DATATYPE_CLASS); | ||
115 | } | ||
116 | if (eObject instanceof AggregatorDeclaration) { | ||
117 | classesBuilder.add(AGGREGATOR_CLASS); | ||
118 | } | ||
115 | if (eObject instanceof ReferenceDeclaration referenceDeclaration | 119 | if (eObject instanceof ReferenceDeclaration referenceDeclaration |
116 | && desugarer.isContainmentReference(referenceDeclaration)) { | 120 | && ProblemUtil.isContainmentReference(referenceDeclaration)) { |
117 | classesBuilder.add(CONTAINMENT_CLASS); | 121 | classesBuilder.add(CONTAINMENT_CLASS); |
118 | } | 122 | } |
119 | if (isError && reference != null) { | 123 | if (isError && reference != null) { |
diff --git a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/TypeHashProvider.java b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/TypeHashProvider.java index 82a6af06..2821e1b6 100644 --- a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/TypeHashProvider.java +++ b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/TypeHashProvider.java | |||
@@ -17,6 +17,7 @@ import org.eclipse.xtext.scoping.impl.GlobalResourceDescriptionProvider; | |||
17 | import org.eclipse.xtext.util.IResourceScopeCache; | 17 | import org.eclipse.xtext.util.IResourceScopeCache; |
18 | import tools.refinery.language.documentation.DocumentationCommentParser; | 18 | import tools.refinery.language.documentation.DocumentationCommentParser; |
19 | import tools.refinery.language.model.problem.*; | 19 | import tools.refinery.language.model.problem.*; |
20 | import tools.refinery.language.naming.NamingUtil; | ||
20 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; | 21 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; |
21 | import tools.refinery.language.scoping.imports.ImportCollector; | 22 | import tools.refinery.language.scoping.imports.ImportCollector; |
22 | import tools.refinery.language.utils.ProblemUtil; | 23 | import tools.refinery.language.utils.ProblemUtil; |
@@ -55,7 +56,7 @@ public class TypeHashProvider { | |||
55 | if (qualifiedName == null) { | 56 | if (qualifiedName == null) { |
56 | return null; | 57 | return null; |
57 | } | 58 | } |
58 | var qualifiedNameString = qualifiedNameConverter.toString(qualifiedName); | 59 | var qualifiedNameString = qualifiedNameConverter.toString(NamingUtil.addRootPrefix(qualifiedName)); |
59 | var problem = EcoreUtil2.getContainerOfType(relation, Problem.class); | 60 | var problem = EcoreUtil2.getContainerOfType(relation, Problem.class); |
60 | if (problem == null) { | 61 | if (problem == null) { |
61 | return null; | 62 | return null; |
diff --git a/subprojects/language-model/problem.aird b/subprojects/language-model/problem.aird index cbe413cd..f8a50a76 100644 --- a/subprojects/language-model/problem.aird +++ b/subprojects/language-model/problem.aird | |||
@@ -7,11 +7,11 @@ | |||
7 | <semanticResources>build/resources/main/model/problem.genmodel</semanticResources> | 7 | <semanticResources>build/resources/main/model/problem.genmodel</semanticResources> |
8 | <ownedViews xmi:type="viewpoint:DView" uid="_CsAAYKA4EeuqkpDnuik1sg"> | 8 | <ownedViews xmi:type="viewpoint:DView" uid="_CsAAYKA4EeuqkpDnuik1sg"> |
9 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> | 9 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> |
10 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_CsYa4KA4EeuqkpDnuik1sg" name="declarations" repPath="#_CsUwgKA4EeuqkpDnuik1sg" changeId="1707609830791"> | 10 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_CsYa4KA4EeuqkpDnuik1sg" name="declarations" repPath="#_CsUwgKA4EeuqkpDnuik1sg" changeId="1709659837733"> |
11 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 11 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
12 | <target xmi:type="ecore:EPackage" href="src/main/resources/model/problem.ecore#/"/> | 12 | <target xmi:type="ecore:EPackage" href="src/main/resources/model/problem.ecore#/"/> |
13 | </ownedRepresentationDescriptors> | 13 | </ownedRepresentationDescriptors> |
14 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_z1bOYF3lEe2LuOZzJ_LhLg" name="expressions" repPath="#_z1YyIF3lEe2LuOZzJ_LhLg" changeId="1706657349781"> | 14 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_z1bOYF3lEe2LuOZzJ_LhLg" name="expressions" repPath="#_z1YyIF3lEe2LuOZzJ_LhLg" changeId="1709659698980"> |
15 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 15 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
16 | <target xmi:type="ecore:EPackage" href="src/main/resources/model/problem.ecore#/"/> | 16 | <target xmi:type="ecore:EPackage" href="src/main/resources/model/problem.ecore#/"/> |
17 | </ownedRepresentationDescriptors> | 17 | </ownedRepresentationDescriptors> |
@@ -69,7 +69,7 @@ | |||
69 | <styles xmi:type="notation:FilteringStyle" xmi:id="_c-HCRqA4EeuqkpDnuik1sg"/> | 69 | <styles xmi:type="notation:FilteringStyle" xmi:id="_c-HCRqA4EeuqkpDnuik1sg"/> |
70 | </children> | 70 | </children> |
71 | <styles xmi:type="notation:ShapeStyle" xmi:id="_c-HCQaA4EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> | 71 | <styles xmi:type="notation:ShapeStyle" xmi:id="_c-HCQaA4EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> |
72 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_c-HCQqA4EeuqkpDnuik1sg" x="560" y="1124" width="147" height="100"/> | 72 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_c-HCQqA4EeuqkpDnuik1sg" x="560" y="1104" width="147" height="100"/> |
73 | </children> | 73 | </children> |
74 | <children xmi:type="notation:Node" xmi:id="_RzZA0KA5EeuqkpDnuik1sg" type="2003" element="_RzK-YKA5EeuqkpDnuik1sg"> | 74 | <children xmi:type="notation:Node" xmi:id="_RzZA0KA5EeuqkpDnuik1sg" type="2003" element="_RzK-YKA5EeuqkpDnuik1sg"> |
75 | <children xmi:type="notation:Node" xmi:id="_RzZn4KA5EeuqkpDnuik1sg" type="5007"/> | 75 | <children xmi:type="notation:Node" xmi:id="_RzZn4KA5EeuqkpDnuik1sg" type="5007"/> |
@@ -95,7 +95,7 @@ | |||
95 | <styles xmi:type="notation:FilteringStyle" xmi:id="_fit3lqA5EeuqkpDnuik1sg"/> | 95 | <styles xmi:type="notation:FilteringStyle" xmi:id="_fit3lqA5EeuqkpDnuik1sg"/> |
96 | </children> | 96 | </children> |
97 | <styles xmi:type="notation:ShapeStyle" xmi:id="_fit3kaA5EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> | 97 | <styles xmi:type="notation:ShapeStyle" xmi:id="_fit3kaA5EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> |
98 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fit3kqA5EeuqkpDnuik1sg" x="1340" y="716" width="150" height="100"/> | 98 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fit3kqA5EeuqkpDnuik1sg" x="1680" y="716" width="150" height="100"/> |
99 | </children> | 99 | </children> |
100 | <children xmi:type="notation:Node" xmi:id="_QKLK0KA6EeuqkpDnuik1sg" type="2003" element="_QKD2EKA6EeuqkpDnuik1sg"> | 100 | <children xmi:type="notation:Node" xmi:id="_QKLK0KA6EeuqkpDnuik1sg" type="2003" element="_QKD2EKA6EeuqkpDnuik1sg"> |
101 | <children xmi:type="notation:Node" xmi:id="_QKLK06A6EeuqkpDnuik1sg" type="5007"/> | 101 | <children xmi:type="notation:Node" xmi:id="_QKLK06A6EeuqkpDnuik1sg" type="5007"/> |
@@ -104,7 +104,7 @@ | |||
104 | <styles xmi:type="notation:FilteringStyle" xmi:id="_QKLK1qA6EeuqkpDnuik1sg"/> | 104 | <styles xmi:type="notation:FilteringStyle" xmi:id="_QKLK1qA6EeuqkpDnuik1sg"/> |
105 | </children> | 105 | </children> |
106 | <styles xmi:type="notation:ShapeStyle" xmi:id="_QKLK0aA6EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> | 106 | <styles xmi:type="notation:ShapeStyle" xmi:id="_QKLK0aA6EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> |
107 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QKLK0qA6EeuqkpDnuik1sg" x="1347" y="530" width="120" height="100"/> | 107 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QKLK0qA6EeuqkpDnuik1sg" x="1687" y="530" width="120" height="100"/> |
108 | </children> | 108 | </children> |
109 | <children xmi:type="notation:Node" xmi:id="_jP6FkKA6EeuqkpDnuik1sg" type="2003" element="_jPpm4KA6EeuqkpDnuik1sg"> | 109 | <children xmi:type="notation:Node" xmi:id="_jP6FkKA6EeuqkpDnuik1sg" type="2003" element="_jPpm4KA6EeuqkpDnuik1sg"> |
110 | <children xmi:type="notation:Node" xmi:id="_jP6soKA6EeuqkpDnuik1sg" type="5007"/> | 110 | <children xmi:type="notation:Node" xmi:id="_jP6soKA6EeuqkpDnuik1sg" type="5007"/> |
@@ -113,7 +113,7 @@ | |||
113 | <styles xmi:type="notation:FilteringStyle" xmi:id="_jP6so6A6EeuqkpDnuik1sg"/> | 113 | <styles xmi:type="notation:FilteringStyle" xmi:id="_jP6so6A6EeuqkpDnuik1sg"/> |
114 | </children> | 114 | </children> |
115 | <styles xmi:type="notation:ShapeStyle" xmi:id="_jP6FkaA6EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> | 115 | <styles xmi:type="notation:ShapeStyle" xmi:id="_jP6FkaA6EeuqkpDnuik1sg" fontName="Noto Sans" fontHeight="8"/> |
116 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jP6FkqA6EeuqkpDnuik1sg" x="1172" y="332" width="120" height="100"/> | 116 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jP6FkqA6EeuqkpDnuik1sg" x="1512" y="332" width="120" height="100"/> |
117 | </children> | 117 | </children> |
118 | <children xmi:type="notation:Node" xmi:id="_xsq_MKA8EeuqkpDnuik1sg" type="2003" element="_xsYrUKA8EeuqkpDnuik1sg"> | 118 | <children xmi:type="notation:Node" xmi:id="_xsq_MKA8EeuqkpDnuik1sg" type="2003" element="_xsYrUKA8EeuqkpDnuik1sg"> |
119 | <children xmi:type="notation:Node" xmi:id="_xsrmQKA8EeuqkpDnuik1sg" type="5007"/> | 119 | <children xmi:type="notation:Node" xmi:id="_xsrmQKA8EeuqkpDnuik1sg" type="5007"/> |
@@ -219,7 +219,7 @@ | |||
219 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Kw_WM9bNEeuymriYTNxK2g"/> | 219 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Kw_WM9bNEeuymriYTNxK2g"/> |
220 | </children> | 220 | </children> |
221 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Kw-vIdbNEeuymriYTNxK2g" fontName="Noto Sans" fontHeight="8"/> | 221 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Kw-vIdbNEeuymriYTNxK2g" fontName="Noto Sans" fontHeight="8"/> |
222 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kw-vItbNEeuymriYTNxK2g" x="1109" y="176" width="120" height="100"/> | 222 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kw-vItbNEeuymriYTNxK2g" x="1260" y="176" width="120" height="100"/> |
223 | </children> | 223 | </children> |
224 | <children xmi:type="notation:Node" xmi:id="_pdJrwAGyEey7cfH5K6RyCw" type="2003" element="_pcXBkAGyEey7cfH5K6RyCw"> | 224 | <children xmi:type="notation:Node" xmi:id="_pdJrwAGyEey7cfH5K6RyCw" type="2003" element="_pcXBkAGyEey7cfH5K6RyCw"> |
225 | <children xmi:type="notation:Node" xmi:id="_pdOkQAGyEey7cfH5K6RyCw" type="5007"/> | 225 | <children xmi:type="notation:Node" xmi:id="_pdOkQAGyEey7cfH5K6RyCw" type="5007"/> |
@@ -241,7 +241,7 @@ | |||
241 | <styles xmi:type="notation:FilteringStyle" xmi:id="_A9eK0irZEeyyC-O0_LlY9w"/> | 241 | <styles xmi:type="notation:FilteringStyle" xmi:id="_A9eK0irZEeyyC-O0_LlY9w"/> |
242 | </children> | 242 | </children> |
243 | <styles xmi:type="notation:ShapeStyle" xmi:id="_A9YrQSrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> | 243 | <styles xmi:type="notation:ShapeStyle" xmi:id="_A9YrQSrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> |
244 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_A9YrQirZEeyyC-O0_LlY9w" x="1685" y="530" width="148" height="100"/> | 244 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_A9YrQirZEeyyC-O0_LlY9w" x="2025" y="530" width="148" height="100"/> |
245 | </children> | 245 | </children> |
246 | <children xmi:type="notation:Node" xmi:id="_N0FQ4CrZEeyyC-O0_LlY9w" type="2003" element="_NzpMACrZEeyyC-O0_LlY9w"> | 246 | <children xmi:type="notation:Node" xmi:id="_N0FQ4CrZEeyyC-O0_LlY9w" type="2003" element="_NzpMACrZEeyyC-O0_LlY9w"> |
247 | <children xmi:type="notation:Node" xmi:id="_N0F38CrZEeyyC-O0_LlY9w" type="5007"/> | 247 | <children xmi:type="notation:Node" xmi:id="_N0F38CrZEeyyC-O0_LlY9w" type="5007"/> |
@@ -250,7 +250,7 @@ | |||
250 | <styles xmi:type="notation:FilteringStyle" xmi:id="_N0F38yrZEeyyC-O0_LlY9w"/> | 250 | <styles xmi:type="notation:FilteringStyle" xmi:id="_N0F38yrZEeyyC-O0_LlY9w"/> |
251 | </children> | 251 | </children> |
252 | <styles xmi:type="notation:ShapeStyle" xmi:id="_N0FQ4SrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> | 252 | <styles xmi:type="notation:ShapeStyle" xmi:id="_N0FQ4SrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> |
253 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N0FQ4irZEeyyC-O0_LlY9w" x="1952" y="716" width="132" height="100"/> | 253 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N0FQ4irZEeyyC-O0_LlY9w" x="2292" y="716" width="132" height="100"/> |
254 | </children> | 254 | </children> |
255 | <children xmi:type="notation:Node" xmi:id="_jzknACrZEeyyC-O0_LlY9w" type="2003" element="_jzRFACrZEeyyC-O0_LlY9w"> | 255 | <children xmi:type="notation:Node" xmi:id="_jzknACrZEeyyC-O0_LlY9w" type="2003" element="_jzRFACrZEeyyC-O0_LlY9w"> |
256 | <children xmi:type="notation:Node" xmi:id="_jzknAyrZEeyyC-O0_LlY9w" type="5007"/> | 256 | <children xmi:type="notation:Node" xmi:id="_jzknAyrZEeyyC-O0_LlY9w" type="5007"/> |
@@ -259,7 +259,7 @@ | |||
259 | <styles xmi:type="notation:FilteringStyle" xmi:id="_jzknBirZEeyyC-O0_LlY9w"/> | 259 | <styles xmi:type="notation:FilteringStyle" xmi:id="_jzknBirZEeyyC-O0_LlY9w"/> |
260 | </children> | 260 | </children> |
261 | <styles xmi:type="notation:ShapeStyle" xmi:id="_jzknASrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> | 261 | <styles xmi:type="notation:ShapeStyle" xmi:id="_jzknASrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> |
262 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jzknAirZEeyyC-O0_LlY9w" x="1952" y="956" width="120" height="100"/> | 262 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jzknAirZEeyyC-O0_LlY9w" x="2292" y="956" width="120" height="100"/> |
263 | </children> | 263 | </children> |
264 | <children xmi:type="notation:Node" xmi:id="_re7JICrZEeyyC-O0_LlY9w" type="2003" element="_remZACrZEeyyC-O0_LlY9w"> | 264 | <children xmi:type="notation:Node" xmi:id="_re7JICrZEeyyC-O0_LlY9w" type="2003" element="_remZACrZEeyyC-O0_LlY9w"> |
265 | <children xmi:type="notation:Node" xmi:id="_re7JIyrZEeyyC-O0_LlY9w" type="5007"/> | 265 | <children xmi:type="notation:Node" xmi:id="_re7JIyrZEeyyC-O0_LlY9w" type="5007"/> |
@@ -268,32 +268,7 @@ | |||
268 | <styles xmi:type="notation:FilteringStyle" xmi:id="_re7JJirZEeyyC-O0_LlY9w"/> | 268 | <styles xmi:type="notation:FilteringStyle" xmi:id="_re7JJirZEeyyC-O0_LlY9w"/> |
269 | </children> | 269 | </children> |
270 | <styles xmi:type="notation:ShapeStyle" xmi:id="_re7JISrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> | 270 | <styles xmi:type="notation:ShapeStyle" xmi:id="_re7JISrZEeyyC-O0_LlY9w" fontName="Segoe UI" fontHeight="8"/> |
271 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_re7JIirZEeyyC-O0_LlY9w" x="1958" y="1124" width="120" height="100"/> | 271 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_re7JIirZEeyyC-O0_LlY9w" x="2298" y="1124" width="120" height="100"/> |
272 | </children> | ||
273 | <children xmi:type="notation:Node" xmi:id="_eKvl8BEKEe2AArBmfNpEZA" type="2003" element="_eKVWQBEKEe2AArBmfNpEZA"> | ||
274 | <children xmi:type="notation:Node" xmi:id="_eKwNABEKEe2AArBmfNpEZA" type="5007"/> | ||
275 | <children xmi:type="notation:Node" xmi:id="_eKwNAREKEe2AArBmfNpEZA" type="7004"> | ||
276 | <children xmi:type="notation:Node" xmi:id="_ftnt8BEKEe2AArBmfNpEZA" type="3010" element="_fs9moBEKEe2AArBmfNpEZA"> | ||
277 | <styles xmi:type="notation:FontStyle" xmi:id="_ftnt8REKEe2AArBmfNpEZA" fontName="Noto Sans" fontHeight="8"/> | ||
278 | <layoutConstraint xmi:type="notation:Location" xmi:id="_ftnt8hEKEe2AArBmfNpEZA"/> | ||
279 | </children> | ||
280 | <children xmi:type="notation:Node" xmi:id="_gPRpgBEKEe2AArBmfNpEZA" type="3010" element="_gO3Z0BEKEe2AArBmfNpEZA"> | ||
281 | <styles xmi:type="notation:FontStyle" xmi:id="_gPRpgREKEe2AArBmfNpEZA" fontName="Noto Sans" fontHeight="8"/> | ||
282 | <layoutConstraint xmi:type="notation:Location" xmi:id="_gPRpghEKEe2AArBmfNpEZA"/> | ||
283 | </children> | ||
284 | <children xmi:type="notation:Node" xmi:id="_gppRUBEKEe2AArBmfNpEZA" type="3010" element="_gpdEEBEKEe2AArBmfNpEZA"> | ||
285 | <styles xmi:type="notation:FontStyle" xmi:id="_gppRUREKEe2AArBmfNpEZA" fontName="Noto Sans" fontHeight="8"/> | ||
286 | <layoutConstraint xmi:type="notation:Location" xmi:id="_gppRUhEKEe2AArBmfNpEZA"/> | ||
287 | </children> | ||
288 | <children xmi:type="notation:Node" xmi:id="_uvSwUF4MEe2m7IaHDkh2Xg" type="3010" element="_uumz0F4MEe2m7IaHDkh2Xg"> | ||
289 | <styles xmi:type="notation:FontStyle" xmi:id="_uvSwUV4MEe2m7IaHDkh2Xg" fontName="Noto Sans" fontHeight="8"/> | ||
290 | <layoutConstraint xmi:type="notation:Location" xmi:id="_uvSwUl4MEe2m7IaHDkh2Xg"/> | ||
291 | </children> | ||
292 | <styles xmi:type="notation:SortingStyle" xmi:id="_eKwNAhEKEe2AArBmfNpEZA"/> | ||
293 | <styles xmi:type="notation:FilteringStyle" xmi:id="_eKwNAxEKEe2AArBmfNpEZA"/> | ||
294 | </children> | ||
295 | <styles xmi:type="notation:ShapeStyle" xmi:id="_eKvl8REKEe2AArBmfNpEZA" fontName="Noto Sans" fontHeight="8"/> | ||
296 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_eKvl8hEKEe2AArBmfNpEZA" x="1124" y="1280" width="120" height="100"/> | ||
297 | </children> | 272 | </children> |
298 | <children xmi:type="notation:Node" xmi:id="_xp1icDNlEe2fD4dIhR_vzA" type="2003" element="_xpDfUDNlEe2fD4dIhR_vzA"> | 273 | <children xmi:type="notation:Node" xmi:id="_xp1icDNlEe2fD4dIhR_vzA" type="2003" element="_xpDfUDNlEe2fD4dIhR_vzA"> |
299 | <children xmi:type="notation:Node" xmi:id="_xp2JgDNlEe2fD4dIhR_vzA" type="5007"/> | 274 | <children xmi:type="notation:Node" xmi:id="_xp2JgDNlEe2fD4dIhR_vzA" type="5007"/> |
@@ -310,6 +285,10 @@ | |||
310 | <styles xmi:type="notation:FontStyle" xmi:id="_5M7gcTNlEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/> | 285 | <styles xmi:type="notation:FontStyle" xmi:id="_5M7gcTNlEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/> |
311 | <layoutConstraint xmi:type="notation:Location" xmi:id="_5M7gcjNlEe2fD4dIhR_vzA"/> | 286 | <layoutConstraint xmi:type="notation:Location" xmi:id="_5M7gcjNlEe2fD4dIhR_vzA"/> |
312 | </children> | 287 | </children> |
288 | <children xmi:type="notation:Node" xmi:id="_9ZwJoM9jEe6T2u19X9cqmQ" type="3010" element="_9ZHQcM9jEe6T2u19X9cqmQ"> | ||
289 | <styles xmi:type="notation:FontStyle" xmi:id="_9ZwJoc9jEe6T2u19X9cqmQ" fontName="Noto Sans" fontHeight="8"/> | ||
290 | <layoutConstraint xmi:type="notation:Location" xmi:id="_9ZwJos9jEe6T2u19X9cqmQ"/> | ||
291 | </children> | ||
313 | <styles xmi:type="notation:SortingStyle" xmi:id="_xp2JgjNlEe2fD4dIhR_vzA"/> | 292 | <styles xmi:type="notation:SortingStyle" xmi:id="_xp2JgjNlEe2fD4dIhR_vzA"/> |
314 | <styles xmi:type="notation:FilteringStyle" xmi:id="_xp2JgzNlEe2fD4dIhR_vzA"/> | 293 | <styles xmi:type="notation:FilteringStyle" xmi:id="_xp2JgzNlEe2fD4dIhR_vzA"/> |
315 | </children> | 294 | </children> |
@@ -319,15 +298,11 @@ | |||
319 | <children xmi:type="notation:Node" xmi:id="_782skF9mEe2rXNsIDUvqhw" type="2003" element="_78pRMF9mEe2rXNsIDUvqhw"> | 298 | <children xmi:type="notation:Node" xmi:id="_782skF9mEe2rXNsIDUvqhw" type="2003" element="_78pRMF9mEe2rXNsIDUvqhw"> |
320 | <children xmi:type="notation:Node" xmi:id="_783ToF9mEe2rXNsIDUvqhw" type="5007"/> | 299 | <children xmi:type="notation:Node" xmi:id="_783ToF9mEe2rXNsIDUvqhw" type="5007"/> |
321 | <children xmi:type="notation:Node" xmi:id="_783ToV9mEe2rXNsIDUvqhw" type="7004"> | 300 | <children xmi:type="notation:Node" xmi:id="_783ToV9mEe2rXNsIDUvqhw" type="7004"> |
322 | <children xmi:type="notation:Node" xmi:id="_WXcHIGg9Ee25oofngfVl_A" type="3010" element="_WWiIMGg9Ee25oofngfVl_A"> | ||
323 | <styles xmi:type="notation:FontStyle" xmi:id="_WXcHIWg9Ee25oofngfVl_A" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/> | ||
324 | <layoutConstraint xmi:type="notation:Location" xmi:id="_WXcHImg9Ee25oofngfVl_A"/> | ||
325 | </children> | ||
326 | <styles xmi:type="notation:SortingStyle" xmi:id="_783Tol9mEe2rXNsIDUvqhw"/> | 301 | <styles xmi:type="notation:SortingStyle" xmi:id="_783Tol9mEe2rXNsIDUvqhw"/> |
327 | <styles xmi:type="notation:FilteringStyle" xmi:id="_783To19mEe2rXNsIDUvqhw"/> | 302 | <styles xmi:type="notation:FilteringStyle" xmi:id="_783To19mEe2rXNsIDUvqhw"/> |
328 | </children> | 303 | </children> |
329 | <styles xmi:type="notation:ShapeStyle" xmi:id="_782skV9mEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | 304 | <styles xmi:type="notation:ShapeStyle" xmi:id="_782skV9mEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> |
330 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_782skl9mEe2rXNsIDUvqhw" x="1550" y="716" width="132" height="100"/> | 305 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_782skl9mEe2rXNsIDUvqhw" x="1890" y="716" width="132" height="100"/> |
331 | </children> | 306 | </children> |
332 | <children xmi:type="notation:Node" xmi:id="_rsftYF9vEe2rXNsIDUvqhw" type="2003" element="_rsVVUF9vEe2rXNsIDUvqhw"> | 307 | <children xmi:type="notation:Node" xmi:id="_rsftYF9vEe2rXNsIDUvqhw" type="2003" element="_rsVVUF9vEe2rXNsIDUvqhw"> |
333 | <children xmi:type="notation:Node" xmi:id="_rsgUcF9vEe2rXNsIDUvqhw" type="5007"/> | 308 | <children xmi:type="notation:Node" xmi:id="_rsgUcF9vEe2rXNsIDUvqhw" type="5007"/> |
@@ -336,7 +311,7 @@ | |||
336 | <styles xmi:type="notation:FilteringStyle" xmi:id="_rsgUc19vEe2rXNsIDUvqhw"/> | 311 | <styles xmi:type="notation:FilteringStyle" xmi:id="_rsgUc19vEe2rXNsIDUvqhw"/> |
337 | </children> | 312 | </children> |
338 | <styles xmi:type="notation:ShapeStyle" xmi:id="_rsftYV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | 313 | <styles xmi:type="notation:ShapeStyle" xmi:id="_rsftYV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> |
339 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rsftYl9vEe2rXNsIDUvqhw" x="1784" y="956" width="120" height="100"/> | 314 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rsftYl9vEe2rXNsIDUvqhw" x="2124" y="956" width="120" height="100"/> |
340 | </children> | 315 | </children> |
341 | <children xmi:type="notation:Node" xmi:id="_thrGUF9vEe2rXNsIDUvqhw" type="2003" element="_thaAkF9vEe2rXNsIDUvqhw"> | 316 | <children xmi:type="notation:Node" xmi:id="_thrGUF9vEe2rXNsIDUvqhw" type="2003" element="_thaAkF9vEe2rXNsIDUvqhw"> |
342 | <children xmi:type="notation:Node" xmi:id="_thrGU19vEe2rXNsIDUvqhw" type="5007"/> | 317 | <children xmi:type="notation:Node" xmi:id="_thrGU19vEe2rXNsIDUvqhw" type="5007"/> |
@@ -345,7 +320,7 @@ | |||
345 | <styles xmi:type="notation:FilteringStyle" xmi:id="_thrGVl9vEe2rXNsIDUvqhw"/> | 320 | <styles xmi:type="notation:FilteringStyle" xmi:id="_thrGVl9vEe2rXNsIDUvqhw"/> |
346 | </children> | 321 | </children> |
347 | <styles xmi:type="notation:ShapeStyle" xmi:id="_thrGUV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | 322 | <styles xmi:type="notation:ShapeStyle" xmi:id="_thrGUV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> |
348 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_thrGUl9vEe2rXNsIDUvqhw" x="1562" y="1124" width="120" height="100"/> | 323 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_thrGUl9vEe2rXNsIDUvqhw" x="1902" y="1124" width="120" height="100"/> |
349 | </children> | 324 | </children> |
350 | <children xmi:type="notation:Node" xmi:id="_uqERwF9vEe2rXNsIDUvqhw" type="2003" element="_up7H0F9vEe2rXNsIDUvqhw"> | 325 | <children xmi:type="notation:Node" xmi:id="_uqERwF9vEe2rXNsIDUvqhw" type="2003" element="_up7H0F9vEe2rXNsIDUvqhw"> |
351 | <children xmi:type="notation:Node" xmi:id="_uqERw19vEe2rXNsIDUvqhw" type="5007"/> | 326 | <children xmi:type="notation:Node" xmi:id="_uqERw19vEe2rXNsIDUvqhw" type="5007"/> |
@@ -354,7 +329,7 @@ | |||
354 | <styles xmi:type="notation:FilteringStyle" xmi:id="_uqE40l9vEe2rXNsIDUvqhw"/> | 329 | <styles xmi:type="notation:FilteringStyle" xmi:id="_uqE40l9vEe2rXNsIDUvqhw"/> |
355 | </children> | 330 | </children> |
356 | <styles xmi:type="notation:ShapeStyle" xmi:id="_uqERwV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | 331 | <styles xmi:type="notation:ShapeStyle" xmi:id="_uqERwV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> |
357 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uqERwl9vEe2rXNsIDUvqhw" x="1784" y="1124" width="120" height="100"/> | 332 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uqERwl9vEe2rXNsIDUvqhw" x="2124" y="1124" width="120" height="100"/> |
358 | </children> | 333 | </children> |
359 | <children xmi:type="notation:Node" xmi:id="_1HBuIF9vEe2rXNsIDUvqhw" type="2003" element="_1G5LQF9vEe2rXNsIDUvqhw"> | 334 | <children xmi:type="notation:Node" xmi:id="_1HBuIF9vEe2rXNsIDUvqhw" type="2003" element="_1G5LQF9vEe2rXNsIDUvqhw"> |
360 | <children xmi:type="notation:Node" xmi:id="_1HBuI19vEe2rXNsIDUvqhw" type="5007"/> | 335 | <children xmi:type="notation:Node" xmi:id="_1HBuI19vEe2rXNsIDUvqhw" type="5007"/> |
@@ -363,7 +338,7 @@ | |||
363 | <styles xmi:type="notation:FilteringStyle" xmi:id="_1HBuJl9vEe2rXNsIDUvqhw"/> | 338 | <styles xmi:type="notation:FilteringStyle" xmi:id="_1HBuJl9vEe2rXNsIDUvqhw"/> |
364 | </children> | 339 | </children> |
365 | <styles xmi:type="notation:ShapeStyle" xmi:id="_1HBuIV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8" italic="true"/> | 340 | <styles xmi:type="notation:ShapeStyle" xmi:id="_1HBuIV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8" italic="true"/> |
366 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1HBuIl9vEe2rXNsIDUvqhw" x="1347" y="956" width="135"/> | 341 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1HBuIl9vEe2rXNsIDUvqhw" x="1687" y="956" width="135"/> |
367 | </children> | 342 | </children> |
368 | <children xmi:type="notation:Node" xmi:id="_286RsF9vEe2rXNsIDUvqhw" type="2003" element="_28xu0F9vEe2rXNsIDUvqhw"> | 343 | <children xmi:type="notation:Node" xmi:id="_286RsF9vEe2rXNsIDUvqhw" type="2003" element="_28xu0F9vEe2rXNsIDUvqhw"> |
369 | <children xmi:type="notation:Node" xmi:id="_2864wF9vEe2rXNsIDUvqhw" type="5007"/> | 344 | <children xmi:type="notation:Node" xmi:id="_2864wF9vEe2rXNsIDUvqhw" type="5007"/> |
@@ -372,7 +347,7 @@ | |||
372 | <styles xmi:type="notation:FilteringStyle" xmi:id="_2864w19vEe2rXNsIDUvqhw"/> | 347 | <styles xmi:type="notation:FilteringStyle" xmi:id="_2864w19vEe2rXNsIDUvqhw"/> |
373 | </children> | 348 | </children> |
374 | <styles xmi:type="notation:ShapeStyle" xmi:id="_286RsV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | 349 | <styles xmi:type="notation:ShapeStyle" xmi:id="_286RsV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> |
375 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_286Rsl9vEe2rXNsIDUvqhw" x="1124" y="956"/> | 350 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_286Rsl9vEe2rXNsIDUvqhw" x="1464" y="956"/> |
376 | </children> | 351 | </children> |
377 | <children xmi:type="notation:Node" xmi:id="_HyypsF9wEe2rXNsIDUvqhw" type="2003" element="_HynqkF9wEe2rXNsIDUvqhw"> | 352 | <children xmi:type="notation:Node" xmi:id="_HyypsF9wEe2rXNsIDUvqhw" type="2003" element="_HynqkF9wEe2rXNsIDUvqhw"> |
378 | <children xmi:type="notation:Node" xmi:id="_Hyyps19wEe2rXNsIDUvqhw" type="5007"/> | 353 | <children xmi:type="notation:Node" xmi:id="_Hyyps19wEe2rXNsIDUvqhw" type="5007"/> |
@@ -381,7 +356,7 @@ | |||
381 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Hyyptl9wEe2rXNsIDUvqhw"/> | 356 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Hyyptl9wEe2rXNsIDUvqhw"/> |
382 | </children> | 357 | </children> |
383 | <styles xmi:type="notation:ShapeStyle" xmi:id="_HyypsV9wEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8" italic="true"/> | 358 | <styles xmi:type="notation:ShapeStyle" xmi:id="_HyypsV9wEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8" italic="true"/> |
384 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Hyypsl9wEe2rXNsIDUvqhw" x="1679" y="1280"/> | 359 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Hyypsl9wEe2rXNsIDUvqhw" x="2019" y="1280"/> |
385 | </children> | 360 | </children> |
386 | <children xmi:type="notation:Node" xmi:id="_dzfLYGTvEe2qdtyPWAtoxA" type="2003" element="_dzVaYGTvEe2qdtyPWAtoxA"> | 361 | <children xmi:type="notation:Node" xmi:id="_dzfLYGTvEe2qdtyPWAtoxA" type="2003" element="_dzVaYGTvEe2qdtyPWAtoxA"> |
387 | <children xmi:type="notation:Node" xmi:id="_dzfLY2TvEe2qdtyPWAtoxA" type="5007"/> | 362 | <children xmi:type="notation:Node" xmi:id="_dzfLY2TvEe2qdtyPWAtoxA" type="5007"/> |
@@ -392,58 +367,6 @@ | |||
392 | <styles xmi:type="notation:ShapeStyle" xmi:id="_dzfLYWTvEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8" italic="true"/> | 367 | <styles xmi:type="notation:ShapeStyle" xmi:id="_dzfLYWTvEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8" italic="true"/> |
393 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dzfLYmTvEe2qdtyPWAtoxA" x="497" y="524"/> | 368 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dzfLYmTvEe2qdtyPWAtoxA" x="497" y="524"/> |
394 | </children> | 369 | </children> |
395 | <children xmi:type="notation:Node" xmi:id="_O9jk8Gg8Ee25oofngfVl_A" type="2003" element="_O8gcEGg8Ee25oofngfVl_A"> | ||
396 | <children xmi:type="notation:Node" xmi:id="_O9rgwGg8Ee25oofngfVl_A" type="5007"/> | ||
397 | <children xmi:type="notation:Node" xmi:id="_O9sH0Gg8Ee25oofngfVl_A" type="7004"> | ||
398 | <styles xmi:type="notation:SortingStyle" xmi:id="_O9sH0Wg8Ee25oofngfVl_A"/> | ||
399 | <styles xmi:type="notation:FilteringStyle" xmi:id="_O9sH0mg8Ee25oofngfVl_A"/> | ||
400 | </children> | ||
401 | <styles xmi:type="notation:ShapeStyle" xmi:id="_O9jk8Wg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
402 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O9jk8mg8Ee25oofngfVl_A" x="572" y="956" width="124" height="100"/> | ||
403 | </children> | ||
404 | <children xmi:type="notation:Node" xmi:id="_cVTpMGg8Ee25oofngfVl_A" type="2003" element="_cU9D4Gg8Ee25oofngfVl_A"> | ||
405 | <children xmi:type="notation:Node" xmi:id="_cVTpM2g8Ee25oofngfVl_A" type="5007"/> | ||
406 | <children xmi:type="notation:Node" xmi:id="_cVTpNGg8Ee25oofngfVl_A" type="7004"> | ||
407 | <children xmi:type="notation:Node" xmi:id="_ECnr8Gg9Ee25oofngfVl_A" type="3010" element="_EB7vcGg9Ee25oofngfVl_A"> | ||
408 | <styles xmi:type="notation:FontStyle" xmi:id="_ECnr8Wg9Ee25oofngfVl_A" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/> | ||
409 | <layoutConstraint xmi:type="notation:Location" xmi:id="_ECnr8mg9Ee25oofngfVl_A"/> | ||
410 | </children> | ||
411 | <styles xmi:type="notation:SortingStyle" xmi:id="_cVTpNWg8Ee25oofngfVl_A"/> | ||
412 | <styles xmi:type="notation:FilteringStyle" xmi:id="_cVTpNmg8Ee25oofngfVl_A"/> | ||
413 | </children> | ||
414 | <styles xmi:type="notation:ShapeStyle" xmi:id="_cVTpMWg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
415 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cVTpMmg8Ee25oofngfVl_A" x="768" y="1124" width="135" height="100"/> | ||
416 | </children> | ||
417 | <children xmi:type="notation:Node" xmi:id="_jZNw0Gg8Ee25oofngfVl_A" type="2003" element="_jY5nwGg8Ee25oofngfVl_A"> | ||
418 | <children xmi:type="notation:Node" xmi:id="_jZNw02g8Ee25oofngfVl_A" type="5007"/> | ||
419 | <children xmi:type="notation:Node" xmi:id="_jZNw1Gg8Ee25oofngfVl_A" type="7004"> | ||
420 | <styles xmi:type="notation:SortingStyle" xmi:id="_jZNw1Wg8Ee25oofngfVl_A"/> | ||
421 | <styles xmi:type="notation:FilteringStyle" xmi:id="_jZNw1mg8Ee25oofngfVl_A"/> | ||
422 | </children> | ||
423 | <styles xmi:type="notation:ShapeStyle" xmi:id="_jZNw0Wg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
424 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jZNw0mg8Ee25oofngfVl_A" x="956" y="1124" width="120" height="100"/> | ||
425 | </children> | ||
426 | <children xmi:type="notation:Node" xmi:id="_pOTU4Gg8Ee25oofngfVl_A" type="2003" element="_pOBoEGg8Ee25oofngfVl_A"> | ||
427 | <children xmi:type="notation:Node" xmi:id="_pOT78Gg8Ee25oofngfVl_A" type="5007"/> | ||
428 | <children xmi:type="notation:Node" xmi:id="_pOT78Wg8Ee25oofngfVl_A" type="7004"> | ||
429 | <children xmi:type="notation:Node" xmi:id="_qPXJQGg8Ee25oofngfVl_A" type="3010" element="_qOtpAGg8Ee25oofngfVl_A"> | ||
430 | <styles xmi:type="notation:FontStyle" xmi:id="_qPXJQWg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
431 | <layoutConstraint xmi:type="notation:Location" xmi:id="_qPXJQmg8Ee25oofngfVl_A"/> | ||
432 | </children> | ||
433 | <children xmi:type="notation:Node" xmi:id="_qqPucGg8Ee25oofngfVl_A" type="3010" element="_qp-BoGg8Ee25oofngfVl_A"> | ||
434 | <styles xmi:type="notation:FontStyle" xmi:id="_qqPucWg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
435 | <layoutConstraint xmi:type="notation:Location" xmi:id="_qqPucmg8Ee25oofngfVl_A"/> | ||
436 | </children> | ||
437 | <children xmi:type="notation:Node" xmi:id="_rAE0gGg8Ee25oofngfVl_A" type="3010" element="_q_vdUGg8Ee25oofngfVl_A"> | ||
438 | <styles xmi:type="notation:FontStyle" xmi:id="_rAE0gWg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
439 | <layoutConstraint xmi:type="notation:Location" xmi:id="_rAE0gmg8Ee25oofngfVl_A"/> | ||
440 | </children> | ||
441 | <styles xmi:type="notation:SortingStyle" xmi:id="_pOT78mg8Ee25oofngfVl_A"/> | ||
442 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pOT782g8Ee25oofngfVl_A"/> | ||
443 | </children> | ||
444 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pOTU4Wg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
445 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pOTU4mg8Ee25oofngfVl_A" x="776" y="1280" width="120" height="100"/> | ||
446 | </children> | ||
447 | <children xmi:type="notation:Node" xmi:id="_ZcIsoL_JEe6Mo_-4--GvQg" type="2003" element="_ZbwSIL_JEe6Mo_-4--GvQg"> | 370 | <children xmi:type="notation:Node" xmi:id="_ZcIsoL_JEe6Mo_-4--GvQg" type="2003" element="_ZbwSIL_JEe6Mo_-4--GvQg"> |
448 | <children xmi:type="notation:Node" xmi:id="_ZcJTsL_JEe6Mo_-4--GvQg" type="5007"/> | 371 | <children xmi:type="notation:Node" xmi:id="_ZcJTsL_JEe6Mo_-4--GvQg" type="5007"/> |
449 | <children xmi:type="notation:Node" xmi:id="_ZcJTsb_JEe6Mo_-4--GvQg" type="7004"> | 372 | <children xmi:type="notation:Node" xmi:id="_ZcJTsb_JEe6Mo_-4--GvQg" type="7004"> |
@@ -495,6 +418,24 @@ | |||
495 | <styles xmi:type="notation:ShapeStyle" xmi:id="_GTtOgcBeEe6Mo_-4--GvQg" fontName="Noto Sans" fontHeight="8"/> | 418 | <styles xmi:type="notation:ShapeStyle" xmi:id="_GTtOgcBeEe6Mo_-4--GvQg" fontName="Noto Sans" fontHeight="8"/> |
496 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GTtOgsBeEe6Mo_-4--GvQg" x="-48" y="524" width="120" height="100"/> | 419 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GTtOgsBeEe6Mo_-4--GvQg" x="-48" y="524" width="120" height="100"/> |
497 | </children> | 420 | </children> |
421 | <children xmi:type="notation:Node" xmi:id="_uuYr8M9kEe6T2u19X9cqmQ" type="2003" element="_uuKCcM9kEe6T2u19X9cqmQ"> | ||
422 | <children xmi:type="notation:Node" xmi:id="_uudkcM9kEe6T2u19X9cqmQ" type="5007"/> | ||
423 | <children xmi:type="notation:Node" xmi:id="_uudkcc9kEe6T2u19X9cqmQ" type="7004"> | ||
424 | <styles xmi:type="notation:SortingStyle" xmi:id="_uudkcs9kEe6T2u19X9cqmQ"/> | ||
425 | <styles xmi:type="notation:FilteringStyle" xmi:id="_uudkc89kEe6T2u19X9cqmQ"/> | ||
426 | </children> | ||
427 | <styles xmi:type="notation:ShapeStyle" xmi:id="_uuYr8c9kEe6T2u19X9cqmQ" fontName="Noto Sans" fontHeight="8"/> | ||
428 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uuYr8s9kEe6T2u19X9cqmQ" x="1330" y="716" width="137" height="100"/> | ||
429 | </children> | ||
430 | <children xmi:type="notation:Node" xmi:id="_jlSckNsVEe6c9ehqpe3s7A" type="2003" element="_jjj-QNsVEe6c9ehqpe3s7A"> | ||
431 | <children xmi:type="notation:Node" xmi:id="_jlWuANsVEe6c9ehqpe3s7A" type="5007"/> | ||
432 | <children xmi:type="notation:Node" xmi:id="_jlXVENsVEe6c9ehqpe3s7A" type="7004"> | ||
433 | <styles xmi:type="notation:SortingStyle" xmi:id="_jlXVEdsVEe6c9ehqpe3s7A"/> | ||
434 | <styles xmi:type="notation:FilteringStyle" xmi:id="_jlXVEtsVEe6c9ehqpe3s7A"/> | ||
435 | </children> | ||
436 | <styles xmi:type="notation:ShapeStyle" xmi:id="_jlSckdsVEe6c9ehqpe3s7A" fontName="Noto Sans" fontHeight="8"/> | ||
437 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jlScktsVEe6c9ehqpe3s7A" x="1128" y="716" width="147" height="100"/> | ||
438 | </children> | ||
498 | <styles xmi:type="notation:DiagramStyle" xmi:id="_CsZB8qA4EeuqkpDnuik1sg"/> | 439 | <styles xmi:type="notation:DiagramStyle" xmi:id="_CsZB8qA4EeuqkpDnuik1sg"/> |
499 | <edges xmi:type="notation:Edge" xmi:id="_4eaYwKA8EeuqkpDnuik1sg" type="4001" element="_4eU5TqA8EeuqkpDnuik1sg" source="_D1D6MKA4EeuqkpDnuik1sg" target="_xsq_MKA8EeuqkpDnuik1sg"> | 440 | <edges xmi:type="notation:Edge" xmi:id="_4eaYwKA8EeuqkpDnuik1sg" type="4001" element="_4eU5TqA8EeuqkpDnuik1sg" source="_D1D6MKA4EeuqkpDnuik1sg" target="_xsq_MKA8EeuqkpDnuik1sg"> |
500 | <children xmi:type="notation:Node" xmi:id="_4ea_06A8EeuqkpDnuik1sg" type="6001"> | 441 | <children xmi:type="notation:Node" xmi:id="_4ea_06A8EeuqkpDnuik1sg" type="6001"> |
@@ -604,7 +545,7 @@ | |||
604 | </children> | 545 | </children> |
605 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_p1cRUaBJEeuqkpDnuik1sg" routing="Rectilinear"/> | 546 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_p1cRUaBJEeuqkpDnuik1sg" routing="Rectilinear"/> |
606 | <styles xmi:type="notation:FontStyle" xmi:id="_p1cRUqBJEeuqkpDnuik1sg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 547 | <styles xmi:type="notation:FontStyle" xmi:id="_p1cRUqBJEeuqkpDnuik1sg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
607 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_p1cRU6BJEeuqkpDnuik1sg" points="[0, 2, 134, 2]$[-134, 2, 0, 2]"/> | 548 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_p1cRU6BJEeuqkpDnuik1sg" points="[0, 2, 134, -18]$[-134, 2, 0, -18]"/> |
608 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p1c4ZqBJEeuqkpDnuik1sg" id="(0.0,0.5918367346938775)"/> | 549 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p1c4ZqBJEeuqkpDnuik1sg" id="(0.0,0.5918367346938775)"/> |
609 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p1c4Z6BJEeuqkpDnuik1sg" id="(1.0,0.5918367346938775)"/> | 550 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p1c4Z6BJEeuqkpDnuik1sg" id="(1.0,0.5918367346938775)"/> |
610 | </edges> | 551 | </edges> |
@@ -738,17 +679,17 @@ | |||
738 | </edges> | 679 | </edges> |
739 | <edges xmi:type="notation:Edge" xmi:id="_zKMY0AGyEey7cfH5K6RyCw" type="4001" element="_zJpmRgGyEey7cfH5K6RyCw" source="_pdJrwAGyEey7cfH5K6RyCw" target="_xsq_MKA8EeuqkpDnuik1sg"> | 680 | <edges xmi:type="notation:Edge" xmi:id="_zKMY0AGyEey7cfH5K6RyCw" type="4001" element="_zJpmRgGyEey7cfH5K6RyCw" source="_pdJrwAGyEey7cfH5K6RyCw" target="_xsq_MKA8EeuqkpDnuik1sg"> |
740 | <children xmi:type="notation:Node" xmi:id="_zKM_4AGyEey7cfH5K6RyCw" type="6001"> | 681 | <children xmi:type="notation:Node" xmi:id="_zKM_4AGyEey7cfH5K6RyCw" type="6001"> |
741 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zKM_4QGyEey7cfH5K6RyCw" x="-397" y="-12"/> | 682 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zKM_4QGyEey7cfH5K6RyCw" x="-425" y="-12"/> |
742 | </children> | 683 | </children> |
743 | <children xmi:type="notation:Node" xmi:id="_zKM_4gGyEey7cfH5K6RyCw" type="6002"> | 684 | <children xmi:type="notation:Node" xmi:id="_zKM_4gGyEey7cfH5K6RyCw" type="6002"> |
744 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zKM_4wGyEey7cfH5K6RyCw" x="-43"/> | 685 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zKM_4wGyEey7cfH5K6RyCw" x="-71"/> |
745 | </children> | 686 | </children> |
746 | <children xmi:type="notation:Node" xmi:id="_zKM_5AGyEey7cfH5K6RyCw" type="6003"> | 687 | <children xmi:type="notation:Node" xmi:id="_zKM_5AGyEey7cfH5K6RyCw" type="6003"> |
747 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zKM_5QGyEey7cfH5K6RyCw" x="-88" y="10"/> | 688 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zKM_5QGyEey7cfH5K6RyCw" x="-116" y="10"/> |
748 | </children> | 689 | </children> |
749 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_zKMY0QGyEey7cfH5K6RyCw" routing="Rectilinear"/> | 690 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_zKMY0QGyEey7cfH5K6RyCw" routing="Rectilinear"/> |
750 | <styles xmi:type="notation:FontStyle" xmi:id="_zKMY0gGyEey7cfH5K6RyCw" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 691 | <styles xmi:type="notation:FontStyle" xmi:id="_zKMY0gGyEey7cfH5K6RyCw" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
751 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_zKMY0wGyEey7cfH5K6RyCw" points="[-21, -3, -828, 120]$[-21, -51, -828, 72]$[843, -51, 36, 72]$[843, -97, 36, 26]"/> | 692 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_zKMY0wGyEey7cfH5K6RyCw" points="[-21, -3, -828, 120]$[-21, -23, -828, 100]$[843, -23, 36, 100]$[843, -97, 36, 26]"/> |
752 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zKNm8AGyEey7cfH5K6RyCw" id="(0.4576271186440678,0.030612244897959183)"/> | 693 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zKNm8AGyEey7cfH5K6RyCw" id="(0.4576271186440678,0.030612244897959183)"/> |
753 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zKNm8QGyEey7cfH5K6RyCw" id="(0.0,0.7346938775510204)"/> | 694 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zKNm8QGyEey7cfH5K6RyCw" id="(0.0,0.7346938775510204)"/> |
754 | </edges> | 695 | </edges> |
@@ -1218,17 +1159,17 @@ | |||
1218 | </edges> | 1159 | </edges> |
1219 | <edges xmi:type="notation:Edge" xmi:id="_Nr78MGTzEe2qdtyPWAtoxA" type="4001" element="_NrtSzmTzEe2qdtyPWAtoxA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> | 1160 | <edges xmi:type="notation:Edge" xmi:id="_Nr78MGTzEe2qdtyPWAtoxA" type="4001" element="_NrtSzmTzEe2qdtyPWAtoxA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> |
1220 | <children xmi:type="notation:Node" xmi:id="_Nr78NGTzEe2qdtyPWAtoxA" type="6001"> | 1161 | <children xmi:type="notation:Node" xmi:id="_Nr78NGTzEe2qdtyPWAtoxA" type="6001"> |
1221 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78NWTzEe2qdtyPWAtoxA" x="79"/> | 1162 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78NWTzEe2qdtyPWAtoxA" x="69"/> |
1222 | </children> | 1163 | </children> |
1223 | <children xmi:type="notation:Node" xmi:id="_Nr78NmTzEe2qdtyPWAtoxA" type="6002"> | 1164 | <children xmi:type="notation:Node" xmi:id="_Nr78NmTzEe2qdtyPWAtoxA" type="6002"> |
1224 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78N2TzEe2qdtyPWAtoxA" x="193" y="10"/> | 1165 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78N2TzEe2qdtyPWAtoxA" x="176" y="10"/> |
1225 | </children> | 1166 | </children> |
1226 | <children xmi:type="notation:Node" xmi:id="_Nr78OGTzEe2qdtyPWAtoxA" type="6003"> | 1167 | <children xmi:type="notation:Node" xmi:id="_Nr78OGTzEe2qdtyPWAtoxA" type="6003"> |
1227 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78OWTzEe2qdtyPWAtoxA" x="19" y="10"/> | 1168 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78OWTzEe2qdtyPWAtoxA" x="16" y="10"/> |
1228 | </children> | 1169 | </children> |
1229 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Nr78MWTzEe2qdtyPWAtoxA" routing="Rectilinear"/> | 1170 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Nr78MWTzEe2qdtyPWAtoxA" routing="Rectilinear"/> |
1230 | <styles xmi:type="notation:FontStyle" xmi:id="_Nr78MmTzEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 1171 | <styles xmi:type="notation:FontStyle" xmi:id="_Nr78MmTzEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
1231 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Nr78M2TzEe2qdtyPWAtoxA" points="[-60, 24, 24, 526]$[-80, 24, 4, 526]$[-80, -502, 4, 0]"/> | 1172 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Nr78M2TzEe2qdtyPWAtoxA" points="[-60, 24, 24, 506]$[-80, 24, 4, 506]$[-80, -482, 4, 0]"/> |
1232 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78OmTzEe2qdtyPWAtoxA" id="(0.41379310344827586,0.0)"/> | 1173 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78OmTzEe2qdtyPWAtoxA" id="(0.41379310344827586,0.0)"/> |
1233 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78O2TzEe2qdtyPWAtoxA" id="(0.3305084745762712,1.0)"/> | 1174 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78O2TzEe2qdtyPWAtoxA" id="(0.3305084745762712,1.0)"/> |
1234 | </edges> | 1175 | </edges> |
@@ -1250,17 +1191,17 @@ | |||
1250 | </edges> | 1191 | </edges> |
1251 | <edges xmi:type="notation:Edge" xmi:id="_iXIY4GTzEe2qdtyPWAtoxA" type="4001" element="_iWzpAmTzEe2qdtyPWAtoxA" source="_QKLK0KA6EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> | 1192 | <edges xmi:type="notation:Edge" xmi:id="_iXIY4GTzEe2qdtyPWAtoxA" type="4001" element="_iWzpAmTzEe2qdtyPWAtoxA" source="_QKLK0KA6EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> |
1252 | <children xmi:type="notation:Node" xmi:id="_iXIY5GTzEe2qdtyPWAtoxA" type="6001"> | 1193 | <children xmi:type="notation:Node" xmi:id="_iXIY5GTzEe2qdtyPWAtoxA" type="6001"> |
1253 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iXIY5WTzEe2qdtyPWAtoxA" x="-298" y="10"/> | 1194 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iXIY5WTzEe2qdtyPWAtoxA" x="-318" y="18"/> |
1254 | </children> | 1195 | </children> |
1255 | <children xmi:type="notation:Node" xmi:id="_iXIY5mTzEe2qdtyPWAtoxA" type="6002"> | 1196 | <children xmi:type="notation:Node" xmi:id="_iXIY5mTzEe2qdtyPWAtoxA" type="6002"> |
1256 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iXIY52TzEe2qdtyPWAtoxA" x="79" y="-10"/> | 1197 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iXIY52TzEe2qdtyPWAtoxA" x="368" y="-10"/> |
1257 | </children> | 1198 | </children> |
1258 | <children xmi:type="notation:Node" xmi:id="_iXIY6GTzEe2qdtyPWAtoxA" type="6003"> | 1199 | <children xmi:type="notation:Node" xmi:id="_iXIY6GTzEe2qdtyPWAtoxA" type="6003"> |
1259 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iXIY6WTzEe2qdtyPWAtoxA" x="-42" y="10"/> | 1200 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iXIY6WTzEe2qdtyPWAtoxA" x="9" y="10"/> |
1260 | </children> | 1201 | </children> |
1261 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_iXIY4WTzEe2qdtyPWAtoxA" routing="Rectilinear"/> | 1202 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_iXIY4WTzEe2qdtyPWAtoxA" routing="Rectilinear"/> |
1262 | <styles xmi:type="notation:FontStyle" xmi:id="_iXIY4mTzEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 1203 | <styles xmi:type="notation:FontStyle" xmi:id="_iXIY4mTzEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
1263 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_iXIY42TzEe2qdtyPWAtoxA" points="[-72, 48, 791, 5]$[-804, 48, 59, 5]"/> | 1204 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_iXIY42TzEe2qdtyPWAtoxA" points="[-72, 48, 1131, 5]$[-1144, 48, 59, 5]"/> |
1264 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iXIY6mTzEe2qdtyPWAtoxA" id="(0.6101694915254238,0.0)"/> | 1205 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iXIY6mTzEe2qdtyPWAtoxA" id="(0.6101694915254238,0.0)"/> |
1265 | </edges> | 1206 | </edges> |
1266 | <edges xmi:type="notation:Edge" xmi:id="_q7DhwGTzEe2qdtyPWAtoxA" type="4001" element="_q604amTzEe2qdtyPWAtoxA" source="_zaq8oKA9EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> | 1207 | <edges xmi:type="notation:Edge" xmi:id="_q7DhwGTzEe2qdtyPWAtoxA" type="4001" element="_q604amTzEe2qdtyPWAtoxA" source="_zaq8oKA9EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> |
@@ -1279,114 +1220,35 @@ | |||
1279 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q7EI1mTzEe2qdtyPWAtoxA" id="(0.711864406779661,0.0)"/> | 1220 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q7EI1mTzEe2qdtyPWAtoxA" id="(0.711864406779661,0.0)"/> |
1280 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q7EI12TzEe2qdtyPWAtoxA" id="(0.0,0.5612244897959183)"/> | 1221 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q7EI12TzEe2qdtyPWAtoxA" id="(0.0,0.5612244897959183)"/> |
1281 | </edges> | 1222 | </edges> |
1282 | <edges xmi:type="notation:Edge" xmi:id="_Rq3fwGg8Ee25oofngfVl_A" type="4001" element="_jk6-PKA4EeuqkpDnuik1sg" source="_JT0o8KA4EeuqkpDnuik1sg" target="_O9jk8Gg8Ee25oofngfVl_A"> | ||
1283 | <children xmi:type="notation:Node" xmi:id="_Rq4t4Gg8Ee25oofngfVl_A" type="6001"> | ||
1284 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rq4t4Wg8Ee25oofngfVl_A" x="-53" y="-19"/> | ||
1285 | </children> | ||
1286 | <children xmi:type="notation:Node" xmi:id="_Rq5U8Gg8Ee25oofngfVl_A" type="6002"> | ||
1287 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rq5U8Wg8Ee25oofngfVl_A" x="8" y="10"/> | ||
1288 | </children> | ||
1289 | <children xmi:type="notation:Node" xmi:id="_Rq58AGg8Ee25oofngfVl_A" type="6003"> | ||
1290 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rq58AWg8Ee25oofngfVl_A" x="-8" y="10"/> | ||
1291 | </children> | ||
1292 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Rq3fwWg8Ee25oofngfVl_A" routing="Rectilinear"/> | ||
1293 | <styles xmi:type="notation:FontStyle" xmi:id="_Rq3fwmg8Ee25oofngfVl_A" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | ||
1294 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Rq3fw2g8Ee25oofngfVl_A" points="[-24, 0, 35, -191]$[-24, 71, 35, -120]$[-60, 71, -1, -120]$[-60, 142, -1, -49]"/> | ||
1295 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Rq8YQGg8Ee25oofngfVl_A" id="(0.4067796610169492,1.0)"/> | ||
1296 | </edges> | ||
1297 | <edges xmi:type="notation:Edge" xmi:id="_WnX2AGg8Ee25oofngfVl_A" type="4001" element="_nxr57GTvEe2qdtyPWAtoxA" source="_O9jk8Gg8Ee25oofngfVl_A" target="_dzfLYGTvEe2qdtyPWAtoxA"> | ||
1298 | <children xmi:type="notation:Node" xmi:id="_WnX2BGg8Ee25oofngfVl_A" type="6001"> | ||
1299 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WnX2BWg8Ee25oofngfVl_A" y="-10"/> | ||
1300 | </children> | ||
1301 | <children xmi:type="notation:Node" xmi:id="_WnX2Bmg8Ee25oofngfVl_A" type="6002"> | ||
1302 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WnX2B2g8Ee25oofngfVl_A" y="10"/> | ||
1303 | </children> | ||
1304 | <children xmi:type="notation:Node" xmi:id="_WnX2CGg8Ee25oofngfVl_A" type="6003"> | ||
1305 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WnX2CWg8Ee25oofngfVl_A" y="10"/> | ||
1306 | </children> | ||
1307 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_WnX2AWg8Ee25oofngfVl_A" routing="Tree"/> | ||
1308 | <styles xmi:type="notation:FontStyle" xmi:id="_WnX2Amg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
1309 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WnX2A2g8Ee25oofngfVl_A" points="[0, -56, 44, 383]$[0, -316, 44, 123]$[-43, -316, 1, 123]$[-43, -390, 1, 49]"/> | ||
1310 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WnZEIGg8Ee25oofngfVl_A" id="(0.22950819672131148,0.5714285714285714)"/> | ||
1311 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WnZEIWg8Ee25oofngfVl_A" id="(0.5,0.5)"/> | ||
1312 | </edges> | ||
1313 | <edges xmi:type="notation:Edge" xmi:id="_bOAC4Gg8Ee25oofngfVl_A" type="4001" element="_bNXJs2g8Ee25oofngfVl_A" source="_c-HCQKA4EeuqkpDnuik1sg" target="_O9jk8Gg8Ee25oofngfVl_A"> | ||
1314 | <children xmi:type="notation:Node" xmi:id="_bOAp8Gg8Ee25oofngfVl_A" type="6001"> | ||
1315 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bOAp8Wg8Ee25oofngfVl_A" y="-10"/> | ||
1316 | </children> | ||
1317 | <children xmi:type="notation:Node" xmi:id="_bOAp8mg8Ee25oofngfVl_A" type="6002"> | ||
1318 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bOAp82g8Ee25oofngfVl_A" y="10"/> | ||
1319 | </children> | ||
1320 | <children xmi:type="notation:Node" xmi:id="_bOAp9Gg8Ee25oofngfVl_A" type="6003"> | ||
1321 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bOAp9Wg8Ee25oofngfVl_A" y="10"/> | ||
1322 | </children> | ||
1323 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_bOAC4Wg8Ee25oofngfVl_A" routing="Tree"/> | ||
1324 | <styles xmi:type="notation:FontStyle" xmi:id="_bOAC4mg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
1325 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bOAC42g8Ee25oofngfVl_A" points="[0, 0, -1, 119]$[0, -52, -1, 67]$[2, -52, 1, 67]$[2, -70, 1, 49]"/> | ||
1326 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOAp9mg8Ee25oofngfVl_A" id="(0.22758620689655173,0.05102040816326531)"/> | ||
1327 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOAp92g8Ee25oofngfVl_A" id="(0.5,0.5)"/> | ||
1328 | </edges> | ||
1329 | <edges xmi:type="notation:Edge" xmi:id="_lSXq0Gg8Ee25oofngfVl_A" type="4001" element="_lSCTtWg8Ee25oofngfVl_A" source="_cVTpMGg8Ee25oofngfVl_A" target="_O9jk8Gg8Ee25oofngfVl_A"> | ||
1330 | <children xmi:type="notation:Node" xmi:id="_lSXq1Gg8Ee25oofngfVl_A" type="6001"> | ||
1331 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lSXq1Wg8Ee25oofngfVl_A" y="-10"/> | ||
1332 | </children> | ||
1333 | <children xmi:type="notation:Node" xmi:id="_lSXq1mg8Ee25oofngfVl_A" type="6002"> | ||
1334 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lSXq12g8Ee25oofngfVl_A" y="10"/> | ||
1335 | </children> | ||
1336 | <children xmi:type="notation:Node" xmi:id="_lSXq2Gg8Ee25oofngfVl_A" type="6003"> | ||
1337 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lSXq2Wg8Ee25oofngfVl_A" y="10"/> | ||
1338 | </children> | ||
1339 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_lSXq0Wg8Ee25oofngfVl_A" routing="Tree"/> | ||
1340 | <styles xmi:type="notation:FontStyle" xmi:id="_lSXq0mg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
1341 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lSXq02g8Ee25oofngfVl_A" points="[0, 0, 135, 106]$[-135, -106, 0, 0]"/> | ||
1342 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lSXq2mg8Ee25oofngfVl_A" id="(0.3684210526315789,0.17346938775510204)"/> | ||
1343 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lSXq22g8Ee25oofngfVl_A" id="(0.5,0.5)"/> | ||
1344 | </edges> | ||
1345 | <edges xmi:type="notation:Edge" xmi:id="_mDe-sGg8Ee25oofngfVl_A" type="4001" element="_mCvX7mg8Ee25oofngfVl_A" source="_jZNw0Gg8Ee25oofngfVl_A" target="_O9jk8Gg8Ee25oofngfVl_A"> | ||
1346 | <children xmi:type="notation:Node" xmi:id="_mDflwGg8Ee25oofngfVl_A" type="6001"> | ||
1347 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDflwWg8Ee25oofngfVl_A" y="-10"/> | ||
1348 | </children> | ||
1349 | <children xmi:type="notation:Node" xmi:id="_mDflwmg8Ee25oofngfVl_A" type="6002"> | ||
1350 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDflw2g8Ee25oofngfVl_A" y="10"/> | ||
1351 | </children> | ||
1352 | <children xmi:type="notation:Node" xmi:id="_mDflxGg8Ee25oofngfVl_A" type="6003"> | ||
1353 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDflxWg8Ee25oofngfVl_A" y="10"/> | ||
1354 | </children> | ||
1355 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_mDe-sWg8Ee25oofngfVl_A" routing="Tree"/> | ||
1356 | <styles xmi:type="notation:FontStyle" xmi:id="_mDe-smg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> | ||
1357 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mDe-s2g8Ee25oofngfVl_A" points="[0, 0, 262, 132]$[-262, -132, 0, 0]"/> | ||
1358 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mDflxmg8Ee25oofngfVl_A" id="(0.3644067796610169,0.16326530612244897)"/> | ||
1359 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mDflx2g8Ee25oofngfVl_A" id="(0.5,0.5)"/> | ||
1360 | </edges> | ||
1361 | <edges xmi:type="notation:Edge" xmi:id="_8s7BwDrXEe62Q_vL_UTCsA" type="4001" element="_8sdu2DrXEe62Q_vL_UTCsA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> | 1223 | <edges xmi:type="notation:Edge" xmi:id="_8s7BwDrXEe62Q_vL_UTCsA" type="4001" element="_8sdu2DrXEe62Q_vL_UTCsA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> |
1362 | <children xmi:type="notation:Node" xmi:id="_8s-sIDrXEe62Q_vL_UTCsA" type="6001"> | 1224 | <children xmi:type="notation:Node" xmi:id="_8s-sIDrXEe62Q_vL_UTCsA" type="6001"> |
1363 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sITrXEe62Q_vL_UTCsA" x="-155" y="-60"/> | 1225 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sITrXEe62Q_vL_UTCsA" x="-165" y="-60"/> |
1364 | </children> | 1226 | </children> |
1365 | <children xmi:type="notation:Node" xmi:id="_8s-sIjrXEe62Q_vL_UTCsA" type="6002"> | 1227 | <children xmi:type="notation:Node" xmi:id="_8s-sIjrXEe62Q_vL_UTCsA" type="6002"> |
1366 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sIzrXEe62Q_vL_UTCsA" x="69" y="10"/> | 1228 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sIzrXEe62Q_vL_UTCsA" x="52" y="10"/> |
1367 | </children> | 1229 | </children> |
1368 | <children xmi:type="notation:Node" xmi:id="_8s-sJDrXEe62Q_vL_UTCsA" type="6003"> | 1230 | <children xmi:type="notation:Node" xmi:id="_8s-sJDrXEe62Q_vL_UTCsA" type="6003"> |
1369 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sJTrXEe62Q_vL_UTCsA" x="3" y="10"/> | 1231 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sJTrXEe62Q_vL_UTCsA" y="10"/> |
1370 | </children> | 1232 | </children> |
1371 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_8s7BwTrXEe62Q_vL_UTCsA" routing="Rectilinear"/> | 1233 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_8s7BwTrXEe62Q_vL_UTCsA" routing="Rectilinear"/> |
1372 | <styles xmi:type="notation:FontStyle" xmi:id="_8s7BwjrXEe62Q_vL_UTCsA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 1234 | <styles xmi:type="notation:FontStyle" xmi:id="_8s7BwjrXEe62Q_vL_UTCsA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
1373 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8s7BwzrXEe62Q_vL_UTCsA" points="[-52, 40, 0, 542]$[-84, 40, -32, 542]$[-84, -502, -32, 0]"/> | 1235 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8s7BwzrXEe62Q_vL_UTCsA" points="[-52, 40, 0, 522]$[-84, 40, -32, 522]$[-84, -482, -32, 0]"/> |
1374 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8s_6QDrXEe62Q_vL_UTCsA" id="(0.3586206896551724,0.0)"/> | 1236 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8s_6QDrXEe62Q_vL_UTCsA" id="(0.3586206896551724,0.0)"/> |
1375 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8s_6QTrXEe62Q_vL_UTCsA" id="(0.5338983050847458,1.0)"/> | 1237 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8s_6QTrXEe62Q_vL_UTCsA" id="(0.5338983050847458,1.0)"/> |
1376 | </edges> | 1238 | </edges> |
1377 | <edges xmi:type="notation:Edge" xmi:id="_UVB0MMBeEe6Mo_-4--GvQg" type="4001" element="_UU0Y5cBeEe6Mo_-4--GvQg" source="_GTtOgMBeEe6Mo_-4--GvQg" target="_e73WIKA9EeuqkpDnuik1sg"> | 1239 | <edges xmi:type="notation:Edge" xmi:id="_UVB0MMBeEe6Mo_-4--GvQg" type="4001" element="_UU0Y5cBeEe6Mo_-4--GvQg" source="_GTtOgMBeEe6Mo_-4--GvQg" target="_e73WIKA9EeuqkpDnuik1sg"> |
1378 | <children xmi:type="notation:Node" xmi:id="_UVB0NMBeEe6Mo_-4--GvQg" type="6001"> | 1240 | <children xmi:type="notation:Node" xmi:id="_UVB0NMBeEe6Mo_-4--GvQg" type="6001"> |
1379 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVB0NcBeEe6Mo_-4--GvQg" y="-10"/> | 1241 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVB0NcBeEe6Mo_-4--GvQg" x="12" y="-10"/> |
1380 | </children> | 1242 | </children> |
1381 | <children xmi:type="notation:Node" xmi:id="_UVB0NsBeEe6Mo_-4--GvQg" type="6002"> | 1243 | <children xmi:type="notation:Node" xmi:id="_UVB0NsBeEe6Mo_-4--GvQg" type="6002"> |
1382 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVB0N8BeEe6Mo_-4--GvQg" y="10"/> | 1244 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVB0N8BeEe6Mo_-4--GvQg" x="12" y="10"/> |
1383 | </children> | 1245 | </children> |
1384 | <children xmi:type="notation:Node" xmi:id="_UVB0OMBeEe6Mo_-4--GvQg" type="6003"> | 1246 | <children xmi:type="notation:Node" xmi:id="_UVB0OMBeEe6Mo_-4--GvQg" type="6003"> |
1385 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVB0OcBeEe6Mo_-4--GvQg" y="10"/> | 1247 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVB0OcBeEe6Mo_-4--GvQg" x="12" y="10"/> |
1386 | </children> | 1248 | </children> |
1387 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_UVB0McBeEe6Mo_-4--GvQg" routing="Tree"/> | 1249 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_UVB0McBeEe6Mo_-4--GvQg" routing="Tree"/> |
1388 | <styles xmi:type="notation:FontStyle" xmi:id="_UVB0MsBeEe6Mo_-4--GvQg" fontName="Noto Sans" fontHeight="8"/> | 1250 | <styles xmi:type="notation:FontStyle" xmi:id="_UVB0MsBeEe6Mo_-4--GvQg" fontName="Noto Sans" fontHeight="8"/> |
1389 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UVB0M8BeEe6Mo_-4--GvQg" points="[0, 0, -706, 180]$[706, -180, 0, 0]"/> | 1251 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UVB0M8BeEe6Mo_-4--GvQg" points="[0, -3, -808, 192]$[0, -47, -808, 148]$[809, -47, 1, 148]$[809, -97, 1, 98]"/> |
1390 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UVCbQMBeEe6Mo_-4--GvQg" id="(0.635593220338983,0.030612244897959183)"/> | 1252 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UVCbQMBeEe6Mo_-4--GvQg" id="(0.635593220338983,0.030612244897959183)"/> |
1391 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UVCbQcBeEe6Mo_-4--GvQg" id="(0.5,0.0)"/> | 1253 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UVCbQcBeEe6Mo_-4--GvQg" id="(0.5,0.0)"/> |
1392 | </edges> | 1254 | </edges> |
@@ -1406,6 +1268,118 @@ | |||
1406 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bYblisBeEe6Mo_-4--GvQg" id="(0.4067796610169492,0.0)"/> | 1268 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bYblisBeEe6Mo_-4--GvQg" id="(0.4067796610169492,0.0)"/> |
1407 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bYbli8BeEe6Mo_-4--GvQg" id="(0.1118421052631579,0.5714285714285714)"/> | 1269 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bYbli8BeEe6Mo_-4--GvQg" id="(0.1118421052631579,0.5714285714285714)"/> |
1408 | </edges> | 1270 | </edges> |
1271 | <edges xmi:type="notation:Edge" xmi:id="_yL04oM9jEe6T2u19X9cqmQ" type="4001" element="_nxr57GTvEe2qdtyPWAtoxA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> | ||
1272 | <children xmi:type="notation:Node" xmi:id="_yL6YMM9jEe6T2u19X9cqmQ" type="6001"> | ||
1273 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yL6YMc9jEe6T2u19X9cqmQ" y="-10"/> | ||
1274 | </children> | ||
1275 | <children xmi:type="notation:Node" xmi:id="_yL6_QM9jEe6T2u19X9cqmQ" type="6002"> | ||
1276 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yL6_Qc9jEe6T2u19X9cqmQ" y="10"/> | ||
1277 | </children> | ||
1278 | <children xmi:type="notation:Node" xmi:id="_yL7mUM9jEe6T2u19X9cqmQ" type="6003"> | ||
1279 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yL7mUc9jEe6T2u19X9cqmQ" y="10"/> | ||
1280 | </children> | ||
1281 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_yL04oc9jEe6T2u19X9cqmQ" routing="Tree"/> | ||
1282 | <styles xmi:type="notation:FontStyle" xmi:id="_yL04os9jEe6T2u19X9cqmQ" fontName="Noto Sans" fontHeight="8"/> | ||
1283 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_yL04o89jEe6T2u19X9cqmQ" points="[0, -15, 42, 531]$[0, -423, 42, 123]$[-41, -423, 1, 123]$[-41, -497, 1, 49]"/> | ||
1284 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yL_QsM9jEe6T2u19X9cqmQ" id="(0.2620689655172414,0.15306122448979592)"/> | ||
1285 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yL_Qsc9jEe6T2u19X9cqmQ" id="(0.5,0.5)"/> | ||
1286 | </edges> | ||
1287 | <edges xmi:type="notation:Edge" xmi:id="_yrWtQM9jEe6T2u19X9cqmQ" type="4001" element="_jk6-PKA4EeuqkpDnuik1sg" source="_JT0o8KA4EeuqkpDnuik1sg" target="_c-HCQKA4EeuqkpDnuik1sg"> | ||
1288 | <children xmi:type="notation:Node" xmi:id="_yrWtRM9jEe6T2u19X9cqmQ" type="6001"> | ||
1289 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yrWtRc9jEe6T2u19X9cqmQ" x="-55" y="-76"/> | ||
1290 | </children> | ||
1291 | <children xmi:type="notation:Node" xmi:id="_yrWtRs9jEe6T2u19X9cqmQ" type="6002"> | ||
1292 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yrWtR89jEe6T2u19X9cqmQ" x="-1" y="10"/> | ||
1293 | </children> | ||
1294 | <children xmi:type="notation:Node" xmi:id="_yrWtSM9jEe6T2u19X9cqmQ" type="6003"> | ||
1295 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yrWtSc9jEe6T2u19X9cqmQ" x="1" y="10"/> | ||
1296 | </children> | ||
1297 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_yrWtQc9jEe6T2u19X9cqmQ" routing="Rectilinear"/> | ||
1298 | <styles xmi:type="notation:FontStyle" xmi:id="_yrWtQs9jEe6T2u19X9cqmQ" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | ||
1299 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_yrWtQ89jEe6T2u19X9cqmQ" points="[-20, 0, 42, -309]$[-20, 50, 42, -259]$[-60, 50, 2, -259]$[-60, 290, 2, -19]"/> | ||
1300 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yrXUUM9jEe6T2u19X9cqmQ" id="(0.4067796610169492,1.0)"/> | ||
1301 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yrXUUc9jEe6T2u19X9cqmQ" id="(0.4827586206896552,0.19387755102040816)"/> | ||
1302 | </edges> | ||
1303 | <edges xmi:type="notation:Edge" xmi:id="_6FWkMM9kEe6T2u19X9cqmQ" type="4001" element="_6FJJDM9kEe6T2u19X9cqmQ" source="_uuYr8M9kEe6T2u19X9cqmQ" target="_dzfLYGTvEe2qdtyPWAtoxA"> | ||
1304 | <children xmi:type="notation:Node" xmi:id="_6FWkNM9kEe6T2u19X9cqmQ" type="6001"> | ||
1305 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6FWkNc9kEe6T2u19X9cqmQ" y="-10"/> | ||
1306 | </children> | ||
1307 | <children xmi:type="notation:Node" xmi:id="_6FWkNs9kEe6T2u19X9cqmQ" type="6002"> | ||
1308 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6FWkN89kEe6T2u19X9cqmQ" y="10"/> | ||
1309 | </children> | ||
1310 | <children xmi:type="notation:Node" xmi:id="_6FWkOM9kEe6T2u19X9cqmQ" type="6003"> | ||
1311 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6FWkOc9kEe6T2u19X9cqmQ" y="10"/> | ||
1312 | </children> | ||
1313 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_6FWkMc9kEe6T2u19X9cqmQ" routing="Tree"/> | ||
1314 | <styles xmi:type="notation:FontStyle" xmi:id="_6FWkMs9kEe6T2u19X9cqmQ" fontName="Noto Sans" fontHeight="8"/> | ||
1315 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6FWkM89kEe6T2u19X9cqmQ" points="[0, 0, 633, 143]$[-633, -143, 0, 0]"/> | ||
1316 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6FXLQM9kEe6T2u19X9cqmQ" id="(0.7185185185185186,0.07142857142857142)"/> | ||
1317 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6FXLQc9kEe6T2u19X9cqmQ" id="(0.5,0.5)"/> | ||
1318 | </edges> | ||
1319 | <edges xmi:type="notation:Edge" xmi:id="_8EntQM9kEe6T2u19X9cqmQ" type="4001" element="_8EJzMM9kEe6T2u19X9cqmQ" source="_uuYr8M9kEe6T2u19X9cqmQ" target="_e73WIKA9EeuqkpDnuik1sg"> | ||
1320 | <children xmi:type="notation:Node" xmi:id="_8EntRM9kEe6T2u19X9cqmQ" type="6001"> | ||
1321 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8EntRc9kEe6T2u19X9cqmQ" y="-10"/> | ||
1322 | </children> | ||
1323 | <children xmi:type="notation:Node" xmi:id="_8EntRs9kEe6T2u19X9cqmQ" type="6002"> | ||
1324 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8EntR89kEe6T2u19X9cqmQ" y="10"/> | ||
1325 | </children> | ||
1326 | <children xmi:type="notation:Node" xmi:id="_8EntSM9kEe6T2u19X9cqmQ" type="6003"> | ||
1327 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8EntSc9kEe6T2u19X9cqmQ" y="10"/> | ||
1328 | </children> | ||
1329 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_8EntQc9kEe6T2u19X9cqmQ" routing="Tree"/> | ||
1330 | <styles xmi:type="notation:FontStyle" xmi:id="_8EntQs9kEe6T2u19X9cqmQ" fontName="Noto Sans" fontHeight="8"/> | ||
1331 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8EntQ89kEe6T2u19X9cqmQ" points="[0, 0, 318, 320]$[-318, -320, 0, 0]"/> | ||
1332 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8EntSs9kEe6T2u19X9cqmQ" id="(0.3111111111111111,0.05102040816326531)"/> | ||
1333 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8EntS89kEe6T2u19X9cqmQ" id="(0.5,0.0)"/> | ||
1334 | </edges> | ||
1335 | <edges xmi:type="notation:Edge" xmi:id="_Rjhe0M9lEe6T2u19X9cqmQ" type="4001" element="_RjRnQs9lEe6T2u19X9cqmQ" source="_782skF9mEe2rXNsIDUvqhw" target="_uuYr8M9kEe6T2u19X9cqmQ"> | ||
1336 | <children xmi:type="notation:Node" xmi:id="_RjiF4M9lEe6T2u19X9cqmQ" type="6001"> | ||
1337 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RjiF4c9lEe6T2u19X9cqmQ" y="16"/> | ||
1338 | </children> | ||
1339 | <children xmi:type="notation:Node" xmi:id="_RjiF4s9lEe6T2u19X9cqmQ" type="6002"> | ||
1340 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RjiF489lEe6T2u19X9cqmQ" x="77" y="10"/> | ||
1341 | </children> | ||
1342 | <children xmi:type="notation:Node" xmi:id="_RjiF5M9lEe6T2u19X9cqmQ" type="6003"> | ||
1343 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RjiF5c9lEe6T2u19X9cqmQ" x="-78" y="10"/> | ||
1344 | </children> | ||
1345 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Rjhe0c9lEe6T2u19X9cqmQ" routing="Rectilinear"/> | ||
1346 | <styles xmi:type="notation:FontStyle" xmi:id="_Rjhe0s9lEe6T2u19X9cqmQ" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | ||
1347 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Rjhe089lEe6T2u19X9cqmQ" points="[66, -49, 491, -49]$[66, -93, 491, -93]$[-492, -93, -67, -93]$[-492, -49, -67, -49]"/> | ||
1348 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RjiF5s9lEe6T2u19X9cqmQ" id="(0.0,0.5)"/> | ||
1349 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RjiF589lEe6T2u19X9cqmQ" id="(1.0,0.5)"/> | ||
1350 | </edges> | ||
1351 | <edges xmi:type="notation:Edge" xmi:id="_qBfrANsVEe6c9ehqpe3s7A" type="4001" element="_qAygeNsVEe6c9ehqpe3s7A" source="_jlSckNsVEe6c9ehqpe3s7A" target="_e73WIKA9EeuqkpDnuik1sg"> | ||
1352 | <children xmi:type="notation:Node" xmi:id="_qBgSENsVEe6c9ehqpe3s7A" type="6001"> | ||
1353 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBgSEdsVEe6c9ehqpe3s7A" y="-10"/> | ||
1354 | </children> | ||
1355 | <children xmi:type="notation:Node" xmi:id="_qBgSEtsVEe6c9ehqpe3s7A" type="6002"> | ||
1356 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBgSE9sVEe6c9ehqpe3s7A" y="10"/> | ||
1357 | </children> | ||
1358 | <children xmi:type="notation:Node" xmi:id="_qBgSFNsVEe6c9ehqpe3s7A" type="6003"> | ||
1359 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBgSFdsVEe6c9ehqpe3s7A" y="10"/> | ||
1360 | </children> | ||
1361 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_qBfrAdsVEe6c9ehqpe3s7A" routing="Tree"/> | ||
1362 | <styles xmi:type="notation:FontStyle" xmi:id="_qBfrAtsVEe6c9ehqpe3s7A" fontName="Noto Sans" fontHeight="8"/> | ||
1363 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qBfrA9sVEe6c9ehqpe3s7A" points="[0, 0, 294, 356]$[-294, -356, 0, 0]"/> | ||
1364 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qBgSFtsVEe6c9ehqpe3s7A" id="(0.31724137931034485,0.01020408163265306)"/> | ||
1365 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qBgSF9sVEe6c9ehqpe3s7A" id="(0.5,0.0)"/> | ||
1366 | </edges> | ||
1367 | <edges xmi:type="notation:Edge" xmi:id="_EJdSYNsWEe6c9ehqpe3s7A" type="4001" element="_EI0ZOdsWEe6c9ehqpe3s7A" source="_jlSckNsVEe6c9ehqpe3s7A" target="_RzZA0KA5EeuqkpDnuik1sg"> | ||
1368 | <children xmi:type="notation:Node" xmi:id="_EJd5cNsWEe6c9ehqpe3s7A" type="6001"> | ||
1369 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EJd5cdsWEe6c9ehqpe3s7A" y="-10"/> | ||
1370 | </children> | ||
1371 | <children xmi:type="notation:Node" xmi:id="_EJd5ctsWEe6c9ehqpe3s7A" type="6002"> | ||
1372 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EJd5c9sWEe6c9ehqpe3s7A" y="10"/> | ||
1373 | </children> | ||
1374 | <children xmi:type="notation:Node" xmi:id="_EJd5dNsWEe6c9ehqpe3s7A" type="6003"> | ||
1375 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EJd5ddsWEe6c9ehqpe3s7A" y="10"/> | ||
1376 | </children> | ||
1377 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_EJdSYdsWEe6c9ehqpe3s7A" routing="Tree"/> | ||
1378 | <styles xmi:type="notation:FontStyle" xmi:id="_EJdSYtsWEe6c9ehqpe3s7A" fontName="Noto Sans" fontHeight="8"/> | ||
1379 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_EJdSY9sWEe6c9ehqpe3s7A" points="[0, 0, 115, 598]$[-115, -598, 0, 0]"/> | ||
1380 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EJd5dtsWEe6c9ehqpe3s7A" id="(0.6068965517241379,0.030612244897959183)"/> | ||
1381 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EJd5d9sWEe6c9ehqpe3s7A" id="(0.5,0.5)"/> | ||
1382 | </edges> | ||
1409 | </data> | 1383 | </data> |
1410 | </ownedAnnotationEntries> | 1384 | </ownedAnnotationEntries> |
1411 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Csiy8KA4EeuqkpDnuik1sg" source="DANNOTATION_CUSTOMIZATION_KEY"> | 1385 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Csiy8KA4EeuqkpDnuik1sg" source="DANNOTATION_CUSTOMIZATION_KEY"> |
@@ -1467,7 +1441,7 @@ | |||
1467 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | 1441 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> |
1468 | </ownedElements> | 1442 | </ownedElements> |
1469 | </ownedDiagramElements> | 1443 | </ownedDiagramElements> |
1470 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_c-A7oKA4EeuqkpDnuik1sg" name="ReferenceDeclaration" tooltipText="" outgoingEdges="_0V3L1qA4EeuqkpDnuik1sg _p1JWcqBJEeuqkpDnuik1sg _NrtSzmTzEe2qdtyPWAtoxA _bNXJs2g8Ee25oofngfVl_A _8sdu2DrXEe62Q_vL_UTCsA" incomingEdges="_0V3L1qA4EeuqkpDnuik1sg" width="12" height="10"> | 1444 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_c-A7oKA4EeuqkpDnuik1sg" name="ReferenceDeclaration" tooltipText="" outgoingEdges="_0V3L1qA4EeuqkpDnuik1sg _p1JWcqBJEeuqkpDnuik1sg _NrtSzmTzEe2qdtyPWAtoxA _8sdu2DrXEe62Q_vL_UTCsA _nxr57GTvEe2qdtyPWAtoxA" incomingEdges="_0V3L1qA4EeuqkpDnuik1sg _jk6-PKA4EeuqkpDnuik1sg" width="12" height="10"> |
1471 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> | 1445 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> |
1472 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> | 1446 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> |
1473 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 1447 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -1477,7 +1451,7 @@ | |||
1477 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | 1451 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> |
1478 | </ownedStyle> | 1452 | </ownedStyle> |
1479 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 1453 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
1480 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_902GwDNlEe2fD4dIhR_vzA" name="kind : ReferenceKind = REFERENCE" tooltipText=""> | 1454 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_902GwDNlEe2fD4dIhR_vzA" name="kind : ReferenceKind = DEFAULT" tooltipText=""> |
1481 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/kind"/> | 1455 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/kind"/> |
1482 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/kind"/> | 1456 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/kind"/> |
1483 | <ownedStyle xmi:type="diagram:BundledImage" uid="__BoC8jNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> | 1457 | <ownedStyle xmi:type="diagram:BundledImage" uid="__BoC8jNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> |
@@ -1486,7 +1460,7 @@ | |||
1486 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | 1460 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> |
1487 | </ownedElements> | 1461 | </ownedElements> |
1488 | </ownedDiagramElements> | 1462 | </ownedDiagramElements> |
1489 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_jk6-PKA4EeuqkpDnuik1sg" name="[0..*] featureDeclarations" sourceNode="_JTstIKA4EeuqkpDnuik1sg" targetNode="_O8gcEGg8Ee25oofngfVl_A"> | 1463 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_jk6-PKA4EeuqkpDnuik1sg" name="[0..*] featureDeclarations" sourceNode="_JTstIKA4EeuqkpDnuik1sg" targetNode="_c-A7oKA4EeuqkpDnuik1sg"> |
1490 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ClassDeclaration/featureDeclarations"/> | 1464 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ClassDeclaration/featureDeclarations"/> |
1491 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ClassDeclaration/featureDeclarations"/> | 1465 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ClassDeclaration/featureDeclarations"/> |
1492 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_jk7lQKA4EeuqkpDnuik1sg" description="_L-JhMKA4EeuqkpDnuik1sg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | 1466 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_jk7lQKA4EeuqkpDnuik1sg" description="_L-JhMKA4EeuqkpDnuik1sg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> |
@@ -1513,7 +1487,7 @@ | |||
1513 | </ownedStyle> | 1487 | </ownedStyle> |
1514 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 1488 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
1515 | </ownedDiagramElements> | 1489 | </ownedDiagramElements> |
1516 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_RzK-YKA5EeuqkpDnuik1sg" name="NamedElement" tooltipText="" incomingEdges="_m-6OTNXtEeuF_d0WEhR3Xw _Smi9eNbNEeuymriYTNxK2g _WUsgHCrcEeyyC-O0_LlY9w _-OYJtGTvEe2qdtyPWAtoxA" width="12" height="10"> | 1490 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_RzK-YKA5EeuqkpDnuik1sg" name="NamedElement" tooltipText="" incomingEdges="_m-6OTNXtEeuF_d0WEhR3Xw _Smi9eNbNEeuymriYTNxK2g _WUsgHCrcEeyyC-O0_LlY9w _-OYJtGTvEe2qdtyPWAtoxA _EI0ZOdsWEe6c9ehqpe3s7A" width="12" height="10"> |
1517 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//NamedElement"/> | 1491 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//NamedElement"/> |
1518 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//NamedElement"/> | 1492 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//NamedElement"/> |
1519 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 1493 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -1635,7 +1609,7 @@ | |||
1635 | </ownedStyle> | 1609 | </ownedStyle> |
1636 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 1610 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
1637 | </ownedDiagramElements> | 1611 | </ownedDiagramElements> |
1638 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_e7ydoKA9EeuqkpDnuik1sg" name="Statement" tooltipText="" incomingEdges="_hU64ZqA9EeuqkpDnuik1sg _mzziwKA9EeuqkpDnuik1sg _plK3JqA9EeuqkpDnuik1sg _vdptgqA9EeuqkpDnuik1sg _WX_5w9bGEeuymriYTNxK2g _s68oXAGyEey7cfH5K6RyCw _UU0Y5cBeEe6Mo_-4--GvQg" width="12" height="10"> | 1612 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_e7ydoKA9EeuqkpDnuik1sg" name="Statement" tooltipText="" incomingEdges="_hU64ZqA9EeuqkpDnuik1sg _mzziwKA9EeuqkpDnuik1sg _plK3JqA9EeuqkpDnuik1sg _vdptgqA9EeuqkpDnuik1sg _WX_5w9bGEeuymriYTNxK2g _s68oXAGyEey7cfH5K6RyCw _UU0Y5cBeEe6Mo_-4--GvQg _8EJzMM9kEe6T2u19X9cqmQ _qAygeNsVEe6c9ehqpe3s7A" width="12" height="10"> |
1639 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Statement"/> | 1613 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Statement"/> |
1640 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Statement"/> | 1614 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Statement"/> |
1641 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 1615 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -2120,49 +2094,6 @@ | |||
2120 | </ownedStyle> | 2094 | </ownedStyle> |
2121 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 2095 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
2122 | </ownedDiagramElements> | 2096 | </ownedDiagramElements> |
2123 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_eKVWQBEKEe2AArBmfNpEZA" name="Modality" tooltipText="" width="12" height="10"> | ||
2124 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//Modality"/> | ||
2125 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//Modality"/> | ||
2126 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2127 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2128 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2129 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_eKXLcBEKEe2AArBmfNpEZA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202"> | ||
2130 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> | ||
2131 | </ownedStyle> | ||
2132 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> | ||
2133 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_fs9moBEKEe2AArBmfNpEZA" name="DEFAULT" tooltipText=""> | ||
2134 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/DEFAULT"/> | ||
2135 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/DEFAULT"/> | ||
2136 | <ownedStyle xmi:type="diagram:BundledImage" uid="_fs-NsBEKEe2AArBmfNpEZA" labelAlignment="LEFT"> | ||
2137 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2138 | </ownedStyle> | ||
2139 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2140 | </ownedElements> | ||
2141 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_gO3Z0BEKEe2AArBmfNpEZA" name="MAY" tooltipText=""> | ||
2142 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MAY"/> | ||
2143 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MAY"/> | ||
2144 | <ownedStyle xmi:type="diagram:BundledImage" uid="_gO4A4BEKEe2AArBmfNpEZA" labelAlignment="LEFT"> | ||
2145 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2146 | </ownedStyle> | ||
2147 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2148 | </ownedElements> | ||
2149 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_gpdEEBEKEe2AArBmfNpEZA" name="MUST" tooltipText=""> | ||
2150 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MUST"/> | ||
2151 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MUST"/> | ||
2152 | <ownedStyle xmi:type="diagram:BundledImage" uid="_gpdEEREKEe2AArBmfNpEZA" labelAlignment="LEFT"> | ||
2153 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2154 | </ownedStyle> | ||
2155 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2156 | </ownedElements> | ||
2157 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_uumz0F4MEe2m7IaHDkh2Xg" name="CURRENT" tooltipText=""> | ||
2158 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/CURRENT"/> | ||
2159 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/CURRENT"/> | ||
2160 | <ownedStyle xmi:type="diagram:BundledImage" uid="_uuna4F4MEe2m7IaHDkh2Xg" labelAlignment="LEFT"> | ||
2161 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2162 | </ownedStyle> | ||
2163 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2164 | </ownedElements> | ||
2165 | </ownedDiagramElements> | ||
2166 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_xpDfUDNlEe2fD4dIhR_vzA" name="ReferenceKind" tooltipText="" width="12" height="10"> | 2097 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_xpDfUDNlEe2fD4dIhR_vzA" name="ReferenceKind" tooltipText="" width="12" height="10"> |
2167 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//ReferenceKind"/> | 2098 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//ReferenceKind"/> |
2168 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//ReferenceKind"/> | 2099 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//ReferenceKind"/> |
@@ -2173,59 +2104,59 @@ | |||
2173 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> | 2104 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> |
2174 | </ownedStyle> | 2105 | </ownedStyle> |
2175 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> | 2106 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> |
2176 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_2zSIgDNlEe2fD4dIhR_vzA" name="REFERENCE" tooltipText=""> | 2107 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_2zSIgDNlEe2fD4dIhR_vzA" name="DEFAULT" tooltipText=""> |
2108 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/DEFAULT"/> | ||
2109 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/DEFAULT"/> | ||
2110 | <ownedStyle xmi:type="diagram:BundledImage" uid="_2zSvkDNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> | ||
2111 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2112 | </ownedStyle> | ||
2113 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2114 | </ownedElements> | ||
2115 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_4K8fADNlEe2fD4dIhR_vzA" name="REFERENCE" tooltipText=""> | ||
2177 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/REFERENCE"/> | 2116 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/REFERENCE"/> |
2178 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/REFERENCE"/> | 2117 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/REFERENCE"/> |
2179 | <ownedStyle xmi:type="diagram:BundledImage" uid="_2zSvkDNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> | 2118 | <ownedStyle xmi:type="diagram:BundledImage" uid="_4K8fATNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> |
2180 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 2119 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
2181 | </ownedStyle> | 2120 | </ownedStyle> |
2182 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 2121 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
2183 | </ownedElements> | 2122 | </ownedElements> |
2184 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_4K8fADNlEe2fD4dIhR_vzA" name="CONTAINMENT" tooltipText=""> | 2123 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_5MhQwDNlEe2fD4dIhR_vzA" name="CONTAINMENT" tooltipText=""> |
2185 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINMENT"/> | 2124 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINMENT"/> |
2186 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINMENT"/> | 2125 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINMENT"/> |
2187 | <ownedStyle xmi:type="diagram:BundledImage" uid="_4K8fATNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> | 2126 | <ownedStyle xmi:type="diagram:BundledImage" uid="_5MhQwTNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> |
2188 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 2127 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
2189 | </ownedStyle> | 2128 | </ownedStyle> |
2190 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 2129 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
2191 | </ownedElements> | 2130 | </ownedElements> |
2192 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_5MhQwDNlEe2fD4dIhR_vzA" name="CONTAINER" tooltipText=""> | 2131 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_9ZHQcM9jEe6T2u19X9cqmQ" name="CONTAINER" tooltipText=""> |
2193 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINER"/> | 2132 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINER"/> |
2194 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINER"/> | 2133 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ReferenceKind/CONTAINER"/> |
2195 | <ownedStyle xmi:type="diagram:BundledImage" uid="_5MhQwTNlEe2fD4dIhR_vzA" labelAlignment="LEFT"> | 2134 | <ownedStyle xmi:type="diagram:BundledImage" uid="_9ZJFoM9jEe6T2u19X9cqmQ" labelAlignment="LEFT"> |
2196 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 2135 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
2197 | </ownedStyle> | 2136 | </ownedStyle> |
2198 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 2137 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
2199 | </ownedElements> | 2138 | </ownedElements> |
2200 | </ownedDiagramElements> | 2139 | </ownedDiagramElements> |
2201 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_78pRMF9mEe2rXNsIDUvqhw" name="FunctionDefinition" tooltipText="" outgoingEdges="_rKoQHF9nEe2rXNsIDUvqhw _S6YCJl9wEe2rXNsIDUvqhw _sMPaBmTvEe2qdtyPWAtoxA" width="12" height="10"> | 2140 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_78pRMF9mEe2rXNsIDUvqhw" name="FunctionDefinition" tooltipText="" outgoingEdges="_rKoQHF9nEe2rXNsIDUvqhw _S6YCJl9wEe2rXNsIDUvqhw _sMPaBmTvEe2qdtyPWAtoxA _RjRnQs9lEe6T2u19X9cqmQ" width="12" height="10"> |
2202 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> | 2141 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> |
2203 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> | 2142 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> |
2204 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 2143 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
2205 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 2144 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
2206 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 2145 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
2207 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_XN5OB2g9Ee25oofngfVl_A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | 2146 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_2ElS-M9jEe6T2u19X9cqmQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> |
2208 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | 2147 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> |
2209 | </ownedStyle> | 2148 | </ownedStyle> |
2210 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 2149 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
2211 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_WWiIMGg9Ee25oofngfVl_A" name="functionType : PrimitiveType = INT" tooltipText=""> | ||
2212 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//FunctionDefinition/functionType"/> | ||
2213 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//FunctionDefinition/functionType"/> | ||
2214 | <ownedStyle xmi:type="diagram:BundledImage" uid="_XN6cJGg9Ee25oofngfVl_A" labelAlignment="LEFT"> | ||
2215 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
2216 | </ownedStyle> | ||
2217 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
2218 | </ownedElements> | ||
2219 | </ownedDiagramElements> | 2150 | </ownedDiagramElements> |
2220 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_rKoQHF9nEe2rXNsIDUvqhw" sourceNode="_78pRMF9mEe2rXNsIDUvqhw" targetNode="_A8hIkCrZEeyyC-O0_LlY9w"> | 2151 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_rKoQHF9nEe2rXNsIDUvqhw" sourceNode="_78pRMF9mEe2rXNsIDUvqhw" targetNode="_A8hIkCrZEeyyC-O0_LlY9w"> |
2221 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> | 2152 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> |
2222 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> | 2153 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> |
2223 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_XN-tzGg9Ee25oofngfVl_A" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> | 2154 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_2ExgMs9jEe6T2u19X9cqmQ" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> |
2224 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> | 2155 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> |
2225 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_XN-tzWg9Ee25oofngfVl_A" showIcon="false"> | 2156 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_2ExgM89jEe6T2u19X9cqmQ" showIcon="false"> |
2226 | <labelFormat>italic</labelFormat> | 2157 | <labelFormat>italic</labelFormat> |
2227 | </beginLabelStyle> | 2158 | </beginLabelStyle> |
2228 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_XN-tzmg9Ee25oofngfVl_A" showIcon="false"/> | 2159 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_2ExgNM9jEe6T2u19X9cqmQ" showIcon="false"/> |
2229 | </ownedStyle> | 2160 | </ownedStyle> |
2230 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 2161 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
2231 | </ownedDiagramElements> | 2162 | </ownedDiagramElements> |
@@ -2404,7 +2335,7 @@ | |||
2404 | </ownedStyle> | 2335 | </ownedStyle> |
2405 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 2336 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
2406 | </ownedDiagramElements> | 2337 | </ownedDiagramElements> |
2407 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_dzVaYGTvEe2qdtyPWAtoxA" name="Relation" tooltipText="" outgoingEdges="_-OYJtGTvEe2qdtyPWAtoxA" incomingEdges="_m2GbcmTvEe2qdtyPWAtoxA _nxr57GTvEe2qdtyPWAtoxA _pHlWJ2TvEe2qdtyPWAtoxA _p-1uSmTvEe2qdtyPWAtoxA _sMPaBmTvEe2qdtyPWAtoxA _NrtSzmTzEe2qdtyPWAtoxA _YWqZhmTzEe2qdtyPWAtoxA _iWzpAmTzEe2qdtyPWAtoxA _q604amTzEe2qdtyPWAtoxA _8sdu2DrXEe62Q_vL_UTCsA" width="12" height="10"> | 2338 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_dzVaYGTvEe2qdtyPWAtoxA" name="Relation" tooltipText="" outgoingEdges="_-OYJtGTvEe2qdtyPWAtoxA" incomingEdges="_m2GbcmTvEe2qdtyPWAtoxA _nxr57GTvEe2qdtyPWAtoxA _pHlWJ2TvEe2qdtyPWAtoxA _p-1uSmTvEe2qdtyPWAtoxA _sMPaBmTvEe2qdtyPWAtoxA _NrtSzmTzEe2qdtyPWAtoxA _YWqZhmTzEe2qdtyPWAtoxA _iWzpAmTzEe2qdtyPWAtoxA _q604amTzEe2qdtyPWAtoxA _8sdu2DrXEe62Q_vL_UTCsA _6FJJDM9kEe6T2u19X9cqmQ" width="12" height="10"> |
2408 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> | 2339 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> |
2409 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> | 2340 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> |
2410 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 2341 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -2428,9 +2359,9 @@ | |||
2428 | </ownedStyle> | 2359 | </ownedStyle> |
2429 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 2360 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
2430 | </ownedDiagramElements> | 2361 | </ownedDiagramElements> |
2431 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_nxr57GTvEe2qdtyPWAtoxA" sourceNode="_O8gcEGg8Ee25oofngfVl_A" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> | 2362 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_nxr57GTvEe2qdtyPWAtoxA" sourceNode="_c-A7oKA4EeuqkpDnuik1sg" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> |
2432 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FeatureDeclaration"/> | 2363 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> |
2433 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FeatureDeclaration"/> | 2364 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> |
2434 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_nxr57WTvEe2qdtyPWAtoxA" targetArrow="InputClosedArrow" routingStyle="tree"> | 2365 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_nxr57WTvEe2qdtyPWAtoxA" targetArrow="InputClosedArrow" routingStyle="tree"> |
2435 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | 2366 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> |
2436 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_nxr57mTvEe2qdtyPWAtoxA" showIcon="false"> | 2367 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_nxr57mTvEe2qdtyPWAtoxA" showIcon="false"> |
@@ -2467,12 +2398,12 @@ | |||
2467 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_sMPaBmTvEe2qdtyPWAtoxA" sourceNode="_78pRMF9mEe2rXNsIDUvqhw" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> | 2398 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_sMPaBmTvEe2qdtyPWAtoxA" sourceNode="_78pRMF9mEe2rXNsIDUvqhw" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> |
2468 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> | 2399 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> |
2469 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> | 2400 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> |
2470 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_XN-t0mg9Ee25oofngfVl_A" targetArrow="InputClosedArrow" routingStyle="tree"> | 2401 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_2EyHMM9jEe6T2u19X9cqmQ" targetArrow="InputClosedArrow" routingStyle="tree"> |
2471 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | 2402 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> |
2472 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_XN-t02g9Ee25oofngfVl_A" showIcon="false"> | 2403 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_2EyHMc9jEe6T2u19X9cqmQ" showIcon="false"> |
2473 | <labelFormat>italic</labelFormat> | 2404 | <labelFormat>italic</labelFormat> |
2474 | </beginLabelStyle> | 2405 | </beginLabelStyle> |
2475 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_XN-t1Gg9Ee25oofngfVl_A" showIcon="false"/> | 2406 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_2EyHMs9jEe6T2u19X9cqmQ" showIcon="false"/> |
2476 | </ownedStyle> | 2407 | </ownedStyle> |
2477 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 2408 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
2478 | </ownedDiagramElements> | 2409 | </ownedDiagramElements> |
@@ -2553,119 +2484,6 @@ | |||
2553 | </ownedStyle> | 2484 | </ownedStyle> |
2554 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 2485 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
2555 | </ownedDiagramElements> | 2486 | </ownedDiagramElements> |
2556 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_O8gcEGg8Ee25oofngfVl_A" name="FeatureDeclaration" tooltipText="" outgoingEdges="_nxr57GTvEe2qdtyPWAtoxA" incomingEdges="_jk6-PKA4EeuqkpDnuik1sg _bNXJs2g8Ee25oofngfVl_A _lSCTtWg8Ee25oofngfVl_A _mCvX7mg8Ee25oofngfVl_A" width="12" height="10"> | ||
2557 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FeatureDeclaration"/> | ||
2558 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FeatureDeclaration"/> | ||
2559 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2560 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2561 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2562 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_3hrT6Wg8Ee25oofngfVl_A" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228"> | ||
2563 | <labelFormat>italic</labelFormat> | ||
2564 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
2565 | </ownedStyle> | ||
2566 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2567 | </ownedDiagramElements> | ||
2568 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_bNXJs2g8Ee25oofngfVl_A" sourceNode="_c-A7oKA4EeuqkpDnuik1sg" targetNode="_O8gcEGg8Ee25oofngfVl_A"> | ||
2569 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> | ||
2570 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> | ||
2571 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_bNXwwGg8Ee25oofngfVl_A" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2572 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2573 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_bNXwwWg8Ee25oofngfVl_A" showIcon="false"> | ||
2574 | <labelFormat>italic</labelFormat> | ||
2575 | </beginLabelStyle> | ||
2576 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_bNXwwmg8Ee25oofngfVl_A" showIcon="false"/> | ||
2577 | </ownedStyle> | ||
2578 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2579 | </ownedDiagramElements> | ||
2580 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_cU9D4Gg8Ee25oofngfVl_A" name="AttributeDeclaration" tooltipText="" outgoingEdges="_lSCTtWg8Ee25oofngfVl_A" width="12" height="10"> | ||
2581 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AttributeDeclaration"/> | ||
2582 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AttributeDeclaration"/> | ||
2583 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2584 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2585 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2586 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Eui91Wg9Ee25oofngfVl_A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2587 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2588 | </ownedStyle> | ||
2589 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2590 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_EB7vcGg9Ee25oofngfVl_A" name="attributeType : PrimitiveType = INT" tooltipText=""> | ||
2591 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//AttributeDeclaration/attributeType"/> | ||
2592 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//AttributeDeclaration/attributeType"/> | ||
2593 | <ownedStyle xmi:type="diagram:BundledImage" uid="_EukL8Wg9Ee25oofngfVl_A" labelAlignment="LEFT"> | ||
2594 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
2595 | </ownedStyle> | ||
2596 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
2597 | </ownedElements> | ||
2598 | </ownedDiagramElements> | ||
2599 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_jY5nwGg8Ee25oofngfVl_A" name="FlagDeclaration" tooltipText="" outgoingEdges="_mCvX7mg8Ee25oofngfVl_A" width="12" height="10"> | ||
2600 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FlagDeclaration"/> | ||
2601 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FlagDeclaration"/> | ||
2602 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2603 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2604 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2605 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_jY5nwWg8Ee25oofngfVl_A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2606 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2607 | </ownedStyle> | ||
2608 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2609 | </ownedDiagramElements> | ||
2610 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_lSCTtWg8Ee25oofngfVl_A" sourceNode="_cU9D4Gg8Ee25oofngfVl_A" targetNode="_O8gcEGg8Ee25oofngfVl_A"> | ||
2611 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AttributeDeclaration"/> | ||
2612 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AttributeDeclaration"/> | ||
2613 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_EupEhWg9Ee25oofngfVl_A" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2614 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2615 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_EupEhmg9Ee25oofngfVl_A" showIcon="false"> | ||
2616 | <labelFormat>italic</labelFormat> | ||
2617 | </beginLabelStyle> | ||
2618 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_EupEh2g9Ee25oofngfVl_A" showIcon="false"/> | ||
2619 | </ownedStyle> | ||
2620 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2621 | </ownedDiagramElements> | ||
2622 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_mCvX7mg8Ee25oofngfVl_A" sourceNode="_jY5nwGg8Ee25oofngfVl_A" targetNode="_O8gcEGg8Ee25oofngfVl_A"> | ||
2623 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FlagDeclaration"/> | ||
2624 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FlagDeclaration"/> | ||
2625 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_mCv-4Gg8Ee25oofngfVl_A" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2626 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2627 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_mCv-4Wg8Ee25oofngfVl_A" showIcon="false"> | ||
2628 | <labelFormat>italic</labelFormat> | ||
2629 | </beginLabelStyle> | ||
2630 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_mCv-4mg8Ee25oofngfVl_A" showIcon="false"/> | ||
2631 | </ownedStyle> | ||
2632 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2633 | </ownedDiagramElements> | ||
2634 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_pOBoEGg8Ee25oofngfVl_A" name="PrimitiveType" tooltipText="" width="12" height="10"> | ||
2635 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//PrimitiveType"/> | ||
2636 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//PrimitiveType"/> | ||
2637 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2638 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2639 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2640 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_pOBoEWg8Ee25oofngfVl_A" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202"> | ||
2641 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> | ||
2642 | </ownedStyle> | ||
2643 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> | ||
2644 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_qOtpAGg8Ee25oofngfVl_A" name="INT" tooltipText=""> | ||
2645 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PrimitiveType/INT"/> | ||
2646 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PrimitiveType/INT"/> | ||
2647 | <ownedStyle xmi:type="diagram:BundledImage" uid="_qOuQEGg8Ee25oofngfVl_A" labelAlignment="LEFT"> | ||
2648 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2649 | </ownedStyle> | ||
2650 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2651 | </ownedElements> | ||
2652 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_qp-BoGg8Ee25oofngfVl_A" name="REAL" tooltipText=""> | ||
2653 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PrimitiveType/REAL"/> | ||
2654 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PrimitiveType/REAL"/> | ||
2655 | <ownedStyle xmi:type="diagram:BundledImage" uid="_qp-osGg8Ee25oofngfVl_A" labelAlignment="LEFT"> | ||
2656 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2657 | </ownedStyle> | ||
2658 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2659 | </ownedElements> | ||
2660 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_q_vdUGg8Ee25oofngfVl_A" name="STRING" tooltipText=""> | ||
2661 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PrimitiveType/STRING"/> | ||
2662 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PrimitiveType/STRING"/> | ||
2663 | <ownedStyle xmi:type="diagram:BundledImage" uid="_q_wEYGg8Ee25oofngfVl_A" labelAlignment="LEFT"> | ||
2664 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
2665 | </ownedStyle> | ||
2666 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
2667 | </ownedElements> | ||
2668 | </ownedDiagramElements> | ||
2669 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_8sdu2DrXEe62Q_vL_UTCsA" name="[0..1] invalidMultiplicity" sourceNode="_c-A7oKA4EeuqkpDnuik1sg" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> | 2487 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_8sdu2DrXEe62Q_vL_UTCsA" name="[0..1] invalidMultiplicity" sourceNode="_c-A7oKA4EeuqkpDnuik1sg" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> |
2670 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/> | 2488 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/> |
2671 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/> | 2489 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/> |
@@ -2782,6 +2600,86 @@ | |||
2782 | </ownedStyle> | 2600 | </ownedStyle> |
2783 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 2601 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
2784 | </ownedDiagramElements> | 2602 | </ownedDiagramElements> |
2603 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_uuKCcM9kEe6T2u19X9cqmQ" name="DatatypeDeclaration" tooltipText="" outgoingEdges="_6FJJDM9kEe6T2u19X9cqmQ _8EJzMM9kEe6T2u19X9cqmQ" incomingEdges="_RjRnQs9lEe6T2u19X9cqmQ" width="12" height="10"> | ||
2604 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//DatatypeDeclaration"/> | ||
2605 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//DatatypeDeclaration"/> | ||
2606 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2607 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2608 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2609 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_1J9BRc9kEe6T2u19X9cqmQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2610 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2611 | </ownedStyle> | ||
2612 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2613 | </ownedDiagramElements> | ||
2614 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_6FJJDM9kEe6T2u19X9cqmQ" sourceNode="_uuKCcM9kEe6T2u19X9cqmQ" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> | ||
2615 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//DatatypeDeclaration"/> | ||
2616 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//DatatypeDeclaration"/> | ||
2617 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_6FJJDc9kEe6T2u19X9cqmQ" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2618 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2619 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_6FJJDs9kEe6T2u19X9cqmQ" showIcon="false"> | ||
2620 | <labelFormat>italic</labelFormat> | ||
2621 | </beginLabelStyle> | ||
2622 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_6FJJD89kEe6T2u19X9cqmQ" showIcon="false"/> | ||
2623 | </ownedStyle> | ||
2624 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2625 | </ownedDiagramElements> | ||
2626 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_8EJzMM9kEe6T2u19X9cqmQ" sourceNode="_uuKCcM9kEe6T2u19X9cqmQ" targetNode="_e7ydoKA9EeuqkpDnuik1sg"> | ||
2627 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//DatatypeDeclaration"/> | ||
2628 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//DatatypeDeclaration"/> | ||
2629 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_8EJzMc9kEe6T2u19X9cqmQ" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2630 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> | ||
2631 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_8EJzMs9kEe6T2u19X9cqmQ" showIcon="false"> | ||
2632 | <labelFormat>italic</labelFormat> | ||
2633 | </beginLabelStyle> | ||
2634 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_8EJzM89kEe6T2u19X9cqmQ" showIcon="false"/> | ||
2635 | </ownedStyle> | ||
2636 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2637 | </ownedDiagramElements> | ||
2638 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_RjRnQs9lEe6T2u19X9cqmQ" name="[0..1] functionType" sourceNode="_78pRMF9mEe2rXNsIDUvqhw" targetNode="_uuKCcM9kEe6T2u19X9cqmQ"> | ||
2639 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//FunctionDefinition/functionType"/> | ||
2640 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//FunctionDefinition/functionType"/> | ||
2641 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_RjRnQ89lEe6T2u19X9cqmQ" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2642 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
2643 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_RjRnRc9lEe6T2u19X9cqmQ" showIcon="false"/> | ||
2644 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_RjRnRM9lEe6T2u19X9cqmQ" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
2645 | </ownedStyle> | ||
2646 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2647 | </ownedDiagramElements> | ||
2648 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_jjj-QNsVEe6c9ehqpe3s7A" name="AggregatorDeclaration" tooltipText="" outgoingEdges="_qAygeNsVEe6c9ehqpe3s7A _EI0ZOdsWEe6c9ehqpe3s7A" width="12" height="10"> | ||
2649 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
2650 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
2651 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2652 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2653 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2654 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_jjlMYNsVEe6c9ehqpe3s7A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2655 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2656 | </ownedStyle> | ||
2657 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2658 | </ownedDiagramElements> | ||
2659 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_qAygeNsVEe6c9ehqpe3s7A" sourceNode="_jjj-QNsVEe6c9ehqpe3s7A" targetNode="_e7ydoKA9EeuqkpDnuik1sg"> | ||
2660 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
2661 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
2662 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_qAygedsVEe6c9ehqpe3s7A" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2663 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> | ||
2664 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_qAygetsVEe6c9ehqpe3s7A" showIcon="false"> | ||
2665 | <labelFormat>italic</labelFormat> | ||
2666 | </beginLabelStyle> | ||
2667 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_qAyge9sVEe6c9ehqpe3s7A" showIcon="false"/> | ||
2668 | </ownedStyle> | ||
2669 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2670 | </ownedDiagramElements> | ||
2671 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_EI0ZOdsWEe6c9ehqpe3s7A" sourceNode="_jjj-QNsVEe6c9ehqpe3s7A" targetNode="_RzK-YKA5EeuqkpDnuik1sg"> | ||
2672 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
2673 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
2674 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_EI0ZOtsWEe6c9ehqpe3s7A" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2675 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2676 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_EI0ZO9sWEe6c9ehqpe3s7A" showIcon="false"> | ||
2677 | <labelFormat>italic</labelFormat> | ||
2678 | </beginLabelStyle> | ||
2679 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_EI0ZPNsWEe6c9ehqpe3s7A" showIcon="false"/> | ||
2680 | </ownedStyle> | ||
2681 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2682 | </ownedDiagramElements> | ||
2785 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 2683 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
2786 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_CsWlsKA4EeuqkpDnuik1sg"/> | 2684 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_CsWlsKA4EeuqkpDnuik1sg"/> |
2787 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | 2685 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> |
@@ -2808,7 +2706,7 @@ | |||
2808 | <styles xmi:type="notation:FilteringStyle" xmi:id="_8bUtNl3lEe2LuOZzJ_LhLg"/> | 2706 | <styles xmi:type="notation:FilteringStyle" xmi:id="_8bUtNl3lEe2LuOZzJ_LhLg"/> |
2809 | </children> | 2707 | </children> |
2810 | <styles xmi:type="notation:ShapeStyle" xmi:id="_8bUtMV3lEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8" italic="true"/> | 2708 | <styles xmi:type="notation:ShapeStyle" xmi:id="_8bUtMV3lEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8" italic="true"/> |
2811 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8bUtMl3lEe2LuOZzJ_LhLg" x="548" y="168"/> | 2709 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8bUtMl3lEe2LuOZzJ_LhLg" x="540" y="168"/> |
2812 | </children> | 2710 | </children> |
2813 | <children xmi:type="notation:Node" xmi:id="_9ZUmgF3lEe2LuOZzJ_LhLg" type="2003" element="_9Ys7cF3lEe2LuOZzJ_LhLg"> | 2711 | <children xmi:type="notation:Node" xmi:id="_9ZUmgF3lEe2LuOZzJ_LhLg" type="2003" element="_9Ys7cF3lEe2LuOZzJ_LhLg"> |
2814 | <children xmi:type="notation:Node" xmi:id="_9ZVNkF3lEe2LuOZzJ_LhLg" type="5007"/> | 2712 | <children xmi:type="notation:Node" xmi:id="_9ZVNkF3lEe2LuOZzJ_LhLg" type="5007"/> |
@@ -2817,7 +2715,7 @@ | |||
2817 | <styles xmi:type="notation:FilteringStyle" xmi:id="_9ZVNk13lEe2LuOZzJ_LhLg"/> | 2715 | <styles xmi:type="notation:FilteringStyle" xmi:id="_9ZVNk13lEe2LuOZzJ_LhLg"/> |
2818 | </children> | 2716 | </children> |
2819 | <styles xmi:type="notation:ShapeStyle" xmi:id="_9ZUmgV3lEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2717 | <styles xmi:type="notation:ShapeStyle" xmi:id="_9ZUmgV3lEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2820 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9ZUmgl3lEe2LuOZzJ_LhLg" x="360" y="168" width="135" height="100"/> | 2718 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9ZUmgl3lEe2LuOZzJ_LhLg" x="352" y="168" width="135" height="100"/> |
2821 | </children> | 2719 | </children> |
2822 | <children xmi:type="notation:Node" xmi:id="_bTgeJl3tEe2LuOZzJ_LhLg" type="2003" element="_bTLuAF3tEe2LuOZzJ_LhLg"> | 2720 | <children xmi:type="notation:Node" xmi:id="_bTgeJl3tEe2LuOZzJ_LhLg" type="2003" element="_bTLuAF3tEe2LuOZzJ_LhLg"> |
2823 | <children xmi:type="notation:Node" xmi:id="_bTgeKV3tEe2LuOZzJ_LhLg" type="5007"/> | 2721 | <children xmi:type="notation:Node" xmi:id="_bTgeKV3tEe2LuOZzJ_LhLg" type="5007"/> |
@@ -2826,7 +2724,7 @@ | |||
2826 | <styles xmi:type="notation:FilteringStyle" xmi:id="_bTgeLF3tEe2LuOZzJ_LhLg"/> | 2724 | <styles xmi:type="notation:FilteringStyle" xmi:id="_bTgeLF3tEe2LuOZzJ_LhLg"/> |
2827 | </children> | 2725 | </children> |
2828 | <styles xmi:type="notation:ShapeStyle" xmi:id="_bTgeJ13tEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2726 | <styles xmi:type="notation:ShapeStyle" xmi:id="_bTgeJ13tEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2829 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bTgeKF3tEe2LuOZzJ_LhLg" x="1956" y="168" width="120" height="100"/> | 2727 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bTgeKF3tEe2LuOZzJ_LhLg" x="1955" y="168" width="120" height="100"/> |
2830 | </children> | 2728 | </children> |
2831 | <children xmi:type="notation:Node" xmi:id="_meWJcF3uEe2LuOZzJ_LhLg" type="2003" element="_mdrbEF3uEe2LuOZzJ_LhLg"> | 2729 | <children xmi:type="notation:Node" xmi:id="_meWJcF3uEe2LuOZzJ_LhLg" type="2003" element="_mdrbEF3uEe2LuOZzJ_LhLg"> |
2832 | <children xmi:type="notation:Node" xmi:id="_meWwgF3uEe2LuOZzJ_LhLg" type="5007"/> | 2730 | <children xmi:type="notation:Node" xmi:id="_meWwgF3uEe2LuOZzJ_LhLg" type="5007"/> |
@@ -2877,19 +2775,23 @@ | |||
2877 | <styles xmi:type="notation:FontStyle" xmi:id="_n5Y5MV3wEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2775 | <styles xmi:type="notation:FontStyle" xmi:id="_n5Y5MV3wEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2878 | <layoutConstraint xmi:type="notation:Location" xmi:id="_n5Y5Ml3wEe2LuOZzJ_LhLg"/> | 2776 | <layoutConstraint xmi:type="notation:Location" xmi:id="_n5Y5Ml3wEe2LuOZzJ_LhLg"/> |
2879 | </children> | 2777 | </children> |
2880 | <children xmi:type="notation:Node" xmi:id="_SoEXkGgrEe24RpwpWgpkFQ" type="3010" element="_Sn1HAGgrEe24RpwpWgpkFQ"> | 2778 | <children xmi:type="notation:Node" xmi:id="_BjWXkNf8Ee66mJJuF_pPGg" type="3010" element="_BiDXENf8Ee66mJJuF_pPGg"> |
2881 | <styles xmi:type="notation:FontStyle" xmi:id="_SoEXkWgrEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> | 2779 | <styles xmi:type="notation:FontStyle" xmi:id="_BjWXkdf8Ee66mJJuF_pPGg" fontName="Noto Sans" fontHeight="8"/> |
2882 | <layoutConstraint xmi:type="notation:Location" xmi:id="_SoEXkmgrEe24RpwpWgpkFQ"/> | 2780 | <layoutConstraint xmi:type="notation:Location" xmi:id="_BjWXktf8Ee66mJJuF_pPGg"/> |
2883 | </children> | 2781 | </children> |
2884 | <children xmi:type="notation:Node" xmi:id="_TrvbEGgrEe24RpwpWgpkFQ" type="3010" element="_TrhYoGgrEe24RpwpWgpkFQ"> | 2782 | <children xmi:type="notation:Node" xmi:id="_CG2GMNf8Ee66mJJuF_pPGg" type="3010" element="_CGRecNf8Ee66mJJuF_pPGg"> |
2885 | <styles xmi:type="notation:FontStyle" xmi:id="_TrvbEWgrEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> | 2783 | <styles xmi:type="notation:FontStyle" xmi:id="_CG2GMdf8Ee66mJJuF_pPGg" fontName="Noto Sans" fontHeight="8"/> |
2886 | <layoutConstraint xmi:type="notation:Location" xmi:id="_TrvbEmgrEe24RpwpWgpkFQ"/> | 2784 | <layoutConstraint xmi:type="notation:Location" xmi:id="_CG2GMtf8Ee66mJJuF_pPGg"/> |
2785 | </children> | ||
2786 | <children xmi:type="notation:Node" xmi:id="_CpQPsNf8Ee66mJJuF_pPGg" type="3010" element="_CopLsNf8Ee66mJJuF_pPGg"> | ||
2787 | <styles xmi:type="notation:FontStyle" xmi:id="_CpQPsdf8Ee66mJJuF_pPGg" fontName="Noto Sans" fontHeight="8"/> | ||
2788 | <layoutConstraint xmi:type="notation:Location" xmi:id="_CpQPstf8Ee66mJJuF_pPGg"/> | ||
2887 | </children> | 2789 | </children> |
2888 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccRVpV3wEe2LuOZzJ_LhLg"/> | 2790 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccRVpV3wEe2LuOZzJ_LhLg"/> |
2889 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccRVpl3wEe2LuOZzJ_LhLg"/> | 2791 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccRVpl3wEe2LuOZzJ_LhLg"/> |
2890 | </children> | 2792 | </children> |
2891 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccRVoV3wEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2793 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccRVoV3wEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2892 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccRVol3wEe2LuOZzJ_LhLg" x="1788" y="450" width="120" height="153"/> | 2794 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccRVol3wEe2LuOZzJ_LhLg" x="1616" y="450" width="120" height="165"/> |
2893 | </children> | 2795 | </children> |
2894 | <children xmi:type="notation:Node" xmi:id="_R7b9sF38Ee2LuOZzJ_LhLg" type="2003" element="_R7XFMF38Ee2LuOZzJ_LhLg"> | 2796 | <children xmi:type="notation:Node" xmi:id="_R7b9sF38Ee2LuOZzJ_LhLg" type="2003" element="_R7XFMF38Ee2LuOZzJ_LhLg"> |
2895 | <children xmi:type="notation:Node" xmi:id="_R7b9s138Ee2LuOZzJ_LhLg" type="5007"/> | 2797 | <children xmi:type="notation:Node" xmi:id="_R7b9s138Ee2LuOZzJ_LhLg" type="5007"/> |
@@ -2907,7 +2809,7 @@ | |||
2907 | <styles xmi:type="notation:FilteringStyle" xmi:id="_WGzK5l38Ee2LuOZzJ_LhLg"/> | 2809 | <styles xmi:type="notation:FilteringStyle" xmi:id="_WGzK5l38Ee2LuOZzJ_LhLg"/> |
2908 | </children> | 2810 | </children> |
2909 | <styles xmi:type="notation:ShapeStyle" xmi:id="_WGzK4V38Ee2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2811 | <styles xmi:type="notation:ShapeStyle" xmi:id="_WGzK4V38Ee2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2910 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzK4l38Ee2LuOZzJ_LhLg" x="548" y="452"/> | 2812 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzK4l38Ee2LuOZzJ_LhLg" x="540" y="452"/> |
2911 | </children> | 2813 | </children> |
2912 | <children xmi:type="notation:Node" xmi:id="_fx_SQF4GEe2LuOZzJ_LhLg" type="2003" element="_fxsXUF4GEe2LuOZzJ_LhLg"> | 2814 | <children xmi:type="notation:Node" xmi:id="_fx_SQF4GEe2LuOZzJ_LhLg" type="2003" element="_fxsXUF4GEe2LuOZzJ_LhLg"> |
2913 | <children xmi:type="notation:Node" xmi:id="_fx_SQ14GEe2LuOZzJ_LhLg" type="5007"/> | 2815 | <children xmi:type="notation:Node" xmi:id="_fx_SQ14GEe2LuOZzJ_LhLg" type="5007"/> |
@@ -2925,41 +2827,12 @@ | |||
2925 | <children xmi:type="notation:Node" xmi:id="_3BISYF4GEe2LuOZzJ_LhLg" type="2003" element="_3A1XcF4GEe2LuOZzJ_LhLg"> | 2827 | <children xmi:type="notation:Node" xmi:id="_3BISYF4GEe2LuOZzJ_LhLg" type="2003" element="_3A1XcF4GEe2LuOZzJ_LhLg"> |
2926 | <children xmi:type="notation:Node" xmi:id="_3BISY14GEe2LuOZzJ_LhLg" type="5007"/> | 2828 | <children xmi:type="notation:Node" xmi:id="_3BISY14GEe2LuOZzJ_LhLg" type="5007"/> |
2927 | <children xmi:type="notation:Node" xmi:id="_3BISZF4GEe2LuOZzJ_LhLg" type="7004"> | 2829 | <children xmi:type="notation:Node" xmi:id="_3BISZF4GEe2LuOZzJ_LhLg" type="7004"> |
2928 | <children xmi:type="notation:Node" xmi:id="_naQcIF9vEe2rXNsIDUvqhw" type="3010" element="_nZoxHl9vEe2rXNsIDUvqhw"> | ||
2929 | <styles xmi:type="notation:FontStyle" xmi:id="_naQcIV9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | ||
2930 | <layoutConstraint xmi:type="notation:Location" xmi:id="_naQcIl9vEe2rXNsIDUvqhw"/> | ||
2931 | </children> | ||
2932 | <styles xmi:type="notation:SortingStyle" xmi:id="_3BISZV4GEe2LuOZzJ_LhLg"/> | 2830 | <styles xmi:type="notation:SortingStyle" xmi:id="_3BISZV4GEe2LuOZzJ_LhLg"/> |
2933 | <styles xmi:type="notation:FilteringStyle" xmi:id="_3BISZl4GEe2LuOZzJ_LhLg"/> | 2831 | <styles xmi:type="notation:FilteringStyle" xmi:id="_3BISZl4GEe2LuOZzJ_LhLg"/> |
2934 | </children> | 2832 | </children> |
2935 | <styles xmi:type="notation:ShapeStyle" xmi:id="_3BISYV4GEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2833 | <styles xmi:type="notation:ShapeStyle" xmi:id="_3BISYV4GEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2936 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3BISYl4GEe2LuOZzJ_LhLg" x="919" y="312" width="147" height="100"/> | 2834 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3BISYl4GEe2LuOZzJ_LhLg" x="919" y="312" width="147" height="100"/> |
2937 | </children> | 2835 | </children> |
2938 | <children xmi:type="notation:Node" xmi:id="_Yrrhdl4HEe2LuOZzJ_LhLg" type="2003" element="_YrdfAF4HEe2LuOZzJ_LhLg"> | ||
2939 | <children xmi:type="notation:Node" xmi:id="_YrsIgF4HEe2LuOZzJ_LhLg" type="5007"/> | ||
2940 | <children xmi:type="notation:Node" xmi:id="_YrsIgV4HEe2LuOZzJ_LhLg" type="7004"> | ||
2941 | <children xmi:type="notation:Node" xmi:id="_ZYoHAF4HEe2LuOZzJ_LhLg" type="3010" element="_ZYVzIF4HEe2LuOZzJ_LhLg"> | ||
2942 | <styles xmi:type="notation:FontStyle" xmi:id="_ZYoHAV4HEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | ||
2943 | <layoutConstraint xmi:type="notation:Location" xmi:id="_ZYoHAl4HEe2LuOZzJ_LhLg"/> | ||
2944 | </children> | ||
2945 | <children xmi:type="notation:Node" xmi:id="_Zy7dYF4HEe2LuOZzJ_LhLg" type="3010" element="_Zyjp8F4HEe2LuOZzJ_LhLg"> | ||
2946 | <styles xmi:type="notation:FontStyle" xmi:id="_Zy7dYV4HEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | ||
2947 | <layoutConstraint xmi:type="notation:Location" xmi:id="_Zy7dYl4HEe2LuOZzJ_LhLg"/> | ||
2948 | </children> | ||
2949 | <children xmi:type="notation:Node" xmi:id="_aD__QF4HEe2LuOZzJ_LhLg" type="3010" element="_aDuScF4HEe2LuOZzJ_LhLg"> | ||
2950 | <styles xmi:type="notation:FontStyle" xmi:id="_aD__QV4HEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | ||
2951 | <layoutConstraint xmi:type="notation:Location" xmi:id="_aD__Ql4HEe2LuOZzJ_LhLg"/> | ||
2952 | </children> | ||
2953 | <children xmi:type="notation:Node" xmi:id="_aVHkcF4HEe2LuOZzJ_LhLg" type="3010" element="_aU4T4F4HEe2LuOZzJ_LhLg"> | ||
2954 | <styles xmi:type="notation:FontStyle" xmi:id="_aVHkcV4HEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | ||
2955 | <layoutConstraint xmi:type="notation:Location" xmi:id="_aVHkcl4HEe2LuOZzJ_LhLg"/> | ||
2956 | </children> | ||
2957 | <styles xmi:type="notation:SortingStyle" xmi:id="_YrsIgl4HEe2LuOZzJ_LhLg"/> | ||
2958 | <styles xmi:type="notation:FilteringStyle" xmi:id="_YrsIg14HEe2LuOZzJ_LhLg"/> | ||
2959 | </children> | ||
2960 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Yrrhd14HEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | ||
2961 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YrrheF4HEe2LuOZzJ_LhLg" x="933" y="446" width="120" height="106"/> | ||
2962 | </children> | ||
2963 | <children xmi:type="notation:Node" xmi:id="_87Ju4F4IEe2LuOZzJ_LhLg" type="2003" element="_86zJkF4IEe2LuOZzJ_LhLg"> | 2836 | <children xmi:type="notation:Node" xmi:id="_87Ju4F4IEe2LuOZzJ_LhLg" type="2003" element="_86zJkF4IEe2LuOZzJ_LhLg"> |
2964 | <children xmi:type="notation:Node" xmi:id="_87Ju414IEe2LuOZzJ_LhLg" type="5007"/> | 2837 | <children xmi:type="notation:Node" xmi:id="_87Ju414IEe2LuOZzJ_LhLg" type="5007"/> |
2965 | <children xmi:type="notation:Node" xmi:id="_87Ju5F4IEe2LuOZzJ_LhLg" type="7004"> | 2838 | <children xmi:type="notation:Node" xmi:id="_87Ju5F4IEe2LuOZzJ_LhLg" type="7004"> |
@@ -2967,7 +2840,7 @@ | |||
2967 | <styles xmi:type="notation:FilteringStyle" xmi:id="_87Ju5l4IEe2LuOZzJ_LhLg"/> | 2840 | <styles xmi:type="notation:FilteringStyle" xmi:id="_87Ju5l4IEe2LuOZzJ_LhLg"/> |
2968 | </children> | 2841 | </children> |
2969 | <styles xmi:type="notation:ShapeStyle" xmi:id="_87Ju4V4IEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8" italic="true"/> | 2842 | <styles xmi:type="notation:ShapeStyle" xmi:id="_87Ju4V4IEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8" italic="true"/> |
2970 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_87Ju4l4IEe2LuOZzJ_LhLg" x="2628" y="168"/> | 2843 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_87Ju4l4IEe2LuOZzJ_LhLg" x="2820" y="168"/> |
2971 | </children> | 2844 | </children> |
2972 | <children xmi:type="notation:Node" xmi:id="_JYXdgF4JEe2LuOZzJ_LhLg" type="2003" element="_JYQIwF4JEe2LuOZzJ_LhLg"> | 2845 | <children xmi:type="notation:Node" xmi:id="_JYXdgF4JEe2LuOZzJ_LhLg" type="2003" element="_JYQIwF4JEe2LuOZzJ_LhLg"> |
2973 | <children xmi:type="notation:Node" xmi:id="_JYXdg14JEe2LuOZzJ_LhLg" type="5007"/> | 2846 | <children xmi:type="notation:Node" xmi:id="_JYXdg14JEe2LuOZzJ_LhLg" type="5007"/> |
@@ -2980,7 +2853,7 @@ | |||
2980 | <styles xmi:type="notation:FilteringStyle" xmi:id="_JYXdhl4JEe2LuOZzJ_LhLg"/> | 2853 | <styles xmi:type="notation:FilteringStyle" xmi:id="_JYXdhl4JEe2LuOZzJ_LhLg"/> |
2981 | </children> | 2854 | </children> |
2982 | <styles xmi:type="notation:ShapeStyle" xmi:id="_JYXdgV4JEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2855 | <styles xmi:type="notation:ShapeStyle" xmi:id="_JYXdgV4JEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2983 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JYXdgl4JEe2LuOZzJ_LhLg" x="2292" y="312"/> | 2856 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JYXdgl4JEe2LuOZzJ_LhLg" x="2456" y="312"/> |
2984 | </children> | 2857 | </children> |
2985 | <children xmi:type="notation:Node" xmi:id="_JYYEkF4JEe2LuOZzJ_LhLg" type="2003" element="_JYQIw14JEe2LuOZzJ_LhLg"> | 2858 | <children xmi:type="notation:Node" xmi:id="_JYYEkF4JEe2LuOZzJ_LhLg" type="2003" element="_JYQIw14JEe2LuOZzJ_LhLg"> |
2986 | <children xmi:type="notation:Node" xmi:id="_JYYEk14JEe2LuOZzJ_LhLg" type="5007"/> | 2859 | <children xmi:type="notation:Node" xmi:id="_JYYEk14JEe2LuOZzJ_LhLg" type="5007"/> |
@@ -2993,7 +2866,7 @@ | |||
2993 | <styles xmi:type="notation:FilteringStyle" xmi:id="_JYYEll4JEe2LuOZzJ_LhLg"/> | 2866 | <styles xmi:type="notation:FilteringStyle" xmi:id="_JYYEll4JEe2LuOZzJ_LhLg"/> |
2994 | </children> | 2867 | </children> |
2995 | <styles xmi:type="notation:ShapeStyle" xmi:id="_JYYEkV4JEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2868 | <styles xmi:type="notation:ShapeStyle" xmi:id="_JYYEkV4JEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
2996 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JYYEkl4JEe2LuOZzJ_LhLg" x="2441" y="312"/> | 2869 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JYYEkl4JEe2LuOZzJ_LhLg" x="2605" y="312"/> |
2997 | </children> | 2870 | </children> |
2998 | <children xmi:type="notation:Node" xmi:id="_JYYEl14JEe2LuOZzJ_LhLg" type="2003" element="_JYQv0l4JEe2LuOZzJ_LhLg"> | 2871 | <children xmi:type="notation:Node" xmi:id="_JYYEl14JEe2LuOZzJ_LhLg" type="2003" element="_JYQv0l4JEe2LuOZzJ_LhLg"> |
2999 | <children xmi:type="notation:Node" xmi:id="_JYYEml4JEe2LuOZzJ_LhLg" type="5007"/> | 2872 | <children xmi:type="notation:Node" xmi:id="_JYYEml4JEe2LuOZzJ_LhLg" type="5007"/> |
@@ -3006,7 +2879,7 @@ | |||
3006 | <styles xmi:type="notation:FilteringStyle" xmi:id="_JYYEnV4JEe2LuOZzJ_LhLg"/> | 2879 | <styles xmi:type="notation:FilteringStyle" xmi:id="_JYYEnV4JEe2LuOZzJ_LhLg"/> |
3007 | </children> | 2880 | </children> |
3008 | <styles xmi:type="notation:ShapeStyle" xmi:id="_JYYEmF4JEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 2881 | <styles xmi:type="notation:ShapeStyle" xmi:id="_JYYEmF4JEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
3009 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JYYEmV4JEe2LuOZzJ_LhLg" x="2784" y="312"/> | 2882 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JYYEmV4JEe2LuOZzJ_LhLg" x="2792" y="312"/> |
3010 | </children> | 2883 | </children> |
3011 | <children xmi:type="notation:Node" xmi:id="_9AqPEF4KEe2m7IaHDkh2Xg" type="2003" element="_9AeB0F4KEe2m7IaHDkh2Xg"> | 2884 | <children xmi:type="notation:Node" xmi:id="_9AqPEF4KEe2m7IaHDkh2Xg" type="2003" element="_9AeB0F4KEe2m7IaHDkh2Xg"> |
3012 | <children xmi:type="notation:Node" xmi:id="_9ArdMF4KEe2m7IaHDkh2Xg" type="5007"/> | 2885 | <children xmi:type="notation:Node" xmi:id="_9ArdMF4KEe2m7IaHDkh2Xg" type="5007"/> |
@@ -3024,7 +2897,7 @@ | |||
3024 | <styles xmi:type="notation:FilteringStyle" xmi:id="_4qq0Vl4MEe2m7IaHDkh2Xg"/> | 2897 | <styles xmi:type="notation:FilteringStyle" xmi:id="_4qq0Vl4MEe2m7IaHDkh2Xg"/> |
3025 | </children> | 2898 | </children> |
3026 | <styles xmi:type="notation:ShapeStyle" xmi:id="_4qq0UV4MEe2m7IaHDkh2Xg" fontName="Noto Sans" fontHeight="8" italic="true"/> | 2899 | <styles xmi:type="notation:ShapeStyle" xmi:id="_4qq0UV4MEe2m7IaHDkh2Xg" fontName="Noto Sans" fontHeight="8" italic="true"/> |
3027 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4qq0Ul4MEe2m7IaHDkh2Xg" x="548" y="312"/> | 2900 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4qq0Ul4MEe2m7IaHDkh2Xg" x="540" y="312"/> |
3028 | </children> | 2901 | </children> |
3029 | <children xmi:type="notation:Node" xmi:id="_GNwrgGTUEe2qdtyPWAtoxA" type="2003" element="_GNovsGTUEe2qdtyPWAtoxA"> | 2902 | <children xmi:type="notation:Node" xmi:id="_GNwrgGTUEe2qdtyPWAtoxA" type="2003" element="_GNovsGTUEe2qdtyPWAtoxA"> |
3030 | <children xmi:type="notation:Node" xmi:id="_GNwrg2TUEe2qdtyPWAtoxA" type="5007"/> | 2903 | <children xmi:type="notation:Node" xmi:id="_GNwrg2TUEe2qdtyPWAtoxA" type="5007"/> |
@@ -3037,7 +2910,7 @@ | |||
3037 | <styles xmi:type="notation:FilteringStyle" xmi:id="_GNwrhmTUEe2qdtyPWAtoxA"/> | 2910 | <styles xmi:type="notation:FilteringStyle" xmi:id="_GNwrhmTUEe2qdtyPWAtoxA"/> |
3038 | </children> | 2911 | </children> |
3039 | <styles xmi:type="notation:ShapeStyle" xmi:id="_GNwrgWTUEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | 2912 | <styles xmi:type="notation:ShapeStyle" xmi:id="_GNwrgWTUEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> |
3040 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GNwrgmTUEe2qdtyPWAtoxA" x="1956" y="312" width="123"/> | 2913 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GNwrgmTUEe2qdtyPWAtoxA" x="1952" y="312" width="123"/> |
3041 | </children> | 2914 | </children> |
3042 | <children xmi:type="notation:Node" xmi:id="_M-upAGTUEe2qdtyPWAtoxA" type="2003" element="_M-ZR0GTUEe2qdtyPWAtoxA"> | 2915 | <children xmi:type="notation:Node" xmi:id="_M-upAGTUEe2qdtyPWAtoxA" type="2003" element="_M-ZR0GTUEe2qdtyPWAtoxA"> |
3043 | <children xmi:type="notation:Node" xmi:id="_M-upA2TUEe2qdtyPWAtoxA" type="5007"/> | 2916 | <children xmi:type="notation:Node" xmi:id="_M-upA2TUEe2qdtyPWAtoxA" type="5007"/> |
@@ -3050,7 +2923,7 @@ | |||
3050 | <styles xmi:type="notation:FilteringStyle" xmi:id="_M-upBmTUEe2qdtyPWAtoxA"/> | 2923 | <styles xmi:type="notation:FilteringStyle" xmi:id="_M-upBmTUEe2qdtyPWAtoxA"/> |
3051 | </children> | 2924 | </children> |
3052 | <styles xmi:type="notation:ShapeStyle" xmi:id="_M-upAWTUEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | 2925 | <styles xmi:type="notation:ShapeStyle" xmi:id="_M-upAWTUEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> |
3053 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-upAmTUEe2qdtyPWAtoxA" x="1780" y="312" width="135" height="100"/> | 2926 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-upAmTUEe2qdtyPWAtoxA" x="1608" y="312" width="135" height="100"/> |
3054 | </children> | 2927 | </children> |
3055 | <children xmi:type="notation:Node" xmi:id="_QkXS8GTUEe2qdtyPWAtoxA" type="2003" element="_QkP-MGTUEe2qdtyPWAtoxA"> | 2928 | <children xmi:type="notation:Node" xmi:id="_QkXS8GTUEe2qdtyPWAtoxA" type="2003" element="_QkP-MGTUEe2qdtyPWAtoxA"> |
3056 | <children xmi:type="notation:Node" xmi:id="_QkXS82TUEe2qdtyPWAtoxA" type="5007"/> | 2929 | <children xmi:type="notation:Node" xmi:id="_QkXS82TUEe2qdtyPWAtoxA" type="5007"/> |
@@ -3083,14 +2956,6 @@ | |||
3083 | <styles xmi:type="notation:FontStyle" xmi:id="_pZfy4WgpEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> | 2956 | <styles xmi:type="notation:FontStyle" xmi:id="_pZfy4WgpEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> |
3084 | <layoutConstraint xmi:type="notation:Location" xmi:id="_pZfy4mgpEe24RpwpWgpkFQ"/> | 2957 | <layoutConstraint xmi:type="notation:Location" xmi:id="_pZfy4mgpEe24RpwpWgpkFQ"/> |
3085 | </children> | 2958 | </children> |
3086 | <children xmi:type="notation:Node" xmi:id="_BuRG0GkFEe24rIYSlCjKHA" type="3010" element="_BtK6oGkFEe24rIYSlCjKHA"> | ||
3087 | <styles xmi:type="notation:FontStyle" xmi:id="_BuRG0WkFEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> | ||
3088 | <layoutConstraint xmi:type="notation:Location" xmi:id="_BuRG0mkFEe24rIYSlCjKHA"/> | ||
3089 | </children> | ||
3090 | <children xmi:type="notation:Node" xmi:id="_dTWMcGkFEe24rIYSlCjKHA" type="3010" element="_dSepwGkFEe24rIYSlCjKHA"> | ||
3091 | <styles xmi:type="notation:FontStyle" xmi:id="_dTWMcWkFEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> | ||
3092 | <layoutConstraint xmi:type="notation:Location" xmi:id="_dTWMcmkFEe24rIYSlCjKHA"/> | ||
3093 | </children> | ||
3094 | <children xmi:type="notation:Node" xmi:id="_eqflkGkFEe24rIYSlCjKHA" type="3010" element="_eqCSkGkFEe24rIYSlCjKHA"> | 2959 | <children xmi:type="notation:Node" xmi:id="_eqflkGkFEe24rIYSlCjKHA" type="3010" element="_eqCSkGkFEe24rIYSlCjKHA"> |
3095 | <styles xmi:type="notation:FontStyle" xmi:id="_eqflkWkFEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> | 2960 | <styles xmi:type="notation:FontStyle" xmi:id="_eqflkWkFEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> |
3096 | <layoutConstraint xmi:type="notation:Location" xmi:id="_eqflkmkFEe24rIYSlCjKHA"/> | 2961 | <layoutConstraint xmi:type="notation:Location" xmi:id="_eqflkmkFEe24rIYSlCjKHA"/> |
@@ -3103,7 +2968,7 @@ | |||
3103 | <styles xmi:type="notation:FilteringStyle" xmi:id="_QkXS9mTUEe2qdtyPWAtoxA"/> | 2968 | <styles xmi:type="notation:FilteringStyle" xmi:id="_QkXS9mTUEe2qdtyPWAtoxA"/> |
3104 | </children> | 2969 | </children> |
3105 | <styles xmi:type="notation:ShapeStyle" xmi:id="_QkXS8WTUEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | 2970 | <styles xmi:type="notation:ShapeStyle" xmi:id="_QkXS8WTUEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> |
3106 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QkXS8mTUEe2qdtyPWAtoxA" x="1958" y="448" height="215"/> | 2971 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QkXS8mTUEe2qdtyPWAtoxA" x="1954" y="448" height="179"/> |
3107 | </children> | 2972 | </children> |
3108 | <children xmi:type="notation:Node" xmi:id="_36XqIGTuEe2qdtyPWAtoxA" type="2003" element="_36CS8GTuEe2qdtyPWAtoxA"> | 2973 | <children xmi:type="notation:Node" xmi:id="_36XqIGTuEe2qdtyPWAtoxA" type="2003" element="_36CS8GTuEe2qdtyPWAtoxA"> |
3109 | <children xmi:type="notation:Node" xmi:id="_36YRMGTuEe2qdtyPWAtoxA" type="5007"/> | 2974 | <children xmi:type="notation:Node" xmi:id="_36YRMGTuEe2qdtyPWAtoxA" type="5007"/> |
@@ -3134,7 +2999,7 @@ | |||
3134 | <styles xmi:type="notation:FilteringStyle" xmi:id="_LC6oVmTvEe2qdtyPWAtoxA"/> | 2999 | <styles xmi:type="notation:FilteringStyle" xmi:id="_LC6oVmTvEe2qdtyPWAtoxA"/> |
3135 | </children> | 3000 | </children> |
3136 | <styles xmi:type="notation:ShapeStyle" xmi:id="_LC6oUWTvEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | 3001 | <styles xmi:type="notation:ShapeStyle" xmi:id="_LC6oUWTvEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> |
3137 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC6oUmTvEe2qdtyPWAtoxA" x="168" y="168" width="124"/> | 3002 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC6oUmTvEe2qdtyPWAtoxA" x="180" y="168" width="124"/> |
3138 | </children> | 3003 | </children> |
3139 | <children xmi:type="notation:Node" xmi:id="_Z0bU0GTvEe2qdtyPWAtoxA" type="2003" element="_Z0MrUGTvEe2qdtyPWAtoxA"> | 3004 | <children xmi:type="notation:Node" xmi:id="_Z0bU0GTvEe2qdtyPWAtoxA" type="2003" element="_Z0MrUGTvEe2qdtyPWAtoxA"> |
3140 | <children xmi:type="notation:Node" xmi:id="_Z0bU02TvEe2qdtyPWAtoxA" type="5007"/> | 3005 | <children xmi:type="notation:Node" xmi:id="_Z0bU02TvEe2qdtyPWAtoxA" type="5007"/> |
@@ -3143,45 +3008,7 @@ | |||
3143 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Z0bU1mTvEe2qdtyPWAtoxA"/> | 3008 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Z0bU1mTvEe2qdtyPWAtoxA"/> |
3144 | </children> | 3009 | </children> |
3145 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Z0bU0WTvEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | 3010 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Z0bU0WTvEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> |
3146 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z0bU0mTvEe2qdtyPWAtoxA" x="170" y="312" width="120" height="100"/> | 3011 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z0bU0mTvEe2qdtyPWAtoxA" x="182" y="312" width="120" height="100"/> |
3147 | </children> | ||
3148 | <children xmi:type="notation:Node" xmi:id="_DNRsUGTwEe2qdtyPWAtoxA" type="2003" element="_DM_YcGTwEe2qdtyPWAtoxA"> | ||
3149 | <children xmi:type="notation:Node" xmi:id="_DNRsU2TwEe2qdtyPWAtoxA" type="5007"/> | ||
3150 | <children xmi:type="notation:Node" xmi:id="_DNRsVGTwEe2qdtyPWAtoxA" type="7004"> | ||
3151 | <children xmi:type="notation:Node" xmi:id="_GEP5cGTwEe2qdtyPWAtoxA" type="3010" element="_GD-MoGTwEe2qdtyPWAtoxA"> | ||
3152 | <styles xmi:type="notation:FontStyle" xmi:id="_GEP5cWTwEe2qdtyPWAtoxA" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/> | ||
3153 | <layoutConstraint xmi:type="notation:Location" xmi:id="_GEP5cmTwEe2qdtyPWAtoxA"/> | ||
3154 | </children> | ||
3155 | <styles xmi:type="notation:SortingStyle" xmi:id="_DNRsVWTwEe2qdtyPWAtoxA"/> | ||
3156 | <styles xmi:type="notation:FilteringStyle" xmi:id="_DNRsVmTwEe2qdtyPWAtoxA"/> | ||
3157 | </children> | ||
3158 | <styles xmi:type="notation:ShapeStyle" xmi:id="_DNRsUWTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3159 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNRsUmTwEe2qdtyPWAtoxA" x="1608" y="312" width="120" height="100"/> | ||
3160 | </children> | ||
3161 | <children xmi:type="notation:Node" xmi:id="_FOjAgGTwEe2qdtyPWAtoxA" type="2003" element="_FOadoGTwEe2qdtyPWAtoxA"> | ||
3162 | <children xmi:type="notation:Node" xmi:id="_FOjnkGTwEe2qdtyPWAtoxA" type="5007"/> | ||
3163 | <children xmi:type="notation:Node" xmi:id="_FOjnkWTwEe2qdtyPWAtoxA" type="7004"> | ||
3164 | <children xmi:type="notation:Node" xmi:id="_FOjnlGTwEe2qdtyPWAtoxA" type="3010" element="_FOevIGTwEe2qdtyPWAtoxA"> | ||
3165 | <styles xmi:type="notation:FontStyle" xmi:id="_FOjnlWTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3166 | <layoutConstraint xmi:type="notation:Location" xmi:id="_FOjnlmTwEe2qdtyPWAtoxA"/> | ||
3167 | </children> | ||
3168 | <children xmi:type="notation:Node" xmi:id="_FOjnl2TwEe2qdtyPWAtoxA" type="3010" element="_FOevImTwEe2qdtyPWAtoxA"> | ||
3169 | <styles xmi:type="notation:FontStyle" xmi:id="_FOjnmGTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3170 | <layoutConstraint xmi:type="notation:Location" xmi:id="_FOjnmWTwEe2qdtyPWAtoxA"/> | ||
3171 | </children> | ||
3172 | <children xmi:type="notation:Node" xmi:id="_FOkOoGTwEe2qdtyPWAtoxA" type="3010" element="_FOevJGTwEe2qdtyPWAtoxA"> | ||
3173 | <styles xmi:type="notation:FontStyle" xmi:id="_FOkOoWTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3174 | <layoutConstraint xmi:type="notation:Location" xmi:id="_FOkOomTwEe2qdtyPWAtoxA"/> | ||
3175 | </children> | ||
3176 | <children xmi:type="notation:Node" xmi:id="_FOkOo2TwEe2qdtyPWAtoxA" type="3010" element="_FOevJmTwEe2qdtyPWAtoxA"> | ||
3177 | <styles xmi:type="notation:FontStyle" xmi:id="_FOkOpGTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3178 | <layoutConstraint xmi:type="notation:Location" xmi:id="_FOkOpWTwEe2qdtyPWAtoxA"/> | ||
3179 | </children> | ||
3180 | <styles xmi:type="notation:SortingStyle" xmi:id="_FOjnkmTwEe2qdtyPWAtoxA"/> | ||
3181 | <styles xmi:type="notation:FilteringStyle" xmi:id="_FOjnk2TwEe2qdtyPWAtoxA"/> | ||
3182 | </children> | ||
3183 | <styles xmi:type="notation:ShapeStyle" xmi:id="_FOjAgWTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3184 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FOjAgmTwEe2qdtyPWAtoxA" x="1608" y="446"/> | ||
3185 | </children> | 3012 | </children> |
3186 | <children xmi:type="notation:Node" xmi:id="_3ahdoGgpEe24RpwpWgpkFQ" type="2003" element="_3aQ-8GgpEe24RpwpWgpkFQ"> | 3013 | <children xmi:type="notation:Node" xmi:id="_3ahdoGgpEe24RpwpWgpkFQ" type="2003" element="_3aQ-8GgpEe24RpwpWgpkFQ"> |
3187 | <children xmi:type="notation:Node" xmi:id="_3ahdo2gpEe24RpwpWgpkFQ" type="5007"/> | 3014 | <children xmi:type="notation:Node" xmi:id="_3ahdo2gpEe24RpwpWgpkFQ" type="5007"/> |
@@ -3190,16 +3017,7 @@ | |||
3190 | <styles xmi:type="notation:FilteringStyle" xmi:id="_3ahdpmgpEe24RpwpWgpkFQ"/> | 3017 | <styles xmi:type="notation:FilteringStyle" xmi:id="_3ahdpmgpEe24RpwpWgpkFQ"/> |
3191 | </children> | 3018 | </children> |
3192 | <styles xmi:type="notation:ShapeStyle" xmi:id="_3ahdoWgpEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> | 3019 | <styles xmi:type="notation:ShapeStyle" xmi:id="_3ahdoWgpEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> |
3193 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3ahdomgpEe24RpwpWgpkFQ" x="2124" y="312" width="120" height="100"/> | 3020 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3ahdomgpEe24RpwpWgpkFQ" x="2120" y="312" width="120" height="100"/> |
3194 | </children> | ||
3195 | <children xmi:type="notation:Node" xmi:id="_zs6moGgtEe24RpwpWgpkFQ" type="2003" element="_zsr9IGgtEe24RpwpWgpkFQ"> | ||
3196 | <children xmi:type="notation:Node" xmi:id="_zs7NsGgtEe24RpwpWgpkFQ" type="5007"/> | ||
3197 | <children xmi:type="notation:Node" xmi:id="_zs7NsWgtEe24RpwpWgpkFQ" type="7004"> | ||
3198 | <styles xmi:type="notation:SortingStyle" xmi:id="_zs7NsmgtEe24RpwpWgpkFQ"/> | ||
3199 | <styles xmi:type="notation:FilteringStyle" xmi:id="_zs7Ns2gtEe24RpwpWgpkFQ"/> | ||
3200 | </children> | ||
3201 | <styles xmi:type="notation:ShapeStyle" xmi:id="_zs6moWgtEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> | ||
3202 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zs6momgtEe24RpwpWgpkFQ" x="2628" y="312" width="120" height="100"/> | ||
3203 | </children> | 3021 | </children> |
3204 | <children xmi:type="notation:Node" xmi:id="_ZjfaEGkGEe24rIYSlCjKHA" type="2003" element="_Zi8AcGkGEe24rIYSlCjKHA"> | 3022 | <children xmi:type="notation:Node" xmi:id="_ZjfaEGkGEe24rIYSlCjKHA" type="2003" element="_Zi8AcGkGEe24rIYSlCjKHA"> |
3205 | <children xmi:type="notation:Node" xmi:id="_ZjkSkGkGEe24rIYSlCjKHA" type="5007"/> | 3023 | <children xmi:type="notation:Node" xmi:id="_ZjkSkGkGEe24rIYSlCjKHA" type="5007"/> |
@@ -3212,7 +3030,7 @@ | |||
3212 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ZjkSk2kGEe24rIYSlCjKHA"/> | 3030 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ZjkSk2kGEe24rIYSlCjKHA"/> |
3213 | </children> | 3031 | </children> |
3214 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ZjfaEWkGEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> | 3032 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ZjfaEWkGEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> |
3215 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZjfaEmkGEe24rIYSlCjKHA" x="2952" y="312" width="120" height="100"/> | 3033 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZjfaEmkGEe24rIYSlCjKHA" x="3120" y="312" width="120" height="100"/> |
3216 | </children> | 3034 | </children> |
3217 | <children xmi:type="notation:Node" xmi:id="_fdU7QGkGEe24rIYSlCjKHA" type="2003" element="_fdLKQGkGEe24rIYSlCjKHA"> | 3035 | <children xmi:type="notation:Node" xmi:id="_fdU7QGkGEe24rIYSlCjKHA" type="2003" element="_fdLKQGkGEe24rIYSlCjKHA"> |
3218 | <children xmi:type="notation:Node" xmi:id="_fdViUGkGEe24rIYSlCjKHA" type="5007"/> | 3036 | <children xmi:type="notation:Node" xmi:id="_fdViUGkGEe24rIYSlCjKHA" type="5007"/> |
@@ -3237,7 +3055,73 @@ | |||
3237 | <styles xmi:type="notation:FilteringStyle" xmi:id="_fdViU2kGEe24rIYSlCjKHA"/> | 3055 | <styles xmi:type="notation:FilteringStyle" xmi:id="_fdViU2kGEe24rIYSlCjKHA"/> |
3238 | </children> | 3056 | </children> |
3239 | <styles xmi:type="notation:ShapeStyle" xmi:id="_fdU7QWkGEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> | 3057 | <styles xmi:type="notation:ShapeStyle" xmi:id="_fdU7QWkGEe24rIYSlCjKHA" fontName="Noto Sans" fontHeight="8"/> |
3240 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fdU7QmkGEe24rIYSlCjKHA" x="2952" y="446"/> | 3058 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fdU7QmkGEe24rIYSlCjKHA" x="3120" y="449"/> |
3059 | </children> | ||
3060 | <children xmi:type="notation:Node" xmi:id="_IYGPgNZUEe69IbObpvsypA" type="2003" element="_IXrYwNZUEe69IbObpvsypA"> | ||
3061 | <children xmi:type="notation:Node" xmi:id="_IYGPg9ZUEe69IbObpvsypA" type="5007"/> | ||
3062 | <children xmi:type="notation:Node" xmi:id="_IYGPhNZUEe69IbObpvsypA" type="7004"> | ||
3063 | <children xmi:type="notation:Node" xmi:id="_W0tqENZUEe69IbObpvsypA" type="3010" element="_W0CUoNZUEe69IbObpvsypA"> | ||
3064 | <styles xmi:type="notation:FontStyle" xmi:id="_W0tqEdZUEe69IbObpvsypA" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/> | ||
3065 | <layoutConstraint xmi:type="notation:Location" xmi:id="_W0tqEtZUEe69IbObpvsypA"/> | ||
3066 | </children> | ||
3067 | <styles xmi:type="notation:SortingStyle" xmi:id="_IYGPhdZUEe69IbObpvsypA"/> | ||
3068 | <styles xmi:type="notation:FilteringStyle" xmi:id="_IYGPhtZUEe69IbObpvsypA"/> | ||
3069 | </children> | ||
3070 | <styles xmi:type="notation:ShapeStyle" xmi:id="_IYGPgdZUEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3071 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_IYGPgtZUEe69IbObpvsypA" x="1784" y="312" width="120" height="100"/> | ||
3072 | </children> | ||
3073 | <children xmi:type="notation:Node" xmi:id="_Nm2zYNZUEe69IbObpvsypA" type="2003" element="_Nmg1INZUEe69IbObpvsypA"> | ||
3074 | <children xmi:type="notation:Node" xmi:id="_Nm2zY9ZUEe69IbObpvsypA" type="5007"/> | ||
3075 | <children xmi:type="notation:Node" xmi:id="_Nm3acNZUEe69IbObpvsypA" type="7004"> | ||
3076 | <children xmi:type="notation:Node" xmi:id="_TQ7aQNZUEe69IbObpvsypA" type="3010" element="_TQOPoNZUEe69IbObpvsypA"> | ||
3077 | <styles xmi:type="notation:FontStyle" xmi:id="_TQ7aQdZUEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3078 | <layoutConstraint xmi:type="notation:Location" xmi:id="_TQ7aQtZUEe69IbObpvsypA"/> | ||
3079 | </children> | ||
3080 | <children xmi:type="notation:Node" xmi:id="_UGDrcNZUEe69IbObpvsypA" type="3010" element="_UFttMNZUEe69IbObpvsypA"> | ||
3081 | <styles xmi:type="notation:FontStyle" xmi:id="_UGDrcdZUEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3082 | <layoutConstraint xmi:type="notation:Location" xmi:id="_UGDrctZUEe69IbObpvsypA"/> | ||
3083 | </children> | ||
3084 | <styles xmi:type="notation:SortingStyle" xmi:id="_Nm3acdZUEe69IbObpvsypA"/> | ||
3085 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Nm3actZUEe69IbObpvsypA"/> | ||
3086 | </children> | ||
3087 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Nm2zYdZUEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3088 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nm2zYtZUEe69IbObpvsypA" x="1784" y="449" width="120" height="100"/> | ||
3089 | </children> | ||
3090 | <children xmi:type="notation:Node" xmi:id="_FTa2MNZXEe69IbObpvsypA" type="2003" element="_FTH7QNZXEe69IbObpvsypA"> | ||
3091 | <children xmi:type="notation:Node" xmi:id="_FTbdQNZXEe69IbObpvsypA" type="5007"/> | ||
3092 | <children xmi:type="notation:Node" xmi:id="_FTbdQdZXEe69IbObpvsypA" type="7004"> | ||
3093 | <styles xmi:type="notation:SortingStyle" xmi:id="_FTbdQtZXEe69IbObpvsypA"/> | ||
3094 | <styles xmi:type="notation:FilteringStyle" xmi:id="_FTbdQ9ZXEe69IbObpvsypA"/> | ||
3095 | </children> | ||
3096 | <styles xmi:type="notation:ShapeStyle" xmi:id="_FTa2MdZXEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3097 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FTa2MtZXEe69IbObpvsypA" x="12" y="168" width="120" height="100"/> | ||
3098 | </children> | ||
3099 | <children xmi:type="notation:Node" xmi:id="_c0t34NcIEe6pjNxdSs0E0Q" type="2003" element="_c0BUUNcIEe6pjNxdSs0E0Q"> | ||
3100 | <children xmi:type="notation:Node" xmi:id="_c0ywYNcIEe6pjNxdSs0E0Q" type="5007"/> | ||
3101 | <children xmi:type="notation:Node" xmi:id="_c0zXcNcIEe6pjNxdSs0E0Q" type="7004"> | ||
3102 | <styles xmi:type="notation:SortingStyle" xmi:id="_c0zXcdcIEe6pjNxdSs0E0Q"/> | ||
3103 | <styles xmi:type="notation:FilteringStyle" xmi:id="_c0zXctcIEe6pjNxdSs0E0Q"/> | ||
3104 | </children> | ||
3105 | <styles xmi:type="notation:ShapeStyle" xmi:id="_c0ue8NcIEe6pjNxdSs0E0Q" fontName="Noto Sans" fontHeight="8"/> | ||
3106 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_c0ue8dcIEe6pjNxdSs0E0Q" x="2288" y="312" width="120" height="100"/> | ||
3107 | </children> | ||
3108 | <children xmi:type="notation:Node" xmi:id="_hOS68NjvEe66mJJuF_pPGg" type="2003" element="_hNitANjvEe66mJJuF_pPGg"> | ||
3109 | <children xmi:type="notation:Node" xmi:id="_hOYagNjvEe66mJJuF_pPGg" type="5007"/> | ||
3110 | <children xmi:type="notation:Node" xmi:id="_hOZBkNjvEe66mJJuF_pPGg" type="7004"> | ||
3111 | <styles xmi:type="notation:SortingStyle" xmi:id="_hOZBkdjvEe66mJJuF_pPGg"/> | ||
3112 | <styles xmi:type="notation:FilteringStyle" xmi:id="_hOZBktjvEe66mJJuF_pPGg"/> | ||
3113 | </children> | ||
3114 | <styles xmi:type="notation:ShapeStyle" xmi:id="_hOS68djvEe66mJJuF_pPGg" fontName="Noto Sans" fontHeight="8"/> | ||
3115 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hOS68tjvEe66mJJuF_pPGg" x="2964" y="312" width="120" height="100"/> | ||
3116 | </children> | ||
3117 | <children xmi:type="notation:Node" xmi:id="_tkOK4NsVEe6c9ehqpe3s7A" type="2003" element="_tkAvgNsVEe6c9ehqpe3s7A"> | ||
3118 | <children xmi:type="notation:Node" xmi:id="_tkOK49sVEe6c9ehqpe3s7A" type="5007"/> | ||
3119 | <children xmi:type="notation:Node" xmi:id="_tkOK5NsVEe6c9ehqpe3s7A" type="7004"> | ||
3120 | <styles xmi:type="notation:SortingStyle" xmi:id="_tkOK5dsVEe6c9ehqpe3s7A"/> | ||
3121 | <styles xmi:type="notation:FilteringStyle" xmi:id="_tkOK5tsVEe6c9ehqpe3s7A"/> | ||
3122 | </children> | ||
3123 | <styles xmi:type="notation:ShapeStyle" xmi:id="_tkOK4dsVEe6c9ehqpe3s7A" fontName="Noto Sans" fontHeight="8"/> | ||
3124 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tkOK4tsVEe6c9ehqpe3s7A" x="919" y="448" width="147"/> | ||
3241 | </children> | 3125 | </children> |
3242 | <styles xmi:type="notation:DiagramStyle" xmi:id="_z1ff0l3lEe2LuOZzJ_LhLg"/> | 3126 | <styles xmi:type="notation:DiagramStyle" xmi:id="_z1ff0l3lEe2LuOZzJ_LhLg"/> |
3243 | <edges xmi:type="notation:Edge" xmi:id="_C-b04F3mEe2LuOZzJ_LhLg" type="4001" element="_C9_I8F3mEe2LuOZzJ_LhLg" source="_9ZUmgF3lEe2LuOZzJ_LhLg" target="_8bUtMF3lEe2LuOZzJ_LhLg"> | 3127 | <edges xmi:type="notation:Edge" xmi:id="_C-b04F3mEe2LuOZzJ_LhLg" type="4001" element="_C9_I8F3mEe2LuOZzJ_LhLg" source="_9ZUmgF3lEe2LuOZzJ_LhLg" target="_8bUtMF3lEe2LuOZzJ_LhLg"> |
@@ -3284,7 +3168,7 @@ | |||
3284 | </children> | 3168 | </children> |
3285 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_oAifgV3vEe2LuOZzJ_LhLg" routing="Rectilinear"/> | 3169 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_oAifgV3vEe2LuOZzJ_LhLg" routing="Rectilinear"/> |
3286 | <styles xmi:type="notation:FontStyle" xmi:id="_oAifgl3vEe2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 3170 | <styles xmi:type="notation:FontStyle" xmi:id="_oAifgl3vEe2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
3287 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oAifg13vEe2LuOZzJ_LhLg" points="[6, 0, 803, 50]$[6, -96, 803, -46]$[-715, -96, 82, -46]"/> | 3171 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oAifg13vEe2LuOZzJ_LhLg" points="[6, 0, 802, 50]$[6, -96, 802, -46]$[-714, -96, 82, -46]"/> |
3288 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oAifil3vEe2LuOZzJ_LhLg" id="(0.3050847457627119,0.0)"/> | 3172 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oAifil3vEe2LuOZzJ_LhLg" id="(0.3050847457627119,0.0)"/> |
3289 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oAifi13vEe2LuOZzJ_LhLg" id="(0.3050847457627119,1.0)"/> | 3173 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oAifi13vEe2LuOZzJ_LhLg" id="(0.3050847457627119,1.0)"/> |
3290 | </edges> | 3174 | </edges> |
@@ -3300,7 +3184,7 @@ | |||
3300 | </children> | 3184 | </children> |
3301 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_qyMHwV3vEe2LuOZzJ_LhLg" routing="Rectilinear"/> | 3185 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_qyMHwV3vEe2LuOZzJ_LhLg" routing="Rectilinear"/> |
3302 | <styles xmi:type="notation:FontStyle" xmi:id="_qyMHwl3vEe2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 3186 | <styles xmi:type="notation:FontStyle" xmi:id="_qyMHwl3vEe2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
3303 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qyMHw13vEe2LuOZzJ_LhLg" points="[0, 0, 797, 50]$[0, -120, 797, -70]$[-751, -120, 46, -70]"/> | 3187 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qyMHw13vEe2LuOZzJ_LhLg" points="[0, 0, 796, 50]$[0, -120, 796, -70]$[-750, -120, 46, -70]"/> |
3304 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qyMHyl3vEe2LuOZzJ_LhLg" id="(0.6101694915254238,0.0)"/> | 3188 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qyMHyl3vEe2LuOZzJ_LhLg" id="(0.6101694915254238,0.0)"/> |
3305 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qyMHy13vEe2LuOZzJ_LhLg" id="(0.6101694915254238,1.0)"/> | 3189 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qyMHy13vEe2LuOZzJ_LhLg" id="(0.6101694915254238,1.0)"/> |
3306 | </edges> | 3190 | </edges> |
@@ -3322,33 +3206,33 @@ | |||
3322 | </edges> | 3206 | </edges> |
3323 | <edges xmi:type="notation:Edge" xmi:id="_v0nf0F3vEe2LuOZzJ_LhLg" type="4001" element="_v0WaHF3vEe2LuOZzJ_LhLg" source="_bTgeJl3tEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | 3207 | <edges xmi:type="notation:Edge" xmi:id="_v0nf0F3vEe2LuOZzJ_LhLg" type="4001" element="_v0WaHF3vEe2LuOZzJ_LhLg" source="_bTgeJl3tEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> |
3324 | <children xmi:type="notation:Node" xmi:id="_v0nf1F3vEe2LuOZzJ_LhLg" type="6001"> | 3208 | <children xmi:type="notation:Node" xmi:id="_v0nf1F3vEe2LuOZzJ_LhLg" type="6001"> |
3325 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v0nf1V3vEe2LuOZzJ_LhLg" x="5" y="-10"/> | 3209 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v0nf1V3vEe2LuOZzJ_LhLg" x="-15" y="-10"/> |
3326 | </children> | 3210 | </children> |
3327 | <children xmi:type="notation:Node" xmi:id="_v0nf1l3vEe2LuOZzJ_LhLg" type="6002"> | 3211 | <children xmi:type="notation:Node" xmi:id="_v0nf1l3vEe2LuOZzJ_LhLg" type="6002"> |
3328 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v0nf113vEe2LuOZzJ_LhLg" x="-6" y="10"/> | 3212 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v0nf113vEe2LuOZzJ_LhLg" x="-26" y="10"/> |
3329 | </children> | 3213 | </children> |
3330 | <children xmi:type="notation:Node" xmi:id="_v0nf2F3vEe2LuOZzJ_LhLg" type="6003"> | 3214 | <children xmi:type="notation:Node" xmi:id="_v0nf2F3vEe2LuOZzJ_LhLg" type="6003"> |
3331 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v0nf2V3vEe2LuOZzJ_LhLg" x="18" y="10"/> | 3215 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v0nf2V3vEe2LuOZzJ_LhLg" x="-2" y="10"/> |
3332 | </children> | 3216 | </children> |
3333 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_v0nf0V3vEe2LuOZzJ_LhLg" routing="Tree"/> | 3217 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_v0nf0V3vEe2LuOZzJ_LhLg" routing="Tree"/> |
3334 | <styles xmi:type="notation:FontStyle" xmi:id="_v0nf0l3vEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> | 3218 | <styles xmi:type="notation:FontStyle" xmi:id="_v0nf0l3vEe2LuOZzJ_LhLg" fontName="Noto Sans" fontHeight="8"/> |
3335 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_v0nf013vEe2LuOZzJ_LhLg" points="[0, -2, 758, 99]$[0, -38, 758, 63]$[-764, -38, -6, 63]$[-764, -52, -6, 49]"/> | 3219 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_v0nf013vEe2LuOZzJ_LhLg" points="[0, -2, 929, 99]$[0, -26, 929, 75]$[-935, -26, -6, 75]$[-935, -52, -6, 49]"/> |
3336 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v0nf2l3vEe2LuOZzJ_LhLg" id="(0.1694915254237288,0.02040816326530612)"/> | 3220 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v0nf2l3vEe2LuOZzJ_LhLg" id="(0.1694915254237288,0.02040816326530612)"/> |
3337 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v0nf213vEe2LuOZzJ_LhLg" id="(0.5,0.5)"/> | 3221 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v0nf213vEe2LuOZzJ_LhLg" id="(0.5,0.5)"/> |
3338 | </edges> | 3222 | </edges> |
3339 | <edges xmi:type="notation:Edge" xmi:id="_WGzx8F38Ee2LuOZzJ_LhLg" type="4001" element="_WGxVyF38Ee2LuOZzJ_LhLg" source="_R7b9sF38Ee2LuOZzJ_LhLg" target="_WGzK4F38Ee2LuOZzJ_LhLg"> | 3223 | <edges xmi:type="notation:Edge" xmi:id="_WGzx8F38Ee2LuOZzJ_LhLg" type="4001" element="_WGxVyF38Ee2LuOZzJ_LhLg" source="_R7b9sF38Ee2LuOZzJ_LhLg" target="_WGzK4F38Ee2LuOZzJ_LhLg"> |
3340 | <children xmi:type="notation:Node" xmi:id="_WGzx9F38Ee2LuOZzJ_LhLg" type="6001"> | 3224 | <children xmi:type="notation:Node" xmi:id="_WGzx9F38Ee2LuOZzJ_LhLg" type="6001"> |
3341 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzx9V38Ee2LuOZzJ_LhLg" x="80" y="45"/> | 3225 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzx9V38Ee2LuOZzJ_LhLg" x="76" y="45"/> |
3342 | </children> | 3226 | </children> |
3343 | <children xmi:type="notation:Node" xmi:id="_WGzx9l38Ee2LuOZzJ_LhLg" type="6002"> | 3227 | <children xmi:type="notation:Node" xmi:id="_WGzx9l38Ee2LuOZzJ_LhLg" type="6002"> |
3344 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzx9138Ee2LuOZzJ_LhLg" x="-27" y="10"/> | 3228 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzx9138Ee2LuOZzJ_LhLg" x="-28" y="10"/> |
3345 | </children> | 3229 | </children> |
3346 | <children xmi:type="notation:Node" xmi:id="_WGzx-F38Ee2LuOZzJ_LhLg" type="6003"> | 3230 | <children xmi:type="notation:Node" xmi:id="_WGzx-F38Ee2LuOZzJ_LhLg" type="6003"> |
3347 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzx-V38Ee2LuOZzJ_LhLg" x="-44" y="158"/> | 3231 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGzx-V38Ee2LuOZzJ_LhLg" x="-51" y="158"/> |
3348 | </children> | 3232 | </children> |
3349 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_WGzx8V38Ee2LuOZzJ_LhLg" routing="Rectilinear"/> | 3233 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_WGzx8V38Ee2LuOZzJ_LhLg" routing="Rectilinear"/> |
3350 | <styles xmi:type="notation:FontStyle" xmi:id="_WGzx8l38Ee2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 3234 | <styles xmi:type="notation:FontStyle" xmi:id="_WGzx8l38Ee2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
3351 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WGzx8138Ee2LuOZzJ_LhLg" points="[-1, 49, 166, -235]$[-1, 291, 166, 7]$[-108, 291, 59, 7]"/> | 3235 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WGzx8138Ee2LuOZzJ_LhLg" points="[-1, 49, 174, -235]$[-1, 291, 174, 7]$[-116, 291, 59, 7]"/> |
3352 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WG0ZAF38Ee2LuOZzJ_LhLg" id="(0.472,0.5)"/> | 3236 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WG0ZAF38Ee2LuOZzJ_LhLg" id="(0.472,0.5)"/> |
3353 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WG0ZAV38Ee2LuOZzJ_LhLg" id="(0.5,0.5)"/> | 3237 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WG0ZAV38Ee2LuOZzJ_LhLg" id="(0.5,0.5)"/> |
3354 | </edges> | 3238 | </edges> |
@@ -3370,17 +3254,17 @@ | |||
3370 | </edges> | 3254 | </edges> |
3371 | <edges xmi:type="notation:Edge" xmi:id="_ObvisF4HEe2LuOZzJ_LhLg" type="4001" element="_ObhgTF4HEe2LuOZzJ_LhLg" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | 3255 | <edges xmi:type="notation:Edge" xmi:id="_ObvisF4HEe2LuOZzJ_LhLg" type="4001" element="_ObhgTF4HEe2LuOZzJ_LhLg" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> |
3372 | <children xmi:type="notation:Node" xmi:id="_ObvitF4HEe2LuOZzJ_LhLg" type="6001"> | 3256 | <children xmi:type="notation:Node" xmi:id="_ObvitF4HEe2LuOZzJ_LhLg" type="6001"> |
3373 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ObvitV4HEe2LuOZzJ_LhLg" x="-187" y="-37"/> | 3257 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ObvitV4HEe2LuOZzJ_LhLg" x="-181" y="-37"/> |
3374 | </children> | 3258 | </children> |
3375 | <children xmi:type="notation:Node" xmi:id="_Obvitl4HEe2LuOZzJ_LhLg" type="6002"> | 3259 | <children xmi:type="notation:Node" xmi:id="_Obvitl4HEe2LuOZzJ_LhLg" type="6002"> |
3376 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Obvit14HEe2LuOZzJ_LhLg" x="111" y="10"/> | 3260 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Obvit14HEe2LuOZzJ_LhLg" x="113" y="10"/> |
3377 | </children> | 3261 | </children> |
3378 | <children xmi:type="notation:Node" xmi:id="_ObviuF4HEe2LuOZzJ_LhLg" type="6003"> | 3262 | <children xmi:type="notation:Node" xmi:id="_ObviuF4HEe2LuOZzJ_LhLg" type="6003"> |
3379 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ObviuV4HEe2LuOZzJ_LhLg" x="20" y="10"/> | 3263 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ObviuV4HEe2LuOZzJ_LhLg" x="18" y="10"/> |
3380 | </children> | 3264 | </children> |
3381 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ObvisV4HEe2LuOZzJ_LhLg" routing="Rectilinear"/> | 3265 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ObvisV4HEe2LuOZzJ_LhLg" routing="Rectilinear"/> |
3382 | <styles xmi:type="notation:FontStyle" xmi:id="_Obvisl4HEe2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 3266 | <styles xmi:type="notation:FontStyle" xmi:id="_Obvisl4HEe2LuOZzJ_LhLg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
3383 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Obvis14HEe2LuOZzJ_LhLg" points="[29, 0, -247, 194]$[29, -240, -247, -46]$[204, -240, -72, -46]"/> | 3267 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Obvis14HEe2LuOZzJ_LhLg" points="[29, 0, -247, 194]$[29, -228, -247, -34]$[204, -228, -72, -34]"/> |
3384 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Obviul4HEe2LuOZzJ_LhLg" id="(0.2482758620689655,0.0)"/> | 3268 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Obviul4HEe2LuOZzJ_LhLg" id="(0.2482758620689655,0.0)"/> |
3385 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Obviu14HEe2LuOZzJ_LhLg" id="(0.6101694915254238,1.0)"/> | 3269 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Obviu14HEe2LuOZzJ_LhLg" id="(0.6101694915254238,1.0)"/> |
3386 | </edges> | 3270 | </edges> |
@@ -3450,17 +3334,17 @@ | |||
3450 | </edges> | 3334 | </edges> |
3451 | <edges xmi:type="notation:Edge" xmi:id="_q0sN4F4KEe2m7IaHDkh2Xg" type="4001" element="_q0dkhF4KEe2m7IaHDkh2Xg" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | 3335 | <edges xmi:type="notation:Edge" xmi:id="_q0sN4F4KEe2m7IaHDkh2Xg" type="4001" element="_q0dkhF4KEe2m7IaHDkh2Xg" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> |
3452 | <children xmi:type="notation:Node" xmi:id="_q0sN5F4KEe2m7IaHDkh2Xg" type="6001"> | 3336 | <children xmi:type="notation:Node" xmi:id="_q0sN5F4KEe2m7IaHDkh2Xg" type="6001"> |
3453 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q0sN5V4KEe2m7IaHDkh2Xg" x="-14" y="25"/> | 3337 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q0sN5V4KEe2m7IaHDkh2Xg" x="-26" y="13"/> |
3454 | </children> | 3338 | </children> |
3455 | <children xmi:type="notation:Node" xmi:id="_q0sN5l4KEe2m7IaHDkh2Xg" type="6002"> | 3339 | <children xmi:type="notation:Node" xmi:id="_q0sN5l4KEe2m7IaHDkh2Xg" type="6002"> |
3456 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q0sN514KEe2m7IaHDkh2Xg" x="-9" y="10"/> | 3340 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q0sN514KEe2m7IaHDkh2Xg" x="-9" y="10"/> |
3457 | </children> | 3341 | </children> |
3458 | <children xmi:type="notation:Node" xmi:id="_q0s08F4KEe2m7IaHDkh2Xg" type="6003"> | 3342 | <children xmi:type="notation:Node" xmi:id="_q0s08F4KEe2m7IaHDkh2Xg" type="6003"> |
3459 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q0s08V4KEe2m7IaHDkh2Xg" x="-42" y="10"/> | 3343 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q0s08V4KEe2m7IaHDkh2Xg" x="-54" y="10"/> |
3460 | </children> | 3344 | </children> |
3461 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_q0sN4V4KEe2m7IaHDkh2Xg" routing="Tree"/> | 3345 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_q0sN4V4KEe2m7IaHDkh2Xg" routing="Tree"/> |
3462 | <styles xmi:type="notation:FontStyle" xmi:id="_q0sN4l4KEe2m7IaHDkh2Xg" fontName="Noto Sans" fontHeight="8"/> | 3346 | <styles xmi:type="notation:FontStyle" xmi:id="_q0sN4l4KEe2m7IaHDkh2Xg" fontName="Noto Sans" fontHeight="8"/> |
3463 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_q0sN414KEe2m7IaHDkh2Xg" points="[0, -27, -155, 202]$[0, -207, -155, 22]$[174, -207, 19, 22]$[174, -221, 19, 8]"/> | 3347 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_q0sN414KEe2m7IaHDkh2Xg" points="[0, -27, -155, 202]$[0, -195, -155, 34]$[174, -195, 19, 34]$[174, -221, 19, 8]"/> |
3464 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q0s08l4KEe2m7IaHDkh2Xg" id="(0.8206896551724138,0.2755102040816326)"/> | 3348 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q0s08l4KEe2m7IaHDkh2Xg" id="(0.8206896551724138,0.2755102040816326)"/> |
3465 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q0s0814KEe2m7IaHDkh2Xg" id="(0.288135593220339,0.9183673469387755)"/> | 3349 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_q0s0814KEe2m7IaHDkh2Xg" id="(0.288135593220339,0.9183673469387755)"/> |
3466 | </edges> | 3350 | </edges> |
@@ -3498,17 +3382,17 @@ | |||
3498 | </edges> | 3382 | </edges> |
3499 | <edges xmi:type="notation:Edge" xmi:id="_Y-UMwF4LEe2m7IaHDkh2Xg" type="4001" element="_Y-E8MF4LEe2m7IaHDkh2Xg" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | 3383 | <edges xmi:type="notation:Edge" xmi:id="_Y-UMwF4LEe2m7IaHDkh2Xg" type="4001" element="_Y-E8MF4LEe2m7IaHDkh2Xg" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_3xZUsF3lEe2LuOZzJ_LhLg"> |
3500 | <children xmi:type="notation:Node" xmi:id="_Y-UMxF4LEe2m7IaHDkh2Xg" type="6001"> | 3384 | <children xmi:type="notation:Node" xmi:id="_Y-UMxF4LEe2m7IaHDkh2Xg" type="6001"> |
3501 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y-UMxV4LEe2m7IaHDkh2Xg" x="-160" y="47"/> | 3385 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y-UMxV4LEe2m7IaHDkh2Xg" x="-154" y="47"/> |
3502 | </children> | 3386 | </children> |
3503 | <children xmi:type="notation:Node" xmi:id="_Y-UMxl4LEe2m7IaHDkh2Xg" type="6002"> | 3387 | <children xmi:type="notation:Node" xmi:id="_Y-UMxl4LEe2m7IaHDkh2Xg" type="6002"> |
3504 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y-UMx14LEe2m7IaHDkh2Xg" x="152" y="88"/> | 3388 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y-UMx14LEe2m7IaHDkh2Xg" x="142" y="88"/> |
3505 | </children> | 3389 | </children> |
3506 | <children xmi:type="notation:Node" xmi:id="_Y-UMyF4LEe2m7IaHDkh2Xg" type="6003"> | 3390 | <children xmi:type="notation:Node" xmi:id="_Y-UMyF4LEe2m7IaHDkh2Xg" type="6003"> |
3507 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y-UMyV4LEe2m7IaHDkh2Xg" x="28" y="10"/> | 3391 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y-UMyV4LEe2m7IaHDkh2Xg" x="27" y="10"/> |
3508 | </children> | 3392 | </children> |
3509 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Y-UMwV4LEe2m7IaHDkh2Xg" routing="Rectilinear"/> | 3393 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Y-UMwV4LEe2m7IaHDkh2Xg" routing="Rectilinear"/> |
3510 | <styles xmi:type="notation:FontStyle" xmi:id="_Y-UMwl4LEe2m7IaHDkh2Xg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 3394 | <styles xmi:type="notation:FontStyle" xmi:id="_Y-UMwl4LEe2m7IaHDkh2Xg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
3511 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Y-UMw14LEe2m7IaHDkh2Xg" points="[-49, -16, -144, 240]$[-49, -232, -144, 24]$[95, -232, 0, 24]"/> | 3395 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Y-UMw14LEe2m7IaHDkh2Xg" points="[-49, -16, -144, 240]$[-49, -220, -144, 36]$[95, -220, 0, 36]"/> |
3512 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y-UMyl4LEe2m7IaHDkh2Xg" id="(1.0,0.16326530612244897)"/> | 3396 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y-UMyl4LEe2m7IaHDkh2Xg" id="(1.0,0.16326530612244897)"/> |
3513 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y-UMy14LEe2m7IaHDkh2Xg" id="(0.0,0.5306122448979592)"/> | 3397 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y-UMy14LEe2m7IaHDkh2Xg" id="(0.0,0.5306122448979592)"/> |
3514 | </edges> | 3398 | </edges> |
@@ -3573,7 +3457,7 @@ | |||
3573 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_mZrI4V9vEe2rXNsIDUvqhw" routing="Tree"/> | 3457 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_mZrI4V9vEe2rXNsIDUvqhw" routing="Tree"/> |
3574 | <styles xmi:type="notation:FontStyle" xmi:id="_mZrI4l9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> | 3458 | <styles xmi:type="notation:FontStyle" xmi:id="_mZrI4l9vEe2rXNsIDUvqhw" fontName="Noto Sans" fontHeight="8"/> |
3575 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mZrI419vEe2rXNsIDUvqhw" points="[36, 0, 214, 95]$[36, -28, 214, 67]$[-156, -28, 22, 67]$[-156, -46, 22, 49]"/> | 3459 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mZrI419vEe2rXNsIDUvqhw" points="[36, 0, 214, 95]$[36, -28, 214, 67]$[-156, -28, 22, 67]$[-156, -46, 22, 49]"/> |
3576 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mZrv8F9vEe2rXNsIDUvqhw" id="(0.2482758620689655,0.0)"/> | 3460 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mZrv8F9vEe2rXNsIDUvqhw" id="(0.2,0.08163265306122448)"/> |
3577 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mZrv8V9vEe2rXNsIDUvqhw" id="(0.5,0.5)"/> | 3461 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mZrv8V9vEe2rXNsIDUvqhw" id="(0.5,0.5)"/> |
3578 | </edges> | 3462 | </edges> |
3579 | <edges xmi:type="notation:Edge" xmi:id="_Us6csGTUEe2qdtyPWAtoxA" type="4001" element="_UstBaGTUEe2qdtyPWAtoxA" source="_M-upAGTUEe2qdtyPWAtoxA" target="_bTgeJl3tEe2LuOZzJ_LhLg"> | 3463 | <edges xmi:type="notation:Edge" xmi:id="_Us6csGTUEe2qdtyPWAtoxA" type="4001" element="_UstBaGTUEe2qdtyPWAtoxA" source="_M-upAGTUEe2qdtyPWAtoxA" target="_bTgeJl3tEe2LuOZzJ_LhLg"> |
@@ -3642,17 +3526,17 @@ | |||
3642 | </edges> | 3526 | </edges> |
3643 | <edges xmi:type="notation:Edge" xmi:id="_LC7PYGTvEe2qdtyPWAtoxA" type="4001" element="_LC4MOmTvEe2qdtyPWAtoxA" source="_LC6oUGTvEe2qdtyPWAtoxA" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | 3527 | <edges xmi:type="notation:Edge" xmi:id="_LC7PYGTvEe2qdtyPWAtoxA" type="4001" element="_LC4MOmTvEe2qdtyPWAtoxA" source="_LC6oUGTvEe2qdtyPWAtoxA" target="_3xZUsF3lEe2LuOZzJ_LhLg"> |
3644 | <children xmi:type="notation:Node" xmi:id="_LC7PZGTvEe2qdtyPWAtoxA" type="6001"> | 3528 | <children xmi:type="notation:Node" xmi:id="_LC7PZGTvEe2qdtyPWAtoxA" type="6001"> |
3645 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC7PZWTvEe2qdtyPWAtoxA" x="10" y="-10"/> | 3529 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC7PZWTvEe2qdtyPWAtoxA" x="-365" y="36"/> |
3646 | </children> | 3530 | </children> |
3647 | <children xmi:type="notation:Node" xmi:id="_LC7PZmTvEe2qdtyPWAtoxA" type="6002"> | 3531 | <children xmi:type="notation:Node" xmi:id="_LC7PZmTvEe2qdtyPWAtoxA" type="6002"> |
3648 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC7PZ2TvEe2qdtyPWAtoxA" x="17" y="10"/> | 3532 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC7PZ2TvEe2qdtyPWAtoxA" x="-10" y="10"/> |
3649 | </children> | 3533 | </children> |
3650 | <children xmi:type="notation:Node" xmi:id="_LC7PaGTvEe2qdtyPWAtoxA" type="6003"> | 3534 | <children xmi:type="notation:Node" xmi:id="_LC7PaGTvEe2qdtyPWAtoxA" type="6003"> |
3651 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC7PaWTvEe2qdtyPWAtoxA" x="3" y="10"/> | 3535 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LC7PaWTvEe2qdtyPWAtoxA" x="-2" y="10"/> |
3652 | </children> | 3536 | </children> |
3653 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_LC7PYWTvEe2qdtyPWAtoxA" routing="Rectilinear"/> | 3537 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_LC7PYWTvEe2qdtyPWAtoxA" routing="Rectilinear"/> |
3654 | <styles xmi:type="notation:FontStyle" xmi:id="_LC7PYmTvEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | 3538 | <styles xmi:type="notation:FontStyle" xmi:id="_LC7PYmTvEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> |
3655 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LC7PY2TvEe2qdtyPWAtoxA" points="[43, -49, -988, 99]$[43, -169, -988, -21]$[972, -169, -59, -21]"/> | 3539 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LC7PY2TvEe2qdtyPWAtoxA" points="[43, -49, -976, 99]$[43, -149, -976, -1]$[960, -149, -59, -1]"/> |
3656 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LC7PamTvEe2qdtyPWAtoxA" id="(0.1557377049180328,0.5)"/> | 3540 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LC7PamTvEe2qdtyPWAtoxA" id="(0.1557377049180328,0.5)"/> |
3657 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LC7Pa2TvEe2qdtyPWAtoxA" id="(0.5,0.5)"/> | 3541 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LC7Pa2TvEe2qdtyPWAtoxA" id="(0.5,0.5)"/> |
3658 | </edges> | 3542 | </edges> |
@@ -3672,22 +3556,6 @@ | |||
3672 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_cBzLV2TvEe2qdtyPWAtoxA" id="(0.5,1.0)"/> | 3556 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_cBzLV2TvEe2qdtyPWAtoxA" id="(0.5,1.0)"/> |
3673 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_cBzLWGTvEe2qdtyPWAtoxA" id="(0.5,0.0)"/> | 3557 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_cBzLWGTvEe2qdtyPWAtoxA" id="(0.5,0.0)"/> |
3674 | </edges> | 3558 | </edges> |
3675 | <edges xmi:type="notation:Edge" xmi:id="_HgqNEGTwEe2qdtyPWAtoxA" type="4001" element="_HgMTBmTwEe2qdtyPWAtoxA" source="_DNRsUGTwEe2qdtyPWAtoxA" target="_meWJcF3uEe2LuOZzJ_LhLg"> | ||
3676 | <children xmi:type="notation:Node" xmi:id="_HgqNFGTwEe2qdtyPWAtoxA" type="6001"> | ||
3677 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_HgqNFWTwEe2qdtyPWAtoxA" y="-10"/> | ||
3678 | </children> | ||
3679 | <children xmi:type="notation:Node" xmi:id="_HgqNFmTwEe2qdtyPWAtoxA" type="6002"> | ||
3680 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_HgqNF2TwEe2qdtyPWAtoxA" y="10"/> | ||
3681 | </children> | ||
3682 | <children xmi:type="notation:Node" xmi:id="_Hgq0IGTwEe2qdtyPWAtoxA" type="6003"> | ||
3683 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Hgq0IWTwEe2qdtyPWAtoxA" y="10"/> | ||
3684 | </children> | ||
3685 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_HgqNEWTwEe2qdtyPWAtoxA" routing="Tree"/> | ||
3686 | <styles xmi:type="notation:FontStyle" xmi:id="_HgqNEmTwEe2qdtyPWAtoxA" fontName="Noto Sans" fontHeight="8"/> | ||
3687 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HgqNE2TwEe2qdtyPWAtoxA" points="[0, 0, 211, 132]$[-211, -132, 0, 0]"/> | ||
3688 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Hgq0ImTwEe2qdtyPWAtoxA" id="(0.4067796610169492,0.0)"/> | ||
3689 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Hgq0I2TwEe2qdtyPWAtoxA" id="(0.5,0.5)"/> | ||
3690 | </edges> | ||
3691 | <edges xmi:type="notation:Edge" xmi:id="_MXL3IGTwEe2qdtyPWAtoxA" type="4001" element="_MW7_mGTwEe2qdtyPWAtoxA" source="_LC6oUGTvEe2qdtyPWAtoxA" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | 3559 | <edges xmi:type="notation:Edge" xmi:id="_MXL3IGTwEe2qdtyPWAtoxA" type="4001" element="_MW7_mGTwEe2qdtyPWAtoxA" source="_LC6oUGTvEe2qdtyPWAtoxA" target="_3xZUsF3lEe2LuOZzJ_LhLg"> |
3692 | <children xmi:type="notation:Node" xmi:id="_MXL3JGTwEe2qdtyPWAtoxA" type="6001"> | 3560 | <children xmi:type="notation:Node" xmi:id="_MXL3JGTwEe2qdtyPWAtoxA" type="6001"> |
3693 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MXL3JWTwEe2qdtyPWAtoxA" x="-12" y="-10"/> | 3561 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MXL3JWTwEe2qdtyPWAtoxA" x="-12" y="-10"/> |
@@ -3736,22 +3604,6 @@ | |||
3736 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_syrYYGgtEe24RpwpWgpkFQ" id="(0.5,0.5)"/> | 3604 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_syrYYGgtEe24RpwpWgpkFQ" id="(0.5,0.5)"/> |
3737 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qYvsm2gtEe24RpwpWgpkFQ" id="(0.0,0.6122448979591837)"/> | 3605 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qYvsm2gtEe24RpwpWgpkFQ" id="(0.0,0.6122448979591837)"/> |
3738 | </edges> | 3606 | </edges> |
3739 | <edges xmi:type="notation:Edge" xmi:id="_3zjE0GgtEe24RpwpWgpkFQ" type="4001" element="_3zQKBGgtEe24RpwpWgpkFQ" source="_zs6moGgtEe24RpwpWgpkFQ" target="_87Ju4F4IEe2LuOZzJ_LhLg"> | ||
3740 | <children xmi:type="notation:Node" xmi:id="_3zjr4GgtEe24RpwpWgpkFQ" type="6001"> | ||
3741 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3zjr4WgtEe24RpwpWgpkFQ" y="-10"/> | ||
3742 | </children> | ||
3743 | <children xmi:type="notation:Node" xmi:id="_3zjr4mgtEe24RpwpWgpkFQ" type="6002"> | ||
3744 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3zjr42gtEe24RpwpWgpkFQ" y="10"/> | ||
3745 | </children> | ||
3746 | <children xmi:type="notation:Node" xmi:id="_3zjr5GgtEe24RpwpWgpkFQ" type="6003"> | ||
3747 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3zjr5WgtEe24RpwpWgpkFQ" y="10"/> | ||
3748 | </children> | ||
3749 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_3zjE0WgtEe24RpwpWgpkFQ" routing="Tree"/> | ||
3750 | <styles xmi:type="notation:FontStyle" xmi:id="_3zjE0mgtEe24RpwpWgpkFQ" fontName="Noto Sans" fontHeight="8"/> | ||
3751 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3zjE02gtEe24RpwpWgpkFQ" points="[0, 0, 86, 120]$[-86, -120, 0, 0]"/> | ||
3752 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3zjr5mgtEe24RpwpWgpkFQ" id="(0.8135593220338984,0.0)"/> | ||
3753 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3zjr52gtEe24RpwpWgpkFQ" id="(0.5,0.5)"/> | ||
3754 | </edges> | ||
3755 | <edges xmi:type="notation:Edge" xmi:id="_dTGfYGkGEe24rIYSlCjKHA" type="4001" element="_dSnXTmkGEe24rIYSlCjKHA" source="_ZjfaEGkGEe24rIYSlCjKHA" target="_87Ju4F4IEe2LuOZzJ_LhLg"> | 3607 | <edges xmi:type="notation:Edge" xmi:id="_dTGfYGkGEe24rIYSlCjKHA" type="4001" element="_dSnXTmkGEe24rIYSlCjKHA" source="_ZjfaEGkGEe24rIYSlCjKHA" target="_87Ju4F4IEe2LuOZzJ_LhLg"> |
3756 | <children xmi:type="notation:Node" xmi:id="_dTHGcGkGEe24rIYSlCjKHA" type="6001"> | 3608 | <children xmi:type="notation:Node" xmi:id="_dTHGcGkGEe24rIYSlCjKHA" type="6001"> |
3757 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dTHGcWkGEe24rIYSlCjKHA" y="-10"/> | 3609 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dTHGcWkGEe24rIYSlCjKHA" y="-10"/> |
@@ -3768,6 +3620,118 @@ | |||
3768 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dTKJwGkGEe24rIYSlCjKHA" id="(0.6101694915254238,0.0)"/> | 3620 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dTKJwGkGEe24rIYSlCjKHA" id="(0.6101694915254238,0.0)"/> |
3769 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dTKJwWkGEe24rIYSlCjKHA" id="(0.5,0.5)"/> | 3621 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dTKJwWkGEe24rIYSlCjKHA" id="(0.5,0.5)"/> |
3770 | </edges> | 3622 | </edges> |
3623 | <edges xmi:type="notation:Edge" xmi:id="_LPzccNZUEe69IbObpvsypA" type="4001" element="_LPX-3NZUEe69IbObpvsypA" source="_IYGPgNZUEe69IbObpvsypA" target="_bTgeJl3tEe2LuOZzJ_LhLg"> | ||
3624 | <children xmi:type="notation:Node" xmi:id="_LPzcdNZUEe69IbObpvsypA" type="6001"> | ||
3625 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LPzcddZUEe69IbObpvsypA" y="-10"/> | ||
3626 | </children> | ||
3627 | <children xmi:type="notation:Node" xmi:id="_LPzcdtZUEe69IbObpvsypA" type="6002"> | ||
3628 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LPzcd9ZUEe69IbObpvsypA" y="10"/> | ||
3629 | </children> | ||
3630 | <children xmi:type="notation:Node" xmi:id="_LPzceNZUEe69IbObpvsypA" type="6003"> | ||
3631 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LPzcedZUEe69IbObpvsypA" y="10"/> | ||
3632 | </children> | ||
3633 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_LPzccdZUEe69IbObpvsypA" routing="Tree"/> | ||
3634 | <styles xmi:type="notation:FontStyle" xmi:id="_LPzcctZUEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3635 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LPzcc9ZUEe69IbObpvsypA" points="[0, 0, -84, 46]$[84, -46, 0, 0]"/> | ||
3636 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LPzcetZUEe69IbObpvsypA" id="(0.711864406779661,0.0)"/> | ||
3637 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LPzce9ZUEe69IbObpvsypA" id="(0.5,0.5)"/> | ||
3638 | </edges> | ||
3639 | <edges xmi:type="notation:Edge" xmi:id="_JiwkcNZXEe69IbObpvsypA" type="4001" element="_JicbhNZXEe69IbObpvsypA" source="_FTa2MNZXEe69IbObpvsypA" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | ||
3640 | <children xmi:type="notation:Node" xmi:id="_JixLgNZXEe69IbObpvsypA" type="6001"> | ||
3641 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JixLgdZXEe69IbObpvsypA" x="-457" y="56"/> | ||
3642 | </children> | ||
3643 | <children xmi:type="notation:Node" xmi:id="_JixLgtZXEe69IbObpvsypA" type="6002"> | ||
3644 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JixLg9ZXEe69IbObpvsypA" x="51" y="10"/> | ||
3645 | </children> | ||
3646 | <children xmi:type="notation:Node" xmi:id="_JixLhNZXEe69IbObpvsypA" type="6003"> | ||
3647 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JixLhdZXEe69IbObpvsypA" x="-17" y="10"/> | ||
3648 | </children> | ||
3649 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_JiwkcdZXEe69IbObpvsypA" routing="Rectilinear"/> | ||
3650 | <styles xmi:type="notation:FontStyle" xmi:id="_JiwkctZXEe69IbObpvsypA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | ||
3651 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Jiwkc9ZXEe69IbObpvsypA" points="[-82, -49, -1111, 99]$[-82, -169, -1111, -21]$[1029, -169, 0, -21]"/> | ||
3652 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JixLhtZXEe69IbObpvsypA" id="(1.0,0.5)"/> | ||
3653 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JixLh9ZXEe69IbObpvsypA" id="(0.0,0.5)"/> | ||
3654 | </edges> | ||
3655 | <edges xmi:type="notation:Edge" xmi:id="_NggzcNZXEe69IbObpvsypA" type="4001" element="_NgNRjtZXEe69IbObpvsypA" source="_FTa2MNZXEe69IbObpvsypA" target="_Z0bU0GTvEe2qdtyPWAtoxA"> | ||
3656 | <children xmi:type="notation:Node" xmi:id="_NggzdNZXEe69IbObpvsypA" type="6001"> | ||
3657 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NggzddZXEe69IbObpvsypA" x="14" y="18"/> | ||
3658 | </children> | ||
3659 | <children xmi:type="notation:Node" xmi:id="_NggzdtZXEe69IbObpvsypA" type="6002"> | ||
3660 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nggzd9ZXEe69IbObpvsypA" x="4" y="10"/> | ||
3661 | </children> | ||
3662 | <children xmi:type="notation:Node" xmi:id="_NggzeNZXEe69IbObpvsypA" type="6003"> | ||
3663 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NggzedZXEe69IbObpvsypA" x="-46" y="10"/> | ||
3664 | </children> | ||
3665 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_NggzcdZXEe69IbObpvsypA" routing="Rectilinear"/> | ||
3666 | <styles xmi:type="notation:FontStyle" xmi:id="_NggzctZXEe69IbObpvsypA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | ||
3667 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Nggzc9ZXEe69IbObpvsypA" points="[0, 0, -98, -118]$[0, 94, -98, -24]$[98, 94, 0, -24]"/> | ||
3668 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NghagNZXEe69IbObpvsypA" id="(0.6101694915254238,1.0)"/> | ||
3669 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NghagdZXEe69IbObpvsypA" id="(0.0,0.7346938775510204)"/> | ||
3670 | </edges> | ||
3671 | <edges xmi:type="notation:Edge" xmi:id="_Pu3hYNZXEe69IbObpvsypA" type="4001" element="_PulNvNZXEe69IbObpvsypA" source="_FTa2MNZXEe69IbObpvsypA" target="_3xZUsF3lEe2LuOZzJ_LhLg"> | ||
3672 | <children xmi:type="notation:Node" xmi:id="_Pu4Ic9ZXEe69IbObpvsypA" type="6001"> | ||
3673 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pu4IdNZXEe69IbObpvsypA" y="-10"/> | ||
3674 | </children> | ||
3675 | <children xmi:type="notation:Node" xmi:id="_Pu4IddZXEe69IbObpvsypA" type="6002"> | ||
3676 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pu4IdtZXEe69IbObpvsypA" y="10"/> | ||
3677 | </children> | ||
3678 | <children xmi:type="notation:Node" xmi:id="_Pu4Id9ZXEe69IbObpvsypA" type="6003"> | ||
3679 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pu4IeNZXEe69IbObpvsypA" y="10"/> | ||
3680 | </children> | ||
3681 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Pu4IcNZXEe69IbObpvsypA" routing="Tree"/> | ||
3682 | <styles xmi:type="notation:FontStyle" xmi:id="_Pu4IcdZXEe69IbObpvsypA" fontName="Noto Sans" fontHeight="8"/> | ||
3683 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Pu4IctZXEe69IbObpvsypA" points="[0, -24, -1197, 88]$[0, -48, -1197, 64]$[1250, -48, 53, 64]$[1250, -74, 53, 38]"/> | ||
3684 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Pu4IedZXEe69IbObpvsypA" id="(0.6949152542372882,0.24489795918367346)"/> | ||
3685 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Pu4IetZXEe69IbObpvsypA" id="(0.0,0.6122448979591837)"/> | ||
3686 | </edges> | ||
3687 | <edges xmi:type="notation:Edge" xmi:id="_fkQnUNcIEe6pjNxdSs0E0Q" type="4001" element="_fj2Xo9cIEe6pjNxdSs0E0Q" source="_c0t34NcIEe6pjNxdSs0E0Q" target="_bTgeJl3tEe2LuOZzJ_LhLg"> | ||
3688 | <children xmi:type="notation:Node" xmi:id="_fkR1cNcIEe6pjNxdSs0E0Q" type="6001"> | ||
3689 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fkR1cdcIEe6pjNxdSs0E0Q" y="-10"/> | ||
3690 | </children> | ||
3691 | <children xmi:type="notation:Node" xmi:id="_fkWG4NcIEe6pjNxdSs0E0Q" type="6002"> | ||
3692 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fkWG4dcIEe6pjNxdSs0E0Q" y="10"/> | ||
3693 | </children> | ||
3694 | <children xmi:type="notation:Node" xmi:id="_fkWt8NcIEe6pjNxdSs0E0Q" type="6003"> | ||
3695 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fkWt8dcIEe6pjNxdSs0E0Q" y="10"/> | ||
3696 | </children> | ||
3697 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_fkROYNcIEe6pjNxdSs0E0Q" routing="Tree"/> | ||
3698 | <styles xmi:type="notation:FontStyle" xmi:id="_fkROYdcIEe6pjNxdSs0E0Q" fontName="Noto Sans" fontHeight="8"/> | ||
3699 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_fkROYtcIEe6pjNxdSs0E0Q" points="[0, 0, 373, 120]$[-373, -120, 0, 0]"/> | ||
3700 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fkYjINcIEe6pjNxdSs0E0Q" id="(0.5,0.0)"/> | ||
3701 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fkYjIdcIEe6pjNxdSs0E0Q" id="(0.5,0.5)"/> | ||
3702 | </edges> | ||
3703 | <edges xmi:type="notation:Edge" xmi:id="_nICVgNjvEe66mJJuF_pPGg" type="4001" element="_nHjNetjvEe66mJJuF_pPGg" source="_hOS68NjvEe66mJJuF_pPGg" target="_87Ju4F4IEe2LuOZzJ_LhLg"> | ||
3704 | <children xmi:type="notation:Node" xmi:id="_nIC8kNjvEe66mJJuF_pPGg" type="6001"> | ||
3705 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nIC8kdjvEe66mJJuF_pPGg" y="-10"/> | ||
3706 | </children> | ||
3707 | <children xmi:type="notation:Node" xmi:id="_nIDjoNjvEe66mJJuF_pPGg" type="6002"> | ||
3708 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nIDjodjvEe66mJJuF_pPGg" y="10"/> | ||
3709 | </children> | ||
3710 | <children xmi:type="notation:Node" xmi:id="_nIEKsNjvEe66mJJuF_pPGg" type="6003"> | ||
3711 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nIEKsdjvEe66mJJuF_pPGg" y="10"/> | ||
3712 | </children> | ||
3713 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_nICVgdjvEe66mJJuF_pPGg" routing="Tree"/> | ||
3714 | <styles xmi:type="notation:FontStyle" xmi:id="_nICVgtjvEe66mJJuF_pPGg" fontName="Noto Sans" fontHeight="8"/> | ||
3715 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nICVg9jvEe66mJJuF_pPGg" points="[0, 0, 210, 108]$[-210, -108, 0, 0]"/> | ||
3716 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nIFY0NjvEe66mJJuF_pPGg" id="(0.6101694915254238,0.0)"/> | ||
3717 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nIFY0djvEe66mJJuF_pPGg" id="(0.5,0.5)"/> | ||
3718 | </edges> | ||
3719 | <edges xmi:type="notation:Edge" xmi:id="_vaGHYNsVEe6c9ehqpe3s7A" type="4001" element="_vZd1TNsVEe6c9ehqpe3s7A" source="_3BISYF4GEe2LuOZzJ_LhLg" target="_tkOK4NsVEe6c9ehqpe3s7A"> | ||
3720 | <children xmi:type="notation:Node" xmi:id="_vaGucNsVEe6c9ehqpe3s7A" type="6001"> | ||
3721 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vaGucdsVEe6c9ehqpe3s7A" x="-1" y="-47"/> | ||
3722 | </children> | ||
3723 | <children xmi:type="notation:Node" xmi:id="_vaGuctsVEe6c9ehqpe3s7A" type="6002"> | ||
3724 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vaGuc9sVEe6c9ehqpe3s7A" y="10"/> | ||
3725 | </children> | ||
3726 | <children xmi:type="notation:Node" xmi:id="_vaGudNsVEe6c9ehqpe3s7A" type="6003"> | ||
3727 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vaGuddsVEe6c9ehqpe3s7A" y="10"/> | ||
3728 | </children> | ||
3729 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_vaGHYdsVEe6c9ehqpe3s7A" routing="Rectilinear"/> | ||
3730 | <styles xmi:type="notation:FontStyle" xmi:id="_vaGHYtsVEe6c9ehqpe3s7A" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> | ||
3731 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vaGHY9sVEe6c9ehqpe3s7A" points="[0, 0, 0, -38]$[0, 38, 0, 0]"/> | ||
3732 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vaGudtsVEe6c9ehqpe3s7A" id="(0.503448275862069,1.0)"/> | ||
3733 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vaGud9sVEe6c9ehqpe3s7A" id="(0.503448275862069,0.0)"/> | ||
3734 | </edges> | ||
3771 | </data> | 3735 | </data> |
3772 | </ownedAnnotationEntries> | 3736 | </ownedAnnotationEntries> |
3773 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_z1k_YV3lEe2LuOZzJ_LhLg" source="DANNOTATION_CUSTOMIZATION_KEY"> | 3737 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_z1k_YV3lEe2LuOZzJ_LhLg" source="DANNOTATION_CUSTOMIZATION_KEY"> |
@@ -3783,7 +3747,7 @@ | |||
3783 | </computedStyleDescriptions> | 3747 | </computedStyleDescriptions> |
3784 | </data> | 3748 | </data> |
3785 | </ownedAnnotationEntries> | 3749 | </ownedAnnotationEntries> |
3786 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_3wvNYF3lEe2LuOZzJ_LhLg" name="Expr" tooltipText="" incomingEdges="_FMB-xl3vEe2LuOZzJ_LhLg _oARZ0l3vEe2LuOZzJ_LhLg _qx9eWF3vEe2LuOZzJ_LhLg _uSiCAF3vEe2LuOZzJ_LhLg _v0WaHF3vEe2LuOZzJ_LhLg _ObhgTF4HEe2LuOZzJ_LhLg _q0dkhF4KEe2m7IaHDkh2Xg _Y-E8MF4LEe2m7IaHDkh2Xg _Y-qe-F63Ee2rXNsIDUvqhw _LC4MOmTvEe2qdtyPWAtoxA _MW7_mGTwEe2qdtyPWAtoxA _qYZuyGgtEe24RpwpWgpkFQ" width="12" height="10"> | 3750 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_3wvNYF3lEe2LuOZzJ_LhLg" name="Expr" tooltipText="" incomingEdges="_FMB-xl3vEe2LuOZzJ_LhLg _oARZ0l3vEe2LuOZzJ_LhLg _qx9eWF3vEe2LuOZzJ_LhLg _uSiCAF3vEe2LuOZzJ_LhLg _v0WaHF3vEe2LuOZzJ_LhLg _ObhgTF4HEe2LuOZzJ_LhLg _q0dkhF4KEe2m7IaHDkh2Xg _Y-E8MF4LEe2m7IaHDkh2Xg _Y-qe-F63Ee2rXNsIDUvqhw _LC4MOmTvEe2qdtyPWAtoxA _MW7_mGTwEe2qdtyPWAtoxA _qYZuyGgtEe24RpwpWgpkFQ _JicbhNZXEe69IbObpvsypA _PulNvNZXEe69IbObpvsypA" width="12" height="10"> |
3787 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Expr"/> | 3751 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Expr"/> |
3788 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Expr"/> | 3752 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Expr"/> |
3789 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 3753 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -3832,7 +3796,7 @@ | |||
3832 | </ownedStyle> | 3796 | </ownedStyle> |
3833 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 3797 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
3834 | </ownedDiagramElements> | 3798 | </ownedDiagramElements> |
3835 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_bTLuAF3tEe2LuOZzJ_LhLg" name="BinaryExpr" tooltipText="" outgoingEdges="_oARZ0l3vEe2LuOZzJ_LhLg _qx9eWF3vEe2LuOZzJ_LhLg _v0WaHF3vEe2LuOZzJ_LhLg" incomingEdges="_UstBaGTUEe2qdtyPWAtoxA _Vb3NYGTUEe2qdtyPWAtoxA _45D4QmgpEe24RpwpWgpkFQ" width="12" height="10"> | 3799 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_bTLuAF3tEe2LuOZzJ_LhLg" name="BinaryExpr" tooltipText="" outgoingEdges="_oARZ0l3vEe2LuOZzJ_LhLg _qx9eWF3vEe2LuOZzJ_LhLg _v0WaHF3vEe2LuOZzJ_LhLg" incomingEdges="_UstBaGTUEe2qdtyPWAtoxA _Vb3NYGTUEe2qdtyPWAtoxA _45D4QmgpEe24RpwpWgpkFQ _LPX-3NZUEe69IbObpvsypA _fj2Xo9cIEe6pjNxdSs0E0Q" width="12" height="10"> |
3836 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//BinaryExpr"/> | 3800 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//BinaryExpr"/> |
3837 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//BinaryExpr"/> | 3801 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//BinaryExpr"/> |
3838 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 3802 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -3844,7 +3808,7 @@ | |||
3844 | </ownedStyle> | 3808 | </ownedStyle> |
3845 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 3809 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
3846 | </ownedDiagramElements> | 3810 | </ownedDiagramElements> |
3847 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_mdrbEF3uEe2LuOZzJ_LhLg" name="UnaryExpr" tooltipText="" outgoingEdges="_FMB-xl3vEe2LuOZzJ_LhLg _uSiCAF3vEe2LuOZzJ_LhLg" incomingEdges="_vB8OTF4GEe2LuOZzJ_LhLg _EUlvyF4LEe2m7IaHDkh2Xg _HgMTBmTwEe2qdtyPWAtoxA" width="12" height="10"> | 3811 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_mdrbEF3uEe2LuOZzJ_LhLg" name="UnaryExpr" tooltipText="" outgoingEdges="_FMB-xl3vEe2LuOZzJ_LhLg _uSiCAF3vEe2LuOZzJ_LhLg" incomingEdges="_vB8OTF4GEe2LuOZzJ_LhLg _EUlvyF4LEe2m7IaHDkh2Xg" width="12" height="10"> |
3848 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//UnaryExpr"/> | 3812 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//UnaryExpr"/> |
3849 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//UnaryExpr"/> | 3813 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//UnaryExpr"/> |
3850 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 3814 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -3996,18 +3960,26 @@ | |||
3996 | </ownedStyle> | 3960 | </ownedStyle> |
3997 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 3961 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
3998 | </ownedElements> | 3962 | </ownedElements> |
3999 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_Sn1HAGgrEe24RpwpWgpkFQ" name="MEET" tooltipText=""> | 3963 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_BiDXENf8Ee66mJJuF_pPGg" name="AND" tooltipText=""> |
4000 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/MEET"/> | 3964 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/AND"/> |
4001 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/MEET"/> | 3965 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/AND"/> |
4002 | <ownedStyle xmi:type="diagram:BundledImage" uid="_Sn1HAWgrEe24RpwpWgpkFQ" labelAlignment="LEFT"> | 3966 | <ownedStyle xmi:type="diagram:BundledImage" uid="_BiFMQNf8Ee66mJJuF_pPGg" labelAlignment="LEFT"> |
3967 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
3968 | </ownedStyle> | ||
3969 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
3970 | </ownedElements> | ||
3971 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_CGRecNf8Ee66mJJuF_pPGg" name="OR" tooltipText=""> | ||
3972 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/OR"/> | ||
3973 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/OR"/> | ||
3974 | <ownedStyle xmi:type="diagram:BundledImage" uid="_CGRecdf8Ee66mJJuF_pPGg" labelAlignment="LEFT"> | ||
4003 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 3975 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
4004 | </ownedStyle> | 3976 | </ownedStyle> |
4005 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 3977 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
4006 | </ownedElements> | 3978 | </ownedElements> |
4007 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_TrhYoGgrEe24RpwpWgpkFQ" name="JOIN" tooltipText=""> | 3979 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_CopLsNf8Ee66mJJuF_pPGg" name="XOR" tooltipText=""> |
4008 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/JOIN"/> | 3980 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/XOR"/> |
4009 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/JOIN"/> | 3981 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//BinaryOp/XOR"/> |
4010 | <ownedStyle xmi:type="diagram:BundledImage" uid="_TrhYoWgrEe24RpwpWgpkFQ" labelAlignment="LEFT"> | 3982 | <ownedStyle xmi:type="diagram:BundledImage" uid="_CopywNf8Ee66mJJuF_pPGg" labelAlignment="LEFT"> |
4011 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 3983 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
4012 | </ownedStyle> | 3984 | </ownedStyle> |
4013 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 3985 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
@@ -4080,24 +4052,16 @@ | |||
4080 | </ownedStyle> | 4052 | </ownedStyle> |
4081 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 4053 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
4082 | </ownedDiagramElements> | 4054 | </ownedDiagramElements> |
4083 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_3A1XcF4GEe2LuOZzJ_LhLg" name="AggregationExpr" tooltipText="" outgoingEdges="_ObhgTF4HEe2LuOZzJ_LhLg _q0dkhF4KEe2m7IaHDkh2Xg _Y-E8MF4LEe2m7IaHDkh2Xg _ZLAvTl9vEe2rXNsIDUvqhw" width="12" height="10"> | 4055 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_3A1XcF4GEe2LuOZzJ_LhLg" name="AggregationExpr" tooltipText="" outgoingEdges="_ObhgTF4HEe2LuOZzJ_LhLg _q0dkhF4KEe2m7IaHDkh2Xg _Y-E8MF4LEe2m7IaHDkh2Xg _ZLAvTl9vEe2rXNsIDUvqhw _vZd1TNsVEe6c9ehqpe3s7A" width="12" height="10"> |
4084 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> | 4056 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> |
4085 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> | 4057 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> |
4086 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 4058 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
4087 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 4059 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
4088 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 4060 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
4089 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_LM1SS19xEe2rXNsIDUvqhw" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | 4061 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_syXQI9sVEe6c9ehqpe3s7A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> |
4090 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | 4062 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> |
4091 | </ownedStyle> | 4063 | </ownedStyle> |
4092 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 4064 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
4093 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_nZoxHl9vEe2rXNsIDUvqhw" name="op : AggregationOp = SUM" tooltipText=""> | ||
4094 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//AggregationExpr/op"/> | ||
4095 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//AggregationExpr/op"/> | ||
4096 | <ownedStyle xmi:type="diagram:BundledImage" uid="_nZoxH19vEe2rXNsIDUvqhw" labelAlignment="LEFT"> | ||
4097 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
4098 | </ownedStyle> | ||
4099 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
4100 | </ownedElements> | ||
4101 | </ownedDiagramElements> | 4065 | </ownedDiagramElements> |
4102 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ObhgTF4HEe2LuOZzJ_LhLg" name="[0..1] value" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> | 4066 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ObhgTF4HEe2LuOZzJ_LhLg" name="[0..1] value" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> |
4103 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//AggregationExpr/value"/> | 4067 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//AggregationExpr/value"/> |
@@ -4112,49 +4076,6 @@ | |||
4112 | </ownedStyle> | 4076 | </ownedStyle> |
4113 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 4077 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
4114 | </ownedDiagramElements> | 4078 | </ownedDiagramElements> |
4115 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YrdfAF4HEe2LuOZzJ_LhLg" name="AggregationOp" tooltipText="" width="12" height="10"> | ||
4116 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//AggregationOp"/> | ||
4117 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//AggregationOp"/> | ||
4118 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4119 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4120 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4121 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YrdfAV4HEe2LuOZzJ_LhLg" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202"> | ||
4122 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> | ||
4123 | </ownedStyle> | ||
4124 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> | ||
4125 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_ZYVzIF4HEe2LuOZzJ_LhLg" name="SUM" tooltipText=""> | ||
4126 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/SUM"/> | ||
4127 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/SUM"/> | ||
4128 | <ownedStyle xmi:type="diagram:BundledImage" uid="_ZYVzIV4HEe2LuOZzJ_LhLg" labelAlignment="LEFT"> | ||
4129 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4130 | </ownedStyle> | ||
4131 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4132 | </ownedElements> | ||
4133 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_Zyjp8F4HEe2LuOZzJ_LhLg" name="PROD" tooltipText=""> | ||
4134 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/PROD"/> | ||
4135 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/PROD"/> | ||
4136 | <ownedStyle xmi:type="diagram:BundledImage" uid="_Zyjp8V4HEe2LuOZzJ_LhLg" labelAlignment="LEFT"> | ||
4137 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4138 | </ownedStyle> | ||
4139 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4140 | </ownedElements> | ||
4141 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_aDuScF4HEe2LuOZzJ_LhLg" name="MIN" tooltipText=""> | ||
4142 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/MIN"/> | ||
4143 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/MIN"/> | ||
4144 | <ownedStyle xmi:type="diagram:BundledImage" uid="_aDuScV4HEe2LuOZzJ_LhLg" labelAlignment="LEFT"> | ||
4145 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4146 | </ownedStyle> | ||
4147 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4148 | </ownedElements> | ||
4149 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_aU4T4F4HEe2LuOZzJ_LhLg" name="MAX" tooltipText=""> | ||
4150 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/MAX"/> | ||
4151 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//AggregationOp/MAX"/> | ||
4152 | <ownedStyle xmi:type="diagram:BundledImage" uid="_aU4T4V4HEe2LuOZzJ_LhLg" labelAlignment="LEFT"> | ||
4153 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4154 | </ownedStyle> | ||
4155 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4156 | </ownedElements> | ||
4157 | </ownedDiagramElements> | ||
4158 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_D6U8-V4IEe2LuOZzJ_LhLg" name="[0..1] singletonVariable" sourceNode="_9Ys7cF3lEe2LuOZzJ_LhLg" targetNode="_WGuSZF38Ee2LuOZzJ_LhLg"> | 4079 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_D6U8-V4IEe2LuOZzJ_LhLg" name="[0..1] singletonVariable" sourceNode="_9Ys7cF3lEe2LuOZzJ_LhLg" targetNode="_WGuSZF38Ee2LuOZzJ_LhLg"> |
4159 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//VariableOrNodeExpr/singletonVariable"/> | 4080 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//VariableOrNodeExpr/singletonVariable"/> |
4160 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//VariableOrNodeExpr/singletonVariable"/> | 4081 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//VariableOrNodeExpr/singletonVariable"/> |
@@ -4168,7 +4089,7 @@ | |||
4168 | </ownedStyle> | 4089 | </ownedStyle> |
4169 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 4090 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
4170 | </ownedDiagramElements> | 4091 | </ownedDiagramElements> |
4171 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_86zJkF4IEe2LuOZzJ_LhLg" name="Constant" tooltipText="" outgoingEdges="_qYZuyGgtEe24RpwpWgpkFQ" incomingEdges="_JYWPtF4JEe2LuOZzJ_LhLg _JYW2c14JEe2LuOZzJ_LhLg _JYW2el4JEe2LuOZzJ_LhLg _3zQKBGgtEe24RpwpWgpkFQ _dSnXTmkGEe24rIYSlCjKHA" width="12" height="10"> | 4092 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_86zJkF4IEe2LuOZzJ_LhLg" name="Constant" tooltipText="" outgoingEdges="_qYZuyGgtEe24RpwpWgpkFQ" incomingEdges="_JYWPtF4JEe2LuOZzJ_LhLg _JYW2c14JEe2LuOZzJ_LhLg _JYW2el4JEe2LuOZzJ_LhLg _dSnXTmkGEe24rIYSlCjKHA _nHjNetjvEe66mJJuF_pPGg" width="12" height="10"> |
4172 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Constant"/> | 4093 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Constant"/> |
4173 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Constant"/> | 4094 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Constant"/> |
4174 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 4095 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -4276,12 +4197,12 @@ | |||
4276 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_q0dkhF4KEe2m7IaHDkh2Xg" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> | 4197 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_q0dkhF4KEe2m7IaHDkh2Xg" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> |
4277 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> | 4198 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> |
4278 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> | 4199 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> |
4279 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_q0eLcF4KEe2m7IaHDkh2Xg" targetArrow="InputClosedArrow" routingStyle="tree"> | 4200 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_syi2VtsVEe6c9ehqpe3s7A" targetArrow="InputClosedArrow" routingStyle="tree"> |
4280 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | 4201 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> |
4281 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_q0eLcV4KEe2m7IaHDkh2Xg" showIcon="false"> | 4202 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_syi2V9sVEe6c9ehqpe3s7A" showIcon="false"> |
4282 | <labelFormat>italic</labelFormat> | 4203 | <labelFormat>italic</labelFormat> |
4283 | </beginLabelStyle> | 4204 | </beginLabelStyle> |
4284 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_q0eLcl4KEe2m7IaHDkh2Xg" showIcon="false"/> | 4205 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_syi2WNsVEe6c9ehqpe3s7A" showIcon="false"/> |
4285 | </ownedStyle> | 4206 | </ownedStyle> |
4286 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 4207 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
4287 | </ownedDiagramElements> | 4208 | </ownedDiagramElements> |
@@ -4385,12 +4306,12 @@ | |||
4385 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ZLAvTl9vEe2rXNsIDUvqhw" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_R7XFMF38Ee2LuOZzJ_LhLg"> | 4306 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ZLAvTl9vEe2rXNsIDUvqhw" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_R7XFMF38Ee2LuOZzJ_LhLg"> |
4386 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> | 4307 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> |
4387 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> | 4308 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregationExpr"/> |
4388 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_ZLAvT19vEe2rXNsIDUvqhw" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> | 4309 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_syi2XNsVEe6c9ehqpe3s7A" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> |
4389 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> | 4310 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> |
4390 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_ZLAvUF9vEe2rXNsIDUvqhw" showIcon="false"> | 4311 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_syi2XdsVEe6c9ehqpe3s7A" showIcon="false"> |
4391 | <labelFormat>italic</labelFormat> | 4312 | <labelFormat>italic</labelFormat> |
4392 | </beginLabelStyle> | 4313 | </beginLabelStyle> |
4393 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_ZLAvUV9vEe2rXNsIDUvqhw" showIcon="false"/> | 4314 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_syi2XtsVEe6c9ehqpe3s7A" showIcon="false"/> |
4394 | </ownedStyle> | 4315 | </ownedStyle> |
4395 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 4316 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
4396 | </ownedDiagramElements> | 4317 | </ownedDiagramElements> |
@@ -4498,33 +4419,17 @@ | |||
4498 | </ownedStyle> | 4419 | </ownedStyle> |
4499 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 4420 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
4500 | </ownedElements> | 4421 | </ownedElements> |
4501 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_BtK6oGkFEe24rIYSlCjKHA" name="SUBSUMES" tooltipText=""> | 4422 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_eqCSkGkFEe24rIYSlCjKHA" name="NODE_EQ" tooltipText=""> |
4502 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/SUBSUMES"/> | 4423 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/NODE_EQ"/> |
4503 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/SUBSUMES"/> | 4424 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/NODE_EQ"/> |
4504 | <ownedStyle xmi:type="diagram:BundledImage" uid="_BtMv0GkFEe24rIYSlCjKHA" labelAlignment="LEFT"> | ||
4505 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4506 | </ownedStyle> | ||
4507 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4508 | </ownedElements> | ||
4509 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_dSepwGkFEe24rIYSlCjKHA" name="SUBSUMED_BY" tooltipText=""> | ||
4510 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/SUBSUMED_BY"/> | ||
4511 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/SUBSUMED_BY"/> | ||
4512 | <ownedStyle xmi:type="diagram:BundledImage" uid="_dSfQ0GkFEe24rIYSlCjKHA" labelAlignment="LEFT"> | ||
4513 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4514 | </ownedStyle> | ||
4515 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4516 | </ownedElements> | ||
4517 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_eqCSkGkFEe24rIYSlCjKHA" name="ABS_EQ" tooltipText=""> | ||
4518 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/ABS_EQ"/> | ||
4519 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/ABS_EQ"/> | ||
4520 | <ownedStyle xmi:type="diagram:BundledImage" uid="_eqCSkWkFEe24rIYSlCjKHA" labelAlignment="LEFT"> | 4425 | <ownedStyle xmi:type="diagram:BundledImage" uid="_eqCSkWkFEe24rIYSlCjKHA" labelAlignment="LEFT"> |
4521 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 4426 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
4522 | </ownedStyle> | 4427 | </ownedStyle> |
4523 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 4428 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
4524 | </ownedElements> | 4429 | </ownedElements> |
4525 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_p9Q6UGkFEe24rIYSlCjKHA" name="ABS_NOT_EQ" tooltipText=""> | 4430 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_p9Q6UGkFEe24rIYSlCjKHA" name="NODE_NOT_EQ" tooltipText=""> |
4526 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/ABS_NOT_EQ"/> | 4431 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/NODE_NOT_EQ"/> |
4527 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/ABS_NOT_EQ"/> | 4432 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//ComparisonOp/NODE_NOT_EQ"/> |
4528 | <ownedStyle xmi:type="diagram:BundledImage" uid="_p9RhYGkFEe24rIYSlCjKHA" labelAlignment="LEFT"> | 4433 | <ownedStyle xmi:type="diagram:BundledImage" uid="_p9RhYGkFEe24rIYSlCjKHA" labelAlignment="LEFT"> |
4529 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | 4434 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> |
4530 | </ownedStyle> | 4435 | </ownedStyle> |
@@ -4633,7 +4538,7 @@ | |||
4633 | </ownedStyle> | 4538 | </ownedStyle> |
4634 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 4539 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
4635 | </ownedDiagramElements> | 4540 | </ownedDiagramElements> |
4636 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Z0MrUGTvEe2qdtyPWAtoxA" name="Relation" tooltipText="" incomingEdges="_cBUqNmTvEe2qdtyPWAtoxA" width="12" height="10"> | 4541 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Z0MrUGTvEe2qdtyPWAtoxA" name="Relation" tooltipText="" incomingEdges="_cBUqNmTvEe2qdtyPWAtoxA _NgNRjtZXEe69IbObpvsypA" width="12" height="10"> |
4637 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> | 4542 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> |
4638 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> | 4543 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> |
4639 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 4544 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -4659,80 +4564,6 @@ | |||
4659 | </ownedStyle> | 4564 | </ownedStyle> |
4660 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 4565 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
4661 | </ownedDiagramElements> | 4566 | </ownedDiagramElements> |
4662 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_DM_YcGTwEe2qdtyPWAtoxA" name="ModalExpr" tooltipText="" outgoingEdges="_HgMTBmTwEe2qdtyPWAtoxA" width="12" height="10"> | ||
4663 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ModalExpr"/> | ||
4664 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ModalExpr"/> | ||
4665 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4666 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4667 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4668 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_G0fDp2TwEe2qdtyPWAtoxA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4669 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4670 | </ownedStyle> | ||
4671 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4672 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_GD-MoGTwEe2qdtyPWAtoxA" name="modality : Modality = DEFAULT" tooltipText=""> | ||
4673 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//ModalExpr/modality"/> | ||
4674 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//ModalExpr/modality"/> | ||
4675 | <ownedStyle xmi:type="diagram:BundledImage" uid="_G0fqp2TwEe2qdtyPWAtoxA" labelAlignment="LEFT"> | ||
4676 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
4677 | </ownedStyle> | ||
4678 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
4679 | </ownedElements> | ||
4680 | </ownedDiagramElements> | ||
4681 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_FOadoGTwEe2qdtyPWAtoxA" name="Modality" tooltipText="" width="12" height="10"> | ||
4682 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//Modality"/> | ||
4683 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//Modality"/> | ||
4684 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4685 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4686 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4687 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_FOadoWTwEe2qdtyPWAtoxA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202"> | ||
4688 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> | ||
4689 | </ownedStyle> | ||
4690 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> | ||
4691 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_FOevIGTwEe2qdtyPWAtoxA" name="DEFAULT" tooltipText=""> | ||
4692 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/DEFAULT"/> | ||
4693 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/DEFAULT"/> | ||
4694 | <ownedStyle xmi:type="diagram:BundledImage" uid="_FOevIWTwEe2qdtyPWAtoxA" labelAlignment="LEFT"> | ||
4695 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4696 | </ownedStyle> | ||
4697 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4698 | </ownedElements> | ||
4699 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_FOevImTwEe2qdtyPWAtoxA" name="MAY" tooltipText=""> | ||
4700 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MAY"/> | ||
4701 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MAY"/> | ||
4702 | <ownedStyle xmi:type="diagram:BundledImage" uid="_FOevI2TwEe2qdtyPWAtoxA" labelAlignment="LEFT"> | ||
4703 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4704 | </ownedStyle> | ||
4705 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4706 | </ownedElements> | ||
4707 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_FOevJGTwEe2qdtyPWAtoxA" name="MUST" tooltipText=""> | ||
4708 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MUST"/> | ||
4709 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/MUST"/> | ||
4710 | <ownedStyle xmi:type="diagram:BundledImage" uid="_FOevJWTwEe2qdtyPWAtoxA" labelAlignment="LEFT"> | ||
4711 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4712 | </ownedStyle> | ||
4713 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4714 | </ownedElements> | ||
4715 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_FOevJmTwEe2qdtyPWAtoxA" name="CURRENT" tooltipText=""> | ||
4716 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/CURRENT"/> | ||
4717 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//Modality/CURRENT"/> | ||
4718 | <ownedStyle xmi:type="diagram:BundledImage" uid="_FOfWIGTwEe2qdtyPWAtoxA" labelAlignment="LEFT"> | ||
4719 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4720 | </ownedStyle> | ||
4721 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4722 | </ownedElements> | ||
4723 | </ownedDiagramElements> | ||
4724 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_HgMTBmTwEe2qdtyPWAtoxA" sourceNode="_DM_YcGTwEe2qdtyPWAtoxA" targetNode="_mdrbEF3uEe2LuOZzJ_LhLg"> | ||
4725 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ModalExpr"/> | ||
4726 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ModalExpr"/> | ||
4727 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_HgMTB2TwEe2qdtyPWAtoxA" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
4728 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
4729 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_HgMTCGTwEe2qdtyPWAtoxA" showIcon="false"> | ||
4730 | <labelFormat>italic</labelFormat> | ||
4731 | </beginLabelStyle> | ||
4732 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_HgMTCWTwEe2qdtyPWAtoxA" showIcon="false"/> | ||
4733 | </ownedStyle> | ||
4734 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
4735 | </ownedDiagramElements> | ||
4736 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_MW7_mGTwEe2qdtyPWAtoxA" sourceNode="_LCzTkGTvEe2qdtyPWAtoxA" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> | 4567 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_MW7_mGTwEe2qdtyPWAtoxA" sourceNode="_LCzTkGTvEe2qdtyPWAtoxA" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> |
4737 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Atom"/> | 4568 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Atom"/> |
4738 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Atom"/> | 4569 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Atom"/> |
@@ -4780,29 +4611,6 @@ | |||
4780 | </ownedStyle> | 4611 | </ownedStyle> |
4781 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 4612 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
4782 | </ownedDiagramElements> | 4613 | </ownedDiagramElements> |
4783 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_zsr9IGgtEe24RpwpWgpkFQ" name="InfConstant" tooltipText="" outgoingEdges="_3zQKBGgtEe24RpwpWgpkFQ" width="12" height="10"> | ||
4784 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfConstant"/> | ||
4785 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfConstant"/> | ||
4786 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4787 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4788 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4789 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_zsr9IWgtEe24RpwpWgpkFQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4790 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4791 | </ownedStyle> | ||
4792 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4793 | </ownedDiagramElements> | ||
4794 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_3zQKBGgtEe24RpwpWgpkFQ" sourceNode="_zsr9IGgtEe24RpwpWgpkFQ" targetNode="_86zJkF4IEe2LuOZzJ_LhLg"> | ||
4795 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfConstant"/> | ||
4796 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfConstant"/> | ||
4797 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_3zQKBWgtEe24RpwpWgpkFQ" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
4798 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
4799 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_3zQKBmgtEe24RpwpWgpkFQ" showIcon="false"> | ||
4800 | <labelFormat>italic</labelFormat> | ||
4801 | </beginLabelStyle> | ||
4802 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_3zQKB2gtEe24RpwpWgpkFQ" showIcon="false"/> | ||
4803 | </ownedStyle> | ||
4804 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
4805 | </ownedDiagramElements> | ||
4806 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Zi8AcGkGEe24rIYSlCjKHA" name="LogicConstant" tooltipText="" outgoingEdges="_dSnXTmkGEe24rIYSlCjKHA" width="12" height="10"> | 4614 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Zi8AcGkGEe24rIYSlCjKHA" name="LogicConstant" tooltipText="" outgoingEdges="_dSnXTmkGEe24rIYSlCjKHA" width="12" height="10"> |
4807 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LogicConstant"/> | 4615 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LogicConstant"/> |
4808 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LogicConstant"/> | 4616 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LogicConstant"/> |
@@ -4877,6 +4685,173 @@ | |||
4877 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | 4685 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> |
4878 | </ownedElements> | 4686 | </ownedElements> |
4879 | </ownedDiagramElements> | 4687 | </ownedDiagramElements> |
4688 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_IXrYwNZUEe69IbObpvsypA" name="LatticeBinaryExpr" tooltipText="" outgoingEdges="_LPX-3NZUEe69IbObpvsypA" width="12" height="10"> | ||
4689 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LatticeBinaryExpr"/> | ||
4690 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LatticeBinaryExpr"/> | ||
4691 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4692 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4693 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4694 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Xu1JDdZUEe69IbObpvsypA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4695 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4696 | </ownedStyle> | ||
4697 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4698 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_W0CUoNZUEe69IbObpvsypA" name="op : LatticeBinaryOp = MEET" tooltipText=""> | ||
4699 | <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//LatticeBinaryExpr/op"/> | ||
4700 | <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//LatticeBinaryExpr/op"/> | ||
4701 | <ownedStyle xmi:type="diagram:BundledImage" uid="_Xu2XFNZUEe69IbObpvsypA" labelAlignment="LEFT"> | ||
4702 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
4703 | </ownedStyle> | ||
4704 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
4705 | </ownedElements> | ||
4706 | </ownedDiagramElements> | ||
4707 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_LPX-3NZUEe69IbObpvsypA" sourceNode="_IXrYwNZUEe69IbObpvsypA" targetNode="_bTLuAF3tEe2LuOZzJ_LhLg"> | ||
4708 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LatticeBinaryExpr"/> | ||
4709 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//LatticeBinaryExpr"/> | ||
4710 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Xu6BstZUEe69IbObpvsypA" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
4711 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
4712 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_Xu6Bs9ZUEe69IbObpvsypA" showIcon="false"> | ||
4713 | <labelFormat>italic</labelFormat> | ||
4714 | </beginLabelStyle> | ||
4715 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Xu6BtNZUEe69IbObpvsypA" showIcon="false"/> | ||
4716 | </ownedStyle> | ||
4717 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
4718 | </ownedDiagramElements> | ||
4719 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Nmg1INZUEe69IbObpvsypA" name="LatticeBinaryOp" tooltipText="" width="12" height="10"> | ||
4720 | <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//LatticeBinaryOp"/> | ||
4721 | <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//LatticeBinaryOp"/> | ||
4722 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4723 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4724 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4725 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Nmg1IdZUEe69IbObpvsypA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202"> | ||
4726 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/> | ||
4727 | </ownedStyle> | ||
4728 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/> | ||
4729 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_TQOPoNZUEe69IbObpvsypA" name="MEET" tooltipText=""> | ||
4730 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//LatticeBinaryOp/MEET"/> | ||
4731 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//LatticeBinaryOp/MEET"/> | ||
4732 | <ownedStyle xmi:type="diagram:BundledImage" uid="_TQO2sNZUEe69IbObpvsypA" labelAlignment="LEFT"> | ||
4733 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4734 | </ownedStyle> | ||
4735 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4736 | </ownedElements> | ||
4737 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_UFttMNZUEe69IbObpvsypA" name="JOIN" tooltipText=""> | ||
4738 | <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//LatticeBinaryOp/JOIN"/> | ||
4739 | <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//LatticeBinaryOp/JOIN"/> | ||
4740 | <ownedStyle xmi:type="diagram:BundledImage" uid="_UFttMdZUEe69IbObpvsypA" labelAlignment="LEFT"> | ||
4741 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
4742 | </ownedStyle> | ||
4743 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
4744 | </ownedElements> | ||
4745 | </ownedDiagramElements> | ||
4746 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_FTH7QNZXEe69IbObpvsypA" name="CastExpr" tooltipText="" outgoingEdges="_JicbhNZXEe69IbObpvsypA _NgNRjtZXEe69IbObpvsypA _PulNvNZXEe69IbObpvsypA" width="12" height="10"> | ||
4747 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//CastExpr"/> | ||
4748 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//CastExpr"/> | ||
4749 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4750 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4751 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4752 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_FTH7QdZXEe69IbObpvsypA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4753 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4754 | </ownedStyle> | ||
4755 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4756 | </ownedDiagramElements> | ||
4757 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_JicbhNZXEe69IbObpvsypA" name="[0..1] body" sourceNode="_FTH7QNZXEe69IbObpvsypA" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> | ||
4758 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//CastExpr/body"/> | ||
4759 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//CastExpr/body"/> | ||
4760 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_JidCcNZXEe69IbObpvsypA" description="_FMCl0F3vEe2LuOZzJ_LhLg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
4761 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_JidCctZXEe69IbObpvsypA" showIcon="false"/> | ||
4762 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_JidCcdZXEe69IbObpvsypA" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
4763 | </ownedStyle> | ||
4764 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
4765 | </ownedDiagramElements> | ||
4766 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_NgNRjtZXEe69IbObpvsypA" name="[0..1] targetType" sourceNode="_FTH7QNZXEe69IbObpvsypA" targetNode="_Z0MrUGTvEe2qdtyPWAtoxA"> | ||
4767 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//CastExpr/targetType"/> | ||
4768 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//CastExpr/targetType"/> | ||
4769 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_NgNRj9ZXEe69IbObpvsypA" routingStyle="manhattan" strokeColor="0,0,0"> | ||
4770 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
4771 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_NgNRkdZXEe69IbObpvsypA" showIcon="false"/> | ||
4772 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_NgNRkNZXEe69IbObpvsypA" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
4773 | </ownedStyle> | ||
4774 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
4775 | </ownedDiagramElements> | ||
4776 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_PulNvNZXEe69IbObpvsypA" sourceNode="_FTH7QNZXEe69IbObpvsypA" targetNode="_3wvNYF3lEe2LuOZzJ_LhLg"> | ||
4777 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//CastExpr"/> | ||
4778 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//CastExpr"/> | ||
4779 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_PulNvdZXEe69IbObpvsypA" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
4780 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
4781 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_PulNvtZXEe69IbObpvsypA" showIcon="false"> | ||
4782 | <labelFormat>italic</labelFormat> | ||
4783 | </beginLabelStyle> | ||
4784 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_PulNv9ZXEe69IbObpvsypA" showIcon="false"/> | ||
4785 | </ownedStyle> | ||
4786 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
4787 | </ownedDiagramElements> | ||
4788 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_c0BUUNcIEe6pjNxdSs0E0Q" name="AssignmentExpr" tooltipText="" outgoingEdges="_fj2Xo9cIEe6pjNxdSs0E0Q" width="12" height="10"> | ||
4789 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AssignmentExpr"/> | ||
4790 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AssignmentExpr"/> | ||
4791 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4792 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4793 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4794 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_eWkFJtcIEe6pjNxdSs0E0Q" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4795 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4796 | </ownedStyle> | ||
4797 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4798 | </ownedDiagramElements> | ||
4799 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_fj2Xo9cIEe6pjNxdSs0E0Q" sourceNode="_c0BUUNcIEe6pjNxdSs0E0Q" targetNode="_bTLuAF3tEe2LuOZzJ_LhLg"> | ||
4800 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AssignmentExpr"/> | ||
4801 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AssignmentExpr"/> | ||
4802 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_fj2XpNcIEe6pjNxdSs0E0Q" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
4803 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
4804 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_fj2XpdcIEe6pjNxdSs0E0Q" showIcon="false"> | ||
4805 | <labelFormat>italic</labelFormat> | ||
4806 | </beginLabelStyle> | ||
4807 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_fj2XptcIEe6pjNxdSs0E0Q" showIcon="false"/> | ||
4808 | </ownedStyle> | ||
4809 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
4810 | </ownedDiagramElements> | ||
4811 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_hNitANjvEe66mJJuF_pPGg" name="InfiniteConstant" tooltipText="" outgoingEdges="_nHjNetjvEe66mJJuF_pPGg" width="12" height="10"> | ||
4812 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfiniteConstant"/> | ||
4813 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfiniteConstant"/> | ||
4814 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4815 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4816 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4817 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_kgGbMdj1Ee6BBtaAvpH7kw" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4818 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4819 | </ownedStyle> | ||
4820 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4821 | </ownedDiagramElements> | ||
4822 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_nHjNetjvEe66mJJuF_pPGg" sourceNode="_hNitANjvEe66mJJuF_pPGg" targetNode="_86zJkF4IEe2LuOZzJ_LhLg"> | ||
4823 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfiniteConstant"/> | ||
4824 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//InfiniteConstant"/> | ||
4825 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_kgeOrNj1Ee6BBtaAvpH7kw" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
4826 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
4827 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_kgeOrdj1Ee6BBtaAvpH7kw" showIcon="false"> | ||
4828 | <labelFormat>italic</labelFormat> | ||
4829 | </beginLabelStyle> | ||
4830 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_kgeOrtj1Ee6BBtaAvpH7kw" showIcon="false"/> | ||
4831 | </ownedStyle> | ||
4832 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
4833 | </ownedDiagramElements> | ||
4834 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_tkAvgNsVEe6c9ehqpe3s7A" name="AggregatorDeclaration" tooltipText="" incomingEdges="_vZd1TNsVEe6c9ehqpe3s7A" width="12" height="10"> | ||
4835 | <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
4836 | <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//AggregatorDeclaration"/> | ||
4837 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
4838 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
4839 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
4840 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_tkAvgdsVEe6c9ehqpe3s7A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
4841 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
4842 | </ownedStyle> | ||
4843 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
4844 | </ownedDiagramElements> | ||
4845 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_vZd1TNsVEe6c9ehqpe3s7A" name="[0..1] aggregator" sourceNode="_3A1XcF4GEe2LuOZzJ_LhLg" targetNode="_tkAvgNsVEe6c9ehqpe3s7A"> | ||
4846 | <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//AggregationExpr/aggregator"/> | ||
4847 | <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//AggregationExpr/aggregator"/> | ||
4848 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_vZecUNsVEe6c9ehqpe3s7A" routingStyle="manhattan" strokeColor="0,0,0"> | ||
4849 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
4850 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_vZecUtsVEe6c9ehqpe3s7A" showIcon="false"/> | ||
4851 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_vZecUdsVEe6c9ehqpe3s7A" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
4852 | </ownedStyle> | ||
4853 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
4854 | </ownedDiagramElements> | ||
4880 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 4855 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
4881 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_z1aAQF3lEe2LuOZzJ_LhLg"/> | 4856 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_z1aAQF3lEe2LuOZzJ_LhLg"/> |
4882 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | 4857 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> |
diff --git a/subprojects/language-model/src/main/resources/model/problem.ecore b/subprojects/language-model/src/main/resources/model/problem.ecore index 97355516..9a349490 100644 --- a/subprojects/language-model/src/main/resources/model/problem.ecore +++ b/subprojects/language-model/src/main/resources/model/problem.ecore | |||
@@ -13,13 +13,13 @@ | |||
13 | <eClassifiers xsi:type="ecore:EClass" name="ClassDeclaration" eSuperTypes="#//Statement #//Relation"> | 13 | <eClassifiers xsi:type="ecore:EClass" name="ClassDeclaration" eSuperTypes="#//Statement #//Relation"> |
14 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | 14 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> |
15 | <eStructuralFeatures xsi:type="ecore:EReference" name="featureDeclarations" upperBound="-1" | 15 | <eStructuralFeatures xsi:type="ecore:EReference" name="featureDeclarations" upperBound="-1" |
16 | eType="#//FeatureDeclaration" containment="true"/> | 16 | eType="#//ReferenceDeclaration" containment="true"/> |
17 | <eStructuralFeatures xsi:type="ecore:EReference" name="newNode" eType="#//Node" | 17 | <eStructuralFeatures xsi:type="ecore:EReference" name="newNode" eType="#//Node" |
18 | transient="true" containment="true"/> | 18 | transient="true" containment="true"/> |
19 | <eStructuralFeatures xsi:type="ecore:EReference" name="superTypes" upperBound="-1" | 19 | <eStructuralFeatures xsi:type="ecore:EReference" name="superTypes" upperBound="-1" |
20 | eType="#//Relation"/> | 20 | eType="#//Relation"/> |
21 | </eClassifiers> | 21 | </eClassifiers> |
22 | <eClassifiers xsi:type="ecore:EClass" name="ReferenceDeclaration" eSuperTypes="#//FeatureDeclaration"> | 22 | <eClassifiers xsi:type="ecore:EClass" name="ReferenceDeclaration" eSuperTypes="#//Relation"> |
23 | <eStructuralFeatures xsi:type="ecore:EReference" name="opposite" eType="#//ReferenceDeclaration"/> | 23 | <eStructuralFeatures xsi:type="ecore:EReference" name="opposite" eType="#//ReferenceDeclaration"/> |
24 | <eStructuralFeatures xsi:type="ecore:EReference" name="multiplicity" eType="#//Multiplicity" | 24 | <eStructuralFeatures xsi:type="ecore:EReference" name="multiplicity" eType="#//Multiplicity" |
25 | containment="true"/> | 25 | containment="true"/> |
@@ -150,12 +150,6 @@ | |||
150 | <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//VariableOrNode"/> | 150 | <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//VariableOrNode"/> |
151 | </eClassifiers> | 151 | </eClassifiers> |
152 | <eClassifiers xsi:type="ecore:EClass" name="NewVariable" eSuperTypes="#//Variable"/> | 152 | <eClassifiers xsi:type="ecore:EClass" name="NewVariable" eSuperTypes="#//Variable"/> |
153 | <eClassifiers xsi:type="ecore:EEnum" name="Modality"> | ||
154 | <eLiterals name="DEFAULT" value="1"/> | ||
155 | <eLiterals name="MAY" value="2"/> | ||
156 | <eLiterals name="MUST" value="3"/> | ||
157 | <eLiterals name="CURRENT" value="3"/> | ||
158 | </eClassifiers> | ||
159 | <eClassifiers xsi:type="ecore:EEnum" name="ComparisonOp"> | 153 | <eClassifiers xsi:type="ecore:EEnum" name="ComparisonOp"> |
160 | <eLiterals name="LESS"/> | 154 | <eLiterals name="LESS"/> |
161 | <eLiterals name="LESS_EQ" value="1"/> | 155 | <eLiterals name="LESS_EQ" value="1"/> |
@@ -164,14 +158,13 @@ | |||
164 | <eLiterals name="EQ" value="4"/> | 158 | <eLiterals name="EQ" value="4"/> |
165 | <eLiterals name="NOT_EQ" value="5"/> | 159 | <eLiterals name="NOT_EQ" value="5"/> |
166 | <eLiterals name="IN" value="6"/> | 160 | <eLiterals name="IN" value="6"/> |
167 | <eLiterals name="SUBSUMES" value="7"/> | 161 | <eLiterals name="NODE_EQ" value="9"/> |
168 | <eLiterals name="SUBSUMED_BY" value="8"/> | 162 | <eLiterals name="NODE_NOT_EQ" value="10"/> |
169 | <eLiterals name="ABS_EQ" value="9"/> | ||
170 | <eLiterals name="ABS_NOT_EQ" value="10"/> | ||
171 | </eClassifiers> | 163 | </eClassifiers> |
172 | <eClassifiers xsi:type="ecore:EEnum" name="ReferenceKind"> | 164 | <eClassifiers xsi:type="ecore:EEnum" name="ReferenceKind"> |
173 | <eLiterals name="REFERENCE" value="1"/> | 165 | <eLiterals name="DEFAULT" value="1"/> |
174 | <eLiterals name="CONTAINMENT" value="2"/> | 166 | <eLiterals name="REFERENCE" value="2"/> |
167 | <eLiterals name="CONTAINMENT" value="3"/> | ||
175 | <eLiterals name="CONTAINER" value="3"/> | 168 | <eLiterals name="CONTAINER" value="3"/> |
176 | </eClassifiers> | 169 | </eClassifiers> |
177 | <eClassifiers xsi:type="ecore:EClass" name="Expr" abstract="true"/> | 170 | <eClassifiers xsi:type="ecore:EClass" name="Expr" abstract="true"/> |
@@ -198,8 +191,9 @@ | |||
198 | <eLiterals name="MUL" value="2"/> | 191 | <eLiterals name="MUL" value="2"/> |
199 | <eLiterals name="DIV" value="3"/> | 192 | <eLiterals name="DIV" value="3"/> |
200 | <eLiterals name="POW" value="4"/> | 193 | <eLiterals name="POW" value="4"/> |
201 | <eLiterals name="MEET" value="5"/> | 194 | <eLiterals name="AND" value="5"/> |
202 | <eLiterals name="JOIN" value="6"/> | 195 | <eLiterals name="OR" value="6"/> |
196 | <eLiterals name="XOR" value="7"/> | ||
203 | </eClassifiers> | 197 | </eClassifiers> |
204 | <eClassifiers xsi:type="ecore:EClass" name="ArithmeticUnaryExpr" eSuperTypes="#//UnaryExpr"> | 198 | <eClassifiers xsi:type="ecore:EClass" name="ArithmeticUnaryExpr" eSuperTypes="#//UnaryExpr"> |
205 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//UnaryOp"/> | 199 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//UnaryOp"/> |
@@ -209,13 +203,7 @@ | |||
209 | containment="true"/> | 203 | containment="true"/> |
210 | <eStructuralFeatures xsi:type="ecore:EReference" name="condition" eType="#//Expr" | 204 | <eStructuralFeatures xsi:type="ecore:EReference" name="condition" eType="#//Expr" |
211 | containment="true"/> | 205 | containment="true"/> |
212 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//AggregationOp"/> | 206 | <eStructuralFeatures xsi:type="ecore:EReference" name="aggregator" eType="#//AggregatorDeclaration"/> |
213 | </eClassifiers> | ||
214 | <eClassifiers xsi:type="ecore:EEnum" name="AggregationOp"> | ||
215 | <eLiterals name="SUM"/> | ||
216 | <eLiterals name="PROD" value="1"/> | ||
217 | <eLiterals name="MIN" value="2"/> | ||
218 | <eLiterals name="MAX" value="3"/> | ||
219 | </eClassifiers> | 207 | </eClassifiers> |
220 | <eClassifiers xsi:type="ecore:EClass" name="ComparisonExpr" eSuperTypes="#//BinaryExpr"> | 208 | <eClassifiers xsi:type="ecore:EClass" name="ComparisonExpr" eSuperTypes="#//BinaryExpr"> |
221 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//ComparisonOp"/> | 209 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//ComparisonOp"/> |
@@ -225,7 +213,7 @@ | |||
225 | <eClassifiers xsi:type="ecore:EClass" name="FunctionDefinition" eSuperTypes="#//ParametricDefinition #//Relation"> | 213 | <eClassifiers xsi:type="ecore:EClass" name="FunctionDefinition" eSuperTypes="#//ParametricDefinition #//Relation"> |
226 | <eStructuralFeatures xsi:type="ecore:EReference" name="cases" upperBound="-1" | 214 | <eStructuralFeatures xsi:type="ecore:EReference" name="cases" upperBound="-1" |
227 | eType="#//Case" containment="true"/> | 215 | eType="#//Case" containment="true"/> |
228 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="functionType" eType="#//PrimitiveType"/> | 216 | <eStructuralFeatures xsi:type="ecore:EReference" name="functionType" eType="#//DatatypeDeclaration"/> |
229 | </eClassifiers> | 217 | </eClassifiers> |
230 | <eClassifiers xsi:type="ecore:EClass" name="Case" abstract="true"/> | 218 | <eClassifiers xsi:type="ecore:EClass" name="Case" abstract="true"/> |
231 | <eClassifiers xsi:type="ecore:EClass" name="Conjunction" eSuperTypes="#//Case #//ExistentialQuantifier"> | 219 | <eClassifiers xsi:type="ecore:EClass" name="Conjunction" eSuperTypes="#//Case #//ExistentialQuantifier"> |
@@ -244,22 +232,7 @@ | |||
244 | <eClassifiers xsi:type="ecore:EClass" name="NegationExpr" eSuperTypes="#//QuantifiedUnaryExpr"/> | 232 | <eClassifiers xsi:type="ecore:EClass" name="NegationExpr" eSuperTypes="#//QuantifiedUnaryExpr"/> |
245 | <eClassifiers xsi:type="ecore:EClass" name="CountExpr" eSuperTypes="#//QuantifiedUnaryExpr"/> | 233 | <eClassifiers xsi:type="ecore:EClass" name="CountExpr" eSuperTypes="#//QuantifiedUnaryExpr"/> |
246 | <eClassifiers xsi:type="ecore:EClass" name="Relation" abstract="true" eSuperTypes="#//NamedElement"/> | 234 | <eClassifiers xsi:type="ecore:EClass" name="Relation" abstract="true" eSuperTypes="#//NamedElement"/> |
247 | <eClassifiers xsi:type="ecore:EClass" name="ModalExpr" eSuperTypes="#//UnaryExpr"> | ||
248 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="modality" eType="#//Modality"/> | ||
249 | </eClassifiers> | ||
250 | <eClassifiers xsi:type="ecore:EClass" name="RangeExpr" eSuperTypes="#//BinaryExpr"/> | 235 | <eClassifiers xsi:type="ecore:EClass" name="RangeExpr" eSuperTypes="#//BinaryExpr"/> |
251 | <eClassifiers xsi:type="ecore:EClass" name="InfConstant" eSuperTypes="#//Constant"/> | ||
252 | <eClassifiers xsi:type="ecore:EClass" name="FeatureDeclaration" abstract="true" | ||
253 | eSuperTypes="#//Relation"/> | ||
254 | <eClassifiers xsi:type="ecore:EClass" name="AttributeDeclaration" eSuperTypes="#//FeatureDeclaration"> | ||
255 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="attributeType" eType="#//PrimitiveType"/> | ||
256 | </eClassifiers> | ||
257 | <eClassifiers xsi:type="ecore:EClass" name="FlagDeclaration" eSuperTypes="#//FeatureDeclaration"/> | ||
258 | <eClassifiers xsi:type="ecore:EEnum" name="PrimitiveType"> | ||
259 | <eLiterals name="INT"/> | ||
260 | <eLiterals name="REAL" value="1"/> | ||
261 | <eLiterals name="STRING" value="2"/> | ||
262 | </eClassifiers> | ||
263 | <eClassifiers xsi:type="ecore:EClass" name="LogicConstant" eSuperTypes="#//Constant"> | 236 | <eClassifiers xsi:type="ecore:EClass" name="LogicConstant" eSuperTypes="#//Constant"> |
264 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="logicValue" eType="#//LogicValue"/> | 237 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="logicValue" eType="#//LogicValue"/> |
265 | </eClassifiers> | 238 | </eClassifiers> |
@@ -276,4 +249,19 @@ | |||
276 | <eStructuralFeatures xsi:type="ecore:EReference" name="importedModule" eType="#//Problem"/> | 249 | <eStructuralFeatures xsi:type="ecore:EReference" name="importedModule" eType="#//Problem"/> |
277 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | 250 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
278 | </eClassifiers> | 251 | </eClassifiers> |
252 | <eClassifiers xsi:type="ecore:EClass" name="DatatypeDeclaration" eSuperTypes="#//Relation #//Statement"/> | ||
253 | <eClassifiers xsi:type="ecore:EClass" name="LatticeBinaryExpr" eSuperTypes="#//BinaryExpr"> | ||
254 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//LatticeBinaryOp"/> | ||
255 | </eClassifiers> | ||
256 | <eClassifiers xsi:type="ecore:EEnum" name="LatticeBinaryOp"> | ||
257 | <eLiterals name="MEET"/> | ||
258 | <eLiterals name="JOIN" value="1"/> | ||
259 | </eClassifiers> | ||
260 | <eClassifiers xsi:type="ecore:EClass" name="CastExpr" eSuperTypes="#//Expr"> | ||
261 | <eStructuralFeatures xsi:type="ecore:EReference" name="body" eType="#//Expr" containment="true"/> | ||
262 | <eStructuralFeatures xsi:type="ecore:EReference" name="targetType" eType="#//Relation"/> | ||
263 | </eClassifiers> | ||
264 | <eClassifiers xsi:type="ecore:EClass" name="AssignmentExpr" eSuperTypes="#//BinaryExpr"/> | ||
265 | <eClassifiers xsi:type="ecore:EClass" name="InfiniteConstant" eSuperTypes="#//Constant"/> | ||
266 | <eClassifiers xsi:type="ecore:EClass" name="AggregatorDeclaration" eSuperTypes="#//Statement #//NamedElement"/> | ||
279 | </ecore:EPackage> | 267 | </ecore:EPackage> |
diff --git a/subprojects/language-model/src/main/resources/model/problem.genmodel b/subprojects/language-model/src/main/resources/model/problem.genmodel index 23458ee5..2a1d8522 100644 --- a/subprojects/language-model/src/main/resources/model/problem.genmodel +++ b/subprojects/language-model/src/main/resources/model/problem.genmodel | |||
@@ -16,12 +16,6 @@ | |||
16 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/UNKNOWN"/> | 16 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/UNKNOWN"/> |
17 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/ERROR"/> | 17 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/ERROR"/> |
18 | </genEnums> | 18 | </genEnums> |
19 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//Modality"> | ||
20 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/DEFAULT"/> | ||
21 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/MAY"/> | ||
22 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/MUST"/> | ||
23 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/CURRENT"/> | ||
24 | </genEnums> | ||
25 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ComparisonOp"> | 19 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ComparisonOp"> |
26 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/LESS"/> | 20 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/LESS"/> |
27 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/LESS_EQ"/> | 21 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/LESS_EQ"/> |
@@ -30,12 +24,11 @@ | |||
30 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/EQ"/> | 24 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/EQ"/> |
31 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/NOT_EQ"/> | 25 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/NOT_EQ"/> |
32 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/IN"/> | 26 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/IN"/> |
33 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/SUBSUMES"/> | 27 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/NODE_EQ"/> |
34 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/SUBSUMED_BY"/> | 28 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/NODE_NOT_EQ"/> |
35 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/ABS_EQ"/> | ||
36 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ComparisonOp/ABS_NOT_EQ"/> | ||
37 | </genEnums> | 29 | </genEnums> |
38 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ReferenceKind"> | 30 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ReferenceKind"> |
31 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/DEFAULT"/> | ||
39 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/REFERENCE"/> | 32 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/REFERENCE"/> |
40 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINMENT"/> | 33 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINMENT"/> |
41 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINER"/> | 34 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINER"/> |
@@ -50,19 +43,9 @@ | |||
50 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/MUL"/> | 43 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/MUL"/> |
51 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/DIV"/> | 44 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/DIV"/> |
52 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/POW"/> | 45 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/POW"/> |
53 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/MEET"/> | 46 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/AND"/> |
54 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/JOIN"/> | 47 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/OR"/> |
55 | </genEnums> | 48 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/XOR"/> |
56 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//AggregationOp"> | ||
57 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//AggregationOp/SUM"/> | ||
58 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//AggregationOp/PROD"/> | ||
59 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//AggregationOp/MIN"/> | ||
60 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//AggregationOp/MAX"/> | ||
61 | </genEnums> | ||
62 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//PrimitiveType"> | ||
63 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PrimitiveType/INT"/> | ||
64 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PrimitiveType/REAL"/> | ||
65 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PrimitiveType/STRING"/> | ||
66 | </genEnums> | 49 | </genEnums> |
67 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ModuleKind"> | 50 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ModuleKind"> |
68 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ModuleKind/PROBLEM"/> | 51 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ModuleKind/PROBLEM"/> |
@@ -73,6 +56,10 @@ | |||
73 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/ATOM"/> | 56 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/ATOM"/> |
74 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/MULTI"/> | 57 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/MULTI"/> |
75 | </genEnums> | 58 | </genEnums> |
59 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//LatticeBinaryOp"> | ||
60 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/MEET"/> | ||
61 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/JOIN"/> | ||
62 | </genEnums> | ||
76 | <genClasses ecoreClass="problem.ecore#//Problem"> | 63 | <genClasses ecoreClass="problem.ecore#//Problem"> |
77 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/> | 64 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/> |
78 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/> | 65 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/> |
@@ -202,7 +189,7 @@ | |||
202 | <genClasses ecoreClass="problem.ecore#//AggregationExpr"> | 189 | <genClasses ecoreClass="problem.ecore#//AggregationExpr"> |
203 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AggregationExpr/value"/> | 190 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AggregationExpr/value"/> |
204 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AggregationExpr/condition"/> | 191 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AggregationExpr/condition"/> |
205 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//AggregationExpr/op"/> | 192 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//AggregationExpr/aggregator"/> |
206 | </genClasses> | 193 | </genClasses> |
207 | <genClasses ecoreClass="problem.ecore#//ComparisonExpr"> | 194 | <genClasses ecoreClass="problem.ecore#//ComparisonExpr"> |
208 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ComparisonExpr/op"/> | 195 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ComparisonExpr/op"/> |
@@ -210,7 +197,7 @@ | |||
210 | <genClasses ecoreClass="problem.ecore#//QuantifiedUnaryExpr"/> | 197 | <genClasses ecoreClass="problem.ecore#//QuantifiedUnaryExpr"/> |
211 | <genClasses ecoreClass="problem.ecore#//FunctionDefinition"> | 198 | <genClasses ecoreClass="problem.ecore#//FunctionDefinition"> |
212 | <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//FunctionDefinition/cases"/> | 199 | <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//FunctionDefinition/cases"/> |
213 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//FunctionDefinition/functionType"/> | 200 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//FunctionDefinition/functionType"/> |
214 | </genClasses> | 201 | </genClasses> |
215 | <genClasses ecoreClass="problem.ecore#//Case"/> | 202 | <genClasses ecoreClass="problem.ecore#//Case"/> |
216 | <genClasses ecoreClass="problem.ecore#//Conjunction"> | 203 | <genClasses ecoreClass="problem.ecore#//Conjunction"> |
@@ -226,16 +213,7 @@ | |||
226 | <genClasses ecoreClass="problem.ecore#//NegationExpr"/> | 213 | <genClasses ecoreClass="problem.ecore#//NegationExpr"/> |
227 | <genClasses ecoreClass="problem.ecore#//CountExpr"/> | 214 | <genClasses ecoreClass="problem.ecore#//CountExpr"/> |
228 | <genClasses ecoreClass="problem.ecore#//Relation"/> | 215 | <genClasses ecoreClass="problem.ecore#//Relation"/> |
229 | <genClasses ecoreClass="problem.ecore#//ModalExpr"> | ||
230 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ModalExpr/modality"/> | ||
231 | </genClasses> | ||
232 | <genClasses ecoreClass="problem.ecore#//RangeExpr"/> | 216 | <genClasses ecoreClass="problem.ecore#//RangeExpr"/> |
233 | <genClasses ecoreClass="problem.ecore#//InfConstant"/> | ||
234 | <genClasses ecoreClass="problem.ecore#//FeatureDeclaration"/> | ||
235 | <genClasses ecoreClass="problem.ecore#//AttributeDeclaration"> | ||
236 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//AttributeDeclaration/attributeType"/> | ||
237 | </genClasses> | ||
238 | <genClasses ecoreClass="problem.ecore#//FlagDeclaration"/> | ||
239 | <genClasses ecoreClass="problem.ecore#//LogicConstant"> | 217 | <genClasses ecoreClass="problem.ecore#//LogicConstant"> |
240 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//LogicConstant/logicValue"/> | 218 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//LogicConstant/logicValue"/> |
241 | </genClasses> | 219 | </genClasses> |
@@ -243,5 +221,16 @@ | |||
243 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ImportStatement/importedModule"/> | 221 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ImportStatement/importedModule"/> |
244 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ImportStatement/alias"/> | 222 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ImportStatement/alias"/> |
245 | </genClasses> | 223 | </genClasses> |
224 | <genClasses ecoreClass="problem.ecore#//DatatypeDeclaration"/> | ||
225 | <genClasses ecoreClass="problem.ecore#//LatticeBinaryExpr"> | ||
226 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//LatticeBinaryExpr/op"/> | ||
227 | </genClasses> | ||
228 | <genClasses ecoreClass="problem.ecore#//CastExpr"> | ||
229 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//CastExpr/body"/> | ||
230 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//CastExpr/targetType"/> | ||
231 | </genClasses> | ||
232 | <genClasses ecoreClass="problem.ecore#//AssignmentExpr"/> | ||
233 | <genClasses ecoreClass="problem.ecore#//InfiniteConstant"/> | ||
234 | <genClasses ecoreClass="problem.ecore#//AggregatorDeclaration"/> | ||
246 | </genPackages> | 235 | </genPackages> |
247 | </genmodel:GenModel> | 236 | </genmodel:GenModel> |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java index c2bca2a5..ccfb630f 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -8,20 +8,24 @@ package tools.refinery.language.semantics; | |||
8 | import com.google.inject.Inject; | 8 | import com.google.inject.Inject; |
9 | import tools.refinery.language.library.BuiltinLibrary; | 9 | import tools.refinery.language.library.BuiltinLibrary; |
10 | import tools.refinery.language.model.problem.*; | 10 | import tools.refinery.language.model.problem.*; |
11 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; | ||
11 | import tools.refinery.language.scoping.imports.ImportCollector; | 12 | import tools.refinery.language.scoping.imports.ImportCollector; |
12 | import tools.refinery.language.semantics.internal.MutableSeed; | 13 | import tools.refinery.language.semantics.internal.MutableSeed; |
13 | import tools.refinery.language.utils.BuiltinSymbols; | 14 | import tools.refinery.language.utils.BuiltinSymbols; |
14 | import tools.refinery.language.utils.ProblemDesugarer; | ||
15 | import tools.refinery.language.utils.ProblemUtil; | 15 | import tools.refinery.language.utils.ProblemUtil; |
16 | import tools.refinery.logic.Constraint; | ||
17 | import tools.refinery.logic.dnf.InvalidClauseException; | ||
18 | import tools.refinery.logic.dnf.Query; | ||
19 | import tools.refinery.logic.dnf.RelationalQuery; | ||
20 | import tools.refinery.logic.literal.*; | ||
21 | import tools.refinery.logic.term.NodeVariable; | ||
22 | import tools.refinery.logic.term.Variable; | ||
23 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; | ||
24 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; | ||
25 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
26 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
16 | import tools.refinery.store.dse.propagation.PropagationBuilder; | 27 | import tools.refinery.store.dse.propagation.PropagationBuilder; |
17 | import tools.refinery.store.model.ModelStoreBuilder; | 28 | import tools.refinery.store.model.ModelStoreBuilder; |
18 | import tools.refinery.store.query.Constraint; | ||
19 | import tools.refinery.store.query.dnf.InvalidClauseException; | ||
20 | import tools.refinery.store.query.dnf.Query; | ||
21 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
22 | import tools.refinery.store.query.literal.*; | ||
23 | import tools.refinery.store.query.term.NodeVariable; | ||
24 | import tools.refinery.store.query.term.Variable; | ||
25 | import tools.refinery.store.reasoning.ReasoningAdapter; | 29 | import tools.refinery.store.reasoning.ReasoningAdapter; |
26 | import tools.refinery.store.reasoning.representation.PartialRelation; | 30 | import tools.refinery.store.reasoning.representation.PartialRelation; |
27 | import tools.refinery.store.reasoning.scope.ScopePropagator; | 31 | import tools.refinery.store.reasoning.scope.ScopePropagator; |
@@ -29,25 +33,21 @@ import tools.refinery.store.reasoning.seed.ModelSeed; | |||
29 | import tools.refinery.store.reasoning.seed.Seed; | 33 | import tools.refinery.store.reasoning.seed.Seed; |
30 | import tools.refinery.store.reasoning.translator.TranslationException; | 34 | import tools.refinery.store.reasoning.translator.TranslationException; |
31 | import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator; | 35 | import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator; |
32 | import tools.refinery.store.reasoning.translator.metamodel.*; | 36 | import tools.refinery.store.reasoning.translator.metamodel.Metamodel; |
37 | import tools.refinery.store.reasoning.translator.metamodel.MetamodelBuilder; | ||
38 | import tools.refinery.store.reasoning.translator.metamodel.MetamodelTranslator; | ||
39 | import tools.refinery.store.reasoning.translator.metamodel.ReferenceInfo; | ||
33 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 40 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
34 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; | 41 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; |
35 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 42 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
36 | import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity; | 43 | import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity; |
37 | import tools.refinery.store.reasoning.translator.predicate.PredicateTranslator; | 44 | import tools.refinery.store.reasoning.translator.predicate.PredicateTranslator; |
38 | import tools.refinery.store.representation.TruthValue; | ||
39 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | ||
40 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | ||
41 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
42 | import tools.refinery.store.tuple.Tuple; | 45 | import tools.refinery.store.tuple.Tuple; |
43 | 46 | ||
44 | import java.util.*; | 47 | import java.util.*; |
45 | 48 | ||
46 | public class ModelInitializer { | 49 | public class ModelInitializer { |
47 | @Inject | 50 | @Inject |
48 | private ProblemDesugarer desugarer; | ||
49 | |||
50 | @Inject | ||
51 | private SemanticsUtils semanticsUtils; | 51 | private SemanticsUtils semanticsUtils; |
52 | 52 | ||
53 | @Inject | 53 | @Inject |
@@ -56,6 +56,9 @@ public class ModelInitializer { | |||
56 | @Inject | 56 | @Inject |
57 | private ImportCollector importCollector; | 57 | private ImportCollector importCollector; |
58 | 58 | ||
59 | @Inject | ||
60 | private ImportAdapterProvider importAdapterProvider; | ||
61 | |||
59 | private Problem problem; | 62 | private Problem problem; |
60 | 63 | ||
61 | private final Set<Problem> importedProblems = new HashSet<>(); | 64 | private final Set<Problem> importedProblems = new HashSet<>(); |
@@ -93,8 +96,7 @@ public class ModelInitializer { | |||
93 | importedProblems.add(problem); | 96 | importedProblems.add(problem); |
94 | problemTrace.setProblem(problem); | 97 | problemTrace.setProblem(problem); |
95 | try { | 98 | try { |
96 | builtinSymbols = desugarer.getBuiltinSymbols(problem).orElseThrow(() -> new IllegalArgumentException( | 99 | builtinSymbols = importAdapterProvider.getBuiltinSymbols(problem); |
97 | "Problem has no builtin library")); | ||
98 | var nodeInfo = collectPartialRelation(builtinSymbols.node(), 1, TruthValue.TRUE, TruthValue.TRUE); | 100 | var nodeInfo = collectPartialRelation(builtinSymbols.node(), 1, TruthValue.TRUE, TruthValue.TRUE); |
99 | nodeRelation = nodeInfo.partialRelation(); | 101 | nodeRelation = nodeInfo.partialRelation(); |
100 | metamodelBuilder.type(nodeRelation); | 102 | metamodelBuilder.type(nodeRelation); |
@@ -202,20 +204,7 @@ public class ModelInitializer { | |||
202 | private void collectNodes() { | 204 | private void collectNodes() { |
203 | for (var importedProblem : importedProblems) { | 205 | for (var importedProblem : importedProblems) { |
204 | for (var statement : importedProblem.getStatements()) { | 206 | for (var statement : importedProblem.getStatements()) { |
205 | if (statement instanceof NodeDeclaration nodeDeclaration) { | 207 | collectNodes(statement); |
206 | for (var node : nodeDeclaration.getNodes()) { | ||
207 | collectNode(node); | ||
208 | } | ||
209 | } else if (statement instanceof ClassDeclaration classDeclaration) { | ||
210 | var newNode = classDeclaration.getNewNode(); | ||
211 | if (newNode != null) { | ||
212 | collectNode(newNode); | ||
213 | } | ||
214 | } else if (statement instanceof EnumDeclaration enumDeclaration) { | ||
215 | for (var literal : enumDeclaration.getLiterals()) { | ||
216 | collectNode(literal); | ||
217 | } | ||
218 | } | ||
219 | } | 208 | } |
220 | } | 209 | } |
221 | for (var node : problem.getNodes()) { | 210 | for (var node : problem.getNodes()) { |
@@ -223,6 +212,23 @@ public class ModelInitializer { | |||
223 | } | 212 | } |
224 | } | 213 | } |
225 | 214 | ||
215 | private void collectNodes(Statement statement) { | ||
216 | if (statement instanceof NodeDeclaration nodeDeclaration) { | ||
217 | for (var node : nodeDeclaration.getNodes()) { | ||
218 | collectNode(node); | ||
219 | } | ||
220 | } else if (statement instanceof ClassDeclaration classDeclaration) { | ||
221 | var newNode = classDeclaration.getNewNode(); | ||
222 | if (newNode != null) { | ||
223 | collectNode(newNode); | ||
224 | } | ||
225 | } else if (statement instanceof EnumDeclaration enumDeclaration) { | ||
226 | for (var literal : enumDeclaration.getLiterals()) { | ||
227 | collectNode(literal); | ||
228 | } | ||
229 | } | ||
230 | } | ||
231 | |||
226 | private void collectNode(Node node) { | 232 | private void collectNode(Node node) { |
227 | problemTrace.collectNode(node); | 233 | problemTrace.collectNode(node); |
228 | } | 234 | } |
@@ -243,15 +249,14 @@ public class ModelInitializer { | |||
243 | 249 | ||
244 | private void collectClassDeclarationSymbols(ClassDeclaration classDeclaration) { | 250 | private void collectClassDeclarationSymbols(ClassDeclaration classDeclaration) { |
245 | collectPartialRelation(classDeclaration, 1, null, TruthValue.UNKNOWN); | 251 | collectPartialRelation(classDeclaration, 1, null, TruthValue.UNKNOWN); |
246 | for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) { | 252 | for (var referenceDeclaration : classDeclaration.getFeatureDeclarations()) { |
247 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) { | 253 | if (referenceDeclaration.getReferenceType() instanceof DatatypeDeclaration) { |
248 | collectPartialRelation(referenceDeclaration, 2, null, TruthValue.UNKNOWN); | 254 | throw new TracedException(referenceDeclaration, "Attributes are not yet supported"); |
249 | var invalidMultiplicityConstraint = referenceDeclaration.getInvalidMultiplicity(); | 255 | } |
250 | if (invalidMultiplicityConstraint != null) { | 256 | collectPartialRelation(referenceDeclaration, 2, null, TruthValue.UNKNOWN); |
251 | collectPartialRelation(invalidMultiplicityConstraint, 1, TruthValue.FALSE, TruthValue.FALSE); | 257 | var invalidMultiplicityConstraint = referenceDeclaration.getInvalidMultiplicity(); |
252 | } | 258 | if (invalidMultiplicityConstraint != null) { |
253 | } else { | 259 | collectPartialRelation(invalidMultiplicityConstraint, 1, TruthValue.FALSE, TruthValue.FALSE); |
254 | throw new TracedException(featureDeclaration, "Unknown feature declaration"); | ||
255 | } | 260 | } |
256 | } | 261 | } |
257 | } | 262 | } |
@@ -319,10 +324,8 @@ public class ModelInitializer { | |||
319 | } catch (RuntimeException e) { | 324 | } catch (RuntimeException e) { |
320 | throw TracedException.addTrace(classDeclaration, e); | 325 | throw TracedException.addTrace(classDeclaration, e); |
321 | } | 326 | } |
322 | for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) { | 327 | for (var referenceDeclaration : classDeclaration.getFeatureDeclarations()) { |
323 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) { | 328 | collectReferenceDeclarationMetamodel(classDeclaration, referenceDeclaration); |
324 | collectReferenceDeclarationMetamodel(classDeclaration, referenceDeclaration); | ||
325 | } | ||
326 | } | 329 | } |
327 | } | 330 | } |
328 | 331 | ||
@@ -681,8 +684,8 @@ public class ModelInitializer { | |||
681 | var argumentList = toArgumentList(List.of(comparisonExpr.getLeft(), comparisonExpr.getRight()), | 684 | var argumentList = toArgumentList(List.of(comparisonExpr.getLeft(), comparisonExpr.getRight()), |
682 | localScope, literals); | 685 | localScope, literals); |
683 | boolean positive = switch (comparisonExpr.getOp()) { | 686 | boolean positive = switch (comparisonExpr.getOp()) { |
684 | case EQ -> true; | 687 | case NODE_EQ -> true; |
685 | case NOT_EQ -> false; | 688 | case NODE_NOT_EQ -> false; |
686 | default -> throw new TracedException( | 689 | default -> throw new TracedException( |
687 | comparisonExpr, "Unsupported operator"); | 690 | comparisonExpr, "Unsupported operator"); |
688 | }; | 691 | }; |
@@ -726,14 +729,18 @@ public class ModelInitializer { | |||
726 | private void collectScopes() { | 729 | private void collectScopes() { |
727 | for (var importedProblem : importedProblems) { | 730 | for (var importedProblem : importedProblems) { |
728 | for (var statement : importedProblem.getStatements()) { | 731 | for (var statement : importedProblem.getStatements()) { |
729 | if (statement instanceof ScopeDeclaration scopeDeclaration) { | 732 | collectScopes(statement); |
730 | for (var typeScope : scopeDeclaration.getTypeScopes()) { | 733 | } |
731 | if (typeScope.isIncrement()) { | 734 | } |
732 | collectTypeScopeIncrement(typeScope); | 735 | } |
733 | } else { | 736 | |
734 | collectTypeScope(typeScope); | 737 | private void collectScopes(Statement statement) { |
735 | } | 738 | if (statement instanceof ScopeDeclaration scopeDeclaration) { |
736 | } | 739 | for (var typeScope : scopeDeclaration.getTypeScopes()) { |
740 | if (typeScope.isIncrement()) { | ||
741 | collectTypeScopeIncrement(typeScope); | ||
742 | } else { | ||
743 | collectTypeScope(typeScope); | ||
737 | } | 744 | } |
738 | } | 745 | } |
739 | } | 746 | } |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SemanticsUtils.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SemanticsUtils.java index 9c40e6df..5e0526bc 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SemanticsUtils.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SemanticsUtils.java | |||
@@ -7,7 +7,6 @@ package tools.refinery.language.semantics; | |||
7 | 7 | ||
8 | import com.google.inject.Inject; | 8 | import com.google.inject.Inject; |
9 | import com.google.inject.Singleton; | 9 | import com.google.inject.Singleton; |
10 | import com.google.inject.name.Named; | ||
11 | import org.eclipse.emf.ecore.EClass; | 10 | import org.eclipse.emf.ecore.EClass; |
12 | import org.eclipse.emf.ecore.EObject; | 11 | import org.eclipse.emf.ecore.EObject; |
13 | import org.eclipse.emf.ecore.util.EcoreUtil; | 12 | import org.eclipse.emf.ecore.util.EcoreUtil; |
@@ -20,7 +19,6 @@ import org.eclipse.xtext.scoping.IScope; | |||
20 | import org.jetbrains.annotations.NotNull; | 19 | import org.jetbrains.annotations.NotNull; |
21 | import org.jetbrains.annotations.Nullable; | 20 | import org.jetbrains.annotations.Nullable; |
22 | import tools.refinery.language.model.problem.Problem; | 21 | import tools.refinery.language.model.problem.Problem; |
23 | import tools.refinery.language.naming.ProblemQualifiedNameProvider; | ||
24 | 22 | ||
25 | import java.util.Optional; | 23 | import java.util.Optional; |
26 | 24 | ||
@@ -30,17 +28,13 @@ public class SemanticsUtils { | |||
30 | private IQualifiedNameProvider qualifiedNameProvider; | 28 | private IQualifiedNameProvider qualifiedNameProvider; |
31 | 29 | ||
32 | @Inject | 30 | @Inject |
33 | @Named(ProblemQualifiedNameProvider.NAMED_DELEGATE) | ||
34 | private IQualifiedNameProvider delegateQualifiedNameProvider; | ||
35 | |||
36 | @Inject | ||
37 | private IQualifiedNameConverter qualifiedNameConverter; | 31 | private IQualifiedNameConverter qualifiedNameConverter; |
38 | 32 | ||
39 | @Inject | 33 | @Inject |
40 | private IResourceDescriptionsProvider resourceDescriptionsProvider; | 34 | private IResourceDescriptionsProvider resourceDescriptionsProvider; |
41 | 35 | ||
42 | public Optional<String> getNameWithoutRootPrefix(EObject eObject) { | 36 | public Optional<String> getNameWithoutRootPrefix(EObject eObject) { |
43 | var qualifiedName = delegateQualifiedNameProvider.getFullyQualifiedName(eObject); | 37 | var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(eObject); |
44 | if (qualifiedName == null) { | 38 | if (qualifiedName == null) { |
45 | return Optional.empty(); | 39 | return Optional.empty(); |
46 | } | 40 | } |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SolutionSerializer.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SolutionSerializer.java index 377a66f3..f097143f 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SolutionSerializer.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/SolutionSerializer.java | |||
@@ -21,7 +21,8 @@ import org.eclipse.xtext.resource.XtextResourceSet; | |||
21 | import org.eclipse.xtext.scoping.IScopeProvider; | 21 | import org.eclipse.xtext.scoping.IScopeProvider; |
22 | import tools.refinery.language.model.problem.*; | 22 | import tools.refinery.language.model.problem.*; |
23 | import tools.refinery.language.naming.NamingUtil; | 23 | import tools.refinery.language.naming.NamingUtil; |
24 | import tools.refinery.language.utils.ProblemDesugarer; | 24 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; |
25 | import tools.refinery.language.typesystem.SignatureProvider; | ||
25 | import tools.refinery.language.utils.ProblemUtil; | 26 | import tools.refinery.language.utils.ProblemUtil; |
26 | import tools.refinery.store.model.Model; | 27 | import tools.refinery.store.model.Model; |
27 | import tools.refinery.store.reasoning.ReasoningAdapter; | 28 | import tools.refinery.store.reasoning.ReasoningAdapter; |
@@ -30,7 +31,7 @@ import tools.refinery.store.reasoning.literal.Concreteness; | |||
30 | import tools.refinery.store.reasoning.representation.PartialRelation; | 31 | import tools.refinery.store.reasoning.representation.PartialRelation; |
31 | import tools.refinery.store.reasoning.translator.typehierarchy.InferredType; | 32 | import tools.refinery.store.reasoning.translator.typehierarchy.InferredType; |
32 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; | 33 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; |
33 | import tools.refinery.store.representation.TruthValue; | 34 | import tools.refinery.logic.term.truthvalue.TruthValue; |
34 | import tools.refinery.store.tuple.Tuple; | 35 | import tools.refinery.store.tuple.Tuple; |
35 | 36 | ||
36 | import java.io.ByteArrayInputStream; | 37 | import java.io.ByteArrayInputStream; |
@@ -57,10 +58,13 @@ public class SolutionSerializer { | |||
57 | private IScopeProvider scopeProvider; | 58 | private IScopeProvider scopeProvider; |
58 | 59 | ||
59 | @Inject | 60 | @Inject |
60 | private ProblemDesugarer desugarer; | 61 | private NodeNameProvider nameProvider; |
61 | 62 | ||
62 | @Inject | 63 | @Inject |
63 | private NodeNameProvider nameProvider; | 64 | private ImportAdapterProvider importAdapterProvider; |
65 | |||
66 | @Inject | ||
67 | private SignatureProvider signatureProvider; | ||
64 | 68 | ||
65 | private ProblemTrace trace; | 69 | private ProblemTrace trace; |
66 | private Model model; | 70 | private Model model; |
@@ -223,8 +227,7 @@ public class SolutionSerializer { | |||
223 | } | 227 | } |
224 | 228 | ||
225 | private void addExistsAssertions() { | 229 | private void addExistsAssertions() { |
226 | var builtinSymbols = desugarer.getBuiltinSymbols(problem).orElseThrow(() -> new IllegalStateException("No " + | 230 | var builtinSymbols = importAdapterProvider.getBuiltinSymbols(problem); |
227 | "builtin library in copied problem")); | ||
228 | // Make sure to output exists assertions in a deterministic order. | 231 | // Make sure to output exists assertions in a deterministic order. |
229 | var sortedNewNodes = new TreeMap<Integer, Node>(); | 232 | var sortedNewNodes = new TreeMap<Integer, Node>(); |
230 | for (var pair : trace.getNodeTrace().keyValuesView()) { | 233 | for (var pair : trace.getNodeTrace().keyValuesView()) { |
@@ -336,7 +339,7 @@ public class SolutionSerializer { | |||
336 | var assertion = ProblemFactory.eINSTANCE.createAssertion(); | 339 | var assertion = ProblemFactory.eINSTANCE.createAssertion(); |
337 | assertion.setDefault(true); | 340 | assertion.setDefault(true); |
338 | assertion.setRelation(relation); | 341 | assertion.setRelation(relation); |
339 | int arity = ProblemUtil.getArity(relation); | 342 | int arity = signatureProvider.getArity(relation); |
340 | for (int i = 0; i < arity; i++) { | 343 | for (int i = 0; i < arity; i++) { |
341 | var argument = ProblemFactory.eINSTANCE.createWildcardAssertionArgument(); | 344 | var argument = ProblemFactory.eINSTANCE.createWildcardAssertionArgument(); |
342 | assertion.getArguments().add(argument); | 345 | assertion.getArguments().add(argument); |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTree.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTree.java index 5d25f148..8aa1af28 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTree.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTree.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.language.semantics.internal; | |||
7 | 7 | ||
8 | import org.eclipse.collections.api.factory.primitive.IntObjectMaps; | 8 | import org.eclipse.collections.api.factory.primitive.IntObjectMaps; |
9 | import tools.refinery.store.map.Cursor; | 9 | import tools.refinery.store.map.Cursor; |
10 | import tools.refinery.store.representation.TruthValue; | 10 | import tools.refinery.logic.term.truthvalue.TruthValue; |
11 | import tools.refinery.store.tuple.Tuple; | 11 | import tools.refinery.store.tuple.Tuple; |
12 | 12 | ||
13 | class DecisionTree implements MutableSeed<TruthValue> { | 13 | class DecisionTree implements MutableSeed<TruthValue> { |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeCursor.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeCursor.java index 71b54cbd..8b8fed36 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeCursor.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeCursor.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.language.semantics.internal; | 6 | package tools.refinery.language.semantics.internal; |
7 | 7 | ||
8 | import tools.refinery.store.map.Cursor; | 8 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | import java.util.ArrayDeque; | 12 | import java.util.ArrayDeque; |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeNode.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeNode.java index 31d6fc78..eb79e0c8 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeNode.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeNode.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.language.semantics.internal; | |||
7 | 7 | ||
8 | import org.eclipse.collections.api.LazyIntIterable; | 8 | import org.eclipse.collections.api.LazyIntIterable; |
9 | import tools.refinery.store.tuple.Tuple; | 9 | import tools.refinery.store.tuple.Tuple; |
10 | import tools.refinery.store.representation.TruthValue; | 10 | import tools.refinery.logic.term.truthvalue.TruthValue; |
11 | 11 | ||
12 | abstract class DecisionTreeNode { | 12 | abstract class DecisionTreeNode { |
13 | public DecisionTreeValue getReducedValue() { | 13 | public DecisionTreeValue getReducedValue() { |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java index 5053e7ac..a6b55989 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.language.semantics.internal; | 6 | package tools.refinery.language.semantics.internal; |
7 | 7 | ||
8 | import tools.refinery.store.representation.TruthValue; | 8 | import tools.refinery.logic.term.truthvalue.TruthValue; |
9 | 9 | ||
10 | public enum DecisionTreeValue { | 10 | public enum DecisionTreeValue { |
11 | UNSET(null), | 11 | UNSET(null), |
@@ -25,7 +25,7 @@ public enum DecisionTreeValue { | |||
25 | } | 25 | } |
26 | 26 | ||
27 | public TruthValue merge(TruthValue other) { | 27 | public TruthValue merge(TruthValue other) { |
28 | return truthValue == null ? other : truthValue.merge(other); | 28 | return truthValue == null ? other : truthValue.meet(other); |
29 | } | 29 | } |
30 | 30 | ||
31 | public DecisionTreeValue overwrite(DecisionTreeValue other) { | 31 | public DecisionTreeValue overwrite(DecisionTreeValue other) { |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/IntermediateNode.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/IntermediateNode.java index 2ad216ce..8942068c 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/IntermediateNode.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/IntermediateNode.java | |||
@@ -10,7 +10,7 @@ import org.eclipse.collections.api.factory.primitive.IntObjectMaps; | |||
10 | import org.eclipse.collections.api.map.primitive.MutableIntObjectMap; | 10 | import org.eclipse.collections.api.map.primitive.MutableIntObjectMap; |
11 | import org.eclipse.collections.api.tuple.primitive.IntObjectPair; | 11 | import org.eclipse.collections.api.tuple.primitive.IntObjectPair; |
12 | import tools.refinery.store.tuple.Tuple; | 12 | import tools.refinery.store.tuple.Tuple; |
13 | import tools.refinery.store.representation.TruthValue; | 13 | import tools.refinery.logic.term.truthvalue.TruthValue; |
14 | 14 | ||
15 | final class IntermediateNode extends DecisionTreeNode { | 15 | final class IntermediateNode extends DecisionTreeNode { |
16 | private final MutableIntObjectMap<DecisionTreeNode> children; | 16 | private final MutableIntObjectMap<DecisionTreeNode> children; |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/MutableSeed.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/MutableSeed.java index 693b9e1f..85611059 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/MutableSeed.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/MutableSeed.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.language.semantics.internal; | 6 | package tools.refinery.language.semantics.internal; |
7 | 7 | ||
8 | import tools.refinery.store.reasoning.seed.Seed; | 8 | import tools.refinery.store.reasoning.seed.Seed; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | public interface MutableSeed<T> extends Seed<T> { | 12 | public interface MutableSeed<T> extends Seed<T> { |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/NullaryMutableSeed.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/NullaryMutableSeed.java index f100c5a6..09107a37 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/NullaryMutableSeed.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/NullaryMutableSeed.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.language.semantics.internal; | |||
7 | 7 | ||
8 | import tools.refinery.store.map.Cursor; | 8 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.map.Cursors; | 9 | import tools.refinery.store.map.Cursors; |
10 | import tools.refinery.store.representation.TruthValue; | 10 | import tools.refinery.logic.term.truthvalue.TruthValue; |
11 | import tools.refinery.store.tuple.Tuple; | 11 | import tools.refinery.store.tuple.Tuple; |
12 | 12 | ||
13 | class NullaryMutableSeed implements MutableSeed<TruthValue> { | 13 | class NullaryMutableSeed implements MutableSeed<TruthValue> { |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java index dc501479..75933fe4 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java | |||
@@ -10,7 +10,7 @@ import org.eclipse.collections.api.factory.primitive.IntObjectMaps; | |||
10 | import org.eclipse.collections.api.map.primitive.MutableIntObjectMap; | 10 | import org.eclipse.collections.api.map.primitive.MutableIntObjectMap; |
11 | import org.eclipse.collections.api.tuple.primitive.IntObjectPair; | 11 | import org.eclipse.collections.api.tuple.primitive.IntObjectPair; |
12 | import tools.refinery.store.tuple.Tuple; | 12 | import tools.refinery.store.tuple.Tuple; |
13 | import tools.refinery.store.representation.TruthValue; | 13 | import tools.refinery.logic.term.truthvalue.TruthValue; |
14 | 14 | ||
15 | class TerminalNode extends DecisionTreeNode { | 15 | class TerminalNode extends DecisionTreeNode { |
16 | private MutableIntObjectMap<TruthValue> children; | 16 | private MutableIntObjectMap<TruthValue> children; |
@@ -48,7 +48,7 @@ class TerminalNode extends DecisionTreeNode { | |||
48 | protected void mergeAllValues(int nextLevel, Tuple tuple, TruthValue value) { | 48 | protected void mergeAllValues(int nextLevel, Tuple tuple, TruthValue value) { |
49 | otherwise = DecisionTreeValue.fromTruthValue(otherwise.merge(value)); | 49 | otherwise = DecisionTreeValue.fromTruthValue(otherwise.merge(value)); |
50 | children = IntObjectMaps.mutable.from(children.keyValuesView(), IntObjectPair::getOne, | 50 | children = IntObjectMaps.mutable.from(children.keyValuesView(), IntObjectPair::getOne, |
51 | pair -> pair.getTwo().merge(value)); | 51 | pair -> pair.getTwo().meet(value)); |
52 | reduceChildren(); | 52 | reduceChildren(); |
53 | } | 53 | } |
54 | 54 | ||
diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/CountPropagationTest.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/CountPropagationTest.java index b679c1ef..207bc7ff 100644 --- a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/CountPropagationTest.java +++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/CountPropagationTest.java | |||
@@ -19,8 +19,8 @@ import tools.refinery.store.reasoning.seed.ModelSeed; | |||
19 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 19 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
20 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy; | 20 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy; |
21 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; | 21 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; |
22 | import tools.refinery.store.representation.TruthValue; | 22 | import tools.refinery.logic.term.truthvalue.TruthValue; |
23 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 23 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
24 | import tools.refinery.store.tuple.Tuple; | 24 | import tools.refinery.store.tuple.Tuple; |
25 | 25 | ||
26 | import static org.hamcrest.MatcherAssert.assertThat; | 26 | import static org.hamcrest.MatcherAssert.assertThat; |
diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/internal/DecisionTreeTests.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/internal/DecisionTreeTests.java index 61ce850f..cb0885c1 100644 --- a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/internal/DecisionTreeTests.java +++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/internal/DecisionTreeTests.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.language.semantics.internal; | 6 | package tools.refinery.language.semantics.internal; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | import java.util.LinkedHashMap; | 12 | import java.util.LinkedHashMap; |
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/MetadataCreator.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/MetadataCreator.java index 1858fc87..91008919 100644 --- a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/MetadataCreator.java +++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/MetadataCreator.java | |||
@@ -7,7 +7,6 @@ package tools.refinery.language.web.semantics.metadata; | |||
7 | 7 | ||
8 | import com.google.inject.Inject; | 8 | import com.google.inject.Inject; |
9 | import com.google.inject.Provider; | 9 | import com.google.inject.Provider; |
10 | import com.google.inject.name.Named; | ||
11 | import org.eclipse.emf.ecore.EObject; | 10 | import org.eclipse.emf.ecore.EObject; |
12 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | 11 | import org.eclipse.xtext.naming.IQualifiedNameConverter; |
13 | import org.eclipse.xtext.naming.IQualifiedNameProvider; | 12 | import org.eclipse.xtext.naming.IQualifiedNameProvider; |
@@ -15,7 +14,6 @@ import org.eclipse.xtext.naming.QualifiedName; | |||
15 | import org.eclipse.xtext.scoping.IScope; | 14 | import org.eclipse.xtext.scoping.IScope; |
16 | import org.eclipse.xtext.scoping.IScopeProvider; | 15 | import org.eclipse.xtext.scoping.IScopeProvider; |
17 | import tools.refinery.language.model.problem.*; | 16 | import tools.refinery.language.model.problem.*; |
18 | import tools.refinery.language.naming.ProblemQualifiedNameProvider; | ||
19 | import tools.refinery.language.semantics.ProblemTrace; | 17 | import tools.refinery.language.semantics.ProblemTrace; |
20 | import tools.refinery.language.semantics.TracedException; | 18 | import tools.refinery.language.semantics.TracedException; |
21 | import tools.refinery.language.utils.ProblemUtil; | 19 | import tools.refinery.language.utils.ProblemUtil; |
@@ -34,7 +32,6 @@ public class MetadataCreator { | |||
34 | private IScopeProvider scopeProvider; | 32 | private IScopeProvider scopeProvider; |
35 | 33 | ||
36 | @Inject | 34 | @Inject |
37 | @Named(ProblemQualifiedNameProvider.NAMED_DELEGATE) | ||
38 | private IQualifiedNameProvider qualifiedNameProvider; | 35 | private IQualifiedNameProvider qualifiedNameProvider; |
39 | 36 | ||
40 | @Inject | 37 | @Inject |
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/NodeMetadataFactory.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/NodeMetadataFactory.java index ce0e50c1..f469d2dd 100644 --- a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/NodeMetadataFactory.java +++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/metadata/NodeMetadataFactory.java | |||
@@ -17,7 +17,7 @@ import tools.refinery.store.reasoning.literal.Concreteness; | |||
17 | import tools.refinery.store.reasoning.representation.PartialRelation; | 17 | import tools.refinery.store.reasoning.representation.PartialRelation; |
18 | import tools.refinery.store.reasoning.translator.typehierarchy.InferredType; | 18 | import tools.refinery.store.reasoning.translator.typehierarchy.InferredType; |
19 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; | 19 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; |
20 | import tools.refinery.store.representation.TruthValue; | 20 | import tools.refinery.logic.term.truthvalue.TruthValue; |
21 | import tools.refinery.store.tuple.Tuple; | 21 | import tools.refinery.store.tuple.Tuple; |
22 | 22 | ||
23 | public class NodeMetadataFactory { | 23 | public class NodeMetadataFactory { |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext b/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext index f0d6c38c..08f7a585 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext +++ b/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext | |||
@@ -17,7 +17,8 @@ enum ModuleKind: | |||
17 | 17 | ||
18 | Statement: | 18 | Statement: |
19 | ImportStatement | Assertion | ClassDeclaration | EnumDeclaration | | 19 | ImportStatement | Assertion | ClassDeclaration | EnumDeclaration | |
20 | PredicateDefinition | /* FunctionDefinition | RuleDefinition | */ | 20 | DatatypeDeclaration | AggregatorDeclaration | PredicateDefinition | |
21 | /* FunctionDefinition | RuleDefinition | */ | ||
21 | ScopeDeclaration | NodeDeclaration; | 22 | ScopeDeclaration | NodeDeclaration; |
22 | 23 | ||
23 | ImportStatement: | 24 | ImportStatement: |
@@ -27,7 +28,7 @@ ClassDeclaration: | |||
27 | abstract?="abstract"? "class" | 28 | abstract?="abstract"? "class" |
28 | name=Identifier | 29 | name=Identifier |
29 | ("extends" superTypes+=[Relation|QualifiedName] ("," superTypes+=[Relation|QualifiedName])*)? | 30 | ("extends" superTypes+=[Relation|QualifiedName] ("," superTypes+=[Relation|QualifiedName])*)? |
30 | ("{" (featureDeclarations+=FeatureDeclaration ";"?)* "}" | "."); | 31 | ("{" (featureDeclarations+=ReferenceDeclaration ";"?)* "}" | "."); |
31 | 32 | ||
32 | EnumDeclaration: | 33 | EnumDeclaration: |
33 | "enum" | 34 | "enum" |
@@ -37,8 +38,11 @@ EnumDeclaration: | |||
37 | EnumLiteral returns Node: | 38 | EnumLiteral returns Node: |
38 | name=Identifier; | 39 | name=Identifier; |
39 | 40 | ||
40 | FeatureDeclaration: | 41 | DatatypeDeclaration: |
41 | ReferenceDeclaration /* | AttributeDeclaration | FlagDeclaration */; | 42 | "extern" "datatype" name=Identifier "."; |
43 | |||
44 | AggregatorDeclaration: | ||
45 | "extern" "aggregator" name=Identifier "."; | ||
42 | 46 | ||
43 | enum ReferenceKind: | 47 | enum ReferenceKind: |
44 | REFERENCE="refers" | CONTAINMENT="contains" | CONTAINER="container"; | 48 | REFERENCE="refers" | CONTAINMENT="contains" | CONTAINER="container"; |
@@ -53,15 +57,6 @@ ReferenceDeclaration: | |||
53 | ReferenceMultiplicity returns Multiplicity: | 57 | ReferenceMultiplicity returns Multiplicity: |
54 | "[" Multiplicity "]"; | 58 | "[" Multiplicity "]"; |
55 | 59 | ||
56 | //enum PrimitiveType: | ||
57 | // INT="int" | REAL="real" | STRING="string"; | ||
58 | // | ||
59 | //AttributeDeclaration: | ||
60 | // attributeType=PrimitiveType name=Identifier; | ||
61 | // | ||
62 | //FlagDeclaration: | ||
63 | // "bool" name=Identifier; | ||
64 | |||
65 | PredicateDefinition: | 60 | PredicateDefinition: |
66 | ("pred" | error?="error" "pred"?) | 61 | ("pred" | error?="error" "pred"?) |
67 | name=Identifier | 62 | name=Identifier |
@@ -73,14 +68,13 @@ Conjunction: | |||
73 | literals+=Expr ("," literals+=Expr)*; | 68 | literals+=Expr ("," literals+=Expr)*; |
74 | 69 | ||
75 | //FunctionDefinition: | 70 | //FunctionDefinition: |
76 | // "fn" functionType=PrimitiveType name=Identifier | 71 | // "fn" functionType=[DatatypeDefinition|QualifiedName] name=Identifier |
77 | // "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" | 72 | // "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" |
78 | // ("=" cases+=Case (";" cases+=Case)*)? | 73 | // ("=" cases+=Case (";" cases+=Case)*)? |
79 | // "."; | 74 | // "."; |
80 | // | 75 | // |
81 | //Case: | 76 | //Case: |
82 | // Conjunction ({Match.condition=current} "->" value=Expr)?; | 77 | // Conjunction ({Match.condition=current} "->" value=Expr)?; |
83 | |||
84 | //RuleDefinition: | 78 | //RuleDefinition: |
85 | // "rule" | 79 | // "rule" |
86 | // name=Identifier | 80 | // name=Identifier |
@@ -112,25 +106,32 @@ Parameter: | |||
112 | // name=Identifier; | 106 | // name=Identifier; |
113 | 107 | ||
114 | Expr: | 108 | Expr: |
115 | ComparisonExpr; | 109 | AssignmentExpr; |
110 | |||
111 | AssignmentExpr returns Expr: | ||
112 | BooleanExpr ({AssignmentExpr.left=current} "is" right=BooleanExpr)*; | ||
113 | |||
114 | enum BooleanBinaryOp returns BinaryOp: | ||
115 | AND="&&" | OR="||" | XOR="^^"; | ||
116 | |||
117 | BooleanExpr returns Expr: | ||
118 | ComparisonExpr ({ArithmeticBinaryExpr.left=current} | ||
119 | op=BooleanBinaryOp right=ComparisonExpr)*; | ||
116 | 120 | ||
117 | enum ComparisonOp: | 121 | enum ComparisonOp: |
118 | LESS="<" | LESS_EQ="<=" | GREATER=">" | GREATER_EQ=">=" | EQ="==" | NOT_EQ="!=" | | 122 | LESS="<" | LESS_EQ="<=" | GREATER=">" | GREATER_EQ=">=" | EQ="===" | NOT_EQ="!==" | |
119 | IN="in" | SUBSUMES=":>" | SUBSUMED_BY="<:" | ABS_EQ="===" | ABS_NOT_EQ="!=="; | 123 | IN="in" | NODE_EQ="==" | NODE_NOT_EQ="!="; |
120 | 124 | ||
121 | ComparisonExpr returns Expr: | 125 | ComparisonExpr returns Expr: |
122 | LatticeExpr ({ComparisonExpr.left=current} | 126 | LatticeExpr ({ComparisonExpr.left=current} |
123 | op=ComparisonOp right=LatticeExpr)*; | 127 | op=ComparisonOp right=LatticeExpr)*; |
124 | 128 | ||
125 | enum LatticeOp returns BinaryOp: | 129 | enum LatticeBinaryOp: |
126 | MEET="/\\" | JOIN="\\/"; | 130 | MEET="/\\" | JOIN="\\/"; |
127 | 131 | ||
128 | LatticeExpr returns Expr: | 132 | LatticeExpr returns Expr: |
129 | RangeExpr ({ArithmeticBinaryExpr.left=current} | 133 | AdditiveExpr ({LatticeBinaryExpr.left=current} |
130 | op=LatticeOp right=RangeExpr)*; | 134 | op=LatticeBinaryOp right=AdditiveExpr)*; |
131 | |||
132 | RangeExpr returns Expr: | ||
133 | AdditiveExpr ({RangeExpr.left=current} ".." right=AdditiveExpr)*; | ||
134 | 135 | ||
135 | enum AdditiveOp returns BinaryOp: | 136 | enum AdditiveOp returns BinaryOp: |
136 | ADD="+" | SUB="-"; | 137 | ADD="+" | SUB="-"; |
@@ -150,12 +151,15 @@ enum ExponentialOp returns BinaryOp: | |||
150 | POW="**"; | 151 | POW="**"; |
151 | 152 | ||
152 | ExponentialExpr returns Expr: | 153 | ExponentialExpr returns Expr: |
153 | UnaryExpr ({ArithmeticBinaryExpr.left=current} | 154 | RangeExpr ({ArithmeticBinaryExpr.left=current} |
154 | op=ExponentialOp right=ExponentialExpr)?; | 155 | op=ExponentialOp right=ExponentialExpr)?; |
155 | 156 | ||
157 | RangeExpr returns Expr: | ||
158 | UnaryExpr ({RangeExpr.left=current} ".." right=UnaryExpr)*; | ||
159 | |||
156 | UnaryExpr returns Expr: | 160 | UnaryExpr returns Expr: |
157 | ArithmeticUnaryExpr | ModalExpr | NegationExpr | CountExpr | AggregationExpr | | 161 | ArithmeticUnaryExpr | NegationExpr | |
158 | Atom | VariableOrNodeExpr | Constant | "(" Expr ")"; | 162 | CountExpr | AggregationExpr | CastExpr; |
159 | 163 | ||
160 | enum UnaryOp: | 164 | enum UnaryOp: |
161 | PLUS="+" | MINUS="-"; | 165 | PLUS="+" | MINUS="-"; |
@@ -163,23 +167,21 @@ enum UnaryOp: | |||
163 | ArithmeticUnaryExpr: | 167 | ArithmeticUnaryExpr: |
164 | op=UnaryOp body=UnaryExpr; | 168 | op=UnaryOp body=UnaryExpr; |
165 | 169 | ||
166 | enum Modality: | ||
167 | MAY="may" | MUST="must" | CURRENT="current"; | ||
168 | |||
169 | ModalExpr: | ||
170 | modality=Modality body=UnaryExpr; | ||
171 | |||
172 | NegationExpr: | 170 | NegationExpr: |
173 | "!" body=UnaryExpr; | 171 | "!" body=UnaryExpr; |
174 | 172 | ||
175 | CountExpr: | 173 | CountExpr: |
176 | "count" body=UnaryExpr; | 174 | "count" body=UnaryExpr; |
177 | 175 | ||
178 | enum AggregationOp: | ||
179 | SUM="sum" | PROD="prod" | MIN="min" | MAX="max"; | ||
180 | |||
181 | AggregationExpr: | 176 | AggregationExpr: |
182 | op=AggregationOp "{" value=Expr "|" condition=Expr "}"; | 177 | aggregator=[AggregatorDeclaration|QualifiedName] |
178 | "{" value=Expr "|" condition=ComparisonExpr "}"; | ||
179 | |||
180 | CastExpr returns Expr: | ||
181 | CastExprBody ({CastExpr.body=current} "as" targetType=[Relation|QualifiedName])?; | ||
182 | |||
183 | CastExprBody returns Expr: | ||
184 | Atom | VariableOrNodeExpr | Constant | "(" Expr ")"; | ||
183 | 185 | ||
184 | Atom: | 186 | Atom: |
185 | relation=[Relation|QualifiedName] | 187 | relation=[Relation|QualifiedName] |
@@ -190,7 +192,7 @@ VariableOrNodeExpr: | |||
190 | variableOrNode=[VariableOrNode|QualifiedName]; | 192 | variableOrNode=[VariableOrNode|QualifiedName]; |
191 | 193 | ||
192 | Constant: | 194 | Constant: |
193 | RealConstant | IntConstant | InfConstant | StringConstant | LogicConstant; | 195 | RealConstant | IntConstant | StringConstant | InfiniteConstant | LogicConstant; |
194 | 196 | ||
195 | IntConstant: | 197 | IntConstant: |
196 | intValue=INT; | 198 | intValue=INT; |
@@ -198,12 +200,12 @@ IntConstant: | |||
198 | RealConstant: | 200 | RealConstant: |
199 | realValue=Real; | 201 | realValue=Real; |
200 | 202 | ||
201 | InfConstant: | ||
202 | {InfConstant} "*"; | ||
203 | |||
204 | StringConstant: | 203 | StringConstant: |
205 | stringValue=STRING; | 204 | stringValue=STRING; |
206 | 205 | ||
206 | InfiniteConstant: | ||
207 | {InfiniteConstant} "*"; | ||
208 | |||
207 | enum LogicValue: | 209 | enum LogicValue: |
208 | TRUE="true" | FALSE="false" | UNKNOWN="unknown" | ERROR="error"; | 210 | TRUE="true" | FALSE="false" | UNKNOWN="unknown" | ERROR="error"; |
209 | 211 | ||
@@ -278,8 +280,8 @@ Identifier: | |||
278 | NonContainmentIdentifier | "contains" | "container"; | 280 | NonContainmentIdentifier | "contains" | "container"; |
279 | 281 | ||
280 | NonContainmentIdentifier: | 282 | NonContainmentIdentifier: |
281 | ID | "atom" | "multi" | "contained" | | 283 | ID | "atom" | "multi" | "contained" | "problem" | "module" | |
282 | "sum" | "prod" | "min" | "max" | "problem" | "module"; | 284 | "datatype" | "aggregator"; |
283 | 285 | ||
284 | Real returns ecore::EDouble: | 286 | Real returns ecore::EDouble: |
285 | EXPONENTIAL | INT "." (INT | EXPONENTIAL); | 287 | EXPONENTIAL | INT "." (INT | EXPONENTIAL); |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/ProblemRuntimeModule.java b/subprojects/language/src/main/java/tools/refinery/language/ProblemRuntimeModule.java index f7039027..955a89f9 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/ProblemRuntimeModule.java +++ b/subprojects/language/src/main/java/tools/refinery/language/ProblemRuntimeModule.java | |||
@@ -30,9 +30,8 @@ import org.eclipse.xtext.validation.IResourceValidator; | |||
30 | import org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator; | 30 | import org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator; |
31 | import tools.refinery.language.conversion.ProblemValueConverterService; | 31 | import tools.refinery.language.conversion.ProblemValueConverterService; |
32 | import tools.refinery.language.linking.ProblemLinkingService; | 32 | import tools.refinery.language.linking.ProblemLinkingService; |
33 | import tools.refinery.language.naming.ProblemDelegateQualifiedNameProvider; | ||
34 | import tools.refinery.language.naming.ProblemQualifiedNameConverter; | ||
35 | import tools.refinery.language.naming.ProblemQualifiedNameProvider; | 33 | import tools.refinery.language.naming.ProblemQualifiedNameProvider; |
34 | import tools.refinery.language.naming.ProblemQualifiedNameConverter; | ||
36 | import tools.refinery.language.parser.ProblemEcoreElementFactory; | 35 | import tools.refinery.language.parser.ProblemEcoreElementFactory; |
37 | import tools.refinery.language.parser.antlr.TokenSourceInjectingProblemParser; | 36 | import tools.refinery.language.parser.antlr.TokenSourceInjectingProblemParser; |
38 | import tools.refinery.language.resource.ProblemLocationInFileProvider; | 37 | import tools.refinery.language.resource.ProblemLocationInFileProvider; |
@@ -68,12 +67,6 @@ public class ProblemRuntimeModule extends AbstractProblemRuntimeModule { | |||
68 | return ProblemQualifiedNameConverter.class; | 67 | return ProblemQualifiedNameConverter.class; |
69 | } | 68 | } |
70 | 69 | ||
71 | public void configureIQualifiedNameProviderDelegate(Binder binder) { | ||
72 | binder.bind(IQualifiedNameProvider.class) | ||
73 | .annotatedWith(Names.named(ProblemQualifiedNameProvider.NAMED_DELEGATE)) | ||
74 | .to(ProblemDelegateQualifiedNameProvider.class); | ||
75 | } | ||
76 | |||
77 | @Override | 70 | @Override |
78 | public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() { | 71 | public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() { |
79 | return ProblemQualifiedNameProvider.class; | 72 | return ProblemQualifiedNameProvider.class; |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/expressions/AbstractTermInterpreter.java b/subprojects/language/src/main/java/tools/refinery/language/expressions/AbstractTermInterpreter.java new file mode 100644 index 00000000..2530b707 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/expressions/AbstractTermInterpreter.java | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.expressions; | ||
7 | |||
8 | import tools.refinery.language.model.problem.BinaryOp; | ||
9 | import tools.refinery.language.model.problem.UnaryOp; | ||
10 | import tools.refinery.language.typesystem.AggregatorName; | ||
11 | import tools.refinery.language.typesystem.DataExprType; | ||
12 | |||
13 | import java.util.*; | ||
14 | |||
15 | // This class is used to configure term interpreters by clients with various arguments. | ||
16 | @SuppressWarnings("SameParameterValue") | ||
17 | public abstract class AbstractTermInterpreter implements TermInterpreter { | ||
18 | private final Map<DataExprType, DataExprType> negations = new HashMap<>(); | ||
19 | private final Map<UnaryKey, DataExprType> unaryOperators = new HashMap<>(); | ||
20 | private final Set<DataExprType> comparisons = new HashSet<>(); | ||
21 | private final Set<DataExprType> ranges = new HashSet<>(); | ||
22 | private final Map<BinaryKey, DataExprType> binaryOperators = new HashMap<>(); | ||
23 | private final Set<CastKey> casts = new HashSet<>(); | ||
24 | private final Map<AggregatorKey, DataExprType> aggregators = new HashMap<>(); | ||
25 | |||
26 | protected AbstractTermInterpreter() { | ||
27 | } | ||
28 | |||
29 | protected void addNegation(DataExprType type, DataExprType result) { | ||
30 | negations.put(type, result); | ||
31 | } | ||
32 | |||
33 | protected void addNegation(DataExprType type) { | ||
34 | addNegation(type, type); | ||
35 | } | ||
36 | |||
37 | protected void addUnaryOperator(UnaryOp op, DataExprType type, DataExprType result) { | ||
38 | unaryOperators.put(new UnaryKey(op, type), result); | ||
39 | } | ||
40 | |||
41 | protected void addUnaryOperator(UnaryOp op, DataExprType type) { | ||
42 | addUnaryOperator(op, type, type); | ||
43 | } | ||
44 | |||
45 | protected void addComparison(DataExprType type) { | ||
46 | comparisons.add(type); | ||
47 | } | ||
48 | |||
49 | protected void addRange(DataExprType type) { | ||
50 | ranges.add(type); | ||
51 | } | ||
52 | |||
53 | protected void addBinaryOperator(BinaryOp op, DataExprType leftType, DataExprType rightType, DataExprType result) { | ||
54 | binaryOperators.put(new BinaryKey(op, leftType, rightType), result); | ||
55 | } | ||
56 | |||
57 | protected void addBinaryOperator(BinaryOp op, DataExprType type) { | ||
58 | addBinaryOperator(op, type, type, type); | ||
59 | } | ||
60 | |||
61 | protected void addCast(DataExprType fromType, DataExprType toType) { | ||
62 | if (fromType.equals(toType)) { | ||
63 | throw new IllegalArgumentException("The fromType and toType of a cast operator must be different"); | ||
64 | } | ||
65 | casts.add(new CastKey(fromType, toType)); | ||
66 | } | ||
67 | |||
68 | protected void addAggregator(AggregatorName aggregator, DataExprType type, DataExprType result) { | ||
69 | aggregators.put(new AggregatorKey(aggregator, type), result); | ||
70 | } | ||
71 | |||
72 | protected void addAggregator(AggregatorName aggregator, DataExprType type) { | ||
73 | addAggregator(aggregator, type, type); | ||
74 | } | ||
75 | |||
76 | @Override | ||
77 | public Optional<DataExprType> getNegationType(DataExprType type) { | ||
78 | return Optional.ofNullable(negations.get(type)); | ||
79 | } | ||
80 | |||
81 | @Override | ||
82 | public Optional<DataExprType> getUnaryOperationType(UnaryOp op, DataExprType type) { | ||
83 | if (unaryOperators.isEmpty()) { | ||
84 | return Optional.empty(); | ||
85 | } | ||
86 | return Optional.ofNullable(unaryOperators.get(new UnaryKey(op, type))); | ||
87 | } | ||
88 | |||
89 | @Override | ||
90 | public boolean isComparisonSupported(DataExprType type) { | ||
91 | return comparisons.contains(type); | ||
92 | } | ||
93 | |||
94 | @Override | ||
95 | public boolean isRangeSupported(DataExprType type) { | ||
96 | return ranges.contains(type); | ||
97 | } | ||
98 | |||
99 | @Override | ||
100 | public Optional<DataExprType> getBinaryOperationType(BinaryOp op, DataExprType leftType, DataExprType rightType) { | ||
101 | if (binaryOperators.isEmpty()) { | ||
102 | return Optional.empty(); | ||
103 | } | ||
104 | return Optional.ofNullable(binaryOperators.get(new BinaryKey(op, leftType, rightType))); | ||
105 | } | ||
106 | |||
107 | @Override | ||
108 | public Optional<DataExprType> getAggregationType(AggregatorName aggregator, DataExprType type) { | ||
109 | if (aggregators.isEmpty()) { | ||
110 | return Optional.empty(); | ||
111 | } | ||
112 | return Optional.ofNullable(aggregators.get(new AggregatorKey(aggregator, type))); | ||
113 | } | ||
114 | |||
115 | @Override | ||
116 | public boolean isCastSupported(DataExprType fromType, DataExprType toType) { | ||
117 | return casts.contains(new CastKey(fromType, toType)); | ||
118 | } | ||
119 | |||
120 | private record UnaryKey(UnaryOp op, DataExprType type) { | ||
121 | } | ||
122 | |||
123 | private record BinaryKey(BinaryOp op, DataExprType leftType, DataExprType rightType) { | ||
124 | } | ||
125 | |||
126 | private record CastKey(DataExprType fromType, DataExprType toType) { | ||
127 | } | ||
128 | |||
129 | private record AggregatorKey(AggregatorName aggregator, DataExprType type) { | ||
130 | } | ||
131 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/expressions/BuiltinTermInterpreter.java b/subprojects/language/src/main/java/tools/refinery/language/expressions/BuiltinTermInterpreter.java new file mode 100644 index 00000000..412ed8ba --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/expressions/BuiltinTermInterpreter.java | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.expressions; | ||
7 | |||
8 | import tools.refinery.language.library.BuiltinLibrary; | ||
9 | import tools.refinery.language.model.problem.BinaryOp; | ||
10 | import tools.refinery.language.model.problem.UnaryOp; | ||
11 | import tools.refinery.language.typesystem.AggregatorName; | ||
12 | import tools.refinery.language.typesystem.DataExprType; | ||
13 | |||
14 | public final class BuiltinTermInterpreter extends AbstractTermInterpreter { | ||
15 | public static final DataExprType BOOLEAN_TYPE = new DataExprType(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "boolean"); | ||
16 | public static final DataExprType INT_TYPE = new DataExprType(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "int"); | ||
17 | public static final DataExprType REAL_TYPE = new DataExprType(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "real"); | ||
18 | public static final DataExprType STRING_TYPE = new DataExprType(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "string"); | ||
19 | public static final AggregatorName MIN_AGGREGATOR = new AggregatorName(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "min"); | ||
20 | public static final AggregatorName MAX_AGGREGATOR = new AggregatorName(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "max"); | ||
21 | public static final AggregatorName SUM_AGGREGATOR = new AggregatorName(BuiltinLibrary.BUILTIN_LIBRARY_NAME, "sum"); | ||
22 | |||
23 | public BuiltinTermInterpreter() { | ||
24 | addNegation(BOOLEAN_TYPE); | ||
25 | addBinaryOperator(BinaryOp.AND, BOOLEAN_TYPE); | ||
26 | addBinaryOperator(BinaryOp.OR, BOOLEAN_TYPE); | ||
27 | addBinaryOperator(BinaryOp.XOR, BOOLEAN_TYPE); | ||
28 | |||
29 | addUnaryOperator(UnaryOp.PLUS, INT_TYPE); | ||
30 | addUnaryOperator(UnaryOp.MINUS, INT_TYPE); | ||
31 | addComparison(INT_TYPE); | ||
32 | addRange(INT_TYPE); | ||
33 | addBinaryOperator(BinaryOp.ADD, INT_TYPE); | ||
34 | addBinaryOperator(BinaryOp.SUB, INT_TYPE); | ||
35 | addBinaryOperator(BinaryOp.MUL, INT_TYPE); | ||
36 | addAggregator(MIN_AGGREGATOR, INT_TYPE); | ||
37 | addAggregator(MAX_AGGREGATOR, INT_TYPE); | ||
38 | addAggregator(SUM_AGGREGATOR, INT_TYPE); | ||
39 | |||
40 | addUnaryOperator(UnaryOp.PLUS, REAL_TYPE); | ||
41 | addUnaryOperator(UnaryOp.MINUS, REAL_TYPE); | ||
42 | addCast(INT_TYPE, REAL_TYPE); | ||
43 | addComparison(REAL_TYPE); | ||
44 | addRange(REAL_TYPE); | ||
45 | addBinaryOperator(BinaryOp.ADD, REAL_TYPE); | ||
46 | addBinaryOperator(BinaryOp.SUB, REAL_TYPE); | ||
47 | addBinaryOperator(BinaryOp.MUL, REAL_TYPE); | ||
48 | addBinaryOperator(BinaryOp.DIV, REAL_TYPE); | ||
49 | addBinaryOperator(BinaryOp.POW, REAL_TYPE); | ||
50 | addAggregator(MIN_AGGREGATOR, REAL_TYPE); | ||
51 | addAggregator(MAX_AGGREGATOR, REAL_TYPE); | ||
52 | addAggregator(SUM_AGGREGATOR, REAL_TYPE); | ||
53 | } | ||
54 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/expressions/CompositeTermInterpreter.java b/subprojects/language/src/main/java/tools/refinery/language/expressions/CompositeTermInterpreter.java new file mode 100644 index 00000000..b337e5dd --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/expressions/CompositeTermInterpreter.java | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.expressions; | ||
7 | |||
8 | import tools.refinery.language.model.problem.BinaryOp; | ||
9 | import tools.refinery.language.model.problem.UnaryOp; | ||
10 | import tools.refinery.language.typesystem.AggregatorName; | ||
11 | import tools.refinery.language.typesystem.DataExprType; | ||
12 | |||
13 | import java.util.List; | ||
14 | import java.util.Optional; | ||
15 | |||
16 | public class CompositeTermInterpreter implements TermInterpreter { | ||
17 | private final List<TermInterpreter> interpreters; | ||
18 | |||
19 | public CompositeTermInterpreter(List<TermInterpreter> interpreters) { | ||
20 | this.interpreters = interpreters; | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public Optional<DataExprType> getNegationType(DataExprType type) { | ||
25 | for (var interpreter : interpreters) { | ||
26 | var result = interpreter.getNegationType(type); | ||
27 | if (result.isPresent()) { | ||
28 | return result; | ||
29 | } | ||
30 | } | ||
31 | return Optional.empty(); | ||
32 | } | ||
33 | |||
34 | @Override | ||
35 | public Optional<DataExprType> getUnaryOperationType(UnaryOp op, DataExprType type) { | ||
36 | for (var interpreter : interpreters) { | ||
37 | var result = interpreter.getUnaryOperationType(op, type); | ||
38 | if (result.isPresent()) { | ||
39 | return result; | ||
40 | } | ||
41 | } | ||
42 | return Optional.empty(); | ||
43 | } | ||
44 | |||
45 | @Override | ||
46 | public boolean isComparisonSupported(DataExprType type) { | ||
47 | for (var interpreter : interpreters) { | ||
48 | var result = interpreter.isComparisonSupported(type); | ||
49 | if (result) { | ||
50 | return true; | ||
51 | } | ||
52 | } | ||
53 | return false; | ||
54 | } | ||
55 | |||
56 | @Override | ||
57 | public boolean isRangeSupported(DataExprType type) { | ||
58 | for (var interpreter : interpreters) { | ||
59 | var result = interpreter.isRangeSupported(type); | ||
60 | if (result) { | ||
61 | return true; | ||
62 | } | ||
63 | } | ||
64 | return false; | ||
65 | } | ||
66 | |||
67 | @Override | ||
68 | public Optional<DataExprType> getBinaryOperationType(BinaryOp op, DataExprType leftType, DataExprType rightType) { | ||
69 | for (var interpreter : interpreters) { | ||
70 | var result = interpreter.getBinaryOperationType(op, leftType, rightType); | ||
71 | if (result.isPresent()) { | ||
72 | return result; | ||
73 | } | ||
74 | } | ||
75 | return Optional.empty(); | ||
76 | } | ||
77 | |||
78 | @Override | ||
79 | public boolean isCastSupported(DataExprType fromType, DataExprType toType) { | ||
80 | for (var interpreter : interpreters) { | ||
81 | var result = interpreter.isCastSupported(fromType, toType); | ||
82 | if (result) { | ||
83 | return true; | ||
84 | } | ||
85 | } | ||
86 | return false; | ||
87 | } | ||
88 | |||
89 | @Override | ||
90 | public Optional<DataExprType> getAggregationType(AggregatorName aggregator, DataExprType type) { | ||
91 | for (var interpreter : interpreters) { | ||
92 | var result = interpreter.getAggregationType(aggregator, type); | ||
93 | if (result.isPresent()) { | ||
94 | return result; | ||
95 | } | ||
96 | } | ||
97 | return Optional.empty(); | ||
98 | } | ||
99 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/expressions/TermInterpreter.java b/subprojects/language/src/main/java/tools/refinery/language/expressions/TermInterpreter.java new file mode 100644 index 00000000..122785f2 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/expressions/TermInterpreter.java | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.expressions; | ||
7 | |||
8 | import tools.refinery.language.model.problem.BinaryOp; | ||
9 | import tools.refinery.language.model.problem.UnaryOp; | ||
10 | import tools.refinery.language.typesystem.AggregatorName; | ||
11 | import tools.refinery.language.typesystem.DataExprType; | ||
12 | |||
13 | import java.util.Optional; | ||
14 | |||
15 | public interface TermInterpreter { | ||
16 | Optional<DataExprType> getNegationType(DataExprType type); | ||
17 | |||
18 | Optional<DataExprType> getUnaryOperationType(UnaryOp op, DataExprType type); | ||
19 | |||
20 | boolean isComparisonSupported(DataExprType type); | ||
21 | |||
22 | boolean isRangeSupported(DataExprType type); | ||
23 | |||
24 | Optional<DataExprType> getBinaryOperationType(BinaryOp op, DataExprType leftType, DataExprType rightType); | ||
25 | |||
26 | boolean isCastSupported(DataExprType fromType, DataExprType toType); | ||
27 | |||
28 | Optional<DataExprType> getAggregationType(AggregatorName aggregator, DataExprType type); | ||
29 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemDelegateQualifiedNameProvider.java b/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemDelegateQualifiedNameProvider.java deleted file mode 100644 index b3931401..00000000 --- a/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemDelegateQualifiedNameProvider.java +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.naming; | ||
7 | |||
8 | import com.google.inject.Inject; | ||
9 | import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; | ||
10 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | ||
11 | import org.eclipse.xtext.naming.QualifiedName; | ||
12 | import tools.refinery.language.model.problem.Problem; | ||
13 | import tools.refinery.language.scoping.imports.ImportAdapter; | ||
14 | import tools.refinery.language.utils.ProblemUtil; | ||
15 | |||
16 | public class ProblemDelegateQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { | ||
17 | @Inject | ||
18 | private IQualifiedNameConverter qualifiedNameConverter; | ||
19 | |||
20 | protected QualifiedName qualifiedName(Problem problem) { | ||
21 | var qualifiedNameString = problem.getName(); | ||
22 | if (qualifiedNameString != null) { | ||
23 | return NamingUtil.stripRootPrefix(qualifiedNameConverter.toQualifiedName(qualifiedNameString)); | ||
24 | } | ||
25 | if (!ProblemUtil.isModule(problem)) { | ||
26 | return null; | ||
27 | } | ||
28 | var resource = problem.eResource(); | ||
29 | if (resource == null) { | ||
30 | return null; | ||
31 | } | ||
32 | var resourceUri = resource.getURI(); | ||
33 | if (resourceUri == null) { | ||
34 | return null; | ||
35 | } | ||
36 | var resourceSet = resource.getResourceSet(); | ||
37 | if (resourceSet == null) { | ||
38 | return null; | ||
39 | } | ||
40 | var adapter = ImportAdapter.getOrInstall(resourceSet); | ||
41 | // If a module has no explicitly specified name, return the qualified name it was resolved under. | ||
42 | return adapter.getQualifiedName(resourceUri); | ||
43 | } | ||
44 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemQualifiedNameProvider.java b/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemQualifiedNameProvider.java index 5b682058..2a4df4d0 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemQualifiedNameProvider.java +++ b/subprojects/language/src/main/java/tools/refinery/language/naming/ProblemQualifiedNameProvider.java | |||
@@ -6,36 +6,44 @@ | |||
6 | package tools.refinery.language.naming; | 6 | package tools.refinery.language.naming; |
7 | 7 | ||
8 | import com.google.inject.Inject; | 8 | import com.google.inject.Inject; |
9 | import com.google.inject.name.Named; | 9 | import com.google.inject.Singleton; |
10 | import org.eclipse.emf.ecore.EObject; | 10 | import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; |
11 | import org.eclipse.xtext.naming.IQualifiedNameProvider; | 11 | import org.eclipse.xtext.naming.IQualifiedNameConverter; |
12 | import org.eclipse.xtext.naming.QualifiedName; | 12 | import org.eclipse.xtext.naming.QualifiedName; |
13 | import org.eclipse.xtext.util.IResourceScopeCache; | 13 | import tools.refinery.language.model.problem.Problem; |
14 | import org.eclipse.xtext.util.Tuples; | 14 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; |
15 | import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; | 15 | import tools.refinery.language.utils.ProblemUtil; |
16 | |||
17 | public class ProblemQualifiedNameProvider extends IQualifiedNameProvider.AbstractImpl { | ||
18 | private static final String PREFIX = "tools.refinery.language.naming.ProblemQualifiedNameProvider."; | ||
19 | public static final String NAMED_DELEGATE = PREFIX + "NAMED_DELEGATE"; | ||
20 | public static final String CACHE_KEY = PREFIX + "CACHE_KEY"; | ||
21 | 16 | ||
17 | @Singleton | ||
18 | public class ProblemQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { | ||
22 | @Inject | 19 | @Inject |
23 | @Named(NAMED_DELEGATE) | 20 | private IQualifiedNameConverter qualifiedNameConverter; |
24 | private IQualifiedNameProvider delegate; | ||
25 | 21 | ||
26 | @Inject | 22 | @Inject |
27 | private IResourceScopeCache cache = IResourceScopeCache.NullImpl.INSTANCE; | 23 | private ImportAdapterProvider importAdapterProvider; |
28 | |||
29 | @Override | ||
30 | public QualifiedName getFullyQualifiedName(EObject obj) { | ||
31 | return cache.get(Tuples.pair(obj, CACHE_KEY), obj.eResource(), () -> computeFullyQualifiedName(obj)); | ||
32 | } | ||
33 | 24 | ||
34 | public QualifiedName computeFullyQualifiedName(EObject obj) { | 25 | protected QualifiedName qualifiedName(Problem problem) { |
35 | var qualifiedName = delegate.getFullyQualifiedName(obj); | 26 | var qualifiedNameString = problem.getName(); |
36 | if (qualifiedName != null && ProblemResourceDescriptionStrategy.shouldExport(obj)) { | 27 | if (qualifiedNameString != null) { |
37 | return NamingUtil.addRootPrefix(qualifiedName); | 28 | return NamingUtil.stripRootPrefix(qualifiedNameConverter.toQualifiedName(qualifiedNameString)); |
29 | } | ||
30 | if (!ProblemUtil.isModule(problem)) { | ||
31 | return null; | ||
32 | } | ||
33 | var resource = problem.eResource(); | ||
34 | if (resource == null) { | ||
35 | return null; | ||
36 | } | ||
37 | var resourceUri = resource.getURI(); | ||
38 | if (resourceUri == null) { | ||
39 | return null; | ||
40 | } | ||
41 | var resourceSet = resource.getResourceSet(); | ||
42 | if (resourceSet == null) { | ||
43 | return null; | ||
38 | } | 44 | } |
39 | return qualifiedName; | 45 | var adapter = importAdapterProvider.getOrInstall(resourceSet); |
46 | // If a module has no explicitly specified name, return the qualified name it was resolved under. | ||
47 | return adapter.getQualifiedName(resourceUri); | ||
40 | } | 48 | } |
41 | } | 49 | } |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java index 3dcf6b1f..8fd60364 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java +++ b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java | |||
@@ -8,7 +8,6 @@ package tools.refinery.language.resource; | |||
8 | import com.google.common.collect.ImmutableMap; | 8 | import com.google.common.collect.ImmutableMap; |
9 | import com.google.inject.Inject; | 9 | import com.google.inject.Inject; |
10 | import com.google.inject.Singleton; | 10 | import com.google.inject.Singleton; |
11 | import com.google.inject.name.Named; | ||
12 | import org.eclipse.emf.ecore.EObject; | 11 | import org.eclipse.emf.ecore.EObject; |
13 | import org.eclipse.xtext.EcoreUtil2; | 12 | import org.eclipse.xtext.EcoreUtil2; |
14 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | 13 | import org.eclipse.xtext.naming.IQualifiedNameConverter; |
@@ -19,10 +18,9 @@ import org.eclipse.xtext.resource.IEObjectDescription; | |||
19 | import org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy; | 18 | import org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy; |
20 | import org.eclipse.xtext.util.IAcceptor; | 19 | import org.eclipse.xtext.util.IAcceptor; |
21 | import tools.refinery.language.documentation.DocumentationCommentParser; | 20 | import tools.refinery.language.documentation.DocumentationCommentParser; |
22 | import tools.refinery.language.naming.ProblemQualifiedNameProvider; | ||
23 | import tools.refinery.language.scoping.imports.ImportCollector; | ||
24 | import tools.refinery.language.model.problem.*; | 21 | import tools.refinery.language.model.problem.*; |
25 | import tools.refinery.language.naming.NamingUtil; | 22 | import tools.refinery.language.naming.NamingUtil; |
23 | import tools.refinery.language.scoping.imports.ImportCollector; | ||
26 | import tools.refinery.language.utils.ProblemUtil; | 24 | import tools.refinery.language.utils.ProblemUtil; |
27 | 25 | ||
28 | import java.util.Map; | 26 | import java.util.Map; |
@@ -32,13 +30,15 @@ import java.util.stream.Collectors; | |||
32 | public class ProblemResourceDescriptionStrategy extends DefaultResourceDescriptionStrategy { | 30 | public class ProblemResourceDescriptionStrategy extends DefaultResourceDescriptionStrategy { |
33 | private static final String DATA_PREFIX = "tools.refinery.language.resource.ProblemResourceDescriptionStrategy."; | 31 | private static final String DATA_PREFIX = "tools.refinery.language.resource.ProblemResourceDescriptionStrategy."; |
34 | 32 | ||
35 | public static final String ARITY = DATA_PREFIX + "ARITY"; | 33 | public static final String TYPE_LIKE = DATA_PREFIX + "ARITY"; |
34 | public static final String TYPE_LIKE_TRUE = "true"; | ||
36 | public static final String ERROR_PREDICATE = DATA_PREFIX + "ERROR_PREDICATE"; | 35 | public static final String ERROR_PREDICATE = DATA_PREFIX + "ERROR_PREDICATE"; |
37 | public static final String ERROR_PREDICATE_TRUE = "true"; | 36 | public static final String ERROR_PREDICATE_TRUE = "true"; |
38 | public static final String SHADOWING_KEY = DATA_PREFIX + "SHADOWING_KEY"; | 37 | public static final String SHADOWING_KEY = DATA_PREFIX + "SHADOWING_KEY"; |
39 | public static final String SHADOWING_KEY_PROBLEM = "problem"; | 38 | public static final String SHADOWING_KEY_PROBLEM = "problem"; |
40 | public static final String SHADOWING_KEY_NODE = "node"; | 39 | public static final String SHADOWING_KEY_NODE = "node"; |
41 | public static final String SHADOWING_KEY_RELATION = "relation"; | 40 | public static final String SHADOWING_KEY_RELATION = "relation"; |
41 | public static final String SHADOWING_KEY_AGGREGATOR = "aggregator"; | ||
42 | public static final String PREFERRED_NAME = DATA_PREFIX + "PREFERRED_NAME"; | 42 | public static final String PREFERRED_NAME = DATA_PREFIX + "PREFERRED_NAME"; |
43 | public static final String PREFERRED_NAME_TRUE = "true"; | 43 | public static final String PREFERRED_NAME_TRUE = "true"; |
44 | public static final String IMPORTS = DATA_PREFIX + "IMPORTS"; | 44 | public static final String IMPORTS = DATA_PREFIX + "IMPORTS"; |
@@ -51,8 +51,7 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti | |||
51 | private IQualifiedNameConverter qualifiedNameConverter; | 51 | private IQualifiedNameConverter qualifiedNameConverter; |
52 | 52 | ||
53 | @Inject | 53 | @Inject |
54 | @Named(ProblemQualifiedNameProvider.NAMED_DELEGATE) | 54 | private IQualifiedNameProvider qualifiedNameProvider; |
55 | private IQualifiedNameProvider delegateQualifiedNameProvider; | ||
56 | 55 | ||
57 | @Inject | 56 | @Inject |
58 | private ImportCollector importCollector; | 57 | private ImportCollector importCollector; |
@@ -123,7 +122,7 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti | |||
123 | if (problem == null) { | 122 | if (problem == null) { |
124 | return QualifiedName.EMPTY; | 123 | return QualifiedName.EMPTY; |
125 | } | 124 | } |
126 | var qualifiedName = delegateQualifiedNameProvider.getFullyQualifiedName(problem); | 125 | var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(problem); |
127 | return qualifiedName == null ? QualifiedName.EMPTY : qualifiedName; | 126 | return qualifiedName == null ? QualifiedName.EMPTY : qualifiedName; |
128 | } | 127 | } |
129 | 128 | ||
@@ -152,8 +151,11 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti | |||
152 | builder.put(SHADOWING_KEY, SHADOWING_KEY_NODE); | 151 | builder.put(SHADOWING_KEY, SHADOWING_KEY_NODE); |
153 | } else if (eObject instanceof Relation relation) { | 152 | } else if (eObject instanceof Relation relation) { |
154 | builder.put(SHADOWING_KEY, SHADOWING_KEY_RELATION); | 153 | builder.put(SHADOWING_KEY, SHADOWING_KEY_RELATION); |
155 | int arity = ProblemUtil.getArity(relation); | 154 | if (ProblemUtil.isTypeLike(relation)) { |
156 | builder.put(ARITY, Integer.toString(arity)); | 155 | builder.put(TYPE_LIKE, TYPE_LIKE_TRUE); |
156 | } | ||
157 | } else if (eObject instanceof AggregatorDeclaration) { | ||
158 | builder.put(SHADOWING_KEY, SHADOWING_KEY_AGGREGATOR); | ||
157 | } | 159 | } |
158 | if (eObject instanceof PredicateDefinition predicateDefinition && predicateDefinition.isError()) { | 160 | if (eObject instanceof PredicateDefinition predicateDefinition && predicateDefinition.isError()) { |
159 | builder.put(ERROR_PREDICATE, ERROR_PREDICATE_TRUE); | 161 | builder.put(ERROR_PREDICATE, ERROR_PREDICATE_TRUE); |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/state/DerivedVariableComputer.java b/subprojects/language/src/main/java/tools/refinery/language/resource/state/DerivedVariableComputer.java index f0baf35f..f096264b 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/resource/state/DerivedVariableComputer.java +++ b/subprojects/language/src/main/java/tools/refinery/language/resource/state/DerivedVariableComputer.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -44,15 +44,14 @@ public class DerivedVariableComputer { | |||
44 | knownVariables.add(name); | 44 | knownVariables.add(name); |
45 | } | 45 | } |
46 | } | 46 | } |
47 | if (definition instanceof PredicateDefinition predicateDefinition) { | 47 | switch (definition) { |
48 | installDerivedPredicateDefinitionState(predicateDefinition, knownVariables); | 48 | case PredicateDefinition predicateDefinition -> |
49 | } else if (definition instanceof FunctionDefinition functionDefinition) { | 49 | installDerivedPredicateDefinitionState(predicateDefinition, knownVariables); |
50 | installDerivedFunctionDefinitionState(functionDefinition, knownVariables); | 50 | case FunctionDefinition functionDefinition -> |
51 | } else if (definition instanceof RuleDefinition ruleDefinition) { | 51 | installDerivedFunctionDefinitionState(functionDefinition, knownVariables); |
52 | installDerivedRuleDefinitionState(ruleDefinition, knownVariables); | 52 | case RuleDefinition ruleDefinition -> installDerivedRuleDefinitionState(ruleDefinition, knownVariables); |
53 | } else { | 53 | default -> throw new IllegalArgumentException("Unknown ParametricDefinition: " + definition); |
54 | throw new IllegalArgumentException("Unknown ParametricDefinition: " + definition); | 54 | } |
55 | } | ||
56 | } | 55 | } |
57 | 56 | ||
58 | protected void installDerivedPredicateDefinitionState(PredicateDefinition definition, Set<String> knownVariables) { | 57 | protected void installDerivedPredicateDefinitionState(PredicateDefinition definition, Set<String> knownVariables) { |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/state/ImplicitVariableScope.java b/subprojects/language/src/main/java/tools/refinery/language/resource/state/ImplicitVariableScope.java index e25887ad..c8e01724 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/resource/state/ImplicitVariableScope.java +++ b/subprojects/language/src/main/java/tools/refinery/language/resource/state/ImplicitVariableScope.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -16,10 +16,7 @@ import org.eclipse.xtext.scoping.IScopeProvider; | |||
16 | import tools.refinery.language.model.problem.*; | 16 | import tools.refinery.language.model.problem.*; |
17 | import tools.refinery.language.naming.NamingUtil; | 17 | import tools.refinery.language.naming.NamingUtil; |
18 | 18 | ||
19 | import java.util.Deque; | 19 | import java.util.*; |
20 | import java.util.HashSet; | ||
21 | import java.util.List; | ||
22 | import java.util.Set; | ||
23 | 20 | ||
24 | public class ImplicitVariableScope { | 21 | public class ImplicitVariableScope { |
25 | private final EObject root; | 22 | private final EObject root; |
@@ -71,13 +68,12 @@ public class ImplicitVariableScope { | |||
71 | if ((hasKnownVariables && hasParent) || (!hasKnownVariables && !hasParent)) { | 68 | if ((hasKnownVariables && hasParent) || (!hasKnownVariables && !hasParent)) { |
72 | throw new IllegalStateException("Either known variables or parent must be provided, but not both"); | 69 | throw new IllegalStateException("Either known variables or parent must be provided, but not both"); |
73 | } | 70 | } |
74 | if (hasKnownVariables) { | 71 | if (!hasKnownVariables) { |
75 | return; | 72 | if (parent.knownVariables == null) { |
76 | } | 73 | throw new IllegalStateException("Parent scope must be processed before current scope"); |
77 | if (parent.knownVariables == null) { | 74 | } |
78 | throw new IllegalStateException("Parent scope must be processed before current scope"); | 75 | knownVariables = new HashSet<>(parent.knownVariables); |
79 | } | 76 | } |
80 | knownVariables = new HashSet<>(parent.knownVariables); | ||
81 | } | 77 | } |
82 | 78 | ||
83 | private void processEObject(EObject eObject, IScopeProvider scopeProvider, LinkingHelper linkingHelper, | 79 | private void processEObject(EObject eObject, IScopeProvider scopeProvider, LinkingHelper linkingHelper, |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/state/ProblemDerivedStateComputer.java b/subprojects/language/src/main/java/tools/refinery/language/resource/state/ProblemDerivedStateComputer.java index d905aa9a..efa77c50 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/resource/state/ProblemDerivedStateComputer.java +++ b/subprojects/language/src/main/java/tools/refinery/language/resource/state/ProblemDerivedStateComputer.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -51,7 +51,7 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer { | |||
51 | if (contents.isEmpty()) { | 51 | if (contents.isEmpty()) { |
52 | return null; | 52 | return null; |
53 | } | 53 | } |
54 | EObject object = contents.get(0); | 54 | EObject object = contents.getFirst(); |
55 | if (object instanceof Problem problem) { | 55 | if (object instanceof Problem problem) { |
56 | return problem; | 56 | return problem; |
57 | } | 57 | } |
@@ -71,10 +71,8 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer { | |||
71 | for (var statement : problem.getStatements()) { | 71 | for (var statement : problem.getStatements()) { |
72 | if (statement instanceof ClassDeclaration classDeclaration) { | 72 | if (statement instanceof ClassDeclaration classDeclaration) { |
73 | installOrRemoveNewNode(adapter, classDeclaration); | 73 | installOrRemoveNewNode(adapter, classDeclaration); |
74 | for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) { | 74 | for (var referenceDeclaration : classDeclaration.getFeatureDeclarations()) { |
75 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) { | 75 | installOrRemoveInvalidMultiplicityPredicate(adapter, classDeclaration, referenceDeclaration); |
76 | installOrRemoveInvalidMultiplicityPredicate(adapter, classDeclaration, referenceDeclaration); | ||
77 | } | ||
78 | } | 76 | } |
79 | } | 77 | } |
80 | } | 78 | } |
@@ -157,9 +155,8 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer { | |||
157 | if (classDeclaration.isAbstract()) { | 155 | if (classDeclaration.isAbstract()) { |
158 | abstractClassDeclarations.add(classDeclaration); | 156 | abstractClassDeclarations.add(classDeclaration); |
159 | } | 157 | } |
160 | for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) { | 158 | for (var referenceDeclaration : classDeclaration.getFeatureDeclarations()) { |
161 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration && | 159 | if (ProblemUtil.hasMultiplicityConstraint(referenceDeclaration)) { |
162 | ProblemUtil.hasMultiplicityConstraint(referenceDeclaration)) { | ||
163 | referenceDeclarationsWithMultiplicity.add(referenceDeclaration); | 160 | referenceDeclarationsWithMultiplicity.add(referenceDeclaration); |
164 | } | 161 | } |
165 | } | 162 | } |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemLocalScopeProvider.java b/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemLocalScopeProvider.java index 0067bf94..3b94423a 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemLocalScopeProvider.java +++ b/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemLocalScopeProvider.java | |||
@@ -6,7 +6,6 @@ | |||
6 | package tools.refinery.language.scoping; | 6 | package tools.refinery.language.scoping; |
7 | 7 | ||
8 | import com.google.inject.Inject; | 8 | import com.google.inject.Inject; |
9 | import com.google.inject.name.Named; | ||
10 | import org.eclipse.emf.ecore.EObject; | 9 | import org.eclipse.emf.ecore.EObject; |
11 | import org.eclipse.emf.ecore.EReference; | 10 | import org.eclipse.emf.ecore.EReference; |
12 | import org.eclipse.emf.ecore.resource.Resource; | 11 | import org.eclipse.emf.ecore.resource.Resource; |
@@ -17,14 +16,12 @@ import org.eclipse.xtext.resource.ISelectable; | |||
17 | import org.eclipse.xtext.scoping.IScope; | 16 | import org.eclipse.xtext.scoping.IScope; |
18 | import org.eclipse.xtext.scoping.impl.AbstractGlobalScopeDelegatingScopeProvider; | 17 | import org.eclipse.xtext.scoping.impl.AbstractGlobalScopeDelegatingScopeProvider; |
19 | import org.eclipse.xtext.util.IResourceScopeCache; | 18 | import org.eclipse.xtext.util.IResourceScopeCache; |
20 | import tools.refinery.language.naming.ProblemQualifiedNameProvider; | ||
21 | 19 | ||
22 | public class ProblemLocalScopeProvider extends AbstractGlobalScopeDelegatingScopeProvider { | 20 | public class ProblemLocalScopeProvider extends AbstractGlobalScopeDelegatingScopeProvider { |
23 | private static final String CACHE_KEY = "tools.refinery.language.scoping.ProblemLocalScopeProvider.CACHE_KEY"; | 21 | private static final String CACHE_KEY = "tools.refinery.language.scoping.ProblemLocalScopeProvider.CACHE_KEY"; |
24 | 22 | ||
25 | @Inject | 23 | @Inject |
26 | @Named(ProblemQualifiedNameProvider.NAMED_DELEGATE) | 24 | private IQualifiedNameProvider qualifiedNameProvider; |
27 | private IQualifiedNameProvider delegateQualifiedNameProvider; | ||
28 | 25 | ||
29 | @Inject | 26 | @Inject |
30 | private IResourceDescriptionsProvider resourceDescriptionsProvider; | 27 | private IResourceDescriptionsProvider resourceDescriptionsProvider; |
@@ -59,7 +56,7 @@ public class ProblemLocalScopeProvider extends AbstractGlobalScopeDelegatingScop | |||
59 | if (rootElement == null) { | 56 | if (rootElement == null) { |
60 | return new NoFullyQualifiedNamesSelectable(resourceDescription); | 57 | return new NoFullyQualifiedNamesSelectable(resourceDescription); |
61 | } | 58 | } |
62 | var rootName = delegateQualifiedNameProvider.getFullyQualifiedName(rootElement); | 59 | var rootName = qualifiedNameProvider.getFullyQualifiedName(rootElement); |
63 | if (rootName == null) { | 60 | if (rootName == null) { |
64 | return new NoFullyQualifiedNamesSelectable(resourceDescription); | 61 | return new NoFullyQualifiedNamesSelectable(resourceDescription); |
65 | } | 62 | } |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemScopeProvider.java b/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemScopeProvider.java index a4437ba6..d94c9a13 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemScopeProvider.java +++ b/subprojects/language/src/main/java/tools/refinery/language/scoping/ProblemScopeProvider.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -9,17 +9,15 @@ | |||
9 | */ | 9 | */ |
10 | package tools.refinery.language.scoping; | 10 | package tools.refinery.language.scoping; |
11 | 11 | ||
12 | import com.google.inject.Inject; | ||
13 | import org.eclipse.emf.ecore.EObject; | 12 | import org.eclipse.emf.ecore.EObject; |
14 | import org.eclipse.emf.ecore.EReference; | 13 | import org.eclipse.emf.ecore.EReference; |
15 | import org.eclipse.xtext.EcoreUtil2; | 14 | import org.eclipse.xtext.EcoreUtil2; |
16 | import org.eclipse.xtext.scoping.IScope; | 15 | import org.eclipse.xtext.scoping.IScope; |
17 | import org.eclipse.xtext.scoping.Scopes; | 16 | import org.eclipse.xtext.scoping.Scopes; |
18 | import tools.refinery.language.model.problem.*; | 17 | import tools.refinery.language.model.problem.*; |
19 | import tools.refinery.language.utils.ProblemDesugarer; | ||
20 | 18 | ||
21 | import java.util.ArrayList; | 19 | import java.util.Collection; |
22 | import java.util.List; | 20 | import java.util.LinkedHashSet; |
23 | 21 | ||
24 | /** | 22 | /** |
25 | * This class contains custom scoping description. | 23 | * This class contains custom scoping description. |
@@ -29,9 +27,6 @@ import java.util.List; | |||
29 | * on how and when to use it. | 27 | * on how and when to use it. |
30 | */ | 28 | */ |
31 | public class ProblemScopeProvider extends AbstractProblemScopeProvider { | 29 | public class ProblemScopeProvider extends AbstractProblemScopeProvider { |
32 | @Inject | ||
33 | private ProblemDesugarer desugarer; | ||
34 | |||
35 | @Override | 30 | @Override |
36 | public IScope getScope(EObject context, EReference reference) { | 31 | public IScope getScope(EObject context, EReference reference) { |
37 | var scope = super.getScope(context, reference); | 32 | var scope = super.getScope(context, reference); |
@@ -58,7 +53,7 @@ public class ProblemScopeProvider extends AbstractProblemScopeProvider { | |||
58 | } | 53 | } |
59 | 54 | ||
60 | protected IScope getVariableScope(EObject context, IScope delegateScope) { | 55 | protected IScope getVariableScope(EObject context, IScope delegateScope) { |
61 | List<Variable> variables = new ArrayList<>(); | 56 | Collection<Variable> variables = new LinkedHashSet<>(); |
62 | addSingletonVariableToScope(context, variables); | 57 | addSingletonVariableToScope(context, variables); |
63 | EObject currentContext = context; | 58 | EObject currentContext = context; |
64 | while (currentContext != null && !(currentContext instanceof ParametricDefinition)) { | 59 | while (currentContext != null && !(currentContext instanceof ParametricDefinition)) { |
@@ -73,7 +68,7 @@ public class ProblemScopeProvider extends AbstractProblemScopeProvider { | |||
73 | return Scopes.scopeFor(variables, parentScope); | 68 | return Scopes.scopeFor(variables, parentScope); |
74 | } | 69 | } |
75 | 70 | ||
76 | protected void addSingletonVariableToScope(EObject context, List<Variable> variables) { | 71 | protected void addSingletonVariableToScope(EObject context, Collection<Variable> variables) { |
77 | if (context instanceof VariableOrNodeExpr expr) { | 72 | if (context instanceof VariableOrNodeExpr expr) { |
78 | Variable singletonVariable = expr.getSingletonVariable(); | 73 | Variable singletonVariable = expr.getSingletonVariable(); |
79 | if (singletonVariable != null) { | 74 | if (singletonVariable != null) { |
@@ -82,18 +77,21 @@ public class ProblemScopeProvider extends AbstractProblemScopeProvider { | |||
82 | } | 77 | } |
83 | } | 78 | } |
84 | 79 | ||
85 | protected void addExistentiallyQualifiedVariableToScope(EObject currentContext, List<Variable> variables) { | 80 | protected void addExistentiallyQualifiedVariableToScope(EObject currentContext, Collection<Variable> variables) { |
86 | if (currentContext instanceof ExistentialQuantifier quantifier) { | 81 | switch (currentContext) { |
87 | variables.addAll(quantifier.getImplicitVariables()); | 82 | case ExistentialQuantifier quantifier -> variables.addAll(quantifier.getImplicitVariables()); |
88 | } else if (currentContext instanceof Match match) { | 83 | case Match match -> variables.addAll(match.getCondition().getImplicitVariables()); |
89 | variables.addAll(match.getCondition().getImplicitVariables()); | 84 | case Consequent consequent -> { |
90 | } else if (currentContext instanceof Consequent consequent) { | ||
91 | for (var literal : consequent.getActions()) { | 85 | for (var literal : consequent.getActions()) { |
92 | if (literal instanceof NewAction newAction && newAction.getVariable() != null) { | 86 | if (literal instanceof NewAction newAction && newAction.getVariable() != null) { |
93 | variables.add(newAction.getVariable()); | 87 | variables.add(newAction.getVariable()); |
94 | } | 88 | } |
95 | } | 89 | } |
96 | } | 90 | } |
91 | default -> { | ||
92 | // Nothing to add. | ||
93 | } | ||
94 | } | ||
97 | } | 95 | } |
98 | 96 | ||
99 | protected IScope getOppositeScope(EObject context) { | 97 | protected IScope getOppositeScope(EObject context) { |
@@ -105,10 +103,7 @@ public class ProblemScopeProvider extends AbstractProblemScopeProvider { | |||
105 | if (!(relation instanceof ClassDeclaration classDeclaration)) { | 103 | if (!(relation instanceof ClassDeclaration classDeclaration)) { |
106 | return IScope.NULLSCOPE; | 104 | return IScope.NULLSCOPE; |
107 | } | 105 | } |
108 | var referenceDeclarations = classDeclaration.getFeatureDeclarations() | 106 | var referenceDeclarations = classDeclaration.getFeatureDeclarations(); |
109 | .stream() | ||
110 | .filter(ReferenceDeclaration.class::isInstance) | ||
111 | .toList(); | ||
112 | return Scopes.scopeFor(referenceDeclarations); | 107 | return Scopes.scopeFor(referenceDeclarations); |
113 | } | 108 | } |
114 | } | 109 | } |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapter.java b/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapter.java index d7a5304f..753c8565 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapter.java +++ b/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapter.java | |||
@@ -16,7 +16,12 @@ import org.eclipse.emf.ecore.resource.Resource; | |||
16 | import org.eclipse.emf.ecore.resource.ResourceSet; | 16 | import org.eclipse.emf.ecore.resource.ResourceSet; |
17 | import org.eclipse.emf.ecore.util.EcoreUtil; | 17 | import org.eclipse.emf.ecore.util.EcoreUtil; |
18 | import org.eclipse.xtext.naming.QualifiedName; | 18 | import org.eclipse.xtext.naming.QualifiedName; |
19 | import tools.refinery.language.expressions.CompositeTermInterpreter; | ||
20 | import tools.refinery.language.expressions.TermInterpreter; | ||
21 | import tools.refinery.language.library.BuiltinLibrary; | ||
19 | import tools.refinery.language.library.RefineryLibrary; | 22 | import tools.refinery.language.library.RefineryLibrary; |
23 | import tools.refinery.language.model.problem.Problem; | ||
24 | import tools.refinery.language.utils.BuiltinSymbols; | ||
20 | 25 | ||
21 | import java.io.File; | 26 | import java.io.File; |
22 | import java.nio.file.Path; | 27 | import java.nio.file.Path; |
@@ -25,15 +30,12 @@ import java.util.*; | |||
25 | public class ImportAdapter extends AdapterImpl { | 30 | public class ImportAdapter extends AdapterImpl { |
26 | private static final Logger LOG = Logger.getLogger(ImportAdapter.class); | 31 | private static final Logger LOG = Logger.getLogger(ImportAdapter.class); |
27 | private static final List<RefineryLibrary> DEFAULT_LIBRARIES; | 32 | private static final List<RefineryLibrary> DEFAULT_LIBRARIES; |
33 | private static final List<TermInterpreter> DEFAULT_TERM_INTERPRETERS; | ||
28 | private static final List<Path> DEFAULT_PATHS; | 34 | private static final List<Path> DEFAULT_PATHS; |
29 | 35 | ||
30 | static { | 36 | static { |
31 | var serviceLoader = ServiceLoader.load(RefineryLibrary.class); | 37 | DEFAULT_LIBRARIES = loadServices(RefineryLibrary.class); |
32 | var defaultLibraries = new ArrayList<RefineryLibrary>(); | 38 | DEFAULT_TERM_INTERPRETERS = loadServices(TermInterpreter.class); |
33 | for (var service : serviceLoader) { | ||
34 | defaultLibraries.add(service); | ||
35 | } | ||
36 | DEFAULT_LIBRARIES = List.copyOf(defaultLibraries); | ||
37 | var pathEnv = System.getenv("REFINERY_LIBRARY_PATH"); | 39 | var pathEnv = System.getenv("REFINERY_LIBRARY_PATH"); |
38 | if (pathEnv == null) { | 40 | if (pathEnv == null) { |
39 | DEFAULT_PATHS = List.of(); | 41 | DEFAULT_PATHS = List.of(); |
@@ -45,16 +47,29 @@ public class ImportAdapter extends AdapterImpl { | |||
45 | } | 47 | } |
46 | } | 48 | } |
47 | 49 | ||
48 | private final List<RefineryLibrary> libraries; | 50 | private static <T> List<T> loadServices(Class<T> serviceClass) { |
49 | private final List<Path> libraryPaths; | 51 | var serviceLoader = ServiceLoader.load(serviceClass); |
52 | var services = new ArrayList<T>(); | ||
53 | for (var service : serviceLoader) { | ||
54 | services.add(service); | ||
55 | } | ||
56 | return List.copyOf(services); | ||
57 | } | ||
58 | |||
59 | private ResourceSet resourceSet; | ||
60 | private final List<RefineryLibrary> libraries = new ArrayList<>(DEFAULT_LIBRARIES); | ||
61 | private final List<TermInterpreter> termInterpreters = new ArrayList<>(DEFAULT_TERM_INTERPRETERS); | ||
62 | private final TermInterpreter termInterpreter = new CompositeTermInterpreter(termInterpreters); | ||
63 | private final List<Path> libraryPaths = new ArrayList<>(DEFAULT_PATHS); | ||
50 | private final Cache<QualifiedName, QualifiedName> failedResolutions = | 64 | private final Cache<QualifiedName, QualifiedName> failedResolutions = |
51 | CacheBuilder.newBuilder().maximumSize(100).build(); | 65 | CacheBuilder.newBuilder().maximumSize(100).build(); |
52 | private final Map<QualifiedName, URI> qualifiedNameToUriMap = new LinkedHashMap<>(); | 66 | private final Map<QualifiedName, URI> qualifiedNameToUriMap = new LinkedHashMap<>(); |
53 | private final Map<URI, QualifiedName> uriToQualifiedNameMap = new LinkedHashMap<>(); | 67 | private final Map<URI, QualifiedName> uriToQualifiedNameMap = new LinkedHashMap<>(); |
68 | private Problem builtinProblem; | ||
69 | private BuiltinSymbols builtinSymbols; | ||
54 | 70 | ||
55 | private ImportAdapter(ResourceSet resourceSet) { | 71 | void setResourceSet(ResourceSet resourceSet) { |
56 | libraries = new ArrayList<>(DEFAULT_LIBRARIES); | 72 | this.resourceSet = resourceSet; |
57 | libraryPaths = new ArrayList<>(DEFAULT_PATHS); | ||
58 | for (var resource : resourceSet.getResources()) { | 73 | for (var resource : resourceSet.getResources()) { |
59 | resourceAdded(resource); | 74 | resourceAdded(resource); |
60 | } | 75 | } |
@@ -69,6 +84,14 @@ public class ImportAdapter extends AdapterImpl { | |||
69 | return libraries; | 84 | return libraries; |
70 | } | 85 | } |
71 | 86 | ||
87 | public List<TermInterpreter> getTermInterpreters() { | ||
88 | return termInterpreters; | ||
89 | } | ||
90 | |||
91 | public TermInterpreter getTermInterpreter() { | ||
92 | return termInterpreter; | ||
93 | } | ||
94 | |||
72 | public List<Path> getLibraryPaths() { | 95 | public List<Path> getLibraryPaths() { |
73 | return libraryPaths; | 96 | return libraryPaths; |
74 | } | 97 | } |
@@ -190,16 +213,26 @@ public class ImportAdapter extends AdapterImpl { | |||
190 | } | 213 | } |
191 | } | 214 | } |
192 | 215 | ||
193 | public static ImportAdapter getOrInstall(ResourceSet resourceSet) { | 216 | public Problem getBuiltinProblem() { |
194 | var adapter = getAdapter(resourceSet); | 217 | if (builtinProblem == null) { |
195 | if (adapter == null) { | 218 | var builtinResource = resourceSet.getResource(BuiltinLibrary.BUILTIN_LIBRARY_URI, true); |
196 | adapter = new ImportAdapter(resourceSet); | 219 | if (builtinResource == null) { |
197 | resourceSet.eAdapters().add(adapter); | 220 | throw new IllegalStateException("Failed to load builtin resource"); |
221 | } | ||
222 | var contents = builtinResource.getContents(); | ||
223 | if (contents.isEmpty()) { | ||
224 | throw new IllegalStateException("builtin resource is empty"); | ||
225 | } | ||
226 | builtinProblem = (Problem) contents.getFirst(); | ||
227 | EcoreUtil.resolveAll(builtinResource); | ||
198 | } | 228 | } |
199 | return adapter; | 229 | return builtinProblem; |
200 | } | 230 | } |
201 | 231 | ||
202 | private static ImportAdapter getAdapter(ResourceSet resourceSet) { | 232 | public BuiltinSymbols getBuiltinSymbols() { |
203 | return (ImportAdapter) EcoreUtil.getAdapter(resourceSet.eAdapters(), ImportAdapter.class); | 233 | if (builtinSymbols == null) { |
234 | builtinSymbols = new BuiltinSymbols(getBuiltinProblem()); | ||
235 | } | ||
236 | return builtinSymbols; | ||
204 | } | 237 | } |
205 | } | 238 | } |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapterProvider.java b/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapterProvider.java new file mode 100644 index 00000000..5ab3a851 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportAdapterProvider.java | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.scoping.imports; | ||
7 | |||
8 | import com.google.inject.Inject; | ||
9 | import com.google.inject.Provider; | ||
10 | import com.google.inject.Singleton; | ||
11 | import org.eclipse.emf.ecore.EObject; | ||
12 | import org.eclipse.emf.ecore.resource.Resource; | ||
13 | import org.eclipse.emf.ecore.resource.ResourceSet; | ||
14 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
15 | import org.jetbrains.annotations.NotNull; | ||
16 | import tools.refinery.language.expressions.TermInterpreter; | ||
17 | import tools.refinery.language.utils.BuiltinSymbols; | ||
18 | |||
19 | @Singleton | ||
20 | public class ImportAdapterProvider { | ||
21 | @Inject | ||
22 | private Provider<ImportAdapter> delegateProvider; | ||
23 | |||
24 | public BuiltinSymbols getBuiltinSymbols(@NotNull EObject context) { | ||
25 | var adapter = getOrInstall(context); | ||
26 | return adapter.getBuiltinSymbols(); | ||
27 | } | ||
28 | |||
29 | public BuiltinSymbols getBuiltinSymbols(@NotNull Resource context) { | ||
30 | var adapter = getOrInstall(context); | ||
31 | return adapter.getBuiltinSymbols(); | ||
32 | } | ||
33 | |||
34 | public TermInterpreter getTermInterpreter(@NotNull EObject context) { | ||
35 | var adapter = getOrInstall(context); | ||
36 | return adapter.getTermInterpreter(); | ||
37 | } | ||
38 | |||
39 | public ImportAdapter getOrInstall(@NotNull EObject context) { | ||
40 | var resource = context.eResource(); | ||
41 | if (resource == null) { | ||
42 | throw new IllegalArgumentException("context is not in a resource"); | ||
43 | } | ||
44 | return getOrInstall(resource); | ||
45 | } | ||
46 | |||
47 | public ImportAdapter getOrInstall(@NotNull Resource context) { | ||
48 | var resourceSet = context.getResourceSet(); | ||
49 | if (resourceSet == null) { | ||
50 | throw new IllegalArgumentException("context is not in a resource set"); | ||
51 | } | ||
52 | return getOrInstall(resourceSet); | ||
53 | } | ||
54 | |||
55 | public ImportAdapter getOrInstall(@NotNull ResourceSet resourceSet) { | ||
56 | var adapter = getAdapter(resourceSet); | ||
57 | if (adapter == null) { | ||
58 | adapter = delegateProvider.get(); | ||
59 | adapter.setResourceSet(resourceSet); | ||
60 | resourceSet.eAdapters().add(adapter); | ||
61 | } | ||
62 | return adapter; | ||
63 | } | ||
64 | |||
65 | public static ImportAdapter getAdapter(@NotNull ResourceSet resourceSet) { | ||
66 | return (ImportAdapter) EcoreUtil.getAdapter(resourceSet.eAdapters(), ImportAdapter.class); | ||
67 | } | ||
68 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportCollector.java b/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportCollector.java index ac5a92ba..f3ab54ae 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportCollector.java +++ b/subprojects/language/src/main/java/tools/refinery/language/scoping/imports/ImportCollector.java | |||
@@ -46,6 +46,9 @@ public class ImportCollector { | |||
46 | @Inject | 46 | @Inject |
47 | private Provider<LoadOnDemandResourceDescriptionProvider> loadOnDemandProvider; | 47 | private Provider<LoadOnDemandResourceDescriptionProvider> loadOnDemandProvider; |
48 | 48 | ||
49 | @Inject | ||
50 | private ImportAdapterProvider importAdapterProvider; | ||
51 | |||
49 | public ImportCollection getDirectImports(Resource resource) { | 52 | public ImportCollection getDirectImports(Resource resource) { |
50 | return cache.get(DIRECT_IMPORTS_KEY, resource, () -> this.computeDirectImports(resource)); | 53 | return cache.get(DIRECT_IMPORTS_KEY, resource, () -> this.computeDirectImports(resource)); |
51 | } | 54 | } |
@@ -58,7 +61,7 @@ public class ImportCollector { | |||
58 | if (resourceSet == null) { | 61 | if (resourceSet == null) { |
59 | return ImportCollection.EMPTY; | 62 | return ImportCollection.EMPTY; |
60 | } | 63 | } |
61 | var adapter = ImportAdapter.getOrInstall(resourceSet); | 64 | var adapter = importAdapterProvider.getOrInstall(resourceSet); |
62 | var collection = new ImportCollection(); | 65 | var collection = new ImportCollection(); |
63 | collectAutomaticImports(collection, adapter); | 66 | collectAutomaticImports(collection, adapter); |
64 | collectExplicitImports(problem, collection, adapter); | 67 | collectExplicitImports(problem, collection, adapter); |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/AggregatorName.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/AggregatorName.java new file mode 100644 index 00000000..5939865a --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/AggregatorName.java | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | import org.eclipse.xtext.naming.QualifiedName; | ||
9 | |||
10 | public record AggregatorName(QualifiedName qualifiedName) { | ||
11 | public AggregatorName(QualifiedName prefix, String name) { | ||
12 | this(prefix.append(name)); | ||
13 | } | ||
14 | |||
15 | @Override | ||
16 | public String toString() { | ||
17 | return qualifiedName.isEmpty() ? "" : qualifiedName.getLastSegment(); | ||
18 | } | ||
19 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/DataExprType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/DataExprType.java new file mode 100644 index 00000000..9bc3e6aa --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/DataExprType.java | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | import org.eclipse.xtext.naming.QualifiedName; | ||
9 | |||
10 | public record DataExprType(QualifiedName qualifiedName) implements FixedType { | ||
11 | public DataExprType(QualifiedName prefix, String name) { | ||
12 | this(prefix.append(name)); | ||
13 | } | ||
14 | |||
15 | @Override | ||
16 | public String toString() { | ||
17 | return qualifiedName.isEmpty() ? "" : qualifiedName.getLastSegment(); | ||
18 | } | ||
19 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/ExprType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/ExprType.java new file mode 100644 index 00000000..9e44063d --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/ExprType.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | public sealed interface ExprType permits FixedType, MutableType { | ||
9 | NodeType NODE = new NodeType(); | ||
10 | LiteralType LITERAL = new LiteralType(); | ||
11 | InvalidType INVALID = new InvalidType(); | ||
12 | |||
13 | FixedType getActualType(); | ||
14 | |||
15 | ExprType unwrapIfSet(); | ||
16 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/FixedType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/FixedType.java new file mode 100644 index 00000000..1b2ded48 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/FixedType.java | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | public sealed interface FixedType extends ExprType permits NodeType, LiteralType, InvalidType, DataExprType { | ||
9 | @Override | ||
10 | default FixedType getActualType() { | ||
11 | return this; | ||
12 | } | ||
13 | |||
14 | @Override | ||
15 | default FixedType unwrapIfSet() { | ||
16 | return this; | ||
17 | } | ||
18 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/InvalidType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/InvalidType.java new file mode 100644 index 00000000..c18612bc --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/InvalidType.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | public final class InvalidType implements FixedType { | ||
9 | InvalidType() { | ||
10 | } | ||
11 | |||
12 | @Override | ||
13 | public String toString() { | ||
14 | return "invalid"; | ||
15 | } | ||
16 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/LiteralType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/LiteralType.java new file mode 100644 index 00000000..7fd33553 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/LiteralType.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | public final class LiteralType implements FixedType { | ||
9 | LiteralType() { | ||
10 | } | ||
11 | |||
12 | @Override | ||
13 | public String toString() { | ||
14 | return "constraint"; | ||
15 | } | ||
16 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/MutableType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/MutableType.java new file mode 100644 index 00000000..78fdf884 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/MutableType.java | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | public final class MutableType implements ExprType { | ||
9 | private DataExprType actualType; | ||
10 | |||
11 | @Override | ||
12 | public FixedType getActualType() { | ||
13 | return actualType == null ? INVALID : actualType; | ||
14 | } | ||
15 | |||
16 | public void setActualType(DataExprType actualType) { | ||
17 | if (this.actualType != null) { | ||
18 | throw new IllegalStateException("Actual type was already set"); | ||
19 | } | ||
20 | this.actualType = actualType; | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public ExprType unwrapIfSet() { | ||
25 | return actualType == null ? this : actualType; | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public String toString() { | ||
30 | return getActualType().toString(); | ||
31 | } | ||
32 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/NodeType.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/NodeType.java new file mode 100644 index 00000000..1baff212 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/NodeType.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | public final class NodeType implements FixedType { | ||
9 | NodeType() { | ||
10 | } | ||
11 | |||
12 | @Override | ||
13 | public String toString() { | ||
14 | return "node"; | ||
15 | } | ||
16 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/ProblemTypeAnalyzer.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/ProblemTypeAnalyzer.java new file mode 100644 index 00000000..fcf99ad8 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/ProblemTypeAnalyzer.java | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | import com.google.inject.Inject; | ||
9 | import com.google.inject.Provider; | ||
10 | import com.google.inject.Singleton; | ||
11 | import org.eclipse.xtext.util.IResourceScopeCache; | ||
12 | import tools.refinery.language.model.problem.Problem; | ||
13 | |||
14 | @Singleton | ||
15 | public class ProblemTypeAnalyzer { | ||
16 | private static final String CACHE_KEY = "tools.refinery.language.typesystem.ProblemTypeAnalyzer.CACHE_KEY"; | ||
17 | |||
18 | @Inject | ||
19 | private IResourceScopeCache resourceScopeCache; | ||
20 | |||
21 | @Inject | ||
22 | private Provider<TypedModule> typedModuleProvider; | ||
23 | |||
24 | public TypedModule getOrComputeTypes(Problem problem) { | ||
25 | var resource = problem.eResource(); | ||
26 | return resourceScopeCache.get(CACHE_KEY, resource, () -> { | ||
27 | var typedModule = typedModuleProvider.get(); | ||
28 | typedModule.setProblem(problem); | ||
29 | return typedModule; | ||
30 | }); | ||
31 | } | ||
32 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/Signature.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/Signature.java new file mode 100644 index 00000000..8e72c185 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/Signature.java | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | import java.util.List; | ||
9 | |||
10 | public record Signature(List<FixedType> parameterTypes, FixedType resultType) { | ||
11 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/SignatureProvider.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/SignatureProvider.java new file mode 100644 index 00000000..3e25a0f5 --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/SignatureProvider.java | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | import com.google.inject.Inject; | ||
9 | import com.google.inject.Singleton; | ||
10 | import org.eclipse.xtext.naming.IQualifiedNameProvider; | ||
11 | import org.eclipse.xtext.util.IResourceScopeCache; | ||
12 | import tools.refinery.language.model.problem.*; | ||
13 | |||
14 | import java.util.ArrayList; | ||
15 | import java.util.HashMap; | ||
16 | import java.util.List; | ||
17 | |||
18 | @Singleton | ||
19 | public class SignatureProvider { | ||
20 | private static final String PREFIX = "tools.refinery.language.typesystem.SignatureProvider."; | ||
21 | private static final String SIGNATURE_CACHE = PREFIX + "SIGNATURE_CACHE"; | ||
22 | private static final String DATATYPE_CACHE = PREFIX + "DATATYPE_CACHE"; | ||
23 | private static final String AGGREGATOR_CACHE = PREFIX + "AGGREGATOR_CACHE"; | ||
24 | |||
25 | @Inject | ||
26 | private IQualifiedNameProvider qualifiedNameProvider; | ||
27 | |||
28 | @Inject | ||
29 | private IResourceScopeCache cache; | ||
30 | |||
31 | public Signature getSignature(Relation relation) { | ||
32 | var signatures = cache.get(SIGNATURE_CACHE, relation.eResource(), () -> new HashMap<Relation, Signature>()); | ||
33 | return signatures.computeIfAbsent(relation, this::computeSignature); | ||
34 | } | ||
35 | |||
36 | public int getArity(Relation relation) { | ||
37 | return getSignature(relation).parameterTypes().size(); | ||
38 | } | ||
39 | |||
40 | private Signature computeSignature(Relation relation) { | ||
41 | return new Signature(getParameterTypes(relation), getResultType(relation)); | ||
42 | } | ||
43 | |||
44 | private List<FixedType> getParameterTypes(Relation relation) { | ||
45 | return switch (relation) { | ||
46 | case ClassDeclaration ignored -> List.of(ExprType.NODE); | ||
47 | case EnumDeclaration ignored -> List.of(ExprType.NODE); | ||
48 | case DatatypeDeclaration datatypeDeclaration -> List.of(getDataType(datatypeDeclaration)); | ||
49 | case ReferenceDeclaration referenceDeclaration -> { | ||
50 | if (referenceDeclaration.getReferenceType() instanceof DatatypeDeclaration) { | ||
51 | yield List.of(ExprType.NODE); | ||
52 | } | ||
53 | yield List.of(ExprType.NODE, ExprType.NODE); | ||
54 | } | ||
55 | case ParametricDefinition parametricDefinition -> { | ||
56 | var parameters = parametricDefinition.getParameters(); | ||
57 | var exprTypes = new ArrayList<FixedType>(parameters.size()); | ||
58 | for (var parameter : parameters) { | ||
59 | if (parameter.getParameterType() instanceof DatatypeDeclaration datatypeDeclaration) { | ||
60 | exprTypes.add(getDataType(datatypeDeclaration)); | ||
61 | } else { | ||
62 | exprTypes.add(ExprType.NODE); | ||
63 | } | ||
64 | } | ||
65 | yield List.copyOf(exprTypes); | ||
66 | } | ||
67 | default -> throw new IllegalArgumentException("Unknown Relation: " + relation); | ||
68 | }; | ||
69 | } | ||
70 | |||
71 | private FixedType getResultType(Relation relation) { | ||
72 | if (relation instanceof ReferenceDeclaration referenceDeclaration && | ||
73 | referenceDeclaration.getReferenceType() instanceof DatatypeDeclaration datatypeDeclaration) { | ||
74 | return getDataType(datatypeDeclaration); | ||
75 | } | ||
76 | return ExprType.LITERAL; | ||
77 | } | ||
78 | |||
79 | public DataExprType getDataType(DatatypeDeclaration datatypeDeclaration) { | ||
80 | var dataTypes = cache.get(DATATYPE_CACHE, datatypeDeclaration.eResource(), | ||
81 | () -> new HashMap<DatatypeDeclaration, DataExprType>()); | ||
82 | return dataTypes.computeIfAbsent(datatypeDeclaration, this::computeDataType); | ||
83 | } | ||
84 | |||
85 | private DataExprType computeDataType(DatatypeDeclaration datatypeDeclaration) { | ||
86 | var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(datatypeDeclaration); | ||
87 | if (qualifiedName == null) { | ||
88 | throw new IllegalArgumentException("Datatype declaration has no qualified name: " + datatypeDeclaration); | ||
89 | } | ||
90 | return new DataExprType(qualifiedName); | ||
91 | } | ||
92 | |||
93 | public AggregatorName getAggregatorName(AggregatorDeclaration aggregatorDeclaration) { | ||
94 | var dataTypes = cache.get(AGGREGATOR_CACHE, aggregatorDeclaration.eResource(), | ||
95 | () -> new HashMap<AggregatorDeclaration, AggregatorName>()); | ||
96 | return dataTypes.computeIfAbsent(aggregatorDeclaration, this::computeAggregatorName); | ||
97 | } | ||
98 | |||
99 | private AggregatorName computeAggregatorName(AggregatorDeclaration aggregatorDeclaration) { | ||
100 | var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(aggregatorDeclaration); | ||
101 | if (qualifiedName == null) { | ||
102 | throw new IllegalArgumentException( | ||
103 | "Aggregator declaration has no qualified name: " + aggregatorDeclaration); | ||
104 | } | ||
105 | return new AggregatorName(qualifiedName); | ||
106 | } | ||
107 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/typesystem/TypedModule.java b/subprojects/language/src/main/java/tools/refinery/language/typesystem/TypedModule.java new file mode 100644 index 00000000..de923e0d --- /dev/null +++ b/subprojects/language/src/main/java/tools/refinery/language/typesystem/TypedModule.java | |||
@@ -0,0 +1,568 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.typesystem; | ||
7 | |||
8 | import com.google.inject.Inject; | ||
9 | import org.eclipse.emf.common.util.Diagnostic; | ||
10 | import org.eclipse.emf.ecore.EObject; | ||
11 | import org.eclipse.emf.ecore.EStructuralFeature; | ||
12 | import org.eclipse.xtext.validation.CheckType; | ||
13 | import org.eclipse.xtext.validation.FeatureBasedDiagnostic; | ||
14 | import tools.refinery.language.expressions.BuiltinTermInterpreter; | ||
15 | import tools.refinery.language.expressions.TermInterpreter; | ||
16 | import tools.refinery.language.model.problem.*; | ||
17 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; | ||
18 | import tools.refinery.language.validation.ProblemValidator; | ||
19 | |||
20 | import java.util.*; | ||
21 | |||
22 | public class TypedModule { | ||
23 | private static final String OPERAND_TYPE_ERROR_MESSAGE = "Cannot determine operand type."; | ||
24 | |||
25 | @Inject | ||
26 | private SignatureProvider signatureProvider; | ||
27 | |||
28 | @Inject | ||
29 | private ImportAdapterProvider importAdapterProvider; | ||
30 | |||
31 | private TermInterpreter interpreter; | ||
32 | private final Map<Variable, List<AssignmentExpr>> assignments = new LinkedHashMap<>(); | ||
33 | private final Map<Variable, FixedType> variableTypes = new HashMap<>(); | ||
34 | private final Map<Expr, ExprType> expressionTypes = new HashMap<>(); | ||
35 | private final Set<Variable> variablesToProcess = new LinkedHashSet<>(); | ||
36 | private final List<FeatureBasedDiagnostic> diagnostics = new ArrayList<>(); | ||
37 | |||
38 | void setProblem(Problem problem) { | ||
39 | interpreter = importAdapterProvider.getTermInterpreter(problem); | ||
40 | gatherAssignments(problem); | ||
41 | checkTypes(problem); | ||
42 | } | ||
43 | |||
44 | private void gatherAssignments(Problem problem) { | ||
45 | var iterator = problem.eAllContents(); | ||
46 | while (iterator.hasNext()) { | ||
47 | var eObject = iterator.next(); | ||
48 | if (!(eObject instanceof AssignmentExpr assignmentExpr)) { | ||
49 | continue; | ||
50 | } | ||
51 | if (assignmentExpr.getLeft() instanceof VariableOrNodeExpr variableOrNodeExpr && | ||
52 | variableOrNodeExpr.getVariableOrNode() instanceof Variable variable) { | ||
53 | var assignmentList = assignments.computeIfAbsent(variable, ignored -> new ArrayList<>(1)); | ||
54 | assignmentList.add(assignmentExpr); | ||
55 | } | ||
56 | iterator.prune(); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | private void checkTypes(Problem problem) { | ||
61 | for (var statement : problem.getStatements()) { | ||
62 | switch (statement) { | ||
63 | case PredicateDefinition predicateDefinition -> checkTypes(predicateDefinition); | ||
64 | case Assertion assertion -> checkTypes(assertion); | ||
65 | default -> { | ||
66 | // Nothing to type check. | ||
67 | } | ||
68 | } | ||
69 | } | ||
70 | } | ||
71 | |||
72 | private void checkTypes(PredicateDefinition predicateDefinition) { | ||
73 | for (var conjunction : predicateDefinition.getBodies()) { | ||
74 | for (var literal : conjunction.getLiterals()) { | ||
75 | coerceIntoLiteral(literal); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | |||
80 | private void checkTypes(Assertion assertion) { | ||
81 | var relation = assertion.getRelation(); | ||
82 | var value = assertion.getValue(); | ||
83 | if (relation == null) { | ||
84 | return; | ||
85 | } | ||
86 | var type = signatureProvider.getSignature(relation).resultType(); | ||
87 | if (type == ExprType.LITERAL) { | ||
88 | if (value == null) { | ||
89 | return; | ||
90 | } | ||
91 | expectType(value, BuiltinTermInterpreter.BOOLEAN_TYPE); | ||
92 | return; | ||
93 | } | ||
94 | if (value == null) { | ||
95 | var message = "Assertion value of type %s is required.".formatted(type); | ||
96 | error(message, assertion, ProblemPackage.Literals.ASSERTION__RELATION, 0, ProblemValidator.TYPE_ERROR); | ||
97 | } | ||
98 | expectType(value, type); | ||
99 | } | ||
100 | |||
101 | public List<FeatureBasedDiagnostic> getDiagnostics() { | ||
102 | return diagnostics; | ||
103 | } | ||
104 | |||
105 | public FixedType getVariableType(Variable variable) { | ||
106 | // We can't use computeIfAbsent here, because translating referenced queries calls this method in a reentrant | ||
107 | // way, which would cause a ConcurrentModificationException with computeIfAbsent. | ||
108 | @SuppressWarnings("squid:S3824") | ||
109 | var type = variableTypes.get(variable); | ||
110 | //noinspection Java8MapApi | ||
111 | if (type == null) { | ||
112 | type = computeVariableType(variable); | ||
113 | variableTypes.put(variable, type); | ||
114 | } | ||
115 | return type; | ||
116 | } | ||
117 | |||
118 | private FixedType computeVariableType(Variable variable) { | ||
119 | if (variable instanceof Parameter) { | ||
120 | return computeUnassignedVariableType(variable); | ||
121 | } | ||
122 | var assignmnentList = assignments.get(variable); | ||
123 | if (assignmnentList == null || assignmnentList.isEmpty()) { | ||
124 | return computeUnassignedVariableType(variable); | ||
125 | } | ||
126 | if (variablesToProcess.contains(variable)) { | ||
127 | throw new IllegalStateException("Circular reference to variable: " + variable.getName()); | ||
128 | } | ||
129 | if (assignmnentList.size() > 1) { | ||
130 | var message = "Multiple assignments for variable '%s'.".formatted(variable.getName()); | ||
131 | for (var assignment : assignmnentList) { | ||
132 | error(message, assignment, ProblemPackage.Literals.BINARY_EXPR__LEFT, 0, | ||
133 | ProblemValidator.INVALID_ASSIGNMENT_ISSUE); | ||
134 | } | ||
135 | return ExprType.INVALID; | ||
136 | } | ||
137 | var assignment = assignmnentList.getFirst(); | ||
138 | variablesToProcess.add(variable); | ||
139 | try { | ||
140 | var assignedType = getExpressionType(assignment.getRight()); | ||
141 | if (assignedType instanceof MutableType) { | ||
142 | var message = "Cannot determine type of variable '%s'.".formatted(variable.getName()); | ||
143 | error(message, assignment, ProblemPackage.Literals.BINARY_EXPR__RIGHT, 0, ProblemValidator.TYPE_ERROR); | ||
144 | return ExprType.INVALID; | ||
145 | } | ||
146 | if (assignedType instanceof DataExprType dataExprType) { | ||
147 | return dataExprType; | ||
148 | } | ||
149 | if (assignedType != ExprType.INVALID) { | ||
150 | var message = "Expected data expression for variable '%s', got %s instead." | ||
151 | .formatted(variable.getName(), assignedType); | ||
152 | error(message, assignment, ProblemPackage.Literals.BINARY_EXPR__RIGHT, 0, ProblemValidator.TYPE_ERROR); | ||
153 | } | ||
154 | return ExprType.INVALID; | ||
155 | } finally { | ||
156 | variablesToProcess.remove(variable); | ||
157 | } | ||
158 | } | ||
159 | |||
160 | private FixedType computeUnassignedVariableType(Variable variable) { | ||
161 | if (variable instanceof Parameter parameter && | ||
162 | parameter.getParameterType() instanceof DatatypeDeclaration datatypeDeclaration) { | ||
163 | return signatureProvider.getDataType(datatypeDeclaration); | ||
164 | } | ||
165 | // Parameters without an explicit datatype annotation are node variables. | ||
166 | return ExprType.NODE; | ||
167 | } | ||
168 | |||
169 | public ExprType getExpressionType(Expr expr) { | ||
170 | // We can't use computeIfAbsent here, because translating referenced queries calls this method in a reentrant | ||
171 | // way, which would cause a ConcurrentModificationException with computeIfAbsent. | ||
172 | @SuppressWarnings("squid:S3824") | ||
173 | var type = expressionTypes.get(expr); | ||
174 | //noinspection Java8MapApi | ||
175 | if (type == null) { | ||
176 | type = computeExpressionType(expr); | ||
177 | expressionTypes.put(expr, type); | ||
178 | } | ||
179 | return type.unwrapIfSet(); | ||
180 | } | ||
181 | |||
182 | private ExprType computeExpressionType(Expr expr) { | ||
183 | return switch (expr) { | ||
184 | case LogicConstant logicConstant -> computeExpressionType(logicConstant); | ||
185 | case IntConstant ignored -> BuiltinTermInterpreter.INT_TYPE; | ||
186 | case RealConstant ignored -> BuiltinTermInterpreter.REAL_TYPE; | ||
187 | case StringConstant ignored -> BuiltinTermInterpreter.STRING_TYPE; | ||
188 | case InfiniteConstant ignored -> new MutableType(); | ||
189 | case VariableOrNodeExpr variableOrNodeExpr -> computeExpressionType(variableOrNodeExpr); | ||
190 | case AssignmentExpr assignmentExpr -> computeExpressionType(assignmentExpr); | ||
191 | case Atom atom -> computeExpressionType(atom); | ||
192 | case NegationExpr negationExpr -> computeExpressionType(negationExpr); | ||
193 | case ArithmeticUnaryExpr arithmeticUnaryExpr -> computeExpressionType(arithmeticUnaryExpr); | ||
194 | case CountExpr countExpr -> computeExpressionType(countExpr); | ||
195 | case AggregationExpr aggregationExpr -> computeExpressionType(aggregationExpr); | ||
196 | case ComparisonExpr comparisonExpr -> computeExpressionType(comparisonExpr); | ||
197 | case LatticeBinaryExpr latticeBinaryExpr -> computeExpressionType(latticeBinaryExpr); | ||
198 | case RangeExpr rangeExpr -> computeExpressionType(rangeExpr); | ||
199 | case ArithmeticBinaryExpr arithmeticBinaryExpr -> computeExpressionType(arithmeticBinaryExpr); | ||
200 | case CastExpr castExpr -> computeExpressionType(castExpr); | ||
201 | default -> { | ||
202 | error("Unknown expression: " + expr.getClass().getSimpleName(), expr, null, 0, | ||
203 | ProblemValidator.UNKNOWN_EXPRESSION_ISSUE); | ||
204 | yield ExprType.INVALID; | ||
205 | } | ||
206 | }; | ||
207 | } | ||
208 | |||
209 | private ExprType computeExpressionType(LogicConstant expr) { | ||
210 | return switch (expr.getLogicValue()) { | ||
211 | case TRUE, FALSE -> BuiltinTermInterpreter.BOOLEAN_TYPE; | ||
212 | case UNKNOWN, ERROR -> new MutableType(); | ||
213 | case null -> ExprType.INVALID; | ||
214 | }; | ||
215 | } | ||
216 | |||
217 | private ExprType computeExpressionType(VariableOrNodeExpr expr) { | ||
218 | var target = expr.getVariableOrNode(); | ||
219 | if (target == null || target.eIsProxy()) { | ||
220 | return ExprType.INVALID; | ||
221 | } | ||
222 | return switch (target) { | ||
223 | case Node ignored -> ExprType.NODE; | ||
224 | case Variable variable -> { | ||
225 | if (variablesToProcess.contains(variable)) { | ||
226 | var message = "Circular reference to variable '%s'.".formatted(variable.getName()); | ||
227 | error(message, expr, ProblemPackage.Literals.VARIABLE_OR_NODE_EXPR__VARIABLE_OR_NODE, 0, | ||
228 | ProblemValidator.INVALID_ASSIGNMENT_ISSUE); | ||
229 | yield ExprType.INVALID; | ||
230 | } | ||
231 | yield getVariableType(variable); | ||
232 | } | ||
233 | default -> { | ||
234 | error("Unknown variable: " + target.getName(), expr, | ||
235 | ProblemPackage.Literals.VARIABLE_OR_NODE_EXPR__VARIABLE_OR_NODE, 0, | ||
236 | ProblemValidator.UNKNOWN_EXPRESSION_ISSUE); | ||
237 | yield ExprType.INVALID; | ||
238 | } | ||
239 | }; | ||
240 | } | ||
241 | |||
242 | private ExprType computeExpressionType(AssignmentExpr expr) { | ||
243 | // Force the left side to type check. Since the left side is a variable, it will force the right side to also | ||
244 | // type check in order to infer the variable type. | ||
245 | return getExpressionType(expr.getLeft()) == ExprType.INVALID ? ExprType.INVALID : ExprType.LITERAL; | ||
246 | } | ||
247 | |||
248 | private ExprType computeExpressionType(Atom atom) { | ||
249 | var relation = atom.getRelation(); | ||
250 | if (relation == null || relation.eIsProxy()) { | ||
251 | return ExprType.INVALID; | ||
252 | } | ||
253 | if (relation instanceof DatatypeDeclaration) { | ||
254 | var message = "Invalid call to data type. Use 'as %s' for casting.".formatted( | ||
255 | relation.getName()); | ||
256 | error(message, atom, ProblemPackage.Literals.ATOM__RELATION, 0, ProblemValidator.TYPE_ERROR); | ||
257 | } | ||
258 | var signature = signatureProvider.getSignature(relation); | ||
259 | var parameterTypes = signature.parameterTypes(); | ||
260 | var arguments = atom.getArguments(); | ||
261 | int size = Math.min(parameterTypes.size(), arguments.size()); | ||
262 | boolean ok = parameterTypes.size() == arguments.size(); | ||
263 | for (int i = 0; i < size; i++) { | ||
264 | var parameterType = parameterTypes.get(i); | ||
265 | var argument = arguments.get(i); | ||
266 | if (!expectType(argument, parameterType)) { | ||
267 | // Avoid short-circuiting to let us type check all arguments. | ||
268 | ok = false; | ||
269 | } | ||
270 | } | ||
271 | return ok ? signature.resultType() : ExprType.INVALID; | ||
272 | } | ||
273 | |||
274 | private ExprType computeExpressionType(NegationExpr negationExpr) { | ||
275 | var body = negationExpr.getBody(); | ||
276 | if (body == null) { | ||
277 | return ExprType.INVALID; | ||
278 | } | ||
279 | var actualType = getExpressionType(body); | ||
280 | if (actualType == ExprType.LITERAL) { | ||
281 | // Negation of literals yields another (non-enumerable) literal. | ||
282 | return ExprType.LITERAL; | ||
283 | } | ||
284 | if (actualType == DataExprType.INVALID) { | ||
285 | return ExprType.INVALID; | ||
286 | } | ||
287 | if (actualType instanceof MutableType) { | ||
288 | error(OPERAND_TYPE_ERROR_MESSAGE, body, null, 0, ProblemValidator.TYPE_ERROR); | ||
289 | return ExprType.INVALID; | ||
290 | } | ||
291 | if (actualType instanceof DataExprType dataExprType) { | ||
292 | var result = interpreter.getNegationType(dataExprType); | ||
293 | if (result.isPresent()) { | ||
294 | return result.get(); | ||
295 | } | ||
296 | } | ||
297 | var message = "Data type %s does not support negation.".formatted(actualType); | ||
298 | error(message, negationExpr, null, 0, ProblemValidator.TYPE_ERROR); | ||
299 | return ExprType.INVALID; | ||
300 | } | ||
301 | |||
302 | private ExprType computeExpressionType(ArithmeticUnaryExpr expr) { | ||
303 | var op = expr.getOp(); | ||
304 | var body = expr.getBody(); | ||
305 | if (op == null || body == null) { | ||
306 | return ExprType.INVALID; | ||
307 | } | ||
308 | var actualType = getExpressionType(body); | ||
309 | if (actualType == DataExprType.INVALID) { | ||
310 | return ExprType.INVALID; | ||
311 | } | ||
312 | if (actualType instanceof MutableType) { | ||
313 | error(OPERAND_TYPE_ERROR_MESSAGE, body, null, 0, ProblemValidator.TYPE_ERROR); | ||
314 | return ExprType.INVALID; | ||
315 | } | ||
316 | if (actualType instanceof DataExprType dataExprType) { | ||
317 | var result = interpreter.getUnaryOperationType(op, dataExprType); | ||
318 | if (result.isPresent()) { | ||
319 | return result.get(); | ||
320 | } | ||
321 | } | ||
322 | var message = "Unsupported operator for data type %s.".formatted(actualType); | ||
323 | error(message, expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
324 | return ExprType.INVALID; | ||
325 | } | ||
326 | |||
327 | private ExprType computeExpressionType(CountExpr countExpr) { | ||
328 | return coerceIntoLiteral(countExpr.getBody()) ? BuiltinTermInterpreter.INT_TYPE : ExprType.INVALID; | ||
329 | } | ||
330 | |||
331 | private ExprType computeExpressionType(AggregationExpr expr) { | ||
332 | var aggregator = expr.getAggregator(); | ||
333 | if (aggregator == null || aggregator.eIsProxy()) { | ||
334 | return null; | ||
335 | } | ||
336 | // Avoid short-circuiting to let us type check both the value and the condition. | ||
337 | boolean ok = coerceIntoLiteral(expr.getCondition()); | ||
338 | var value = expr.getValue(); | ||
339 | var actualType = getExpressionType(value); | ||
340 | if (actualType == ExprType.INVALID) { | ||
341 | return ExprType.INVALID; | ||
342 | } | ||
343 | if (actualType instanceof MutableType) { | ||
344 | error(OPERAND_TYPE_ERROR_MESSAGE, value, null, 0, ProblemValidator.TYPE_ERROR); | ||
345 | return ExprType.INVALID; | ||
346 | } | ||
347 | if (actualType instanceof DataExprType dataExprType) { | ||
348 | var aggregatorName = signatureProvider.getAggregatorName(aggregator); | ||
349 | var result = interpreter.getAggregationType(aggregatorName, dataExprType); | ||
350 | if (result.isPresent()) { | ||
351 | return ok ? result.get() : ExprType.INVALID; | ||
352 | } | ||
353 | } | ||
354 | var message = "Unsupported aggregator for type %s.".formatted(actualType); | ||
355 | error(message, expr, ProblemPackage.Literals.AGGREGATION_EXPR__AGGREGATOR, 0, ProblemValidator.TYPE_ERROR); | ||
356 | return ExprType.INVALID; | ||
357 | } | ||
358 | |||
359 | private ExprType computeExpressionType(ComparisonExpr expr) { | ||
360 | var left = expr.getLeft(); | ||
361 | var right = expr.getRight(); | ||
362 | var op = expr.getOp(); | ||
363 | if (op == ComparisonOp.NODE_EQ || op == ComparisonOp.NODE_NOT_EQ) { | ||
364 | // Avoid short-circuiting to let us type check both arguments. | ||
365 | boolean leftOk = expectType(left, ExprType.NODE); | ||
366 | boolean rightOk = expectType(right, ExprType.NODE); | ||
367 | return leftOk && rightOk ? ExprType.LITERAL : ExprType.INVALID; | ||
368 | } | ||
369 | if (!(getCommonDataType(expr) instanceof DataExprType commonType)) { | ||
370 | return ExprType.INVALID; | ||
371 | } | ||
372 | // Data equality and inequality are always supported for data types. | ||
373 | if (op != ComparisonOp.EQ && op != ComparisonOp.NOT_EQ && !interpreter.isComparisonSupported(commonType)) { | ||
374 | var message = "Data type %s does not support comparison.".formatted(commonType); | ||
375 | error(message, expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
376 | return ExprType.INVALID; | ||
377 | } | ||
378 | return BuiltinTermInterpreter.BOOLEAN_TYPE; | ||
379 | } | ||
380 | |||
381 | private ExprType computeExpressionType(LatticeBinaryExpr expr) { | ||
382 | // Lattice operations are always supported for data types. | ||
383 | return getCommonDataType(expr); | ||
384 | } | ||
385 | |||
386 | private ExprType computeExpressionType(RangeExpr expr) { | ||
387 | var left = expr.getLeft(); | ||
388 | var right = expr.getRight(); | ||
389 | if (left instanceof InfiniteConstant && right instanceof InfiniteConstant) { | ||
390 | // `*..*` is equivalent to `unknown` if neither subexpression have been typed yet. | ||
391 | var mutableType = new MutableType(); | ||
392 | if (expressionTypes.putIfAbsent(left, mutableType) == null && | ||
393 | expressionTypes.put(right, mutableType) == null) { | ||
394 | return mutableType; | ||
395 | } | ||
396 | } | ||
397 | if (!(getCommonDataType(expr) instanceof DataExprType commonType)) { | ||
398 | return ExprType.INVALID; | ||
399 | } | ||
400 | if (!interpreter.isRangeSupported(commonType)) { | ||
401 | var message = "Data type %s does not support ranges.".formatted(commonType); | ||
402 | error(message, expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
403 | return ExprType.INVALID; | ||
404 | } | ||
405 | return commonType; | ||
406 | } | ||
407 | |||
408 | private ExprType computeExpressionType(ArithmeticBinaryExpr expr) { | ||
409 | var op = expr.getOp(); | ||
410 | var left = expr.getLeft(); | ||
411 | var right = expr.getRight(); | ||
412 | if (op == null || left == null || right == null) { | ||
413 | return ExprType.INVALID; | ||
414 | } | ||
415 | // Avoid short-circuiting to let us type check both arguments. | ||
416 | var leftType = getExpressionType(left); | ||
417 | var rightType = getExpressionType(right); | ||
418 | if (leftType == ExprType.INVALID || rightType == ExprType.INVALID) { | ||
419 | return ExprType.INVALID; | ||
420 | } | ||
421 | if (rightType instanceof MutableType rightMutableType) { | ||
422 | if (leftType instanceof DataExprType leftExprType) { | ||
423 | rightMutableType.setActualType(leftExprType); | ||
424 | rightType = leftExprType; | ||
425 | } else { | ||
426 | error(OPERAND_TYPE_ERROR_MESSAGE, right, null, 0, ProblemValidator.TYPE_ERROR); | ||
427 | return ExprType.INVALID; | ||
428 | } | ||
429 | } | ||
430 | if (leftType instanceof MutableType leftMutableType) { | ||
431 | if (rightType instanceof DataExprType rightExprType) { | ||
432 | leftMutableType.setActualType(rightExprType); | ||
433 | leftType = rightExprType; | ||
434 | } else { | ||
435 | error(OPERAND_TYPE_ERROR_MESSAGE, left, null, 0, ProblemValidator.TYPE_ERROR); | ||
436 | return ExprType.INVALID; | ||
437 | } | ||
438 | } | ||
439 | if (leftType instanceof DataExprType leftExprType && rightType instanceof DataExprType rightExprType) { | ||
440 | var result = interpreter.getBinaryOperationType(op, leftExprType, rightExprType); | ||
441 | if (result.isPresent()) { | ||
442 | return result.get(); | ||
443 | } | ||
444 | } | ||
445 | var messageBuilder = new StringBuilder("Unsupported operator for "); | ||
446 | if (leftType.equals(rightType)) { | ||
447 | messageBuilder.append("data type ").append(leftType); | ||
448 | } else { | ||
449 | messageBuilder.append("data types ").append(leftType).append(" and ").append(rightType); | ||
450 | } | ||
451 | messageBuilder.append("."); | ||
452 | error(messageBuilder.toString(), expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
453 | return ExprType.INVALID; | ||
454 | } | ||
455 | |||
456 | private ExprType computeExpressionType(CastExpr expr) { | ||
457 | var body = expr.getBody(); | ||
458 | var targetRelation = expr.getTargetType(); | ||
459 | if (body == null || !(targetRelation instanceof DatatypeDeclaration targetDeclaration)) { | ||
460 | return null; | ||
461 | } | ||
462 | var actualType = getExpressionType(body); | ||
463 | if (actualType == ExprType.INVALID) { | ||
464 | return ExprType.INVALID; | ||
465 | } | ||
466 | var targetType = signatureProvider.getDataType(targetDeclaration); | ||
467 | if (actualType instanceof MutableType mutableType) { | ||
468 | // Type ascription for polymorphic literal (e.g., `unknown as int` for the set of all integers). | ||
469 | mutableType.setActualType(targetType); | ||
470 | return targetType; | ||
471 | } | ||
472 | if (actualType.equals(targetType)) { | ||
473 | return targetType; | ||
474 | } | ||
475 | if (actualType instanceof DataExprType dataExprType && interpreter.isCastSupported(dataExprType, targetType)) { | ||
476 | return targetType; | ||
477 | } | ||
478 | var message = "Casting from %s to %s is not supported.".formatted(actualType, targetType); | ||
479 | error(message, expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
480 | return ExprType.INVALID; | ||
481 | } | ||
482 | |||
483 | private FixedType getCommonDataType(BinaryExpr expr) { | ||
484 | var commonType = getCommonType(expr); | ||
485 | if (!(commonType instanceof DataExprType) && commonType != ExprType.INVALID) { | ||
486 | var message = "Expected data expression, got %s instead.".formatted(commonType); | ||
487 | error(message, expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
488 | return ExprType.INVALID; | ||
489 | } | ||
490 | return commonType; | ||
491 | } | ||
492 | |||
493 | private FixedType getCommonType(BinaryExpr expr) { | ||
494 | var left = expr.getLeft(); | ||
495 | var right = expr.getRight(); | ||
496 | if (left == null || right == null) { | ||
497 | return ExprType.INVALID; | ||
498 | } | ||
499 | var leftType = getExpressionType(left); | ||
500 | if (leftType instanceof FixedType fixedLeftType) { | ||
501 | return expectType(right, fixedLeftType) ? fixedLeftType : ExprType.INVALID; | ||
502 | } else { | ||
503 | var rightType = getExpressionType(right); | ||
504 | if (rightType instanceof FixedType fixedRightType) { | ||
505 | return expectType(left, leftType, fixedRightType) ? fixedRightType : ExprType.INVALID; | ||
506 | } else { | ||
507 | error(OPERAND_TYPE_ERROR_MESSAGE, left, null, 0, ProblemValidator.TYPE_ERROR); | ||
508 | error(OPERAND_TYPE_ERROR_MESSAGE, right, null, 0, ProblemValidator.TYPE_ERROR); | ||
509 | return ExprType.INVALID; | ||
510 | } | ||
511 | } | ||
512 | } | ||
513 | |||
514 | private boolean coerceIntoLiteral(Expr expr) { | ||
515 | if (expr == null) { | ||
516 | return false; | ||
517 | } | ||
518 | var actualType = getExpressionType(expr); | ||
519 | if (actualType == ExprType.LITERAL) { | ||
520 | return true; | ||
521 | } | ||
522 | return expectType(expr, actualType, BuiltinTermInterpreter.BOOLEAN_TYPE); | ||
523 | } | ||
524 | |||
525 | private boolean expectType(Expr expr, FixedType expectedType) { | ||
526 | if (expr == null) { | ||
527 | return false; | ||
528 | } | ||
529 | var actualType = getExpressionType(expr); | ||
530 | return expectType(expr, actualType, expectedType); | ||
531 | } | ||
532 | |||
533 | private boolean expectType(Expr expr, ExprType actualType, FixedType expectedType) { | ||
534 | if (expectedType == ExprType.INVALID) { | ||
535 | // Silence any further errors is the expected type failed to compute. | ||
536 | return false; | ||
537 | } | ||
538 | if (actualType.equals(expectedType)) { | ||
539 | return true; | ||
540 | } | ||
541 | if (actualType == ExprType.INVALID) { | ||
542 | // We have already emitted an error previously. | ||
543 | return false; | ||
544 | } | ||
545 | if (actualType instanceof MutableType mutableType && expectedType instanceof DataExprType dataExprType) { | ||
546 | mutableType.setActualType(dataExprType); | ||
547 | return true; | ||
548 | } | ||
549 | var builder = new StringBuilder() | ||
550 | .append("Expected ") | ||
551 | .append(expectedType) | ||
552 | .append(" expression"); | ||
553 | if (!(actualType instanceof MutableType)) { | ||
554 | builder.append(", got ") | ||
555 | .append(actualType) | ||
556 | .append(" instead"); | ||
557 | } | ||
558 | builder.append("."); | ||
559 | error(builder.toString(), expr, null, 0, ProblemValidator.TYPE_ERROR); | ||
560 | return false; | ||
561 | } | ||
562 | |||
563 | private void error(String message, EObject object, EStructuralFeature feature, int index, String code, | ||
564 | String... issueData) { | ||
565 | diagnostics.add(new FeatureBasedDiagnostic(Diagnostic.ERROR, message, object, feature, index, | ||
566 | CheckType.NORMAL, code, issueData)); | ||
567 | } | ||
568 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java b/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java index c87fa044..72f23e85 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java +++ b/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -7,7 +7,56 @@ package tools.refinery.language.utils; | |||
7 | 7 | ||
8 | import tools.refinery.language.model.problem.*; | 8 | import tools.refinery.language.model.problem.*; |
9 | 9 | ||
10 | public record BuiltinSymbols(Problem problem, ClassDeclaration node, PredicateDefinition equals, | 10 | public final class BuiltinSymbols { |
11 | PredicateDefinition exists, ClassDeclaration contained, PredicateDefinition contains, | 11 | private final Problem problem; |
12 | PredicateDefinition invalidContainer) { | 12 | private final ClassDeclaration node; |
13 | private final PredicateDefinition equals; | ||
14 | private final PredicateDefinition exists; | ||
15 | private final ClassDeclaration contained; | ||
16 | private final PredicateDefinition contains; | ||
17 | private final PredicateDefinition invalidContainer; | ||
18 | |||
19 | public BuiltinSymbols(Problem problem) { | ||
20 | this.problem = problem; | ||
21 | node = getDeclaration(ClassDeclaration.class, "node"); | ||
22 | equals = getDeclaration(PredicateDefinition.class, "equals"); | ||
23 | exists = getDeclaration(PredicateDefinition.class, "exists"); | ||
24 | contained = getDeclaration(ClassDeclaration.class, "contained"); | ||
25 | contains = getDeclaration(PredicateDefinition.class, "contains"); | ||
26 | invalidContainer = getDeclaration(PredicateDefinition.class, "invalidContainer"); | ||
27 | } | ||
28 | |||
29 | public Problem problem() { | ||
30 | return problem; | ||
31 | } | ||
32 | |||
33 | public ClassDeclaration node() { | ||
34 | return node; | ||
35 | } | ||
36 | |||
37 | public PredicateDefinition equals() { | ||
38 | return equals; | ||
39 | } | ||
40 | |||
41 | public PredicateDefinition exists() { | ||
42 | return exists; | ||
43 | } | ||
44 | |||
45 | public ClassDeclaration contained() { | ||
46 | return contained; | ||
47 | } | ||
48 | |||
49 | public PredicateDefinition contains() { | ||
50 | return contains; | ||
51 | } | ||
52 | |||
53 | public PredicateDefinition invalidContainer() { | ||
54 | return invalidContainer; | ||
55 | } | ||
56 | |||
57 | private <T extends Statement & NamedElement> T getDeclaration(Class<T> type, String name) { | ||
58 | return problem.getStatements().stream().filter(type::isInstance).map(type::cast) | ||
59 | .filter(declaration -> name.equals(declaration.getName())).findFirst() | ||
60 | .orElseThrow(() -> new IllegalArgumentException("Built-in declaration " + name + " was not found")); | ||
61 | } | ||
13 | } | 62 | } |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java deleted file mode 100644 index 0bd1e50b..00000000 --- a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.utils; | ||
7 | |||
8 | import com.google.inject.Inject; | ||
9 | import com.google.inject.Singleton; | ||
10 | import org.eclipse.emf.ecore.EObject; | ||
11 | import org.eclipse.emf.ecore.resource.Resource; | ||
12 | import org.eclipse.xtext.util.IResourceScopeCache; | ||
13 | import org.eclipse.xtext.util.Tuples; | ||
14 | import tools.refinery.language.library.BuiltinLibrary; | ||
15 | import tools.refinery.language.model.problem.*; | ||
16 | |||
17 | import java.util.*; | ||
18 | |||
19 | @Singleton | ||
20 | public class ProblemDesugarer { | ||
21 | @Inject | ||
22 | private IResourceScopeCache cache = IResourceScopeCache.NullImpl.INSTANCE; | ||
23 | |||
24 | public Optional<Problem> getBuiltinProblem(EObject context) { | ||
25 | return Optional.ofNullable(context).map(EObject::eResource).flatMap(resource -> | ||
26 | cache.get("builtinProblem", resource, () -> doGetBuiltinProblem(resource))); | ||
27 | } | ||
28 | |||
29 | private Optional<Problem> doGetBuiltinProblem(Resource resource) { | ||
30 | return Optional.ofNullable(resource).map(Resource::getResourceSet) | ||
31 | .map(resourceSet -> resourceSet.getResource(BuiltinLibrary.BUILTIN_LIBRARY_URI, true)) | ||
32 | .map(Resource::getContents).filter(contents -> !contents.isEmpty()).map(List::getFirst) | ||
33 | .filter(Problem.class::isInstance).map(Problem.class::cast); | ||
34 | } | ||
35 | |||
36 | public Optional<BuiltinSymbols> getBuiltinSymbols(EObject context) { | ||
37 | return getBuiltinProblem(context).map(builtin -> | ||
38 | cache.get("builtinSymbols", builtin.eResource(), () -> doGetBuiltinSymbols(builtin))); | ||
39 | } | ||
40 | |||
41 | private BuiltinSymbols doGetBuiltinSymbols(Problem builtin) { | ||
42 | var node = doGetDeclaration(builtin, ClassDeclaration.class, "node"); | ||
43 | var equals = doGetDeclaration(builtin, PredicateDefinition.class, "equals"); | ||
44 | var exists = doGetDeclaration(builtin, PredicateDefinition.class, "exists"); | ||
45 | var contained = doGetDeclaration(builtin, ClassDeclaration.class, "contained"); | ||
46 | var contains = doGetDeclaration(builtin, PredicateDefinition.class, "contains"); | ||
47 | var invalidContainer = doGetDeclaration(builtin, PredicateDefinition.class, "invalidContainer"); | ||
48 | return new BuiltinSymbols(builtin, node, equals, exists, contained, contains, invalidContainer); | ||
49 | } | ||
50 | |||
51 | private <T extends Statement & NamedElement> T doGetDeclaration(Problem builtin, Class<T> type, String name) { | ||
52 | return builtin.getStatements().stream().filter(type::isInstance).map(type::cast) | ||
53 | .filter(declaration -> name.equals(declaration.getName())).findFirst() | ||
54 | .orElseThrow(() -> new IllegalArgumentException("Built-in declaration " + name + " was not found")); | ||
55 | } | ||
56 | |||
57 | public Collection<ClassDeclaration> getSuperclassesAndSelf(ClassDeclaration classDeclaration) { | ||
58 | return cache.get(Tuples.create(classDeclaration, "superclassesAndSelf"), classDeclaration.eResource(), | ||
59 | () -> doGetSuperclassesAndSelf(classDeclaration)); | ||
60 | } | ||
61 | |||
62 | private Collection<ClassDeclaration> doGetSuperclassesAndSelf(ClassDeclaration classDeclaration) { | ||
63 | var builtinSymbols = getBuiltinSymbols(classDeclaration); | ||
64 | Set<ClassDeclaration> found = new HashSet<>(); | ||
65 | builtinSymbols.ifPresent(symbols -> found.add(symbols.node())); | ||
66 | Deque<ClassDeclaration> queue = new ArrayDeque<>(); | ||
67 | queue.addLast(classDeclaration); | ||
68 | while (!queue.isEmpty()) { | ||
69 | ClassDeclaration current = queue.removeFirst(); | ||
70 | if (!found.contains(current)) { | ||
71 | found.add(current); | ||
72 | for (Relation superType : current.getSuperTypes()) { | ||
73 | if (superType instanceof ClassDeclaration superDeclaration) { | ||
74 | queue.addLast(superDeclaration); | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | return found; | ||
80 | } | ||
81 | |||
82 | public Collection<ReferenceDeclaration> getAllReferenceDeclarations(ClassDeclaration classDeclaration) { | ||
83 | return cache.get(Tuples.create(classDeclaration, "allReferenceDeclarations"), classDeclaration.eResource(), | ||
84 | () -> doGetAllReferenceDeclarations(classDeclaration)); | ||
85 | } | ||
86 | |||
87 | private Collection<ReferenceDeclaration> doGetAllReferenceDeclarations(ClassDeclaration classDeclaration) { | ||
88 | Set<ReferenceDeclaration> referenceDeclarations = new HashSet<>(); | ||
89 | for (ClassDeclaration superclass : getSuperclassesAndSelf(classDeclaration)) { | ||
90 | for (FeatureDeclaration featureDeclaration : superclass.getFeatureDeclarations()) { | ||
91 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) { | ||
92 | referenceDeclarations.add(referenceDeclaration); | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | return referenceDeclarations; | ||
97 | } | ||
98 | |||
99 | public boolean isContainmentReference(ReferenceDeclaration referenceDeclaration) { | ||
100 | return referenceDeclaration.getKind() == ReferenceKind.CONTAINMENT; | ||
101 | } | ||
102 | } | ||
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java index f70893e0..9daa8f61 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java +++ b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -81,6 +81,9 @@ public final class ProblemUtil { | |||
81 | } | 81 | } |
82 | 82 | ||
83 | public static boolean hasMultiplicityConstraint(ReferenceDeclaration referenceDeclaration) { | 83 | public static boolean hasMultiplicityConstraint(ReferenceDeclaration referenceDeclaration) { |
84 | if (referenceDeclaration.getReferenceType() instanceof DatatypeDeclaration) { | ||
85 | return false; | ||
86 | } | ||
84 | var opposite = referenceDeclaration.getOpposite(); | 87 | var opposite = referenceDeclaration.getOpposite(); |
85 | if (opposite != null && opposite.getKind() == ReferenceKind.CONTAINMENT) { | 88 | if (opposite != null && opposite.getKind() == ReferenceKind.CONTAINMENT) { |
86 | return false; | 89 | return false; |
@@ -95,17 +98,19 @@ public final class ProblemUtil { | |||
95 | return true; | 98 | return true; |
96 | } | 99 | } |
97 | 100 | ||
98 | public static int getArity(Relation relation) { | 101 | public static boolean isTypeLike(Relation relation) { |
99 | if (relation instanceof ClassDeclaration || relation instanceof EnumDeclaration) { | 102 | if (relation instanceof ClassDeclaration || relation instanceof EnumDeclaration || |
100 | return 1; | 103 | relation instanceof DatatypeDeclaration) { |
101 | } | 104 | return true; |
102 | if (relation instanceof ReferenceDeclaration) { | ||
103 | return 2; | ||
104 | } | 105 | } |
105 | if (relation instanceof PredicateDefinition predicateDefinition) { | 106 | if (relation instanceof PredicateDefinition predicateDefinition) { |
106 | return predicateDefinition.getParameters().size(); | 107 | return predicateDefinition.getParameters().size() == 1; |
107 | } | 108 | } |
108 | throw new IllegalArgumentException("Unknown Relation: " + relation); | 109 | return false; |
110 | } | ||
111 | |||
112 | public static boolean isContainmentReference(ReferenceDeclaration referenceDeclaration) { | ||
113 | return referenceDeclaration.getKind() == ReferenceKind.CONTAINMENT; | ||
109 | } | 114 | } |
110 | 115 | ||
111 | public static boolean isContainerReference(ReferenceDeclaration referenceDeclaration) { | 116 | public static boolean isContainerReference(ReferenceDeclaration referenceDeclaration) { |
@@ -116,7 +121,7 @@ public final class ProblemUtil { | |||
116 | return switch (kind) { | 121 | return switch (kind) { |
117 | case CONTAINMENT -> false; | 122 | case CONTAINMENT -> false; |
118 | case CONTAINER -> true; | 123 | case CONTAINER -> true; |
119 | case REFERENCE -> { | 124 | case DEFAULT, REFERENCE -> { |
120 | var opposite = referenceDeclaration.getOpposite(); | 125 | var opposite = referenceDeclaration.getOpposite(); |
121 | if (opposite == null) { | 126 | if (opposite == null) { |
122 | yield false; | 127 | yield false; |
diff --git a/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java b/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java index d9eb5fd3..745e2d2b 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java +++ b/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java | |||
@@ -10,6 +10,7 @@ | |||
10 | package tools.refinery.language.validation; | 10 | package tools.refinery.language.validation; |
11 | 11 | ||
12 | import com.google.inject.Inject; | 12 | import com.google.inject.Inject; |
13 | import org.eclipse.emf.common.util.Diagnostic; | ||
13 | import org.eclipse.emf.ecore.EObject; | 14 | import org.eclipse.emf.ecore.EObject; |
14 | import org.eclipse.emf.ecore.EReference; | 15 | import org.eclipse.emf.ecore.EReference; |
15 | import org.eclipse.xtext.EcoreUtil2; | 16 | import org.eclipse.xtext.EcoreUtil2; |
@@ -18,11 +19,15 @@ import org.eclipse.xtext.validation.Check; | |||
18 | import org.jetbrains.annotations.Nullable; | 19 | import org.jetbrains.annotations.Nullable; |
19 | import tools.refinery.language.model.problem.*; | 20 | import tools.refinery.language.model.problem.*; |
20 | import tools.refinery.language.naming.NamingUtil; | 21 | import tools.refinery.language.naming.NamingUtil; |
21 | import tools.refinery.language.scoping.imports.ImportAdapter; | 22 | import tools.refinery.language.scoping.imports.ImportAdapterProvider; |
22 | import tools.refinery.language.utils.ProblemDesugarer; | 23 | import tools.refinery.language.typesystem.ProblemTypeAnalyzer; |
24 | import tools.refinery.language.typesystem.SignatureProvider; | ||
23 | import tools.refinery.language.utils.ProblemUtil; | 25 | import tools.refinery.language.utils.ProblemUtil; |
24 | 26 | ||
25 | import java.util.*; | 27 | import java.util.ArrayList; |
28 | import java.util.LinkedHashMap; | ||
29 | import java.util.LinkedHashSet; | ||
30 | import java.util.Set; | ||
26 | 31 | ||
27 | /** | 32 | /** |
28 | * This class contains custom validation rules. | 33 | * This class contains custom validation rules. |
@@ -32,45 +37,39 @@ import java.util.*; | |||
32 | */ | 37 | */ |
33 | public class ProblemValidator extends AbstractProblemValidator { | 38 | public class ProblemValidator extends AbstractProblemValidator { |
34 | private static final String ISSUE_PREFIX = "tools.refinery.language.validation.ProblemValidator."; | 39 | private static final String ISSUE_PREFIX = "tools.refinery.language.validation.ProblemValidator."; |
35 | |||
36 | public static final String UNEXPECTED_MODULE_NAME_ISSUE = ISSUE_PREFIX + "UNEXPECTED_MODULE_NAME"; | 40 | public static final String UNEXPECTED_MODULE_NAME_ISSUE = ISSUE_PREFIX + "UNEXPECTED_MODULE_NAME"; |
37 | |||
38 | public static final String INVALID_IMPORT_ISSUE = ISSUE_PREFIX + "INVALID_IMPORT"; | 41 | public static final String INVALID_IMPORT_ISSUE = ISSUE_PREFIX + "INVALID_IMPORT"; |
39 | |||
40 | public static final String SINGLETON_VARIABLE_ISSUE = ISSUE_PREFIX + "SINGLETON_VARIABLE"; | 42 | public static final String SINGLETON_VARIABLE_ISSUE = ISSUE_PREFIX + "SINGLETON_VARIABLE"; |
41 | |||
42 | public static final String NODE_CONSTANT_ISSUE = ISSUE_PREFIX + "NODE_CONSTANT_ISSUE"; | 43 | public static final String NODE_CONSTANT_ISSUE = ISSUE_PREFIX + "NODE_CONSTANT_ISSUE"; |
43 | |||
44 | public static final String DUPLICATE_NAME_ISSUE = ISSUE_PREFIX + "DUPLICATE_NAME"; | 44 | public static final String DUPLICATE_NAME_ISSUE = ISSUE_PREFIX + "DUPLICATE_NAME"; |
45 | |||
46 | public static final String INVALID_MULTIPLICITY_ISSUE = ISSUE_PREFIX + "INVALID_MULTIPLICITY"; | 45 | public static final String INVALID_MULTIPLICITY_ISSUE = ISSUE_PREFIX + "INVALID_MULTIPLICITY"; |
47 | |||
48 | public static final String ZERO_MULTIPLICITY_ISSUE = ISSUE_PREFIX + "ZERO_MULTIPLICITY"; | 46 | public static final String ZERO_MULTIPLICITY_ISSUE = ISSUE_PREFIX + "ZERO_MULTIPLICITY"; |
49 | |||
50 | public static final String MISSING_OPPOSITE_ISSUE = ISSUE_PREFIX + "MISSING_OPPOSITE"; | 47 | public static final String MISSING_OPPOSITE_ISSUE = ISSUE_PREFIX + "MISSING_OPPOSITE"; |
51 | |||
52 | public static final String INVALID_OPPOSITE_ISSUE = ISSUE_PREFIX + "INVALID_OPPOSITE"; | 48 | public static final String INVALID_OPPOSITE_ISSUE = ISSUE_PREFIX + "INVALID_OPPOSITE"; |
53 | |||
54 | public static final String INVALID_SUPERTYPE_ISSUE = ISSUE_PREFIX + "INVALID_SUPERTYPE"; | 49 | public static final String INVALID_SUPERTYPE_ISSUE = ISSUE_PREFIX + "INVALID_SUPERTYPE"; |
55 | |||
56 | public static final String INVALID_REFERENCE_TYPE_ISSUE = ISSUE_PREFIX + "INVALID_REFERENCE_TYPE"; | 50 | public static final String INVALID_REFERENCE_TYPE_ISSUE = ISSUE_PREFIX + "INVALID_REFERENCE_TYPE"; |
57 | |||
58 | public static final String INVALID_ARITY_ISSUE = ISSUE_PREFIX + "INVALID_ARITY"; | 51 | public static final String INVALID_ARITY_ISSUE = ISSUE_PREFIX + "INVALID_ARITY"; |
59 | |||
60 | public static final String INVALID_TRANSITIVE_CLOSURE_ISSUE = ISSUE_PREFIX + "INVALID_TRANSITIVE_CLOSURE"; | 52 | public static final String INVALID_TRANSITIVE_CLOSURE_ISSUE = ISSUE_PREFIX + "INVALID_TRANSITIVE_CLOSURE"; |
61 | |||
62 | public static final String INVALID_VALUE_ISSUE = ISSUE_PREFIX + "INVALID_VALUE"; | 53 | public static final String INVALID_VALUE_ISSUE = ISSUE_PREFIX + "INVALID_VALUE"; |
63 | |||
64 | public static final String UNSUPPORTED_ASSERTION_ISSUE = ISSUE_PREFIX + "UNSUPPORTED_ASSERTION"; | 54 | public static final String UNSUPPORTED_ASSERTION_ISSUE = ISSUE_PREFIX + "UNSUPPORTED_ASSERTION"; |
55 | public static final String UNKNOWN_EXPRESSION_ISSUE = ISSUE_PREFIX + "UNKNOWN_EXPRESSION"; | ||
56 | public static final String INVALID_ASSIGNMENT_ISSUE = ISSUE_PREFIX + "INVALID_ASSIGNMENT"; | ||
57 | public static final String TYPE_ERROR = ISSUE_PREFIX + "TYPE_ERROR"; | ||
65 | 58 | ||
66 | @Inject | 59 | @Inject |
67 | private ReferenceCounter referenceCounter; | 60 | private ReferenceCounter referenceCounter; |
68 | 61 | ||
69 | @Inject | 62 | @Inject |
70 | private ProblemDesugarer desugarer; | 63 | private IQualifiedNameConverter qualifiedNameConverter; |
64 | |||
65 | @Inject | ||
66 | private ImportAdapterProvider importAdapterProvider; | ||
71 | 67 | ||
72 | @Inject | 68 | @Inject |
73 | private IQualifiedNameConverter qualifiedNameConverter; | 69 | private SignatureProvider signatureProvider; |
70 | |||
71 | @Inject | ||
72 | private ProblemTypeAnalyzer typeAnalyzer; | ||
74 | 73 | ||
75 | @Check | 74 | @Check |
76 | public void checkModuleName(Problem problem) { | 75 | public void checkModuleName(Problem problem) { |
@@ -86,7 +85,7 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
86 | if (resourceSet == null) { | 85 | if (resourceSet == null) { |
87 | return; | 86 | return; |
88 | } | 87 | } |
89 | var adapter = ImportAdapter.getOrInstall(resourceSet); | 88 | var adapter = importAdapterProvider.getOrInstall(resourceSet); |
90 | var expectedName = adapter.getQualifiedName(resource.getURI()); | 89 | var expectedName = adapter.getQualifiedName(resource.getURI()); |
91 | if (expectedName == null) { | 90 | if (expectedName == null) { |
92 | return; | 91 | return; |
@@ -156,15 +155,19 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
156 | public void checkUniqueDeclarations(Problem problem) { | 155 | public void checkUniqueDeclarations(Problem problem) { |
157 | var relations = new ArrayList<Relation>(); | 156 | var relations = new ArrayList<Relation>(); |
158 | var nodes = new ArrayList<Node>(); | 157 | var nodes = new ArrayList<Node>(); |
158 | var aggregators = new ArrayList<AggregatorDeclaration>(); | ||
159 | for (var statement : problem.getStatements()) { | 159 | for (var statement : problem.getStatements()) { |
160 | if (statement instanceof Relation relation) { | 160 | if (statement instanceof Relation relation) { |
161 | relations.add(relation); | 161 | relations.add(relation); |
162 | } else if (statement instanceof NodeDeclaration nodeDeclaration) { | 162 | } else if (statement instanceof NodeDeclaration nodeDeclaration) { |
163 | nodes.addAll(nodeDeclaration.getNodes()); | 163 | nodes.addAll(nodeDeclaration.getNodes()); |
164 | } else if (statement instanceof AggregatorDeclaration aggregatorDeclaration) { | ||
165 | aggregators.add(aggregatorDeclaration); | ||
164 | } | 166 | } |
165 | } | 167 | } |
166 | checkUniqueSimpleNames(relations); | 168 | checkUniqueSimpleNames(relations); |
167 | checkUniqueSimpleNames(nodes); | 169 | checkUniqueSimpleNames(nodes); |
170 | checkUniqueSimpleNames(aggregators); | ||
168 | } | 171 | } |
169 | 172 | ||
170 | @Check | 173 | @Check |
@@ -315,8 +318,9 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
315 | 318 | ||
316 | @Check | 319 | @Check |
317 | public void checkReferenceType(ReferenceDeclaration referenceDeclaration) { | 320 | public void checkReferenceType(ReferenceDeclaration referenceDeclaration) { |
318 | if (referenceDeclaration.getKind() == ReferenceKind.REFERENCE && | 321 | boolean isDefaultReference = referenceDeclaration.getKind() == ReferenceKind.DEFAULT && |
319 | !ProblemUtil.isContainerReference(referenceDeclaration)) { | 322 | !ProblemUtil.isContainerReference(referenceDeclaration); |
323 | if (isDefaultReference || referenceDeclaration.getKind() == ReferenceKind.REFERENCE) { | ||
320 | checkArity(referenceDeclaration, ProblemPackage.Literals.REFERENCE_DECLARATION__REFERENCE_TYPE, 1); | 324 | checkArity(referenceDeclaration, ProblemPackage.Literals.REFERENCE_DECLARATION__REFERENCE_TYPE, 1); |
321 | return; | 325 | return; |
322 | } | 326 | } |
@@ -350,11 +354,14 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
350 | 354 | ||
351 | @Check | 355 | @Check |
352 | public void checkAssertion(Assertion assertion) { | 356 | public void checkAssertion(Assertion assertion) { |
353 | int argumentCount = assertion.getArguments().size(); | 357 | var relation = assertion.getRelation(); |
354 | if (!(assertion.getValue() instanceof LogicConstant)) { | 358 | if (relation instanceof DatatypeDeclaration) { |
355 | var message = "Assertion value must be one of 'true', 'false', 'unknown', or 'error'."; | 359 | var message = "Assertions for data types are not supported."; |
356 | acceptError(message, assertion, ProblemPackage.Literals.ASSERTION__VALUE, 0, INVALID_VALUE_ISSUE); | 360 | acceptError(message, assertion, ProblemPackage.Literals.ASSERTION__RELATION, 0, |
361 | UNSUPPORTED_ASSERTION_ISSUE); | ||
362 | return; | ||
357 | } | 363 | } |
364 | int argumentCount = assertion.getArguments().size(); | ||
358 | checkArity(assertion, ProblemPackage.Literals.ASSERTION__RELATION, argumentCount); | 365 | checkArity(assertion, ProblemPackage.Literals.ASSERTION__RELATION, argumentCount); |
359 | } | 366 | } |
360 | 367 | ||
@@ -373,7 +380,7 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
373 | // Feature does not point to a {@link Relation}, we are probably already emitting another error. | 380 | // Feature does not point to a {@link Relation}, we are probably already emitting another error. |
374 | return; | 381 | return; |
375 | } | 382 | } |
376 | int arity = ProblemUtil.getArity(relation); | 383 | int arity = signatureProvider.getArity(relation); |
377 | if (arity == expectedArity) { | 384 | if (arity == expectedArity) { |
378 | return; | 385 | return; |
379 | } | 386 | } |
@@ -384,11 +391,7 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
384 | 391 | ||
385 | @Check | 392 | @Check |
386 | public void checkMultiObjectAssertion(Assertion assertion) { | 393 | public void checkMultiObjectAssertion(Assertion assertion) { |
387 | var builtinSymbolsOption = desugarer.getBuiltinSymbols(assertion); | 394 | var builtinSymbols = importAdapterProvider.getBuiltinSymbols(assertion); |
388 | if (builtinSymbolsOption.isEmpty()) { | ||
389 | return; | ||
390 | } | ||
391 | var builtinSymbols = builtinSymbolsOption.get(); | ||
392 | var relation = assertion.getRelation(); | 395 | var relation = assertion.getRelation(); |
393 | boolean isExists = builtinSymbols.exists().equals(relation); | 396 | boolean isExists = builtinSymbols.exists().equals(relation); |
394 | boolean isEquals = builtinSymbols.equals().equals(relation); | 397 | boolean isEquals = builtinSymbols.equals().equals(relation); |
@@ -492,4 +495,66 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
492 | } | 495 | } |
493 | } | 496 | } |
494 | } | 497 | } |
498 | |||
499 | @Check | ||
500 | private void checkAssignmentExpr(AssignmentExpr assignmentExpr) { | ||
501 | var left = assignmentExpr.getLeft(); | ||
502 | if (left == null) { | ||
503 | // Syntactically invalid, so we already emit an error. | ||
504 | return; | ||
505 | } | ||
506 | if (!(left instanceof VariableOrNodeExpr variableOrNodeExpr)) { | ||
507 | var message = "Left side of an assignment must be variable."; | ||
508 | acceptError(message, assignmentExpr, ProblemPackage.Literals.BINARY_EXPR__LEFT, | ||
509 | 0, INVALID_ASSIGNMENT_ISSUE); | ||
510 | return; | ||
511 | } | ||
512 | var target = variableOrNodeExpr.getVariableOrNode(); | ||
513 | if (target == null) { | ||
514 | // Syntactically invalid, so we already emit an error. | ||
515 | return; | ||
516 | } | ||
517 | if (target instanceof Parameter) { | ||
518 | var message = "Parameters cannot be assigned."; | ||
519 | acceptError(message, variableOrNodeExpr, ProblemPackage.Literals.VARIABLE_OR_NODE_EXPR__VARIABLE_OR_NODE, | ||
520 | 0, INVALID_ASSIGNMENT_ISSUE); | ||
521 | } | ||
522 | if (target instanceof Node) { | ||
523 | var message = "Nodes cannot be assigned."; | ||
524 | acceptError(message, variableOrNodeExpr, ProblemPackage.Literals.VARIABLE_OR_NODE_EXPR__VARIABLE_OR_NODE, | ||
525 | 0, INVALID_ASSIGNMENT_ISSUE); | ||
526 | } | ||
527 | if (!(assignmentExpr.eContainer() instanceof Conjunction)) { | ||
528 | var message = "Assignments may only appear as top-level expressions."; | ||
529 | acceptError(message, assignmentExpr, null, 0, INVALID_ASSIGNMENT_ISSUE); | ||
530 | } | ||
531 | } | ||
532 | |||
533 | @Check | ||
534 | private void checkInfiniteConstant(InfiniteConstant infiniteConstant) { | ||
535 | if (!(infiniteConstant.eContainer() instanceof RangeExpr)) { | ||
536 | var message = "Negative and positive infinity literals may only appear in '..' range expressions."; | ||
537 | acceptError(message, infiniteConstant, null, 0, TYPE_ERROR); | ||
538 | } | ||
539 | } | ||
540 | |||
541 | @Check | ||
542 | private void checkTypes(Problem problem) { | ||
543 | var diagnostics = typeAnalyzer.getOrComputeTypes(problem).getDiagnostics(); | ||
544 | for (var diagnostic : diagnostics) { | ||
545 | switch (diagnostic.getSeverity()) { | ||
546 | case Diagnostic.INFO -> info(diagnostic.getMessage(), diagnostic.getSourceEObject(), | ||
547 | diagnostic.getFeature(), diagnostic.getIndex(), diagnostic.getIssueCode(), | ||
548 | diagnostic.getIssueData()); | ||
549 | case Diagnostic.WARNING -> warning(diagnostic.getMessage(), diagnostic.getSourceEObject(), | ||
550 | diagnostic.getFeature(), diagnostic.getIndex(), diagnostic.getIssueCode(), | ||
551 | diagnostic.getIssueData()); | ||
552 | case Diagnostic.ERROR -> error(diagnostic.getMessage(), diagnostic.getSourceEObject(), | ||
553 | diagnostic.getFeature(), diagnostic.getIndex(), diagnostic.getIssueCode(), | ||
554 | diagnostic.getIssueData()); | ||
555 | default -> throw new IllegalStateException("Unknown severity %s of %s" | ||
556 | .formatted(diagnostic.getSeverity(), diagnostic)); | ||
557 | } | ||
558 | } | ||
559 | } | ||
495 | } | 560 | } |
diff --git a/subprojects/language/src/main/resources/META-INF/services/tools.refinery.language.expressions.TermInterpreter b/subprojects/language/src/main/resources/META-INF/services/tools.refinery.language.expressions.TermInterpreter new file mode 100644 index 00000000..11b6ccae --- /dev/null +++ b/subprojects/language/src/main/resources/META-INF/services/tools.refinery.language.expressions.TermInterpreter | |||
@@ -0,0 +1,4 @@ | |||
1 | # SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
2 | # | ||
3 | # SPDX-License-Identifier: EPL-2.0 | ||
4 | tools.refinery.language.expressions.BuiltinTermInterpreter | ||
diff --git a/subprojects/language/src/main/resources/tools/refinery/language/library/builtin.refinery b/subprojects/language/src/main/resources/tools/refinery/language/library/builtin.refinery index 4e74ca03..09c7d92b 100644 --- a/subprojects/language/src/main/resources/tools/refinery/language/library/builtin.refinery +++ b/subprojects/language/src/main/resources/tools/refinery/language/library/builtin.refinery | |||
@@ -13,3 +13,17 @@ abstract class contained extends node. | |||
13 | pred contains(container, contained contained). | 13 | pred contains(container, contained contained). |
14 | 14 | ||
15 | error invalidContainer(contained contained). | 15 | error invalidContainer(contained contained). |
16 | |||
17 | extern datatype boolean. | ||
18 | |||
19 | extern datatype int. | ||
20 | |||
21 | extern datatype real. | ||
22 | |||
23 | extern datatype string. | ||
24 | |||
25 | extern aggregator min. | ||
26 | |||
27 | extern aggregator max. | ||
28 | |||
29 | extern aggregator sum. | ||
diff --git a/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssertionValidationTest.java b/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssertionValidationTest.java index 1fb08845..b995d0bb 100644 --- a/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssertionValidationTest.java +++ b/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssertionValidationTest.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -35,7 +35,7 @@ class AssertionValidationTest { | |||
35 | """); | 35 | """); |
36 | var issues = problem.validate(); | 36 | var issues = problem.validate(); |
37 | assertThat(issues, hasItem(hasProperty("issueCode", | 37 | assertThat(issues, hasItem(hasProperty("issueCode", |
38 | is(ProblemValidator.INVALID_VALUE_ISSUE)))); | 38 | is(ProblemValidator.TYPE_ERROR)))); |
39 | } | 39 | } |
40 | 40 | ||
41 | @ParameterizedTest | 41 | @ParameterizedTest |
diff --git a/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssignmentValidationTest.java b/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssignmentValidationTest.java new file mode 100644 index 00000000..a9e0e311 --- /dev/null +++ b/subprojects/language/src/test/java/tools/refinery/language/tests/validation/AssignmentValidationTest.java | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.language.tests.validation; | ||
7 | |||
8 | |||
9 | import com.google.inject.Inject; | ||
10 | import org.eclipse.xtext.testing.InjectWith; | ||
11 | import org.eclipse.xtext.testing.extensions.InjectionExtension; | ||
12 | import org.junit.jupiter.api.Test; | ||
13 | import org.junit.jupiter.api.extension.ExtendWith; | ||
14 | import org.junit.jupiter.params.ParameterizedTest; | ||
15 | import org.junit.jupiter.params.provider.ValueSource; | ||
16 | import tools.refinery.language.model.tests.utils.ProblemParseHelper; | ||
17 | import tools.refinery.language.tests.ProblemInjectorProvider; | ||
18 | import tools.refinery.language.validation.ProblemValidator; | ||
19 | |||
20 | import static org.hamcrest.MatcherAssert.assertThat; | ||
21 | import static org.hamcrest.Matchers.*; | ||
22 | |||
23 | @ExtendWith(InjectionExtension.class) | ||
24 | @InjectWith(ProblemInjectorProvider.class) | ||
25 | class AssignmentValidationTest { | ||
26 | @Inject | ||
27 | private ProblemParseHelper parseHelper; | ||
28 | |||
29 | @ParameterizedTest | ||
30 | @ValueSource(strings = {""" | ||
31 | pred foo(node a) <-> 5 is 5. | ||
32 | """, """ | ||
33 | pred foo(node a) <-> b + 2 is 5. | ||
34 | """, """ | ||
35 | pred foo(node a) <-> a is 5. | ||
36 | """, """ | ||
37 | node(n). | ||
38 | pred foo(node a) <-> n is 5. | ||
39 | """, """ | ||
40 | enum E { A, B } | ||
41 | pred foo(node a) <-> B is 5. | ||
42 | """}) | ||
43 | void invalidAssignmentTest(String text) { | ||
44 | var problem = parseHelper.parse(text); | ||
45 | var issues = problem.validate(); | ||
46 | assertThat(issues, hasItem(hasProperty("issueCode", is( | ||
47 | ProblemValidator.INVALID_ASSIGNMENT_ISSUE | ||
48 | )))); | ||
49 | } | ||
50 | |||
51 | @Test | ||
52 | void validAssignmentTest() { | ||
53 | var problem = parseHelper.parse(""" | ||
54 | pred foo(node a) <-> b is 5. | ||
55 | """); | ||
56 | var issues = problem.validate(); | ||
57 | assertThat(issues, not(hasItem(hasProperty("issueCode", is( | ||
58 | ProblemValidator.INVALID_ASSIGNMENT_ISSUE | ||
59 | ))))); | ||
60 | } | ||
61 | } | ||
diff --git a/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedClassDeclaration.java b/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedClassDeclaration.java index a228137c..14ac7bfc 100644 --- a/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedClassDeclaration.java +++ b/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedClassDeclaration.java | |||
@@ -1,19 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.language.model.tests.utils; | 6 | package tools.refinery.language.model.tests.utils; |
7 | 7 | ||
8 | import tools.refinery.language.model.problem.ClassDeclaration; | 8 | import tools.refinery.language.model.problem.ClassDeclaration; |
9 | import tools.refinery.language.model.problem.FeatureDeclaration; | 9 | import tools.refinery.language.model.problem.ReferenceDeclaration; |
10 | 10 | ||
11 | public record WrappedClassDeclaration(ClassDeclaration classDeclaration) { | 11 | public record WrappedClassDeclaration(ClassDeclaration classDeclaration) { |
12 | public ClassDeclaration get() { | 12 | public ClassDeclaration get() { |
13 | return classDeclaration; | 13 | return classDeclaration; |
14 | } | 14 | } |
15 | 15 | ||
16 | public FeatureDeclaration feature(String name) { | 16 | public ReferenceDeclaration feature(String name) { |
17 | return ProblemNavigationUtil.named(classDeclaration.getFeatureDeclarations(), name); | 17 | return ProblemNavigationUtil.named(classDeclaration.getFeatureDeclarations(), name); |
18 | } | 18 | } |
19 | } | 19 | } |
diff --git a/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedProblem.java b/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedProblem.java index 58bfce44..b31eed6d 100644 --- a/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedProblem.java +++ b/subprojects/language/src/testFixtures/java/tools/refinery/language/model/tests/utils/WrappedProblem.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -7,9 +7,9 @@ package tools.refinery.language.model.tests.utils; | |||
7 | 7 | ||
8 | import org.eclipse.emf.ecore.resource.Resource.Diagnostic; | 8 | import org.eclipse.emf.ecore.resource.Resource.Diagnostic; |
9 | import org.eclipse.emf.ecore.util.Diagnostician; | 9 | import org.eclipse.emf.ecore.util.Diagnostician; |
10 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
11 | import tools.refinery.language.library.BuiltinLibrary; | ||
10 | import tools.refinery.language.model.problem.*; | 12 | import tools.refinery.language.model.problem.*; |
11 | import tools.refinery.language.utils.BuiltinSymbols; | ||
12 | import tools.refinery.language.utils.ProblemDesugarer; | ||
13 | 13 | ||
14 | import java.util.List; | 14 | import java.util.List; |
15 | import java.util.stream.Stream; | 15 | import java.util.stream.Stream; |
@@ -32,11 +32,11 @@ public record WrappedProblem(Problem problem) { | |||
32 | } | 32 | } |
33 | 33 | ||
34 | public WrappedProblem builtin() { | 34 | public WrappedProblem builtin() { |
35 | return new WrappedProblem(new ProblemDesugarer().getBuiltinProblem(problem).orElseThrow()); | 35 | var resourceSet = problem.eResource().getResourceSet(); |
36 | } | 36 | var builtinResource = resourceSet.getResource(BuiltinLibrary.BUILTIN_LIBRARY_URI, true); |
37 | 37 | EcoreUtil.resolveAll(builtinResource); | |
38 | public BuiltinSymbols builtinSymbols() { | 38 | var builtinProblem = (Problem) builtinResource.getContents().getFirst(); |
39 | return new ProblemDesugarer().getBuiltinSymbols(problem).orElseThrow(); | 39 | return new WrappedProblem(builtinProblem); |
40 | } | 40 | } |
41 | 41 | ||
42 | public List<String> nodeNames() { | 42 | public List<String> nodeNames() { |
diff --git a/subprojects/logic/build.gradle.kts b/subprojects/logic/build.gradle.kts new file mode 100644 index 00000000..57de8e5d --- /dev/null +++ b/subprojects/logic/build.gradle.kts | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.gradle.java-library") | ||
9 | id("tools.refinery.gradle.java-test-fixtures") | ||
10 | } | ||
11 | |||
12 | dependencies { | ||
13 | testFixturesApi(libs.hamcrest) | ||
14 | } | ||
diff --git a/subprojects/logic/src/main/java/tools/refinery/logic/AbstractDomain.java b/subprojects/logic/src/main/java/tools/refinery/logic/AbstractDomain.java new file mode 100644 index 00000000..0b4d87d2 --- /dev/null +++ b/subprojects/logic/src/main/java/tools/refinery/logic/AbstractDomain.java | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic; | ||
7 | |||
8 | public non-sealed interface AbstractDomain<A extends AbstractValue<A, C>, C> extends AnyAbstractDomain { | ||
9 | @Override | ||
10 | Class<A> abstractType(); | ||
11 | |||
12 | @Override | ||
13 | Class<C> concreteType(); | ||
14 | |||
15 | A unknown(); | ||
16 | |||
17 | A error(); | ||
18 | |||
19 | A toAbstract(C concreteValue); | ||
20 | } | ||
diff --git a/subprojects/logic/src/main/java/tools/refinery/logic/AbstractValue.java b/subprojects/logic/src/main/java/tools/refinery/logic/AbstractValue.java new file mode 100644 index 00000000..0b5e0d01 --- /dev/null +++ b/subprojects/logic/src/main/java/tools/refinery/logic/AbstractValue.java | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic; | ||
7 | |||
8 | import org.jetbrains.annotations.Nullable; | ||
9 | |||
10 | public interface AbstractValue<A extends AbstractValue<A, C>, C> { | ||
11 | @Nullable | ||
12 | C getConcrete(); | ||
13 | |||
14 | default boolean isConcrete() { | ||
15 | return getConcrete() == null; | ||
16 | } | ||
17 | |||
18 | @Nullable | ||
19 | C getArbitrary(); | ||
20 | |||
21 | default boolean isError() { | ||
22 | return getArbitrary() == null; | ||
23 | } | ||
24 | |||
25 | A join(A other); | ||
26 | |||
27 | A meet(A other); | ||
28 | |||
29 | default boolean isRefinementOf(A other) { | ||
30 | return equals(meet(other)); | ||
31 | } | ||
32 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/AnyAbstractDomain.java b/subprojects/logic/src/main/java/tools/refinery/logic/AnyAbstractDomain.java index c354fab7..a296f4b2 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/AnyAbstractDomain.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/AnyAbstractDomain.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation; | 6 | package tools.refinery.logic; |
7 | 7 | ||
8 | public sealed interface AnyAbstractDomain permits AbstractDomain { | 8 | public sealed interface AnyAbstractDomain permits AbstractDomain { |
9 | Class<?> abstractType(); | 9 | Class<?> abstractType(); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/Constraint.java b/subprojects/logic/src/main/java/tools/refinery/logic/Constraint.java index 916fb35c..89c8760b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/Constraint.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/Constraint.java | |||
@@ -1,13 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query; | 6 | package tools.refinery.logic; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.literal.*; | 9 | import tools.refinery.logic.literal.*; |
10 | import tools.refinery.store.query.term.*; | 10 | import tools.refinery.logic.term.*; |
11 | 11 | ||
12 | import java.util.List; | 12 | import java.util.List; |
13 | 13 | ||
@@ -69,4 +69,14 @@ public interface Constraint { | |||
69 | Variable... arguments) { | 69 | Variable... arguments) { |
70 | return aggregateBy(inputVariable, aggregator, List.of(arguments)); | 70 | return aggregateBy(inputVariable, aggregator, List.of(arguments)); |
71 | } | 71 | } |
72 | |||
73 | default <T> AssignedValue<T> leftJoinBy(DataVariable<T> placeholderVariable, T defaultValue, | ||
74 | List<Variable> arguments) { | ||
75 | return targetVariable -> new LeftJoinLiteral<>(targetVariable, placeholderVariable, defaultValue, this, | ||
76 | arguments); | ||
77 | } | ||
78 | |||
79 | default <T> AssignedValue<T> leftJoinBy(DataVariable<T> inputVariable, T defaultValue, Variable... arguments) { | ||
80 | return leftJoinBy(inputVariable, defaultValue, List.of(arguments)); | ||
81 | } | ||
72 | } | 82 | } |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/InvalidQueryException.java b/subprojects/logic/src/main/java/tools/refinery/logic/InvalidQueryException.java index c39277a0..b5460e0d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/InvalidQueryException.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/InvalidQueryException.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query; | 6 | package tools.refinery.logic; |
7 | 7 | ||
8 | public class InvalidQueryException extends RuntimeException { | 8 | public class InvalidQueryException extends RuntimeException { |
9 | public InvalidQueryException() { | 9 | public InvalidQueryException() { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/AbstractQueryBuilder.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/AbstractQueryBuilder.java index 2a3e3ce0..68712b98 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/AbstractQueryBuilder.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/AbstractQueryBuilder.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.callback.*; | 8 | import tools.refinery.logic.dnf.callback.*; |
9 | import tools.refinery.store.query.literal.Literal; | 9 | import tools.refinery.logic.literal.Literal; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | import tools.refinery.store.query.term.ParameterDirection; | 11 | import tools.refinery.logic.term.ParameterDirection; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.Variable; |
13 | 13 | ||
14 | import java.util.Collection; | 14 | import java.util.Collection; |
15 | import java.util.List; | 15 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/AnyQuery.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/AnyQuery.java index 5e28af68..aebfd73f 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/AnyQuery.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/AnyQuery.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | public sealed interface AnyQuery permits Query { | 8 | public sealed interface AnyQuery permits Query { |
9 | String name(); | 9 | String name(); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/ClausePostProcessor.java index 8800a155..00d15a0c 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/ClausePostProcessor.java | |||
@@ -1,19 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.jetbrains.annotations.NotNull; | 8 | import org.jetbrains.annotations.NotNull; |
9 | import tools.refinery.store.query.Constraint; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.InvalidQueryException; | 10 | import tools.refinery.logic.InvalidQueryException; |
11 | import tools.refinery.store.query.literal.*; | 11 | import tools.refinery.logic.literal.*; |
12 | import tools.refinery.store.query.substitution.MapBasedSubstitution; | 12 | import tools.refinery.logic.substitution.MapBasedSubstitution; |
13 | import tools.refinery.store.query.substitution.StatelessSubstitution; | 13 | import tools.refinery.logic.substitution.StatelessSubstitution; |
14 | import tools.refinery.store.query.substitution.Substitution; | 14 | import tools.refinery.logic.substitution.Substitution; |
15 | import tools.refinery.store.query.term.ParameterDirection; | 15 | import tools.refinery.logic.term.ParameterDirection; |
16 | import tools.refinery.store.query.term.Variable; | 16 | import tools.refinery.logic.term.Variable; |
17 | 17 | ||
18 | import java.util.*; | 18 | import java.util.*; |
19 | import java.util.function.Function; | 19 | import java.util.function.Function; |
@@ -112,7 +112,7 @@ class ClausePostProcessor { | |||
112 | .formatted(variable, representative)); | 112 | .formatted(variable, representative)); |
113 | } | 113 | } |
114 | return equivalencePartition.computeIfAbsent(variable, key -> { | 114 | return equivalencePartition.computeIfAbsent(variable, key -> { |
115 | var set = new HashSet<Variable>(1); | 115 | var set = HashSet.<Variable>newHashSet(1); |
116 | set.add(key); | 116 | set.add(key); |
117 | return set; | 117 | return set; |
118 | }); | 118 | }); |
@@ -193,7 +193,7 @@ class ClausePostProcessor { | |||
193 | } | 193 | } |
194 | 194 | ||
195 | private void topologicallySortLiterals() { | 195 | private void topologicallySortLiterals() { |
196 | topologicallySortedLiterals = new LinkedHashSet<>(substitutedLiterals.size()); | 196 | topologicallySortedLiterals = LinkedHashSet.newLinkedHashSet(substitutedLiterals.size()); |
197 | variableToLiteralInputMap = new HashMap<>(); | 197 | variableToLiteralInputMap = new HashMap<>(); |
198 | literalsWithAllInputsBound = new PriorityQueue<>(); | 198 | literalsWithAllInputsBound = new PriorityQueue<>(); |
199 | int size = substitutedLiterals.size(); | 199 | int size = substitutedLiterals.size(); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/Dnf.java index 86a1b6b2..0fc2a1cc 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/Dnf.java | |||
@@ -3,17 +3,17 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.DnfEqualityChecker; | 10 | import tools.refinery.logic.equality.DnfEqualityChecker; |
11 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 11 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
12 | import tools.refinery.store.query.equality.SubstitutingLiteralEqualityHelper; | 12 | import tools.refinery.logic.equality.SubstitutingLiteralEqualityHelper; |
13 | import tools.refinery.store.query.equality.SubstitutingLiteralHashCodeHelper; | 13 | import tools.refinery.logic.equality.SubstitutingLiteralHashCodeHelper; |
14 | import tools.refinery.store.query.literal.Reduction; | 14 | import tools.refinery.logic.literal.Reduction; |
15 | import tools.refinery.store.query.term.Parameter; | 15 | import tools.refinery.logic.term.Parameter; |
16 | import tools.refinery.store.query.term.Variable; | 16 | import tools.refinery.logic.term.Variable; |
17 | 17 | ||
18 | import java.util.Collection; | 18 | import java.util.Collection; |
19 | import java.util.Collections; | 19 | import java.util.Collections; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfBuilder.java index 0f9fd366..b58c5c45 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfBuilder.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.dnf.callback.*; | 9 | import tools.refinery.logic.dnf.callback.*; |
10 | import tools.refinery.store.query.literal.Literal; | 10 | import tools.refinery.logic.literal.Literal; |
11 | import tools.refinery.store.query.term.*; | 11 | import tools.refinery.logic.term.*; |
12 | 12 | ||
13 | import java.util.*; | 13 | import java.util.*; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfClause.java index 94327bad..92755d4d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfClause.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | import tools.refinery.store.query.literal.Literal; | 10 | import tools.refinery.logic.literal.Literal; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.Variable; |
12 | 12 | ||
13 | import java.util.List; | 13 | import java.util.List; |
14 | import java.util.Set; | 14 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfPostProcessor.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfPostProcessor.java index 50236642..87d07187 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfPostProcessor.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfPostProcessor.java | |||
@@ -1,17 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.equality.DnfEqualityChecker; | 9 | import tools.refinery.logic.equality.DnfEqualityChecker; |
10 | import tools.refinery.store.query.equality.SubstitutingLiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.SubstitutingLiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.SubstitutingLiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.SubstitutingLiteralHashCodeHelper; |
12 | import tools.refinery.store.query.literal.Literal; | 12 | import tools.refinery.logic.literal.Literal; |
13 | import tools.refinery.store.query.term.ParameterDirection; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.*; | 16 | import java.util.*; |
17 | 17 | ||
@@ -26,7 +26,7 @@ class DnfPostProcessor { | |||
26 | 26 | ||
27 | public List<DnfClause> postProcessClauses() { | 27 | public List<DnfClause> postProcessClauses() { |
28 | var parameterInfoMap = getParameterInfoMap(); | 28 | var parameterInfoMap = getParameterInfoMap(); |
29 | var postProcessedClauses = new LinkedHashSet<CanonicalClause>(clauses.size()); | 29 | var postProcessedClauses = LinkedHashSet.<CanonicalClause>newLinkedHashSet(clauses.size()); |
30 | int index = 0; | 30 | int index = 0; |
31 | for (var literals : clauses) { | 31 | for (var literals : clauses) { |
32 | var postProcessor = new ClausePostProcessor(parameterInfoMap, literals); | 32 | var postProcessor = new ClausePostProcessor(parameterInfoMap, literals); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfUtils.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfUtils.java index 65ab3634..02a619a6 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfUtils.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/DnfUtils.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import java.util.UUID; | 8 | import java.util.UUID; |
9 | 9 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/FunctionalDependency.java index aef07ee3..c3fc87ab 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/FunctionalDependency.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | 9 | ||
10 | import java.util.HashSet; | 10 | import java.util.HashSet; |
11 | import java.util.Set; | 11 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/FunctionalQuery.java index 225f6844..1df63fbd 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/FunctionalQuery.java | |||
@@ -1,16 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.literal.CallPolarity; | 9 | import tools.refinery.logic.literal.CallPolarity; |
10 | import tools.refinery.store.query.term.Aggregator; | 10 | import tools.refinery.logic.term.Aggregator; |
11 | import tools.refinery.store.query.term.AssignedValue; | 11 | import tools.refinery.logic.term.AssignedValue; |
12 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.logic.term.NodeVariable; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | 14 | ||
15 | import java.util.ArrayList; | 15 | import java.util.ArrayList; |
16 | import java.util.List; | 16 | import java.util.List; |
@@ -94,6 +94,22 @@ public final class FunctionalQuery<T> extends Query<T> { | |||
94 | return aggregate(aggregator, List.of(arguments)); | 94 | return aggregate(aggregator, List.of(arguments)); |
95 | } | 95 | } |
96 | 96 | ||
97 | public AssignedValue<T> leftJoin(T defaultValue, List<NodeVariable> arguments) { | ||
98 | return targetVariable -> { | ||
99 | var placeholderVariable = Variable.of(type); | ||
100 | var argumentsWithPlaceholder = new ArrayList<Variable>(arguments.size() + 1); | ||
101 | argumentsWithPlaceholder.addAll(arguments); | ||
102 | argumentsWithPlaceholder.add(placeholderVariable); | ||
103 | return getDnf() | ||
104 | .leftJoinBy(placeholderVariable, defaultValue, argumentsWithPlaceholder) | ||
105 | .toLiteral(targetVariable); | ||
106 | }; | ||
107 | } | ||
108 | |||
109 | public AssignedValue<T> leftJoin(T defaultValue, NodeVariable... arguments) { | ||
110 | return leftJoin(defaultValue, List.of(arguments)); | ||
111 | } | ||
112 | |||
97 | @Override | 113 | @Override |
98 | public boolean equals(Object o) { | 114 | public boolean equals(Object o) { |
99 | if (this == o) return true; | 115 | if (this == o) return true; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQueryBuilder.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/FunctionalQueryBuilder.java index d1cd7ba8..476f3c83 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQueryBuilder.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/FunctionalQueryBuilder.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.DataVariable; | 8 | import tools.refinery.logic.term.DataVariable; |
9 | 9 | ||
10 | public final class FunctionalQueryBuilder<T> extends AbstractQueryBuilder<FunctionalQueryBuilder<T>> { | 10 | public final class FunctionalQueryBuilder<T> extends AbstractQueryBuilder<FunctionalQueryBuilder<T>> { |
11 | private final DataVariable<T> outputVariable; | 11 | private final DataVariable<T> outputVariable; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/InvalidClauseException.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/InvalidClauseException.java index 747574b9..51a42d02 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/InvalidClauseException.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/InvalidClauseException.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | 9 | ||
10 | public class InvalidClauseException extends InvalidQueryException { | 10 | public class InvalidClauseException extends InvalidQueryException { |
11 | private final int clauseIndex; | 11 | private final int clauseIndex; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/Query.java index 83fe6ccd..1f913ea0 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/Query.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.callback.*; | 8 | import tools.refinery.logic.dnf.callback.*; |
9 | import tools.refinery.store.query.term.ParameterDirection; | 9 | import tools.refinery.logic.term.ParameterDirection; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.Variable; |
11 | 11 | ||
12 | import java.util.Objects; | 12 | import java.util.Objects; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/QueryBuilder.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/QueryBuilder.java index 138911bc..a74295ba 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/QueryBuilder.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/QueryBuilder.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.DataVariable; | 8 | import tools.refinery.logic.term.DataVariable; |
9 | 9 | ||
10 | public final class QueryBuilder extends AbstractQueryBuilder<QueryBuilder> { | 10 | public final class QueryBuilder extends AbstractQueryBuilder<QueryBuilder> { |
11 | QueryBuilder(String name) { | 11 | QueryBuilder(String name) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/RelationalQuery.java index 98f71e11..dc2b8eb6 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/RelationalQuery.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.literal.CallLiteral; | 9 | import tools.refinery.logic.literal.CallLiteral; |
10 | import tools.refinery.store.query.literal.CallPolarity; | 10 | import tools.refinery.logic.literal.CallPolarity; |
11 | import tools.refinery.store.query.term.AssignedValue; | 11 | import tools.refinery.logic.term.AssignedValue; |
12 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.logic.term.NodeVariable; |
13 | 13 | ||
14 | import java.util.Collections; | 14 | import java.util.Collections; |
15 | import java.util.List; | 15 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/SymbolicParameter.java index fe9cefcc..acc775a7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/SymbolicParameter.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 8 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
9 | import tools.refinery.store.query.term.Parameter; | 9 | import tools.refinery.logic.term.Parameter; |
10 | import tools.refinery.store.query.term.ParameterDirection; | 10 | import tools.refinery.logic.term.ParameterDirection; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.Variable; |
12 | 12 | ||
13 | import java.util.Objects; | 13 | import java.util.Objects; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback0.java index d98dda2e..2e276030 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback0.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | 9 | ||
10 | import java.util.Collection; | 10 | import java.util.Collection; |
11 | 11 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback1Data0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback1Data0.java index 4c01a527..f2e174b0 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback1Data0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback1Data0.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback1Data1.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback1Data1.java index 2c0cb6eb..4e6b5a06 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback1Data1.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback1Data1.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback2Data0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback2Data0.java index d764bdba..42b7cb08 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback2Data0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback2Data0.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback2Data1.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback2Data1.java index 140af03a..59e53744 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback2Data1.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback2Data1.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | import java.util.Collection; | 12 | import java.util.Collection; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback2Data2.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback2Data2.java index bfc8637c..d9550d49 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback2Data2.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback2Data2.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data0.java index 074df65b..e36f05db 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data0.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data1.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data1.java index 24ba5187..7227bada 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data1.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data1.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | import java.util.Collection; | 12 | import java.util.Collection; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data2.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data2.java index 2a2e837a..7d842655 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data2.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data2.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | import java.util.Collection; | 12 | import java.util.Collection; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data3.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data3.java index 8f4bdd01..3bc895d5 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback3Data3.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback3Data3.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data0.java index ed0f87b2..164c3208 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data0.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data1.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data1.java index 9b27e2e1..d7454135 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data1.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data1.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | import java.util.Collection; | 12 | import java.util.Collection; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data2.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data2.java index cbc4808e..829dbcf8 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data2.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data2.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | import java.util.Collection; | 12 | import java.util.Collection; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data3.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data3.java index a6258f36..50da829b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data3.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data3.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | import java.util.Collection; | 12 | import java.util.Collection; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data4.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data4.java index b52a911a..46f8fbe9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/ClauseCallback4Data4.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/ClauseCallback4Data4.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback0.java index 63b3eee6..689a5b53 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback0.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.FunctionalQueryBuilder; | 8 | import tools.refinery.logic.dnf.FunctionalQueryBuilder; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface FunctionalQueryCallback0<T> { | 12 | public interface FunctionalQueryCallback0<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback1.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback1.java index 1295a118..b7d69a50 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback1.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback1.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.FunctionalQueryBuilder; | 8 | import tools.refinery.logic.dnf.FunctionalQueryBuilder; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | @FunctionalInterface | 12 | @FunctionalInterface |
13 | public interface FunctionalQueryCallback1<T> { | 13 | public interface FunctionalQueryCallback1<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback2.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback2.java index d5b7f9ff..38fb265b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback2.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback2.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.FunctionalQueryBuilder; | 8 | import tools.refinery.logic.dnf.FunctionalQueryBuilder; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | @FunctionalInterface | 12 | @FunctionalInterface |
13 | public interface FunctionalQueryCallback2<T> { | 13 | public interface FunctionalQueryCallback2<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback3.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback3.java index dc8404a0..04451657 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback3.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback3.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.FunctionalQueryBuilder; | 8 | import tools.refinery.logic.dnf.FunctionalQueryBuilder; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | @FunctionalInterface | 12 | @FunctionalInterface |
13 | public interface FunctionalQueryCallback3<T> { | 13 | public interface FunctionalQueryCallback3<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback4.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback4.java index b6d3ddb0..a39c389d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/FunctionalQueryCallback4.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/FunctionalQueryCallback4.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.FunctionalQueryBuilder; | 8 | import tools.refinery.logic.dnf.FunctionalQueryBuilder; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | 11 | ||
12 | @FunctionalInterface | 12 | @FunctionalInterface |
13 | public interface FunctionalQueryCallback4<T> { | 13 | public interface FunctionalQueryCallback4<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback0.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback0.java index 3cf1de48..bc9a6ee4 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback0.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback0.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.QueryBuilder; | 8 | import tools.refinery.logic.dnf.QueryBuilder; |
9 | 9 | ||
10 | @FunctionalInterface | 10 | @FunctionalInterface |
11 | public interface QueryCallback0 { | 11 | public interface QueryCallback0 { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback1.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback1.java index 0a150955..80763171 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback1.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback1.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.QueryBuilder; | 8 | import tools.refinery.logic.dnf.QueryBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface QueryCallback1 { | 12 | public interface QueryCallback1 { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback2.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback2.java index 9493a7b4..54423104 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback2.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback2.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.QueryBuilder; | 8 | import tools.refinery.logic.dnf.QueryBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface QueryCallback2 { | 12 | public interface QueryCallback2 { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback3.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback3.java index 358c7da7..eb68d493 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback3.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback3.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.QueryBuilder; | 8 | import tools.refinery.logic.dnf.QueryBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface QueryCallback3 { | 12 | public interface QueryCallback3 { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback4.java b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback4.java index 890dda16..59690af9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/callback/QueryCallback4.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/dnf/callback/QueryCallback4.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf.callback; | 6 | package tools.refinery.logic.dnf.callback; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.QueryBuilder; | 8 | import tools.refinery.logic.dnf.QueryBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface QueryCallback4 { | 12 | public interface QueryCallback4 { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java b/subprojects/logic/src/main/java/tools/refinery/logic/equality/DeepDnfEqualityChecker.java index d6171314..a49ef080 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/equality/DeepDnfEqualityChecker.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.equality; | 6 | package tools.refinery.logic.equality; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.dnf.DnfClause; | 9 | import tools.refinery.logic.dnf.DnfClause; |
10 | import tools.refinery.store.query.dnf.SymbolicParameter; | 10 | import tools.refinery.logic.dnf.SymbolicParameter; |
11 | import tools.refinery.store.query.literal.Literal; | 11 | import tools.refinery.logic.literal.Literal; |
12 | import tools.refinery.store.util.CycleDetectingMapper; | 12 | import tools.refinery.logic.util.CycleDetectingMapper; |
13 | 13 | ||
14 | import java.util.List; | 14 | import java.util.List; |
15 | 15 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java b/subprojects/logic/src/main/java/tools/refinery/logic/equality/DnfEqualityChecker.java index e2cfd79b..3162b019 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/equality/DnfEqualityChecker.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.equality; | 6 | package tools.refinery.logic.equality; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | 9 | ||
10 | import java.util.Objects; | 10 | import java.util.Objects; |
11 | 11 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java b/subprojects/logic/src/main/java/tools/refinery/logic/equality/LiteralEqualityHelper.java index 5abc76ce..ea62061e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/equality/LiteralEqualityHelper.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.equality; | 6 | package tools.refinery.logic.equality; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.term.Variable; | 9 | import tools.refinery.logic.term.Variable; |
10 | 10 | ||
11 | import java.util.Objects; | 11 | import java.util.Objects; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralHashCodeHelper.java b/subprojects/logic/src/main/java/tools/refinery/logic/equality/LiteralHashCodeHelper.java index 5495160a..fccadd08 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralHashCodeHelper.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/equality/LiteralHashCodeHelper.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.equality; | 6 | package tools.refinery.logic.equality; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Variable; | 8 | import tools.refinery.logic.term.Variable; |
9 | 9 | ||
10 | import java.util.Objects; | 10 | import java.util.Objects; |
11 | 11 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralEqualityHelper.java b/subprojects/logic/src/main/java/tools/refinery/logic/equality/SubstitutingLiteralEqualityHelper.java index 50a79e07..7a16b5c9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralEqualityHelper.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/equality/SubstitutingLiteralEqualityHelper.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.equality; | 6 | package tools.refinery.logic.equality; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.dnf.SymbolicParameter; | 9 | import tools.refinery.logic.dnf.SymbolicParameter; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.Variable; |
11 | 11 | ||
12 | import java.util.HashMap; | 12 | import java.util.HashMap; |
13 | import java.util.List; | 13 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralHashCodeHelper.java b/subprojects/logic/src/main/java/tools/refinery/logic/equality/SubstitutingLiteralHashCodeHelper.java index 754f6976..64bd9784 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralHashCodeHelper.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/equality/SubstitutingLiteralHashCodeHelper.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.equality; | 6 | package tools.refinery.logic.equality; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.SymbolicParameter; | 8 | import tools.refinery.logic.dnf.SymbolicParameter; |
9 | import tools.refinery.store.query.term.Variable; | 9 | import tools.refinery.logic.term.Variable; |
10 | 10 | ||
11 | import java.util.LinkedHashMap; | 11 | import java.util.LinkedHashMap; |
12 | import java.util.List; | 12 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AbstractCallLiteral.java index 0e99d441..9ae84547 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AbstractCallLiteral.java | |||
@@ -3,21 +3,21 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.ParameterDirection; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.*; | 16 | import java.util.*; |
17 | 17 | ||
18 | // {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}. | 18 | // {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}. |
19 | @SuppressWarnings("squid:S2160") | 19 | @SuppressWarnings("squid:S2160") |
20 | public abstract class AbstractCallLiteral extends AbstractLiteral { | 20 | public abstract class AbstractCallLiteral extends tools.refinery.logic.literal.AbstractLiteral { |
21 | private final Constraint target; | 21 | private final Constraint target; |
22 | private final List<Variable> arguments; | 22 | private final List<Variable> arguments; |
23 | private final Set<Variable> inArguments; | 23 | private final Set<Variable> inArguments; |
@@ -90,12 +90,12 @@ public abstract class AbstractCallLiteral extends AbstractLiteral { | |||
90 | } | 90 | } |
91 | 91 | ||
92 | @Override | 92 | @Override |
93 | public Literal substitute(Substitution substitution) { | 93 | public tools.refinery.logic.literal.Literal substitute(Substitution substitution) { |
94 | var substitutedArguments = arguments.stream().map(substitution::getSubstitute).toList(); | 94 | var substitutedArguments = arguments.stream().map(substitution::getSubstitute).toList(); |
95 | return doSubstitute(substitution, substitutedArguments); | 95 | return doSubstitute(substitution, substitutedArguments); |
96 | } | 96 | } |
97 | 97 | ||
98 | protected abstract Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments); | 98 | protected abstract tools.refinery.logic.literal.Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments); |
99 | 99 | ||
100 | public AbstractCallLiteral withTarget(Constraint newTarget) { | 100 | public AbstractCallLiteral withTarget(Constraint newTarget) { |
101 | if (Objects.equals(target, newTarget)) { | 101 | if (Objects.equals(target, newTarget)) { |
@@ -107,7 +107,7 @@ public abstract class AbstractCallLiteral extends AbstractLiteral { | |||
107 | public abstract AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments); | 107 | public abstract AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments); |
108 | 108 | ||
109 | @Override | 109 | @Override |
110 | public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) { | 110 | public boolean equalsWithSubstitution(LiteralEqualityHelper helper, tools.refinery.logic.literal.Literal other) { |
111 | if (!super.equalsWithSubstitution(helper, other)) { | 111 | if (!super.equalsWithSubstitution(helper, other)) { |
112 | return false; | 112 | return false; |
113 | } | 113 | } |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCountLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AbstractCountLiteral.java index 9bb572c0..ee932598 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCountLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AbstractCountLiteral.java | |||
@@ -3,15 +3,15 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
12 | import tools.refinery.store.query.term.ConstantTerm; | 12 | import tools.refinery.logic.term.ConstantTerm; |
13 | import tools.refinery.store.query.term.DataVariable; | 13 | import tools.refinery.logic.term.DataVariable; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.List; | 16 | import java.util.List; |
17 | import java.util.Objects; | 17 | import java.util.Objects; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AbstractLiteral.java index 7d3cabd7..79100e40 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AbstractLiteral.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | 10 | ||
11 | public abstract class AbstractLiteral implements Literal { | 11 | public abstract class AbstractLiteral implements Literal { |
12 | @Override | 12 | @Override |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java index e3acfacc..d2cc23f9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java | |||
@@ -1,16 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.*; | 13 | import tools.refinery.logic.term.*; |
14 | 14 | ||
15 | import java.util.List; | 15 | import java.util.List; |
16 | import java.util.Objects; | 16 | import java.util.Objects; |
@@ -129,7 +129,12 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral { | |||
129 | } | 129 | } |
130 | builder.append(argument); | 130 | builder.append(argument); |
131 | while (argumentIterator.hasNext()) { | 131 | while (argumentIterator.hasNext()) { |
132 | builder.append(", ").append(argumentIterator.next()); | 132 | builder.append(", "); |
133 | argument = argumentIterator.next(); | ||
134 | if (inputVariable.equals(argument)) { | ||
135 | builder.append("@Aggregate(\"").append(aggregator).append("\") "); | ||
136 | } | ||
137 | builder.append(argument); | ||
133 | } | 138 | } |
134 | } | 139 | } |
135 | builder.append(")"); | 140 | builder.append(")"); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AssignLiteral.java index dadf487f..4929e74c 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AssignLiteral.java | |||
@@ -3,15 +3,15 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 10 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.substitution.Substitution; |
12 | import tools.refinery.store.query.term.DataVariable; | 12 | import tools.refinery.logic.term.DataVariable; |
13 | import tools.refinery.store.query.term.Term; | 13 | import tools.refinery.logic.term.Term; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.Collections; | 16 | import java.util.Collections; |
17 | import java.util.Objects; | 17 | import java.util.Objects; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/BooleanLiteral.java index 6cd320da..fd1dbf91 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/BooleanLiteral.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | import tools.refinery.store.query.substitution.Substitution; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.Variable; |
12 | 12 | ||
13 | import java.util.Set; | 13 | import java.util.Set; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CallLiteral.java index 2d0e4e97..d93afdc7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CallLiteral.java | |||
@@ -3,15 +3,15 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.ParameterDirection; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.*; | 16 | import java.util.*; |
17 | 17 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CallPolarity.java index 716c7109..4f3bca15 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CallPolarity.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | 9 | ||
10 | public enum CallPolarity { | 10 | public enum CallPolarity { |
11 | POSITIVE(true, false), | 11 | POSITIVE(true, false), |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CanNegate.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CanNegate.java index 35dcb3fb..649f0505 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CanNegate.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CanNegate.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | public interface CanNegate<T extends CanNegate<T>> extends Literal { | 8 | public interface CanNegate<T extends CanNegate<T>> extends Literal { |
9 | T negate(); | 9 | T negate(); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CheckLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CheckLiteral.java index dfedd2cb..86bf7eba 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CheckLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CheckLiteral.java | |||
@@ -3,17 +3,17 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 10 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.substitution.Substitution; |
12 | import tools.refinery.store.query.term.ConstantTerm; | 12 | import tools.refinery.logic.term.ConstantTerm; |
13 | import tools.refinery.store.query.term.Term; | 13 | import tools.refinery.logic.term.Term; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | import tools.refinery.store.query.term.bool.BoolNotTerm; | 15 | import tools.refinery.logic.term.bool.BoolNotTerm; |
16 | import tools.refinery.store.query.term.bool.BoolTerms; | 16 | import tools.refinery.logic.term.bool.BoolTerms; |
17 | 17 | ||
18 | import java.util.Collections; | 18 | import java.util.Collections; |
19 | import java.util.Objects; | 19 | import java.util.Objects; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Connectivity.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Connectivity.java index a058094d..c0465716 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Connectivity.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Connectivity.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import java.util.Locale; | 8 | import java.util.Locale; |
9 | 9 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/ConstantLiteral.java index d83bd584..688ddfa0 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/ConstantLiteral.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | import tools.refinery.store.query.substitution.Substitution; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | import tools.refinery.store.query.term.NodeVariable; | 11 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.Variable; |
13 | 13 | ||
14 | import java.util.Objects; | 14 | import java.util.Objects; |
15 | import java.util.Set; | 15 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CountLiteral.java index 3d078d89..19879692 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/CountLiteral.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.substitution.Substitution; | 9 | import tools.refinery.logic.substitution.Substitution; |
10 | import tools.refinery.store.query.term.DataVariable; | 10 | import tools.refinery.logic.term.DataVariable; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.Variable; |
12 | 12 | ||
13 | import java.util.List; | 13 | import java.util.List; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/EquivalenceLiteral.java index 7343f709..48e85b38 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/EquivalenceLiteral.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 10 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.substitution.Substitution; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.Variable; |
13 | 13 | ||
14 | import java.util.Objects; | 14 | import java.util.Objects; |
15 | import java.util.Set; | 15 | import java.util.Set; |
diff --git a/subprojects/logic/src/main/java/tools/refinery/logic/literal/LeftJoinLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/LeftJoinLiteral.java new file mode 100644 index 00000000..593904c5 --- /dev/null +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/LeftJoinLiteral.java | |||
@@ -0,0 +1,140 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic.literal; | ||
7 | |||
8 | import tools.refinery.logic.Constraint; | ||
9 | import tools.refinery.logic.InvalidQueryException; | ||
10 | import tools.refinery.logic.equality.LiteralEqualityHelper; | ||
11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; | ||
12 | import tools.refinery.logic.substitution.Substitution; | ||
13 | import tools.refinery.logic.term.ConstantTerm; | ||
14 | import tools.refinery.logic.term.DataVariable; | ||
15 | import tools.refinery.logic.term.ParameterDirection; | ||
16 | import tools.refinery.logic.term.Variable; | ||
17 | |||
18 | import java.util.*; | ||
19 | |||
20 | // {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}. | ||
21 | @SuppressWarnings("squid:S2160") | ||
22 | public class LeftJoinLiteral<T> extends AbstractCallLiteral { | ||
23 | private final DataVariable<T> resultVariable; | ||
24 | private final DataVariable<T> placeholderVariable; | ||
25 | private final T defaultValue; | ||
26 | |||
27 | public LeftJoinLiteral(DataVariable<T> resultVariable, DataVariable<T> placeholderVariable, | ||
28 | T defaultValue, Constraint target, List<Variable> arguments) { | ||
29 | super(target, arguments); | ||
30 | this.resultVariable = resultVariable; | ||
31 | this.placeholderVariable = placeholderVariable; | ||
32 | this.defaultValue = defaultValue; | ||
33 | if (defaultValue == null) { | ||
34 | throw new InvalidQueryException("Default value must not be null"); | ||
35 | } | ||
36 | if (!resultVariable.getType().isInstance(defaultValue)) { | ||
37 | throw new InvalidQueryException("Default value %s must be assignable to result variable %s type %s" | ||
38 | .formatted(defaultValue, resultVariable, resultVariable.getType().getName())); | ||
39 | } | ||
40 | if (!getArgumentsOfDirection(ParameterDirection.OUT).contains(placeholderVariable)) { | ||
41 | throw new InvalidQueryException( | ||
42 | "Placeholder variable %s must be bound with direction %s in the argument list" | ||
43 | .formatted(resultVariable, ParameterDirection.OUT)); | ||
44 | } | ||
45 | if (arguments.contains(resultVariable)) { | ||
46 | throw new InvalidQueryException("Result variable must not appear in the argument list"); | ||
47 | } | ||
48 | } | ||
49 | |||
50 | public DataVariable<T> getResultVariable() { | ||
51 | return resultVariable; | ||
52 | } | ||
53 | |||
54 | public DataVariable<T> getPlaceholderVariable() { | ||
55 | return placeholderVariable; | ||
56 | } | ||
57 | |||
58 | public T getDefaultValue() { | ||
59 | return defaultValue; | ||
60 | } | ||
61 | |||
62 | @Override | ||
63 | public Set<Variable> getOutputVariables() { | ||
64 | return Set.of(resultVariable); | ||
65 | } | ||
66 | |||
67 | @Override | ||
68 | public Set<Variable> getInputVariables(Set<? extends Variable> positiveVariablesInClause) { | ||
69 | var inputVariables = new LinkedHashSet<>(getArguments()); | ||
70 | inputVariables.remove(placeholderVariable); | ||
71 | return Collections.unmodifiableSet(inputVariables); | ||
72 | } | ||
73 | |||
74 | @Override | ||
75 | public Set<Variable> getPrivateVariables(Set<? extends Variable> positiveVariablesInClause) { | ||
76 | return Set.of(placeholderVariable); | ||
77 | } | ||
78 | |||
79 | @Override | ||
80 | public Literal reduce() { | ||
81 | var reduction = getTarget().getReduction(); | ||
82 | return switch (reduction) { | ||
83 | case ALWAYS_FALSE -> resultVariable.assign(new ConstantTerm<>(resultVariable.getType(), defaultValue)); | ||
84 | case ALWAYS_TRUE -> throw new InvalidQueryException("Trying to left join an infinite set"); | ||
85 | case NOT_REDUCIBLE -> this; | ||
86 | }; | ||
87 | } | ||
88 | |||
89 | @Override | ||
90 | protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) { | ||
91 | return new LeftJoinLiteral<>(substitution.getTypeSafeSubstitute(resultVariable), | ||
92 | substitution.getTypeSafeSubstitute(placeholderVariable), defaultValue, getTarget(), | ||
93 | substitutedArguments); | ||
94 | } | ||
95 | |||
96 | @Override | ||
97 | public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) { | ||
98 | return new LeftJoinLiteral<>(resultVariable, placeholderVariable, defaultValue, newTarget, newArguments); | ||
99 | } | ||
100 | |||
101 | @Override | ||
102 | public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) { | ||
103 | if (!super.equalsWithSubstitution(helper, other)) { | ||
104 | return false; | ||
105 | } | ||
106 | var otherLeftJoinLiteral = (LeftJoinLiteral<?>) other; | ||
107 | return helper.variableEqual(resultVariable, otherLeftJoinLiteral.resultVariable) && | ||
108 | helper.variableEqual(placeholderVariable, otherLeftJoinLiteral.placeholderVariable) && | ||
109 | Objects.equals(defaultValue, otherLeftJoinLiteral.defaultValue); | ||
110 | } | ||
111 | |||
112 | @Override | ||
113 | public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) { | ||
114 | return Objects.hash(super.hashCodeWithSubstitution(helper), helper.getVariableHashCode(resultVariable), | ||
115 | helper.getVariableHashCode(placeholderVariable), defaultValue); | ||
116 | } | ||
117 | |||
118 | @Override | ||
119 | public String toString() { | ||
120 | var builder = new StringBuilder(); | ||
121 | var argumentIterator = getArguments().iterator(); | ||
122 | if (argumentIterator.hasNext()) { | ||
123 | appendArgument(builder, argumentIterator.next()); | ||
124 | while (argumentIterator.hasNext()) { | ||
125 | builder.append(", "); | ||
126 | appendArgument(builder, argumentIterator.next()); | ||
127 | } | ||
128 | } | ||
129 | builder.append(")"); | ||
130 | return builder.toString(); | ||
131 | } | ||
132 | |||
133 | private void appendArgument(StringBuilder builder, Variable argument) { | ||
134 | if (placeholderVariable.equals(argument)) { | ||
135 | builder.append("@Default(").append(defaultValue).append(") "); | ||
136 | argument = resultVariable; | ||
137 | } | ||
138 | builder.append(argument); | ||
139 | } | ||
140 | } | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Literal.java index cb16ab00..08a0241c 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Literal.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | import tools.refinery.store.query.substitution.Substitution; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.Variable; |
12 | 12 | ||
13 | import java.util.Set; | 13 | import java.util.Set; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Literals.java index 6056da45..2f7ddb5d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Literals.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Term; | 8 | import tools.refinery.logic.term.Term; |
9 | 9 | ||
10 | public final class Literals { | 10 | public final class Literals { |
11 | private Literals() { | 11 | private Literals() { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Reduction.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Reduction.java index ee155a9a..1f7d9a2f 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Reduction.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/Reduction.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | public enum Reduction { | 8 | public enum Reduction { |
9 | /** | 9 | /** |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/RepresentativeElectionLiteral.java index f7323947..ff9a6bed 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/RepresentativeElectionLiteral.java | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.NodeVariable; | 13 | import tools.refinery.logic.term.NodeVariable; |
14 | import tools.refinery.store.query.term.ParameterDirection; | 14 | import tools.refinery.logic.term.ParameterDirection; |
15 | import tools.refinery.store.query.term.Variable; | 15 | import tools.refinery.logic.term.Variable; |
16 | 16 | ||
17 | import java.util.List; | 17 | import java.util.List; |
18 | import java.util.Set; | 18 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/AbstractRecursiveRewriter.java b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/AbstractRecursiveRewriter.java index fb4c14a7..073705f8 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/AbstractRecursiveRewriter.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/AbstractRecursiveRewriter.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.equality.DnfEqualityChecker; | 9 | import tools.refinery.logic.equality.DnfEqualityChecker; |
10 | import tools.refinery.store.util.CycleDetectingMapper; | 10 | import tools.refinery.logic.util.CycleDetectingMapper; |
11 | 11 | ||
12 | public abstract class AbstractRecursiveRewriter implements DnfRewriter { | 12 | public abstract class AbstractRecursiveRewriter implements DnfRewriter { |
13 | private final CycleDetectingMapper<Dnf, Dnf> mapper = new CycleDetectingMapper<>(Dnf::name, this::map); | 13 | private final CycleDetectingMapper<Dnf, Dnf> mapper = new CycleDetectingMapper<>(Dnf::name, this::map); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/ClauseInputParameterResolver.java b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/ClauseInputParameterResolver.java index aa06a05a..83fd44c5 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/ClauseInputParameterResolver.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/ClauseInputParameterResolver.java | |||
@@ -3,14 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.dnf.DnfClause; | 9 | import tools.refinery.logic.dnf.DnfClause; |
10 | import tools.refinery.store.query.literal.*; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.term.Variable; |
12 | import tools.refinery.store.query.term.ParameterDirection; | 12 | import tools.refinery.logic.literal.*; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | 14 | ||
15 | import java.util.*; | 15 | import java.util.*; |
16 | 16 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/CompositeRewriter.java b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/CompositeRewriter.java index 5b4f65e5..2e681093 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/CompositeRewriter.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/CompositeRewriter.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | 9 | ||
10 | import java.util.ArrayList; | 10 | import java.util.ArrayList; |
11 | import java.util.List; | 11 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DnfRewriter.java b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/DnfRewriter.java index 5d8359d1..f4605895 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DnfRewriter.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/DnfRewriter.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.AnyQuery; | 8 | import tools.refinery.logic.dnf.AnyQuery; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.dnf.Dnf; |
10 | import tools.refinery.store.query.dnf.Query; | 10 | import tools.refinery.logic.dnf.Query; |
11 | 11 | ||
12 | @FunctionalInterface | 12 | @FunctionalInterface |
13 | public interface DnfRewriter { | 13 | public interface DnfRewriter { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DuplicateDnfRemover.java b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/DuplicateDnfRemover.java index 0c786470..43317338 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DuplicateDnfRemover.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/DuplicateDnfRemover.java | |||
@@ -3,14 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.dnf.DnfClause; | 9 | import tools.refinery.logic.dnf.DnfClause; |
10 | import tools.refinery.store.query.dnf.Query; | 10 | import tools.refinery.logic.dnf.Query; |
11 | import tools.refinery.store.query.equality.DnfEqualityChecker; | 11 | import tools.refinery.logic.equality.DnfEqualityChecker; |
12 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 12 | import tools.refinery.logic.literal.AbstractCallLiteral; |
13 | import tools.refinery.store.query.literal.Literal; | 13 | import tools.refinery.logic.literal.Literal; |
14 | 14 | ||
15 | import java.util.ArrayList; | 15 | import java.util.ArrayList; |
16 | import java.util.HashMap; | 16 | import java.util.HashMap; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/InputParameterResolver.java b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/InputParameterResolver.java index cd8a2e7d..89aa43c7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/InputParameterResolver.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/rewriter/InputParameterResolver.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.dnf.DnfBuilder; | 9 | import tools.refinery.logic.dnf.DnfBuilder; |
10 | import tools.refinery.store.query.literal.Literal; | 10 | import tools.refinery.logic.term.Variable; |
11 | import tools.refinery.store.query.term.ParameterDirection; | 11 | import tools.refinery.logic.literal.Literal; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.ParameterDirection; |
13 | 13 | ||
14 | import java.util.HashSet; | 14 | import java.util.HashSet; |
15 | import java.util.List; | 15 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/MapBasedSubstitution.java b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/MapBasedSubstitution.java index a8201eef..2977bd57 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/MapBasedSubstitution.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/MapBasedSubstitution.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.substitution; | 6 | package tools.refinery.logic.substitution; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Variable; | 8 | import tools.refinery.logic.term.Variable; |
9 | 9 | ||
10 | import java.util.Map; | 10 | import java.util.Map; |
11 | 11 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/RenewingSubstitution.java b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/RenewingSubstitution.java index 9b737ceb..ca40ee50 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/RenewingSubstitution.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/RenewingSubstitution.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.substitution; | 6 | package tools.refinery.logic.substitution; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Variable; | 8 | import tools.refinery.logic.term.Variable; |
9 | 9 | ||
10 | import java.util.HashMap; | 10 | import java.util.HashMap; |
11 | import java.util.Map; | 11 | import java.util.Map; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/StatelessSubstitution.java b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/StatelessSubstitution.java index bb3803d3..ab36d3db 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/StatelessSubstitution.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/StatelessSubstitution.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.substitution; | 6 | package tools.refinery.logic.substitution; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Variable; | 8 | import tools.refinery.logic.term.Variable; |
9 | 9 | ||
10 | public enum StatelessSubstitution implements Substitution { | 10 | public enum StatelessSubstitution implements Substitution { |
11 | FAILING { | 11 | FAILING { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/Substitution.java b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/Substitution.java index 834fce12..8fc700bc 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/Substitution.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/Substitution.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.substitution; | 6 | package tools.refinery.logic.substitution; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.DataVariable; | 8 | import tools.refinery.logic.term.DataVariable; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.Variable; |
11 | 11 | ||
12 | @FunctionalInterface | 12 | @FunctionalInterface |
13 | public interface Substitution { | 13 | public interface Substitution { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/SubstitutionBuilder.java b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/SubstitutionBuilder.java index 37fb6908..f30b1a5d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/substitution/SubstitutionBuilder.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/substitution/SubstitutionBuilder.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.substitution; | 6 | package tools.refinery.logic.substitution; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.DataVariable; | 8 | import tools.refinery.logic.term.DataVariable; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.Variable; |
11 | 11 | ||
12 | import java.util.Collections; | 12 | import java.util.Collections; |
13 | import java.util.HashMap; | 13 | import java.util.HashMap; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/AbstractTerm.java index 5cecc35b..293f7e9e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/AbstractTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | 10 | ||
11 | import java.util.Objects; | 11 | import java.util.Objects; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Aggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/Aggregator.java index 0684a9d9..40189ebc 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Aggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/Aggregator.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import java.util.stream.Stream; | 8 | import java.util.stream.Stream; |
9 | 9 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/AnyDataVariable.java index 3801bc11..3376bdc9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/AnyDataVariable.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | 11 | ||
12 | import java.util.Optional; | 12 | import java.util.Optional; |
13 | import java.util.Set; | 13 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/AnyTerm.java index f136b68d..58b4cb1d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/AnyTerm.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 8 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
9 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 9 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
10 | import tools.refinery.store.query.substitution.Substitution; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | 11 | ||
12 | import java.util.Set; | 12 | import java.util.Set; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AssignedValue.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/AssignedValue.java index 0cf30aa6..78900cd6 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AssignedValue.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/AssignedValue.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.Literal; | 8 | import tools.refinery.logic.literal.Literal; |
9 | 9 | ||
10 | @FunctionalInterface | 10 | @FunctionalInterface |
11 | public interface AssignedValue<T> { | 11 | public interface AssignedValue<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/BinaryTerm.java index cdbf592a..356fd807 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/BinaryTerm.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.substitution.Substitution; |
12 | import tools.refinery.store.query.valuation.Valuation; | 12 | import tools.refinery.logic.valuation.Valuation; |
13 | 13 | ||
14 | import java.util.Collections; | 14 | import java.util.Collections; |
15 | import java.util.HashSet; | 15 | import java.util.HashSet; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/ConstantTerm.java index 415ae286..69c7e5f6 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/ConstantTerm.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.substitution.Substitution; |
12 | import tools.refinery.store.query.valuation.Valuation; | 12 | import tools.refinery.logic.valuation.Valuation; |
13 | 13 | ||
14 | import java.util.Objects; | 14 | import java.util.Objects; |
15 | import java.util.Set; | 15 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/DataVariable.java index 2206b522..7ef69d05 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/DataVariable.java | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 11 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
12 | import tools.refinery.store.query.literal.EquivalenceLiteral; | 12 | import tools.refinery.logic.literal.EquivalenceLiteral; |
13 | import tools.refinery.store.query.literal.Literal; | 13 | import tools.refinery.logic.literal.Literal; |
14 | import tools.refinery.store.query.substitution.Substitution; | 14 | import tools.refinery.logic.substitution.Substitution; |
15 | import tools.refinery.store.query.valuation.Valuation; | 15 | import tools.refinery.logic.valuation.Valuation; |
16 | 16 | ||
17 | import java.util.Objects; | 17 | import java.util.Objects; |
18 | 18 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ExtremeValueAggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/ExtremeValueAggregator.java index 657cb631..31c61b6a 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ExtremeValueAggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/ExtremeValueAggregator.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import java.util.Comparator; | 8 | import java.util.Comparator; |
9 | import java.util.Objects; | 9 | import java.util.Objects; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/NodeVariable.java index 53c32e20..1a5f2657 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/NodeVariable.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.literal.ConstantLiteral; | 10 | import tools.refinery.logic.literal.ConstantLiteral; |
11 | import tools.refinery.store.query.literal.EquivalenceLiteral; | 11 | import tools.refinery.logic.literal.EquivalenceLiteral; |
12 | 12 | ||
13 | import java.util.Optional; | 13 | import java.util.Optional; |
14 | 14 | ||
@@ -24,7 +24,7 @@ public final class NodeVariable extends Variable { | |||
24 | 24 | ||
25 | @Override | 25 | @Override |
26 | public NodeVariable renew(@Nullable String name) { | 26 | public NodeVariable renew(@Nullable String name) { |
27 | return Variable.of(name); | 27 | return of(name); |
28 | } | 28 | } |
29 | 29 | ||
30 | @Override | 30 | @Override |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/Parameter.java index 577ac6e0..d4a651e1 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/Parameter.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import java.util.Objects; | 8 | import java.util.Objects; |
9 | import java.util.Optional; | 9 | import java.util.Optional; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/ParameterDirection.java index da83f3c3..75ee06e6 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/ParameterDirection.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | public enum ParameterDirection { | 8 | public enum ParameterDirection { |
9 | OUT("out"), | 9 | OUT("out"), |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/StatefulAggregate.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/StatefulAggregate.java index ab310556..75e7ecff 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/StatefulAggregate.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/StatefulAggregate.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | public interface StatefulAggregate<R, T> { | 8 | public interface StatefulAggregate<R, T> { |
9 | void add(T value); | 9 | void add(T value); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/StatefulAggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/StatefulAggregator.java index df746a90..79d32535 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/StatefulAggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/StatefulAggregator.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import java.util.stream.Stream; | 8 | import java.util.stream.Stream; |
9 | 9 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/StatelessAggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/StatelessAggregator.java index a094919e..37db262e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/StatelessAggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/StatelessAggregator.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import java.util.stream.Stream; | 8 | import java.util.stream.Stream; |
9 | 9 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Term.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/Term.java index e6818b88..0eaa36d8 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Term.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/Term.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.AssignLiteral; | 8 | import tools.refinery.logic.literal.AssignLiteral; |
9 | import tools.refinery.store.query.literal.Literal; | 9 | import tools.refinery.logic.literal.Literal; |
10 | import tools.refinery.store.query.substitution.Substitution; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | import tools.refinery.store.query.valuation.Valuation; | 11 | import tools.refinery.logic.valuation.Valuation; |
12 | 12 | ||
13 | public non-sealed interface Term<T> extends AnyTerm, AssignedValue<T> { | 13 | public non-sealed interface Term<T> extends AnyTerm, AssignedValue<T> { |
14 | @Override | 14 | @Override |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/UnaryTerm.java index a464ece5..e173de3e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/UnaryTerm.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | 10 | import tools.refinery.logic.equality.LiteralHashCodeHelper; |
11 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.logic.substitution.Substitution; |
12 | import tools.refinery.store.query.valuation.Valuation; | 12 | import tools.refinery.logic.valuation.Valuation; |
13 | 13 | ||
14 | import java.util.Objects; | 14 | import java.util.Objects; |
15 | import java.util.Set; | 15 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/Variable.java index 1b553704..28aad21b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/Variable.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.store.query.dnf.DnfUtils; | 9 | import tools.refinery.logic.dnf.DnfUtils; |
10 | 10 | ||
11 | import java.util.Objects; | 11 | import java.util.Objects; |
12 | import java.util.Optional; | 12 | import java.util.Optional; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolAndTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolAndTerm.java index f9e1c06f..88c2081b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolAndTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolAndTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class BoolAndTerm extends BoolBinaryTerm { | 11 | public class BoolAndTerm extends BoolBinaryTerm { |
12 | public BoolAndTerm(Term<Boolean> left, Term<Boolean> right) { | 12 | public BoolAndTerm(Term<Boolean> left, Term<Boolean> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolBinaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolBinaryTerm.java index a85aa63a..6d53fb43 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolBinaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolBinaryTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.BinaryTerm; | 8 | import tools.refinery.logic.term.BinaryTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public abstract class BoolBinaryTerm extends BinaryTerm<Boolean, Boolean, Boolean> { | 11 | public abstract class BoolBinaryTerm extends BinaryTerm<Boolean, Boolean, Boolean> { |
12 | protected BoolBinaryTerm(Term<Boolean> left, Term<Boolean> right) { | 12 | protected BoolBinaryTerm(Term<Boolean> left, Term<Boolean> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolNotTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolNotTerm.java index 8d3382b3..ec80484f 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolNotTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolNotTerm.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | import tools.refinery.store.query.term.UnaryTerm; | 10 | import tools.refinery.logic.term.UnaryTerm; |
11 | 11 | ||
12 | public class BoolNotTerm extends UnaryTerm<Boolean, Boolean> { | 12 | public class BoolNotTerm extends UnaryTerm<Boolean, Boolean> { |
13 | protected BoolNotTerm(Term<Boolean> body) { | 13 | protected BoolNotTerm(Term<Boolean> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolOrTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolOrTerm.java index b5195d52..10c61bf2 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolOrTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolOrTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class BoolOrTerm extends BoolBinaryTerm { | 11 | public class BoolOrTerm extends BoolBinaryTerm { |
12 | public BoolOrTerm(Term<Boolean> left, Term<Boolean> right) { | 12 | public BoolOrTerm(Term<Boolean> left, Term<Boolean> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolTerms.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolTerms.java index fa54f686..5bdc3207 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolTerms.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolTerms.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.ConstantTerm; | 8 | import tools.refinery.logic.term.ConstantTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public final class BoolTerms { | 11 | public final class BoolTerms { |
12 | private BoolTerms() { | 12 | private BoolTerms() { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolXorTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolXorTerm.java index 7478b8a5..3d5247a7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/bool/BoolXorTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/bool/BoolXorTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class BoolXorTerm extends BoolBinaryTerm { | 11 | public class BoolXorTerm extends BoolBinaryTerm { |
12 | public BoolXorTerm(Term<Boolean> left, Term<Boolean> right) { | 12 | public BoolXorTerm(Term<Boolean> left, Term<Boolean> right) { |
diff --git a/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityDomain.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityDomain.java new file mode 100644 index 00000000..29775615 --- /dev/null +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityDomain.java | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic.term.cardinalityinterval; | ||
7 | |||
8 | import tools.refinery.logic.AbstractDomain; | ||
9 | |||
10 | // Singleton pattern, because there is only one domain for truth values. | ||
11 | @SuppressWarnings("squid:S6548") | ||
12 | public class CardinalityDomain implements AbstractDomain<CardinalityInterval, Integer> { | ||
13 | public static final CardinalityDomain INSTANCE = new CardinalityDomain(); | ||
14 | |||
15 | private CardinalityDomain() { | ||
16 | } | ||
17 | |||
18 | @Override | ||
19 | public Class<CardinalityInterval> abstractType() { | ||
20 | return CardinalityInterval.class; | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public Class<Integer> concreteType() { | ||
25 | return Integer.class; | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public CardinalityInterval unknown() { | ||
30 | return CardinalityIntervals.SET; | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | public CardinalityInterval error() { | ||
35 | return CardinalityIntervals.ERROR; | ||
36 | } | ||
37 | |||
38 | @Override | ||
39 | public CardinalityInterval toAbstract(Integer concreteValue) { | ||
40 | return CardinalityIntervals.exactly(concreteValue); | ||
41 | } | ||
42 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityInterval.java index b20c685a..996ebde5 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityInterval.java | |||
@@ -3,15 +3,17 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | 7 | ||
8 | public sealed interface CardinalityInterval permits NonEmptyCardinalityInterval, EmptyCardinalityInterval { | 8 | import tools.refinery.logic.AbstractValue; |
9 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
10 | |||
11 | public sealed interface CardinalityInterval extends AbstractValue<CardinalityInterval, Integer> | ||
12 | permits NonEmptyCardinalityInterval, EmptyCardinalityInterval { | ||
9 | int lowerBound(); | 13 | int lowerBound(); |
10 | 14 | ||
11 | UpperCardinality upperBound(); | 15 | UpperCardinality upperBound(); |
12 | 16 | ||
13 | boolean isEmpty(); | ||
14 | |||
15 | CardinalityInterval min(CardinalityInterval other); | 17 | CardinalityInterval min(CardinalityInterval other); |
16 | 18 | ||
17 | CardinalityInterval max(CardinalityInterval other); | 19 | CardinalityInterval max(CardinalityInterval other); |
@@ -21,8 +23,4 @@ public sealed interface CardinalityInterval permits NonEmptyCardinalityInterval, | |||
21 | CardinalityInterval take(int count); | 23 | CardinalityInterval take(int count); |
22 | 24 | ||
23 | CardinalityInterval multiply(CardinalityInterval other); | 25 | CardinalityInterval multiply(CardinalityInterval other); |
24 | |||
25 | CardinalityInterval meet(CardinalityInterval other); | ||
26 | |||
27 | CardinalityInterval join(CardinalityInterval other); | ||
28 | } | 26 | } |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityIntervals.java index 855fd248..cb64cc0d 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/CardinalityIntervals.java | |||
@@ -3,7 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | |||
8 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
9 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
7 | 10 | ||
8 | public final class CardinalityIntervals { | 11 | public final class CardinalityIntervals { |
9 | public static final CardinalityInterval NONE = exactly(0); | 12 | public static final CardinalityInterval NONE = exactly(0); |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/EmptyCardinalityInterval.java index 9e371e21..8892b278 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/EmptyCardinalityInterval.java | |||
@@ -1,9 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | |||
8 | import org.jetbrains.annotations.Nullable; | ||
9 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
10 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
7 | 11 | ||
8 | // Singleton implementation, because there is only a single empty interval. | 12 | // Singleton implementation, because there is only a single empty interval. |
9 | @SuppressWarnings("squid:S6548") | 13 | @SuppressWarnings("squid:S6548") |
@@ -15,16 +19,28 @@ public final class EmptyCardinalityInterval implements CardinalityInterval { | |||
15 | } | 19 | } |
16 | 20 | ||
17 | @Override | 21 | @Override |
18 | public int lowerBound() { | 22 | @Nullable |
19 | return 1; | 23 | public Integer getConcrete() { |
24 | return null; | ||
25 | } | ||
26 | |||
27 | @Override | ||
28 | @Nullable | ||
29 | public Integer getArbitrary() { | ||
30 | return null; | ||
20 | } | 31 | } |
21 | 32 | ||
22 | @Override | 33 | @Override |
23 | public boolean isEmpty() { | 34 | public boolean isRefinementOf(CardinalityInterval other) { |
24 | return true; | 35 | return true; |
25 | } | 36 | } |
26 | 37 | ||
27 | @Override | 38 | @Override |
39 | public int lowerBound() { | ||
40 | return 1; | ||
41 | } | ||
42 | |||
43 | @Override | ||
28 | public UpperCardinality upperBound() { | 44 | public UpperCardinality upperBound() { |
29 | return UpperCardinalities.ZERO; | 45 | return UpperCardinalities.ZERO; |
30 | } | 46 | } |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/NonEmptyCardinalityInterval.java index 6bd66df7..efe1464e 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/cardinalityinterval/NonEmptyCardinalityInterval.java | |||
@@ -1,9 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | |||
8 | import org.jetbrains.annotations.NotNull; | ||
9 | import org.jetbrains.annotations.Nullable; | ||
10 | import tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality; | ||
11 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
7 | 12 | ||
8 | import java.util.Objects; | 13 | import java.util.Objects; |
9 | import java.util.function.BinaryOperator; | 14 | import java.util.function.BinaryOperator; |
@@ -20,11 +25,37 @@ public record NonEmptyCardinalityInterval(int lowerBound, UpperCardinality upper | |||
20 | } | 25 | } |
21 | 26 | ||
22 | @Override | 27 | @Override |
23 | public boolean isEmpty() { | 28 | @Nullable |
29 | public Integer getConcrete() { | ||
30 | return isConcrete() ? lowerBound : null; | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | public boolean isConcrete() { | ||
35 | return upperBound instanceof FiniteUpperCardinality finiteUpperCardinality && | ||
36 | finiteUpperCardinality.finiteUpperBound() == lowerBound; | ||
37 | } | ||
38 | |||
39 | @Override | ||
40 | @NotNull | ||
41 | public Integer getArbitrary() { | ||
42 | return lowerBound; | ||
43 | } | ||
44 | |||
45 | @Override | ||
46 | public boolean isError() { | ||
24 | return false; | 47 | return false; |
25 | } | 48 | } |
26 | 49 | ||
27 | @Override | 50 | @Override |
51 | public boolean isRefinementOf(CardinalityInterval other) { | ||
52 | if (!(other instanceof NonEmptyCardinalityInterval nonEmptyOther)) { | ||
53 | return false; | ||
54 | } | ||
55 | return lowerBound >= nonEmptyOther.lowerBound() && upperBound.compareTo(nonEmptyOther.upperBound()) <= 0; | ||
56 | } | ||
57 | |||
58 | @Override | ||
28 | public CardinalityInterval min(CardinalityInterval other) { | 59 | public CardinalityInterval min(CardinalityInterval other) { |
29 | return lift(other, Math::min, UpperCardinality::min); | 60 | return lift(other, Math::min, UpperCardinality::min); |
30 | } | 61 | } |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/ComparisonTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/ComparisonTerm.java index 5ca5a0a1..0401f984 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/ComparisonTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/ComparisonTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.BinaryTerm; | 8 | import tools.refinery.logic.term.BinaryTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public abstract class ComparisonTerm<T> extends BinaryTerm<Boolean, T, T> { | 11 | public abstract class ComparisonTerm<T> extends BinaryTerm<Boolean, T, T> { |
12 | protected ComparisonTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | protected ComparisonTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/EqTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/EqTerm.java index b8cf36f8..7a1315e6 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/EqTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/EqTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class EqTerm<T> extends ComparisonTerm<T> { | 11 | public class EqTerm<T> extends ComparisonTerm<T> { |
12 | public EqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | public EqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/GreaterEqTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/GreaterEqTerm.java index b109eb1a..38323999 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/GreaterEqTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/GreaterEqTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class GreaterEqTerm<T extends Comparable<T>> extends ComparisonTerm<T> { | 11 | public class GreaterEqTerm<T extends Comparable<T>> extends ComparisonTerm<T> { |
12 | public GreaterEqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | public GreaterEqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/GreaterTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/GreaterTerm.java index 1b67f8b5..7174372e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/GreaterTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/GreaterTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class GreaterTerm<T extends Comparable<T>> extends ComparisonTerm<T> { | 11 | public class GreaterTerm<T extends Comparable<T>> extends ComparisonTerm<T> { |
12 | public GreaterTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | public GreaterTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/LessEqTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/LessEqTerm.java index 1b34535f..7a07b7b2 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/LessEqTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/LessEqTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class LessEqTerm<T extends Comparable<T>> extends ComparisonTerm<T> { | 11 | public class LessEqTerm<T extends Comparable<T>> extends ComparisonTerm<T> { |
12 | public LessEqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | public LessEqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/LessTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/LessTerm.java index 44e70902..b402f54d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/LessTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/LessTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class LessTerm<T extends Comparable<T>> extends ComparisonTerm<T> { | 11 | public class LessTerm<T extends Comparable<T>> extends ComparisonTerm<T> { |
12 | public LessTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | public LessTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/NotEqTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/NotEqTerm.java index 1f9734c4..d2c697f4 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/comparable/NotEqTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/comparable/NotEqTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.comparable; | 6 | package tools.refinery.logic.term.comparable; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class NotEqTerm<T> extends ComparisonTerm<T> { | 11 | public class NotEqTerm<T> extends ComparisonTerm<T> { |
12 | public NotEqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { | 12 | public NotEqTerm(Class<T> argumentType, Term<T> left, Term<T> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntAddTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntAddTerm.java index dbea3efc..73533d9b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntAddTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntAddTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntAddTerm extends IntBinaryTerm { | 11 | public class IntAddTerm extends IntBinaryTerm { |
12 | public IntAddTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntAddTerm(Term<Integer> left, Term<Integer> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntBinaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntBinaryTerm.java index 27ced4e4..9543c21f 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntBinaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntBinaryTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.BinaryTerm; | 8 | import tools.refinery.logic.term.BinaryTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public abstract class IntBinaryTerm extends BinaryTerm<Integer, Integer, Integer> { | 11 | public abstract class IntBinaryTerm extends BinaryTerm<Integer, Integer, Integer> { |
12 | protected IntBinaryTerm(Term<Integer> left, Term<Integer> right) { | 12 | protected IntBinaryTerm(Term<Integer> left, Term<Integer> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntDivTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntDivTerm.java index 2a35058c..f9fa70ef 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntDivTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntDivTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntDivTerm extends IntBinaryTerm { | 11 | public class IntDivTerm extends IntBinaryTerm { |
12 | public IntDivTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntDivTerm(Term<Integer> left, Term<Integer> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMaxTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMaxTerm.java index f81fc509..f7b315df 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMaxTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMaxTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntMaxTerm extends IntBinaryTerm { | 11 | public class IntMaxTerm extends IntBinaryTerm { |
12 | public IntMaxTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntMaxTerm(Term<Integer> left, Term<Integer> right) { |
@@ -15,7 +15,7 @@ public class IntMaxTerm extends IntBinaryTerm { | |||
15 | 15 | ||
16 | @Override | 16 | @Override |
17 | public Term<Integer> doSubstitute(Substitution substitution, Term<Integer> substitutedLeft, | 17 | public Term<Integer> doSubstitute(Substitution substitution, Term<Integer> substitutedLeft, |
18 | Term<Integer> substitutedRight) { | 18 | Term<Integer> substitutedRight) { |
19 | return new IntMaxTerm(substitutedLeft, substitutedRight); | 19 | return new IntMaxTerm(substitutedLeft, substitutedRight); |
20 | } | 20 | } |
21 | 21 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMinTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMinTerm.java index 89182e26..73247db1 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMinTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMinTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntMinTerm extends IntBinaryTerm { | 11 | public class IntMinTerm extends IntBinaryTerm { |
12 | public IntMinTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntMinTerm(Term<Integer> left, Term<Integer> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMinusTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMinusTerm.java index 709aa5ba..006e1977 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMinusTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMinusTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntMinusTerm extends IntUnaryTerm { | 11 | public class IntMinusTerm extends IntUnaryTerm { |
12 | public IntMinusTerm(Term<Integer> body) { | 12 | public IntMinusTerm(Term<Integer> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMulTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMulTerm.java index 89d4c5f4..18fdcb45 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntMulTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntMulTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntMulTerm extends IntBinaryTerm { | 11 | public class IntMulTerm extends IntBinaryTerm { |
12 | public IntMulTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntMulTerm(Term<Integer> left, Term<Integer> right) { |
@@ -15,7 +15,7 @@ public class IntMulTerm extends IntBinaryTerm { | |||
15 | 15 | ||
16 | @Override | 16 | @Override |
17 | public Term<Integer> doSubstitute(Substitution substitution, Term<Integer> substitutedLeft, | 17 | public Term<Integer> doSubstitute(Substitution substitution, Term<Integer> substitutedLeft, |
18 | Term<Integer> substitutedRight) { | 18 | Term<Integer> substitutedRight) { |
19 | return new IntMulTerm(substitutedLeft, substitutedRight); | 19 | return new IntMulTerm(substitutedLeft, substitutedRight); |
20 | } | 20 | } |
21 | 21 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntPlusTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntPlusTerm.java index aef83bb4..1a905293 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntPlusTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntPlusTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntPlusTerm extends IntUnaryTerm { | 11 | public class IntPlusTerm extends IntUnaryTerm { |
12 | public IntPlusTerm(Term<Integer> body) { | 12 | public IntPlusTerm(Term<Integer> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntPowTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntPowTerm.java index d5af97a1..dac490b0 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntPowTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntPowTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntPowTerm extends IntBinaryTerm { | 11 | public class IntPowTerm extends IntBinaryTerm { |
12 | public IntPowTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntPowTerm(Term<Integer> left, Term<Integer> right) { |
@@ -15,7 +15,7 @@ public class IntPowTerm extends IntBinaryTerm { | |||
15 | 15 | ||
16 | @Override | 16 | @Override |
17 | public Term<Integer> doSubstitute(Substitution substitution, Term<Integer> substitutedLeft, | 17 | public Term<Integer> doSubstitute(Substitution substitution, Term<Integer> substitutedLeft, |
18 | Term<Integer> substitutedRight) { | 18 | Term<Integer> substitutedRight) { |
19 | return new IntPowTerm(substitutedLeft, substitutedRight); | 19 | return new IntPowTerm(substitutedLeft, substitutedRight); |
20 | } | 20 | } |
21 | 21 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntSubTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntSubTerm.java index 2c27afb1..94326677 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntSubTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntSubTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class IntSubTerm extends IntBinaryTerm { | 11 | public class IntSubTerm extends IntBinaryTerm { |
12 | public IntSubTerm(Term<Integer> left, Term<Integer> right) { | 12 | public IntSubTerm(Term<Integer> left, Term<Integer> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntSumAggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntSumAggregator.java index cd718c53..b42038ab 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntSumAggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntSumAggregator.java | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.StatelessAggregator; | 8 | import tools.refinery.logic.term.StatelessAggregator; |
9 | 9 | ||
10 | public final class IntSumAggregator implements StatelessAggregator<Integer, Integer> { | 10 | public final class IntSumAggregator implements StatelessAggregator<Integer, Integer> { |
11 | public static final IntSumAggregator INSTANCE = new IntSumAggregator(); | 11 | public static final IntSumAggregator INSTANCE = new IntSumAggregator(); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntTerms.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntTerms.java index acb98b94..b152a138 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntTerms.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntTerms.java | |||
@@ -3,13 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Aggregator; | 8 | import tools.refinery.logic.term.Aggregator; |
9 | import tools.refinery.store.query.term.ConstantTerm; | 9 | import tools.refinery.logic.term.ConstantTerm; |
10 | import tools.refinery.store.query.term.ExtremeValueAggregator; | 10 | import tools.refinery.logic.term.ExtremeValueAggregator; |
11 | import tools.refinery.store.query.term.Term; | 11 | import tools.refinery.logic.term.Term; |
12 | import tools.refinery.store.query.term.comparable.*; | 12 | import tools.refinery.logic.term.comparable.*; |
13 | import tools.refinery.logic.term.comparable.*; | ||
13 | 14 | ||
14 | import java.util.Comparator; | 15 | import java.util.Comparator; |
15 | 16 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntUnaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntUnaryTerm.java index 49b4c647..20449e67 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/IntUnaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/IntUnaryTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Term; | 8 | import tools.refinery.logic.term.UnaryTerm; |
9 | import tools.refinery.store.query.term.UnaryTerm; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public abstract class IntUnaryTerm extends UnaryTerm<Integer, Integer> { | 11 | public abstract class IntUnaryTerm extends UnaryTerm<Integer, Integer> { |
12 | protected IntUnaryTerm(Term<Integer> body) { | 12 | protected IntUnaryTerm(Term<Integer> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/RealToIntTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/RealToIntTerm.java index 7d383562..7611af90 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/int_/RealToIntTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/int_/RealToIntTerm.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.term.Term; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.UnaryTerm; |
10 | import tools.refinery.store.query.term.UnaryTerm; | 10 | import tools.refinery.logic.substitution.Substitution; |
11 | 11 | ||
12 | public class RealToIntTerm extends UnaryTerm<Integer, Double> { | 12 | public class RealToIntTerm extends UnaryTerm<Integer, Double> { |
13 | protected RealToIntTerm(Term<Double> body) { | 13 | protected RealToIntTerm(Term<Double> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/IntToRealTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/IntToRealTerm.java index 2f53117a..23c6893c 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/IntToRealTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/IntToRealTerm.java | |||
@@ -3,11 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.term.UnaryTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.substitution.Substitution; |
10 | import tools.refinery.store.query.term.UnaryTerm; | 10 | import tools.refinery.logic.term.Term; |
11 | 11 | ||
12 | public class IntToRealTerm extends UnaryTerm<Double, Integer> { | 12 | public class IntToRealTerm extends UnaryTerm<Double, Integer> { |
13 | protected IntToRealTerm(Term<Integer> body) { | 13 | protected IntToRealTerm(Term<Integer> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealAddTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealAddTerm.java index 33fc9e41..82b97228 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealAddTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealAddTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealAddTerm extends RealBinaryTerm { | 11 | public class RealAddTerm extends RealBinaryTerm { |
12 | public RealAddTerm(Term<Double> left, Term<Double> right) { | 12 | public RealAddTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealBinaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealBinaryTerm.java index 000f3623..3c23e767 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealBinaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealBinaryTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.BinaryTerm; | 8 | import tools.refinery.logic.term.BinaryTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public abstract class RealBinaryTerm extends BinaryTerm<Double, Double, Double> { | 11 | public abstract class RealBinaryTerm extends BinaryTerm<Double, Double, Double> { |
12 | protected RealBinaryTerm(Term<Double> left, Term<Double> right) { | 12 | protected RealBinaryTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealDivTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealDivTerm.java index 1e55bf42..c22399e3 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealDivTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealDivTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealDivTerm extends RealBinaryTerm { | 11 | public class RealDivTerm extends RealBinaryTerm { |
12 | public RealDivTerm(Term<Double> left, Term<Double> right) { | 12 | public RealDivTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMaxTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMaxTerm.java index 2a249496..0c609c6d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMaxTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMaxTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealMaxTerm extends RealBinaryTerm { | 11 | public class RealMaxTerm extends RealBinaryTerm { |
12 | public RealMaxTerm(Term<Double> left, Term<Double> right) { | 12 | public RealMaxTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMinTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMinTerm.java index 2eb4cc1e..af2c3a52 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMinTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMinTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealMinTerm extends RealBinaryTerm { | 11 | public class RealMinTerm extends RealBinaryTerm { |
12 | public RealMinTerm(Term<Double> left, Term<Double> right) { | 12 | public RealMinTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMinusTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMinusTerm.java index 4afec7a1..e3e371c2 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMinusTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMinusTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealMinusTerm extends RealUnaryTerm { | 11 | public class RealMinusTerm extends RealUnaryTerm { |
12 | public RealMinusTerm(Term<Double> body) { | 12 | public RealMinusTerm(Term<Double> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMulTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMulTerm.java index ec95ac6f..ce8f2cd4 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealMulTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealMulTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealMulTerm extends RealBinaryTerm { | 11 | public class RealMulTerm extends RealBinaryTerm { |
12 | public RealMulTerm(Term<Double> left, Term<Double> right) { | 12 | public RealMulTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealPlusTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealPlusTerm.java index 64dd2e70..60efc5fd 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealPlusTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealPlusTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealPlusTerm extends RealUnaryTerm { | 11 | public class RealPlusTerm extends RealUnaryTerm { |
12 | public RealPlusTerm(Term<Double> body) { | 12 | public RealPlusTerm(Term<Double> body) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealPowTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealPowTerm.java index 11c952ea..6cb50362 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealPowTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealPowTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealPowTerm extends RealBinaryTerm { | 11 | public class RealPowTerm extends RealBinaryTerm { |
12 | public RealPowTerm(Term<Double> left, Term<Double> right) { | 12 | public RealPowTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealSubTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealSubTerm.java index 8cc701ed..32315e8e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealSubTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealSubTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public class RealSubTerm extends RealBinaryTerm { | 11 | public class RealSubTerm extends RealBinaryTerm { |
12 | public RealSubTerm(Term<Double> left, Term<Double> right) { | 12 | public RealSubTerm(Term<Double> left, Term<Double> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealSumAggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealSumAggregator.java index d21048e9..4b090188 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealSumAggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealSumAggregator.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.StatefulAggregate; | 8 | import tools.refinery.logic.term.StatefulAggregate; |
9 | import tools.refinery.store.query.term.StatefulAggregator; | 9 | import tools.refinery.logic.term.StatefulAggregator; |
10 | 10 | ||
11 | import java.util.Map; | 11 | import java.util.Map; |
12 | import java.util.TreeMap; | 12 | import java.util.TreeMap; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealTerms.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealTerms.java index 79220358..07dfa96b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealTerms.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealTerms.java | |||
@@ -3,13 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Aggregator; | 8 | import tools.refinery.logic.term.Aggregator; |
9 | import tools.refinery.store.query.term.ConstantTerm; | 9 | import tools.refinery.logic.term.ConstantTerm; |
10 | import tools.refinery.store.query.term.ExtremeValueAggregator; | 10 | import tools.refinery.logic.term.ExtremeValueAggregator; |
11 | import tools.refinery.store.query.term.Term; | 11 | import tools.refinery.logic.term.Term; |
12 | import tools.refinery.store.query.term.comparable.*; | 12 | import tools.refinery.logic.term.comparable.*; |
13 | import tools.refinery.logic.term.comparable.*; | ||
13 | 14 | ||
14 | import java.util.Comparator; | 15 | import java.util.Comparator; |
15 | 16 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealUnaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealUnaryTerm.java index d41c4ed9..14772411 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/real/RealUnaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/real/RealUnaryTerm.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Term; | 8 | import tools.refinery.logic.term.UnaryTerm; |
9 | import tools.refinery.store.query.term.UnaryTerm; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | public abstract class RealUnaryTerm extends UnaryTerm<Double, Double> { | 11 | public abstract class RealUnaryTerm extends UnaryTerm<Double, Double> { |
12 | protected RealUnaryTerm(Term<Double> body) { | 12 | protected RealUnaryTerm(Term<Double> body) { |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/truthvalue/TruthValue.java index f81ee9a4..59bdeab3 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/truthvalue/TruthValue.java | |||
@@ -1,11 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation; | 6 | package tools.refinery.logic.term.truthvalue; |
7 | 7 | ||
8 | public enum TruthValue { | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.logic.AbstractValue; | ||
10 | |||
11 | public enum TruthValue implements AbstractValue<TruthValue, Boolean> { | ||
9 | TRUE("true"), | 12 | TRUE("true"), |
10 | 13 | ||
11 | FALSE("false"), | 14 | FALSE("false"), |
@@ -28,14 +31,41 @@ public enum TruthValue { | |||
28 | return value ? TRUE : FALSE; | 31 | return value ? TRUE : FALSE; |
29 | } | 32 | } |
30 | 33 | ||
34 | @Override | ||
35 | @Nullable | ||
36 | public Boolean getArbitrary() { | ||
37 | return switch (this) { | ||
38 | case TRUE -> true; | ||
39 | case FALSE, UNKNOWN -> false; | ||
40 | case ERROR -> null; | ||
41 | }; | ||
42 | } | ||
43 | |||
44 | @Override | ||
45 | public boolean isError() { | ||
46 | return this == ERROR; | ||
47 | } | ||
48 | |||
31 | public boolean isConsistent() { | 49 | public boolean isConsistent() { |
32 | return this != ERROR; | 50 | return !isError(); |
33 | } | 51 | } |
34 | 52 | ||
53 | |||
35 | public boolean isComplete() { | 54 | public boolean isComplete() { |
36 | return this != UNKNOWN; | 55 | return this != UNKNOWN; |
37 | } | 56 | } |
38 | 57 | ||
58 | @Override | ||
59 | @Nullable | ||
60 | public Boolean getConcrete() { | ||
61 | return switch (this) { | ||
62 | case TRUE -> true; | ||
63 | case FALSE -> false; | ||
64 | default -> null; | ||
65 | }; | ||
66 | } | ||
67 | |||
68 | @Override | ||
39 | public boolean isConcrete() { | 69 | public boolean isConcrete() { |
40 | return this == TRUE || this == FALSE; | 70 | return this == TRUE || this == FALSE; |
41 | } | 71 | } |
@@ -56,15 +86,7 @@ public enum TruthValue { | |||
56 | }; | 86 | }; |
57 | } | 87 | } |
58 | 88 | ||
59 | public TruthValue merge(TruthValue other) { | 89 | @Override |
60 | return switch (this) { | ||
61 | case TRUE -> other == UNKNOWN || other == TRUE ? TRUE : ERROR; | ||
62 | case FALSE -> other == UNKNOWN || other == FALSE ? FALSE : ERROR; | ||
63 | case UNKNOWN -> other; | ||
64 | case ERROR -> ERROR; | ||
65 | }; | ||
66 | } | ||
67 | |||
68 | public TruthValue join(TruthValue other) { | 90 | public TruthValue join(TruthValue other) { |
69 | return switch (this) { | 91 | return switch (this) { |
70 | case TRUE -> other == ERROR || other == TRUE ? TRUE : UNKNOWN; | 92 | case TRUE -> other == ERROR || other == TRUE ? TRUE : UNKNOWN; |
@@ -73,4 +95,14 @@ public enum TruthValue { | |||
73 | case ERROR -> other; | 95 | case ERROR -> other; |
74 | }; | 96 | }; |
75 | } | 97 | } |
98 | |||
99 | @Override | ||
100 | public TruthValue meet(TruthValue other) { | ||
101 | return switch (this) { | ||
102 | case TRUE -> other == UNKNOWN || other == TRUE ? TRUE : ERROR; | ||
103 | case FALSE -> other == UNKNOWN || other == FALSE ? FALSE : ERROR; | ||
104 | case UNKNOWN -> other; | ||
105 | case ERROR -> ERROR; | ||
106 | }; | ||
107 | } | ||
76 | } | 108 | } |
diff --git a/subprojects/logic/src/main/java/tools/refinery/logic/term/truthvalue/TruthValueDomain.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/truthvalue/TruthValueDomain.java new file mode 100644 index 00000000..de8a89be --- /dev/null +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/truthvalue/TruthValueDomain.java | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic.term.truthvalue; | ||
7 | |||
8 | import tools.refinery.logic.AbstractDomain; | ||
9 | |||
10 | // Singleton pattern, because there is only one domain for truth values. | ||
11 | @SuppressWarnings("squid:S6548") | ||
12 | public final class TruthValueDomain implements AbstractDomain<TruthValue, Boolean> { | ||
13 | public static final TruthValueDomain INSTANCE = new TruthValueDomain(); | ||
14 | |||
15 | private TruthValueDomain() { | ||
16 | } | ||
17 | |||
18 | @Override | ||
19 | public Class<TruthValue> abstractType() { | ||
20 | return TruthValue.class; | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public Class<Boolean> concreteType() { | ||
25 | return Boolean.class; | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public TruthValue unknown() { | ||
30 | return TruthValue.UNKNOWN; | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | public TruthValue error() { | ||
35 | return TruthValue.ERROR; | ||
36 | } | ||
37 | |||
38 | @Override | ||
39 | public TruthValue toAbstract(Boolean concreteValue) { | ||
40 | return TruthValue.toTruthValue(concreteValue); | ||
41 | } | ||
42 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/FiniteUpperCardinality.java index b63a8637..478d456b 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/FiniteUpperCardinality.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.jetbrains.annotations.NotNull; | 8 | import org.jetbrains.annotations.NotNull; |
9 | import org.jetbrains.annotations.Nullable; | 9 | import org.jetbrains.annotations.Nullable; |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UnboundedUpperCardinality.java index 03c701ae..b6ecc1bd 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UnboundedUpperCardinality.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.jetbrains.annotations.NotNull; | 8 | import org.jetbrains.annotations.NotNull; |
9 | 9 | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalities.java index 17d1b292..edf0afd2 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalities.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | public final class UpperCardinalities { | 8 | public final class UpperCardinalities { |
9 | public static final UpperCardinality UNBOUNDED = UnboundedUpperCardinality.INSTANCE; | 9 | public static final UpperCardinality UNBOUNDED = UnboundedUpperCardinality.INSTANCE; |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinality.java index 3f0db028..5a3dcfb9 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinality.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | 9 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityAddTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityAddTerm.java index 68905f51..5c849b0a 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityAddTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityAddTerm.java | |||
@@ -3,11 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
11 | 10 | ||
12 | public class UpperCardinalityAddTerm extends UpperCardinalityBinaryTerm { | 11 | public class UpperCardinalityAddTerm extends UpperCardinalityBinaryTerm { |
13 | protected UpperCardinalityAddTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { | 12 | protected UpperCardinalityAddTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityBinaryTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityBinaryTerm.java index 0cf8fe44..976d6115 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityBinaryTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityBinaryTerm.java | |||
@@ -3,11 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.BinaryTerm; | 8 | import tools.refinery.logic.term.BinaryTerm; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
11 | 10 | ||
12 | public abstract class UpperCardinalityBinaryTerm extends BinaryTerm<UpperCardinality, UpperCardinality, | 11 | public abstract class UpperCardinalityBinaryTerm extends BinaryTerm<UpperCardinality, UpperCardinality, |
13 | UpperCardinality> { | 12 | UpperCardinality> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityMaxTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityMaxTerm.java index ff75f64e..0a0c5ee4 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityMaxTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityMaxTerm.java | |||
@@ -3,11 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
11 | 10 | ||
12 | public class UpperCardinalityMaxTerm extends UpperCardinalityBinaryTerm { | 11 | public class UpperCardinalityMaxTerm extends UpperCardinalityBinaryTerm { |
13 | protected UpperCardinalityMaxTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { | 12 | protected UpperCardinalityMaxTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityMinTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityMinTerm.java index 1e89e9f4..d6879595 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityMinTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityMinTerm.java | |||
@@ -3,11 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
11 | 10 | ||
12 | public class UpperCardinalityMinTerm extends UpperCardinalityBinaryTerm { | 11 | public class UpperCardinalityMinTerm extends UpperCardinalityBinaryTerm { |
13 | protected UpperCardinalityMinTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { | 12 | protected UpperCardinalityMinTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityMulTerm.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityMulTerm.java index 3b4970f4..cb0d685f 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityMulTerm.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityMulTerm.java | |||
@@ -3,11 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
11 | 10 | ||
12 | public class UpperCardinalityMulTerm extends UpperCardinalityBinaryTerm { | 11 | public class UpperCardinalityMulTerm extends UpperCardinalityBinaryTerm { |
13 | protected UpperCardinalityMulTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { | 12 | protected UpperCardinalityMulTerm(Term<UpperCardinality> left, Term<UpperCardinality> right) { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitySumAggregator.java index d31f00a2..7c45e6ef 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitySumAggregator.java | |||
@@ -3,15 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.StatefulAggregate; | 8 | import tools.refinery.logic.term.StatefulAggregate; |
9 | import tools.refinery.store.query.term.StatefulAggregator; | 9 | import tools.refinery.logic.term.StatefulAggregator; |
10 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
11 | import tools.refinery.store.representation.cardinality.UnboundedUpperCardinality; | ||
12 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
13 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
14 | 10 | ||
11 | // Singleton implementation, since there is only one way to aggregate upper cardinalities. | ||
12 | @SuppressWarnings("squid:S6548") | ||
15 | public class UpperCardinalitySumAggregator implements StatefulAggregator<UpperCardinality, UpperCardinality> { | 13 | public class UpperCardinalitySumAggregator implements StatefulAggregator<UpperCardinality, UpperCardinality> { |
16 | public static final UpperCardinalitySumAggregator INSTANCE = new UpperCardinalitySumAggregator(); | 14 | public static final UpperCardinalitySumAggregator INSTANCE = new UpperCardinalitySumAggregator(); |
17 | 15 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityTerms.java b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityTerms.java index 13914f2d..7ec61cac 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityTerms.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityTerms.java | |||
@@ -3,15 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Aggregator; | 8 | import tools.refinery.logic.term.Aggregator; |
9 | import tools.refinery.store.query.term.ConstantTerm; | 9 | import tools.refinery.logic.term.ConstantTerm; |
10 | import tools.refinery.store.query.term.ExtremeValueAggregator; | 10 | import tools.refinery.logic.term.ExtremeValueAggregator; |
11 | import tools.refinery.store.query.term.Term; | 11 | import tools.refinery.logic.term.Term; |
12 | import tools.refinery.store.query.term.comparable.*; | 12 | import tools.refinery.logic.term.comparable.*; |
13 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
14 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
15 | 13 | ||
16 | import java.util.Comparator; | 14 | import java.util.Comparator; |
17 | 15 | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java b/subprojects/logic/src/main/java/tools/refinery/logic/util/CycleDetectingMapper.java index 2e302663..8a9efdd6 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/util/CycleDetectingMapper.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.util; | 6 | package tools.refinery.logic.util; |
7 | 7 | ||
8 | import java.util.*; | 8 | import java.util.*; |
9 | import java.util.function.Function; | 9 | import java.util.function.Function; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/MapBasedValuation.java b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/MapBasedValuation.java index 261ceaa5..be1862d2 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/MapBasedValuation.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/MapBasedValuation.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.valuation; | 6 | package tools.refinery.logic.valuation; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.AnyDataVariable; | 8 | import tools.refinery.logic.term.AnyDataVariable; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Map; | 11 | import java.util.Map; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/RestrictedValuation.java b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/RestrictedValuation.java index fc8406aa..b6ac7cc9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/RestrictedValuation.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/RestrictedValuation.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.valuation; | 6 | package tools.refinery.logic.valuation; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.AnyDataVariable; | 8 | import tools.refinery.logic.term.AnyDataVariable; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Set; | 11 | import java.util.Set; |
12 | 12 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/SubstitutedValuation.java b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/SubstitutedValuation.java index 1c14112c..38491481 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/SubstitutedValuation.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/SubstitutedValuation.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.valuation; | 6 | package tools.refinery.logic.valuation; |
7 | 7 | ||
8 | import tools.refinery.store.query.substitution.Substitution; | 8 | import tools.refinery.logic.substitution.Substitution; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | public record SubstitutedValuation(Valuation originalValuation, Substitution substitution) implements Valuation { | 11 | public record SubstitutedValuation(Valuation originalValuation, Substitution substitution) implements Valuation { |
12 | @Override | 12 | @Override |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/Valuation.java b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/Valuation.java index 1588e957..95ee887e 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/Valuation.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/Valuation.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.valuation; | 6 | package tools.refinery.logic.valuation; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.store.query.substitution.Substitution; | 9 | import tools.refinery.logic.substitution.Substitution; |
10 | import tools.refinery.store.query.term.AnyDataVariable; | 10 | import tools.refinery.logic.term.AnyDataVariable; |
11 | import tools.refinery.store.query.term.DataVariable; | 11 | import tools.refinery.logic.term.DataVariable; |
12 | 12 | ||
13 | import java.util.Map; | 13 | import java.util.Map; |
14 | import java.util.Set; | 14 | import java.util.Set; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/ValuationBuilder.java b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/ValuationBuilder.java index 7337dbc3..46459ac7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/valuation/ValuationBuilder.java +++ b/subprojects/logic/src/main/java/tools/refinery/logic/valuation/ValuationBuilder.java | |||
@@ -3,10 +3,10 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.valuation; | 6 | package tools.refinery.logic.valuation; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.AnyDataVariable; | 8 | import tools.refinery.logic.term.AnyDataVariable; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | 10 | ||
11 | import java.util.Collections; | 11 | import java.util.Collections; |
12 | import java.util.HashMap; | 12 | import java.util.HashMap; |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/DnfBuilderLiteralEliminationTest.java index 6a2dc0c7..d5a9ccad 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/DnfBuilderLiteralEliminationTest.java | |||
@@ -3,30 +3,28 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import org.junit.jupiter.params.ParameterizedTest; | 9 | import org.junit.jupiter.params.ParameterizedTest; |
10 | import org.junit.jupiter.params.provider.CsvSource; | 10 | import org.junit.jupiter.params.provider.CsvSource; |
11 | import tools.refinery.store.query.literal.BooleanLiteral; | 11 | import tools.refinery.logic.Constraint; |
12 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.logic.literal.BooleanLiteral; |
13 | import tools.refinery.store.query.term.ParameterDirection; | 13 | import tools.refinery.logic.term.NodeVariable; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.ParameterDirection; |
15 | import tools.refinery.store.query.term.bool.BoolTerms; | 15 | import tools.refinery.logic.term.Variable; |
16 | import tools.refinery.store.query.view.KeyOnlyView; | 16 | import tools.refinery.logic.term.bool.BoolTerms; |
17 | import tools.refinery.store.query.view.SymbolView; | 17 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
18 | import tools.refinery.store.representation.Symbol; | ||
19 | 18 | ||
20 | import java.util.List; | 19 | import java.util.List; |
21 | 20 | ||
22 | import static org.hamcrest.MatcherAssert.assertThat; | 21 | import static org.hamcrest.MatcherAssert.assertThat; |
23 | import static tools.refinery.store.query.literal.Literals.check; | 22 | import static tools.refinery.logic.literal.Literals.check; |
24 | import static tools.refinery.store.query.literal.Literals.not; | 23 | import static tools.refinery.logic.literal.Literals.not; |
25 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 24 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
26 | 25 | ||
27 | class DnfBuilderLiteralEliminationTest { | 26 | class DnfBuilderLiteralEliminationTest { |
28 | private final Symbol<Boolean> friend = Symbol.of("friend", 2); | 27 | private final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
29 | private final SymbolView<Boolean> friendView = new KeyOnlyView<>(friend); | ||
30 | private final NodeVariable p = Variable.of("p"); | 28 | private final NodeVariable p = Variable.of("p"); |
31 | private final NodeVariable q = Variable.of("q"); | 29 | private final NodeVariable q = Variable.of("q"); |
32 | private final Dnf trueDnf = Dnf.builder().parameter(p, ParameterDirection.IN).clause().build(); | 30 | private final Dnf trueDnf = Dnf.builder().parameter(p, ParameterDirection.IN).clause().build(); |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderVariableUnificationTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/DnfBuilderVariableUnificationTest.java index fc40c7b3..0e1f77e2 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderVariableUnificationTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/DnfBuilderVariableUnificationTest.java | |||
@@ -3,25 +3,22 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.term.ParameterDirection; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.ParameterDirection; |
11 | import tools.refinery.store.query.view.KeyOnlyView; | 11 | import tools.refinery.logic.term.Variable; |
12 | import tools.refinery.store.query.view.SymbolView; | 12 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
13 | import tools.refinery.store.representation.Symbol; | ||
14 | 13 | ||
15 | import java.util.List; | 14 | import java.util.List; |
16 | 15 | ||
17 | import static org.hamcrest.MatcherAssert.assertThat; | 16 | import static org.hamcrest.MatcherAssert.assertThat; |
18 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 17 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
19 | 18 | ||
20 | class DnfBuilderVariableUnificationTest { | 19 | class DnfBuilderVariableUnificationTest { |
21 | private final Symbol<Boolean> friend = Symbol.of("friend", 2); | 20 | private final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
22 | private final Symbol<Boolean> children = Symbol.of("children", 2); | 21 | private final Constraint childrenView = new FakeKeyOnlyView("children", 2); |
23 | private final SymbolView<Boolean> friendView = new KeyOnlyView<>(friend); | ||
24 | private final SymbolView<Boolean> childrenView = new KeyOnlyView<>(children); | ||
25 | 22 | ||
26 | @Test | 23 | @Test |
27 | void equalToParameterTest() { | 24 | void equalToParameterTest() { |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/DnfToDefinitionStringTest.java index 12cfaa4e..dd624548 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/DnfToDefinitionStringTest.java | |||
@@ -1,27 +1,24 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.term.ParameterDirection; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.ParameterDirection; |
12 | import tools.refinery.store.query.view.AnySymbolView; | 12 | import tools.refinery.logic.term.Variable; |
13 | import tools.refinery.store.query.view.KeyOnlyView; | 13 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
14 | import tools.refinery.store.representation.Symbol; | ||
15 | 14 | ||
16 | import static org.hamcrest.MatcherAssert.assertThat; | 15 | import static org.hamcrest.MatcherAssert.assertThat; |
17 | import static org.hamcrest.Matchers.is; | 16 | import static org.hamcrest.Matchers.is; |
18 | import static tools.refinery.store.query.literal.Literals.not; | 17 | import static tools.refinery.logic.literal.Literals.not; |
19 | 18 | ||
20 | class DnfToDefinitionStringTest { | 19 | class DnfToDefinitionStringTest { |
21 | private static final Symbol<Boolean> person = Symbol.of("person", 1); | 20 | private static final Constraint personView = new FakeKeyOnlyView("person", 1); |
22 | private static final Symbol<Boolean> friend = Symbol.of("friend", 2); | 21 | private static final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
23 | private static final AnySymbolView personView = new KeyOnlyView<>(person); | ||
24 | private static final AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
25 | private static final NodeVariable p = Variable.of("p"); | 22 | private static final NodeVariable p = Variable.of("p"); |
26 | private static final NodeVariable q = Variable.of("q"); | 23 | private static final NodeVariable q = Variable.of("q"); |
27 | 24 | ||
@@ -61,7 +58,7 @@ class DnfToDefinitionStringTest { | |||
61 | 58 | ||
62 | assertThat(dnf.toDefinitionString(), is(""" | 59 | assertThat(dnf.toDefinitionString(), is(""" |
63 | pred Example(p) <-> | 60 | pred Example(p) <-> |
64 | @RelationView("key") friend(p, q). | 61 | friend(p, q). |
65 | """)); | 62 | """)); |
66 | } | 63 | } |
67 | 64 | ||
@@ -74,7 +71,7 @@ class DnfToDefinitionStringTest { | |||
74 | 71 | ||
75 | assertThat(dnf.toDefinitionString(), is(""" | 72 | assertThat(dnf.toDefinitionString(), is(""" |
76 | pred Example(in p) <-> | 73 | pred Example(in p) <-> |
77 | !(@RelationView("key") friend(p, q)). | 74 | !(friend(p, q)). |
78 | """)); | 75 | """)); |
79 | } | 76 | } |
80 | 77 | ||
@@ -84,7 +81,7 @@ class DnfToDefinitionStringTest { | |||
84 | 81 | ||
85 | assertThat(dnf.toDefinitionString(), is(""" | 82 | assertThat(dnf.toDefinitionString(), is(""" |
86 | pred Example(p) <-> | 83 | pred Example(p) <-> |
87 | @RelationView("key") friend+(p, q). | 84 | friend+(p, q). |
88 | """)); | 85 | """)); |
89 | } | 86 | } |
90 | 87 | ||
@@ -94,7 +91,7 @@ class DnfToDefinitionStringTest { | |||
94 | 91 | ||
95 | assertThat(dnf.toDefinitionString(), is(""" | 92 | assertThat(dnf.toDefinitionString(), is(""" |
96 | pred Example(p, q) <-> | 93 | pred Example(p, q) <-> |
97 | @RelationView("key") friend(p, q). | 94 | friend(p, q). |
98 | """)); | 95 | """)); |
99 | } | 96 | } |
100 | 97 | ||
@@ -111,9 +108,9 @@ class DnfToDefinitionStringTest { | |||
111 | 108 | ||
112 | assertThat(dnf.toDefinitionString(), is(""" | 109 | assertThat(dnf.toDefinitionString(), is(""" |
113 | pred Example(p) <-> | 110 | pred Example(p) <-> |
114 | @RelationView("key") person(p), | 111 | person(p), |
115 | @RelationView("key") person(q), | 112 | person(q), |
116 | @RelationView("key") friend(p, q). | 113 | friend(p, q). |
117 | """)); | 114 | """)); |
118 | } | 115 | } |
119 | 116 | ||
@@ -127,9 +124,9 @@ class DnfToDefinitionStringTest { | |||
127 | 124 | ||
128 | assertThat(dnf.toDefinitionString(), is(""" | 125 | assertThat(dnf.toDefinitionString(), is(""" |
129 | pred Example(p) <-> | 126 | pred Example(p) <-> |
130 | @RelationView("key") friend(p, q) | 127 | friend(p, q) |
131 | ; | 128 | ; |
132 | @RelationView("key") friend(q, p). | 129 | friend(q, p). |
133 | """)); | 130 | """)); |
134 | } | 131 | } |
135 | 132 | ||
@@ -149,8 +146,8 @@ class DnfToDefinitionStringTest { | |||
149 | 146 | ||
150 | assertThat(dnf.toDefinitionString(), is(""" | 147 | assertThat(dnf.toDefinitionString(), is(""" |
151 | pred Example(p) <-> | 148 | pred Example(p) <-> |
152 | @RelationView("key") person(p), | 149 | person(p), |
153 | @RelationView("key") person(q), | 150 | person(q), |
154 | !(@Dnf Called(p, q)). | 151 | !(@Dnf Called(p, q)). |
155 | """)); | 152 | """)); |
156 | } | 153 | } |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/HashCodeTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/HashCodeTest.java index 0c8eaeed..e140be1e 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/HashCodeTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/HashCodeTest.java | |||
@@ -3,24 +3,21 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | import tools.refinery.store.query.view.AnySymbolView; | 11 | import tools.refinery.logic.term.Variable; |
12 | import tools.refinery.store.query.view.KeyOnlyView; | 12 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
13 | import tools.refinery.store.representation.Symbol; | ||
14 | 13 | ||
15 | import static org.hamcrest.MatcherAssert.assertThat; | 14 | import static org.hamcrest.MatcherAssert.assertThat; |
16 | import static org.hamcrest.Matchers.is; | 15 | import static org.hamcrest.Matchers.is; |
17 | import static org.hamcrest.Matchers.not; | 16 | import static org.hamcrest.Matchers.not; |
18 | 17 | ||
19 | class HashCodeTest { | 18 | class HashCodeTest { |
20 | private static final Symbol<Boolean> person = Symbol.of("Person", 1); | 19 | private static final Constraint personView = new FakeKeyOnlyView("Person", 1); |
21 | private static final Symbol<Boolean> friend = Symbol.of("friend", 2); | 20 | private static final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
22 | private static final AnySymbolView personView = new KeyOnlyView<>(person); | ||
23 | private static final AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
24 | private static final NodeVariable p = Variable.of("p"); | 21 | private static final NodeVariable p = Variable.of("p"); |
25 | private static final NodeVariable q = Variable.of("q"); | 22 | private static final NodeVariable q = Variable.of("q"); |
26 | 23 | ||
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/TopologicalSortTest.java index 854bd469..8ea27cc9 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/TopologicalSortTest.java | |||
@@ -3,27 +3,25 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.InvalidQueryException; |
11 | import tools.refinery.store.query.term.ParameterDirection; | 11 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.ParameterDirection; |
13 | import tools.refinery.store.query.view.AnySymbolView; | 13 | import tools.refinery.logic.term.Variable; |
14 | import tools.refinery.store.query.view.KeyOnlyView; | 14 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
15 | import tools.refinery.store.representation.Symbol; | ||
16 | 15 | ||
17 | import java.util.List; | 16 | import java.util.List; |
18 | 17 | ||
19 | import static org.hamcrest.MatcherAssert.assertThat; | 18 | import static org.hamcrest.MatcherAssert.assertThat; |
20 | import static org.junit.jupiter.api.Assertions.assertThrows; | 19 | import static org.junit.jupiter.api.Assertions.assertThrows; |
21 | import static tools.refinery.store.query.literal.Literals.not; | 20 | import static tools.refinery.logic.literal.Literals.not; |
22 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 21 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
23 | 22 | ||
24 | class TopologicalSortTest { | 23 | class TopologicalSortTest { |
25 | private static final Symbol<Boolean> friend = Symbol.of("friend", 2); | 24 | private static final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
26 | private static final AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
27 | private static final Dnf example = Dnf.of("example", builder -> { | 25 | private static final Dnf example = Dnf.of("example", builder -> { |
28 | var a = builder.parameter("a", ParameterDirection.IN); | 26 | var a = builder.parameter("a", ParameterDirection.IN); |
29 | var b = builder.parameter("b", ParameterDirection.IN); | 27 | var b = builder.parameter("b", ParameterDirection.IN); |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/VariableDirectionTest.java index fc3f5d48..f9f39b8a 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/dnf/VariableDirectionTest.java | |||
@@ -1,23 +1,22 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.dnf; | 6 | package tools.refinery.logic.dnf; |
7 | 7 | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 8 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.Arguments; | 9 | import org.junit.jupiter.params.provider.Arguments; |
10 | import org.junit.jupiter.params.provider.MethodSource; | 10 | import org.junit.jupiter.params.provider.MethodSource; |
11 | import tools.refinery.store.query.literal.BooleanLiteral; | 11 | import tools.refinery.logic.Constraint; |
12 | import tools.refinery.store.query.literal.Literal; | 12 | import tools.refinery.logic.literal.BooleanLiteral; |
13 | import tools.refinery.store.query.term.DataVariable; | 13 | import tools.refinery.logic.literal.Literal; |
14 | import tools.refinery.store.query.term.NodeVariable; | 14 | import tools.refinery.logic.term.DataVariable; |
15 | import tools.refinery.store.query.term.ParameterDirection; | 15 | import tools.refinery.logic.term.NodeVariable; |
16 | import tools.refinery.store.query.term.Variable; | 16 | import tools.refinery.logic.term.ParameterDirection; |
17 | import tools.refinery.store.query.view.AnySymbolView; | 17 | import tools.refinery.logic.term.Variable; |
18 | import tools.refinery.store.query.view.FunctionView; | 18 | import tools.refinery.logic.tests.FakeFunctionView; |
19 | import tools.refinery.store.query.view.KeyOnlyView; | 19 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
20 | import tools.refinery.store.representation.Symbol; | ||
21 | 20 | ||
22 | import java.util.ArrayList; | 21 | import java.util.ArrayList; |
23 | import java.util.List; | 22 | import java.util.List; |
@@ -28,16 +27,13 @@ import static org.hamcrest.Matchers.hasItem; | |||
28 | import static org.hamcrest.Matchers.not; | 27 | import static org.hamcrest.Matchers.not; |
29 | import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; | 28 | import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; |
30 | import static org.junit.jupiter.api.Assertions.assertThrows; | 29 | import static org.junit.jupiter.api.Assertions.assertThrows; |
31 | import static tools.refinery.store.query.literal.Literals.not; | 30 | import static tools.refinery.logic.literal.Literals.not; |
32 | import static tools.refinery.store.query.term.int_.IntTerms.INT_SUM; | 31 | import static tools.refinery.logic.term.int_.IntTerms.INT_SUM; |
33 | 32 | ||
34 | class VariableDirectionTest { | 33 | class VariableDirectionTest { |
35 | private static final Symbol<Boolean> person = Symbol.of("Person", 1); | 34 | private static final Constraint personView = new FakeKeyOnlyView("Person", 1); |
36 | private static final Symbol<Boolean> friend = Symbol.of("friend", 2); | 35 | private static final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
37 | private static final Symbol<Integer> age = Symbol.of("age", 1, Integer.class); | 36 | private static final FakeFunctionView<Integer> ageView = new FakeFunctionView<>("age", 1, Integer.class); |
38 | private static final AnySymbolView personView = new KeyOnlyView<>(person); | ||
39 | private static final AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
40 | private static final FunctionView<Integer> ageView = new FunctionView<>(age); | ||
41 | private static final NodeVariable p = Variable.of("p"); | 37 | private static final NodeVariable p = Variable.of("p"); |
42 | private static final NodeVariable q = Variable.of("q"); | 38 | private static final NodeVariable q = Variable.of("q"); |
43 | private static final DataVariable<Integer> x = Variable.of("x", Integer.class); | 39 | private static final DataVariable<Integer> x = Variable.of("x", Integer.class); |
@@ -57,8 +53,8 @@ class VariableDirectionTest { | |||
57 | var builder = Dnf.builder().parameter(p, ParameterDirection.IN).clause(clause); | 53 | var builder = Dnf.builder().parameter(p, ParameterDirection.IN).clause(clause); |
58 | var dnf = assertDoesNotThrow(builder::build); | 54 | var dnf = assertDoesNotThrow(builder::build); |
59 | var clauses = dnf.getClauses(); | 55 | var clauses = dnf.getClauses(); |
60 | if (clauses.size() > 0) { | 56 | if (!clauses.isEmpty()) { |
61 | assertThat(clauses.get(0).positiveVariables(), hasItem(p)); | 57 | assertThat(clauses.getFirst().positiveVariables(), hasItem(p)); |
62 | } | 58 | } |
63 | } | 59 | } |
64 | 60 | ||
@@ -70,8 +66,8 @@ class VariableDirectionTest { | |||
70 | var builder = Dnf.builder().clause(clauseWithBinding); | 66 | var builder = Dnf.builder().clause(clauseWithBinding); |
71 | var dnf = assertDoesNotThrow(builder::build); | 67 | var dnf = assertDoesNotThrow(builder::build); |
72 | var clauses = dnf.getClauses(); | 68 | var clauses = dnf.getClauses(); |
73 | if (clauses.size() > 0) { | 69 | if (!clauses.isEmpty()) { |
74 | assertThat(clauses.get(0).positiveVariables(), hasItem(p)); | 70 | assertThat(clauses.getFirst().positiveVariables(), hasItem(p)); |
75 | } | 71 | } |
76 | } | 72 | } |
77 | 73 | ||
@@ -88,8 +84,8 @@ class VariableDirectionTest { | |||
88 | var builder = Dnf.builder().clause(clause); | 84 | var builder = Dnf.builder().clause(clause); |
89 | var dnf = assertDoesNotThrow(builder::build); | 85 | var dnf = assertDoesNotThrow(builder::build); |
90 | var clauses = dnf.getClauses(); | 86 | var clauses = dnf.getClauses(); |
91 | if (clauses.size() > 0) { | 87 | if (!clauses.isEmpty()) { |
92 | assertThat(clauses.get(0).positiveVariables(), not(hasItem(p))); | 88 | assertThat(clauses.getFirst().positiveVariables(), not(hasItem(p))); |
93 | } | 89 | } |
94 | } | 90 | } |
95 | 91 | ||
@@ -167,7 +163,7 @@ class VariableDirectionTest { | |||
167 | void boundPrivateVariableInputTest(Literal literal) { | 163 | void boundPrivateVariableInputTest(Literal literal) { |
168 | var builder = Dnf.builder().clause(personView.call(p), literal); | 164 | var builder = Dnf.builder().clause(personView.call(p), literal); |
169 | var dnf = assertDoesNotThrow(builder::build); | 165 | var dnf = assertDoesNotThrow(builder::build); |
170 | assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(p)); | 166 | assertThat(dnf.getClauses().getFirst().positiveVariables(), hasItem(p)); |
171 | } | 167 | } |
172 | 168 | ||
173 | static Stream<Arguments> literalsWithRequiredVariableInput() { | 169 | static Stream<Arguments> literalsWithRequiredVariableInput() { |
@@ -201,7 +197,7 @@ class VariableDirectionTest { | |||
201 | void boundParameterTest(Literal literal) { | 197 | void boundParameterTest(Literal literal) { |
202 | var builder = Dnf.builder().parameter(p, ParameterDirection.OUT).clause(literal); | 198 | var builder = Dnf.builder().parameter(p, ParameterDirection.OUT).clause(literal); |
203 | var dnf = assertDoesNotThrow(builder::build); | 199 | var dnf = assertDoesNotThrow(builder::build); |
204 | assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(p)); | 200 | assertThat(dnf.getClauses().getFirst().positiveVariables(), hasItem(p)); |
205 | } | 201 | } |
206 | 202 | ||
207 | @ParameterizedTest | 203 | @ParameterizedTest |
@@ -209,7 +205,7 @@ class VariableDirectionTest { | |||
209 | void boundTwiceParameterTest(Literal literal) { | 205 | void boundTwiceParameterTest(Literal literal) { |
210 | var builder = Dnf.builder().parameter(p, ParameterDirection.IN).clause(literal); | 206 | var builder = Dnf.builder().parameter(p, ParameterDirection.IN).clause(literal); |
211 | var dnf = assertDoesNotThrow(builder::build); | 207 | var dnf = assertDoesNotThrow(builder::build); |
212 | assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(p)); | 208 | assertThat(dnf.getClauses().getFirst().positiveVariables(), hasItem(p)); |
213 | } | 209 | } |
214 | 210 | ||
215 | @ParameterizedTest | 211 | @ParameterizedTest |
@@ -221,7 +217,7 @@ class VariableDirectionTest { | |||
221 | .build(); | 217 | .build(); |
222 | var builder = Dnf.builder().clause(dnfWithInput.call(p), literal); | 218 | var builder = Dnf.builder().clause(dnfWithInput.call(p), literal); |
223 | var dnf = assertDoesNotThrow(builder::build); | 219 | var dnf = assertDoesNotThrow(builder::build); |
224 | assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(p)); | 220 | assertThat(dnf.getClauses().getFirst().positiveVariables(), hasItem(p)); |
225 | } | 221 | } |
226 | 222 | ||
227 | @ParameterizedTest | 223 | @ParameterizedTest |
@@ -229,7 +225,7 @@ class VariableDirectionTest { | |||
229 | void boundTwicePrivateVariableOutputTest(Literal literal) { | 225 | void boundTwicePrivateVariableOutputTest(Literal literal) { |
230 | var builder = Dnf.builder().clause(personView.call(p), literal); | 226 | var builder = Dnf.builder().clause(personView.call(p), literal); |
231 | var dnf = assertDoesNotThrow(builder::build); | 227 | var dnf = assertDoesNotThrow(builder::build); |
232 | assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(p)); | 228 | assertThat(dnf.getClauses().getFirst().positiveVariables(), hasItem(p)); |
233 | } | 229 | } |
234 | 230 | ||
235 | static Stream<Arguments> literalsWithVariableOutput() { | 231 | static Stream<Arguments> literalsWithVariableOutput() { |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/literal/AggregationLiteralTest.java index ddd57e96..76639e18 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/literal/AggregationLiteralTest.java | |||
@@ -3,14 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.Constraint; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.InvalidQueryException; | 10 | import tools.refinery.logic.InvalidQueryException; |
11 | import tools.refinery.store.query.dnf.Dnf; | 11 | import tools.refinery.logic.dnf.Dnf; |
12 | import tools.refinery.store.query.dnf.InvalidClauseException; | 12 | import tools.refinery.logic.dnf.InvalidClauseException; |
13 | import tools.refinery.store.query.term.*; | 13 | import tools.refinery.logic.term.*; |
14 | 14 | ||
15 | import java.util.List; | 15 | import java.util.List; |
16 | import java.util.Set; | 16 | import java.util.Set; |
@@ -19,9 +19,9 @@ import static org.hamcrest.MatcherAssert.assertThat; | |||
19 | import static org.hamcrest.Matchers.*; | 19 | import static org.hamcrest.Matchers.*; |
20 | import static org.junit.jupiter.api.Assertions.assertAll; | 20 | import static org.junit.jupiter.api.Assertions.assertAll; |
21 | import static org.junit.jupiter.api.Assertions.assertThrows; | 21 | import static org.junit.jupiter.api.Assertions.assertThrows; |
22 | import static tools.refinery.store.query.literal.Literals.not; | 22 | import static tools.refinery.logic.literal.Literals.not; |
23 | import static tools.refinery.store.query.term.int_.IntTerms.INT_SUM; | 23 | import static tools.refinery.logic.term.int_.IntTerms.INT_SUM; |
24 | import static tools.refinery.store.query.term.int_.IntTerms.constant; | 24 | import static tools.refinery.logic.term.int_.IntTerms.constant; |
25 | 25 | ||
26 | class AggregationLiteralTest { | 26 | class AggregationLiteralTest { |
27 | private static final NodeVariable p = Variable.of("p"); | 27 | private static final NodeVariable p = Variable.of("p"); |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/CallLiteralTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/literal/CallLiteralTest.java index a01c6586..0fb2e7c9 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/CallLiteralTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/literal/CallLiteralTest.java | |||
@@ -3,14 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.logic.literal; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.Constraint; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.term.NodeVariable; |
11 | import tools.refinery.store.query.term.Parameter; | 11 | import tools.refinery.logic.term.Parameter; |
12 | import tools.refinery.store.query.term.ParameterDirection; | 12 | import tools.refinery.logic.term.ParameterDirection; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | 14 | ||
15 | import java.util.List; | 15 | import java.util.List; |
16 | import java.util.Set; | 16 | import java.util.Set; |
@@ -19,7 +19,7 @@ import static org.hamcrest.MatcherAssert.assertThat; | |||
19 | import static org.hamcrest.Matchers.containsInAnyOrder; | 19 | import static org.hamcrest.Matchers.containsInAnyOrder; |
20 | import static org.hamcrest.Matchers.empty; | 20 | import static org.hamcrest.Matchers.empty; |
21 | import static org.junit.jupiter.api.Assertions.assertAll; | 21 | import static org.junit.jupiter.api.Assertions.assertAll; |
22 | import static tools.refinery.store.query.literal.Literals.not; | 22 | import static tools.refinery.logic.literal.Literals.not; |
23 | 23 | ||
24 | class CallLiteralTest { | 24 | class CallLiteralTest { |
25 | private static final NodeVariable p = Variable.of("p"); | 25 | private static final NodeVariable p = Variable.of("p"); |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/DuplicateDnfRemoverTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/rewriter/DuplicateDnfRemoverTest.java index ebb24ab5..7b2ce8b2 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/DuplicateDnfRemoverTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/rewriter/DuplicateDnfRemoverTest.java | |||
@@ -3,28 +3,26 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import org.junit.jupiter.api.BeforeEach; | 8 | import org.junit.jupiter.api.BeforeEach; |
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.query.dnf.Query; | 10 | import tools.refinery.logic.Constraint; |
11 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 11 | import tools.refinery.logic.dnf.Query; |
12 | import tools.refinery.store.query.literal.Reduction; | 12 | import tools.refinery.logic.literal.AbstractCallLiteral; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.literal.Reduction; |
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.logic.term.Variable; |
15 | import tools.refinery.store.query.view.KeyOnlyView; | 15 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
16 | import tools.refinery.store.representation.Symbol; | ||
17 | 16 | ||
18 | import java.util.List; | 17 | import java.util.List; |
19 | 18 | ||
20 | import static org.hamcrest.MatcherAssert.assertThat; | 19 | import static org.hamcrest.MatcherAssert.assertThat; |
21 | import static org.hamcrest.Matchers.is; | 20 | import static org.hamcrest.Matchers.is; |
22 | import static org.hamcrest.Matchers.not; | 21 | import static org.hamcrest.Matchers.not; |
23 | import static tools.refinery.store.query.literal.Literals.not; | 22 | import static tools.refinery.logic.literal.Literals.not; |
24 | 23 | ||
25 | class DuplicateDnfRemoverTest { | 24 | class DuplicateDnfRemoverTest { |
26 | private final static Symbol<Boolean> friend = Symbol.of("friend", 2); | 25 | private final static Constraint friendView = new FakeKeyOnlyView("friend", 2); |
27 | private final static AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
28 | 26 | ||
29 | private DuplicateDnfRemover sut; | 27 | private DuplicateDnfRemover sut; |
30 | 28 | ||
@@ -116,8 +114,8 @@ class DuplicateDnfRemoverTest { | |||
116 | assertThat(one, is(oneResult)); | 114 | assertThat(one, is(oneResult)); |
117 | assertThat(oneResult, is(not(twoResult))); | 115 | assertThat(oneResult, is(not(twoResult))); |
118 | 116 | ||
119 | var oneCall = (AbstractCallLiteral) oneResult.getDnf().getClauses().get(0).literals().get(0); | 117 | var oneCall = (AbstractCallLiteral) oneResult.getDnf().getClauses().getFirst().literals().getFirst(); |
120 | var twoCall = (AbstractCallLiteral) twoResult.getDnf().getClauses().get(0).literals().get(0); | 118 | var twoCall = (AbstractCallLiteral) twoResult.getDnf().getClauses().getFirst().literals().getFirst(); |
121 | 119 | ||
122 | assertThat(oneCall.getTarget(), is(twoCall.getTarget())); | 120 | assertThat(oneCall.getTarget(), is(twoCall.getTarget())); |
123 | } | 121 | } |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/InputParameterResolverTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/rewriter/InputParameterResolverTest.java index ef0077e4..5e5fdb64 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/InputParameterResolverTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/rewriter/InputParameterResolverTest.java | |||
@@ -3,30 +3,27 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.rewriter; | 6 | package tools.refinery.logic.rewriter; |
7 | 7 | ||
8 | import org.junit.jupiter.api.BeforeEach; | 8 | import org.junit.jupiter.api.BeforeEach; |
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.query.dnf.Dnf; | 10 | import tools.refinery.logic.Constraint; |
11 | import tools.refinery.store.query.dnf.Query; | 11 | import tools.refinery.logic.dnf.Dnf; |
12 | import tools.refinery.store.query.term.ParameterDirection; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.logic.term.Variable; |
15 | import tools.refinery.store.query.view.KeyOnlyView; | 15 | import tools.refinery.logic.tests.FakeKeyOnlyView; |
16 | import tools.refinery.store.representation.Symbol; | ||
17 | 16 | ||
18 | import java.util.List; | 17 | import java.util.List; |
19 | 18 | ||
20 | import static org.hamcrest.MatcherAssert.assertThat; | 19 | import static org.hamcrest.MatcherAssert.assertThat; |
21 | import static org.hamcrest.Matchers.is; | 20 | import static org.hamcrest.Matchers.is; |
22 | import static tools.refinery.store.query.literal.Literals.not; | 21 | import static tools.refinery.logic.literal.Literals.not; |
23 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 22 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
24 | 23 | ||
25 | class InputParameterResolverTest { | 24 | class InputParameterResolverTest { |
26 | private final static Symbol<Boolean> person = Symbol.of("Person", 1); | 25 | private final static Constraint personView = new FakeKeyOnlyView("Person", 1); |
27 | private final static Symbol<Boolean> friend = Symbol.of("friend", 2); | 26 | private final static Constraint friendView = new FakeKeyOnlyView("friend", 2); |
28 | private final static AnySymbolView personView = new KeyOnlyView<>(person); | ||
29 | private final static AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
30 | 27 | ||
31 | private InputParameterResolver sut; | 28 | private InputParameterResolver sut; |
32 | 29 | ||
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/TermSubstitutionTest.java index 1fae2492..52b21692 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/TermSubstitutionTest.java | |||
@@ -3,20 +3,20 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term; | 6 | package tools.refinery.logic.term; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Assertions; | 8 | import org.junit.jupiter.api.Assertions; |
9 | import org.junit.jupiter.params.ParameterizedTest; | 9 | import org.junit.jupiter.params.ParameterizedTest; |
10 | import org.junit.jupiter.params.provider.Arguments; | 10 | import org.junit.jupiter.params.provider.Arguments; |
11 | import org.junit.jupiter.params.provider.MethodSource; | 11 | import org.junit.jupiter.params.provider.MethodSource; |
12 | import tools.refinery.store.query.equality.DnfEqualityChecker; | 12 | import tools.refinery.logic.equality.DnfEqualityChecker; |
13 | import tools.refinery.store.query.equality.SubstitutingLiteralEqualityHelper; | 13 | import tools.refinery.logic.equality.SubstitutingLiteralEqualityHelper; |
14 | import tools.refinery.store.query.substitution.Substitution; | 14 | import tools.refinery.logic.substitution.Substitution; |
15 | import tools.refinery.store.query.term.bool.BoolTerms; | 15 | import tools.refinery.logic.term.bool.BoolTerms; |
16 | import tools.refinery.store.query.term.int_.IntTerms; | 16 | import tools.refinery.logic.term.int_.IntTerms; |
17 | import tools.refinery.store.query.term.real.RealTerms; | 17 | import tools.refinery.logic.term.real.RealTerms; |
18 | import tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms; | 18 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; |
19 | import tools.refinery.store.representation.cardinality.UpperCardinality; | 19 | import tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms; |
20 | 20 | ||
21 | import java.util.List; | 21 | import java.util.List; |
22 | import java.util.stream.Stream; | 22 | import java.util.stream.Stream; |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/bool/BoolTermsEvaluateTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/bool/BoolTermsEvaluateTest.java index beff705e..7f65591f 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/bool/BoolTermsEvaluateTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/bool/BoolTermsEvaluateTest.java | |||
@@ -3,11 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.bool; | 6 | package tools.refinery.logic.term.bool; |
7 | 7 | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 8 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.CsvSource; | 9 | import org.junit.jupiter.params.provider.CsvSource; |
10 | import tools.refinery.store.query.valuation.Valuation; | 10 | import tools.refinery.logic.term.bool.BoolTerms; |
11 | import tools.refinery.logic.valuation.Valuation; | ||
11 | 12 | ||
12 | import static org.hamcrest.MatcherAssert.assertThat; | 13 | import static org.hamcrest.MatcherAssert.assertThat; |
13 | import static org.hamcrest.Matchers.is; | 14 | import static org.hamcrest.Matchers.is; |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/CardinalityIntervalTest.java index 6a66fa84..ee2dd61c 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/CardinalityIntervalTest.java | |||
@@ -3,18 +3,17 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | 7 | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 8 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.Arguments; | 9 | import org.junit.jupiter.params.provider.Arguments; |
10 | import org.junit.jupiter.params.provider.MethodSource; | 10 | import org.junit.jupiter.params.provider.MethodSource; |
11 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | ||
12 | 11 | ||
13 | import java.util.stream.Stream; | 12 | import java.util.stream.Stream; |
14 | 13 | ||
15 | import static org.hamcrest.MatcherAssert.assertThat; | 14 | import static org.hamcrest.MatcherAssert.assertThat; |
16 | import static org.hamcrest.Matchers.equalTo; | 15 | import static org.hamcrest.Matchers.equalTo; |
17 | import static tools.refinery.store.representation.cardinality.CardinalityIntervals.*; | 16 | import static tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals.*; |
18 | 17 | ||
19 | class CardinalityIntervalTest { | 18 | class CardinalityIntervalTest { |
20 | @ParameterizedTest(name = "min({0}, {1}) == {2}") | 19 | @ParameterizedTest(name = "min({0}, {1}) == {2}") |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalsTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/CardinalityIntervalsTest.java index 9fe76159..d68df335 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalsTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/CardinalityIntervalsTest.java | |||
@@ -3,26 +3,25 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 9 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
11 | 10 | ||
12 | import static org.hamcrest.MatcherAssert.assertThat; | 11 | import static org.hamcrest.MatcherAssert.assertThat; |
13 | import static org.hamcrest.Matchers.*; | 12 | import static org.hamcrest.Matchers.equalTo; |
14 | 13 | ||
15 | class CardinalityIntervalsTest { | 14 | class CardinalityIntervalsTest { |
16 | @Test | 15 | @Test |
17 | void betweenEmptyTest() { | 16 | void betweenEmptyTest() { |
18 | var interval = CardinalityIntervals.between(2, 1); | 17 | var interval = CardinalityIntervals.between(2, 1); |
19 | assertThat(interval.isEmpty(), equalTo(true)); | 18 | assertThat(interval.isError(), equalTo(true)); |
20 | } | 19 | } |
21 | 20 | ||
22 | @Test | 21 | @Test |
23 | void betweenNegativeUpperBoundTest() { | 22 | void betweenNegativeUpperBoundTest() { |
24 | var interval = CardinalityIntervals.between(0, -1); | 23 | var interval = CardinalityIntervals.between(0, -1); |
25 | assertThat(interval.upperBound(), equalTo(UpperCardinalities.UNBOUNDED)); | 24 | assertThat(interval.upperBound(), equalTo(UpperCardinalities.UNBOUNDED)); |
26 | assertThat(interval.isEmpty(), equalTo(false)); | 25 | assertThat(interval.isError(), equalTo(false)); |
27 | } | 26 | } |
28 | } | 27 | } |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/EmptyCardinalityIntervalTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/EmptyCardinalityIntervalTest.java index 24a788a8..0dbc7f61 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/EmptyCardinalityIntervalTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/EmptyCardinalityIntervalTest.java | |||
@@ -3,10 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | ||
10 | 9 | ||
11 | import static org.hamcrest.MatcherAssert.assertThat; | 10 | import static org.hamcrest.MatcherAssert.assertThat; |
12 | import static org.hamcrest.Matchers.lessThan; | 11 | import static org.hamcrest.Matchers.lessThan; |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteCardinalityIntervalTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/FiniteCardinalityIntervalTest.java index 6cf56fae..588b25ab 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteCardinalityIntervalTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/cardinalityinterval/FiniteCardinalityIntervalTest.java | |||
@@ -3,12 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.cardinalityinterval; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.representation.cardinality.NonEmptyCardinalityInterval; | 9 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; |
10 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | 10 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; |
11 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
12 | 11 | ||
13 | import static org.junit.jupiter.api.Assertions.assertThrows; | 12 | import static org.junit.jupiter.api.Assertions.assertThrows; |
14 | 13 | ||
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/int_/IntTermsEvaluateTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/int_/IntTermsEvaluateTest.java index abe50d75..55d9b740 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/int_/IntTermsEvaluateTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/int_/IntTermsEvaluateTest.java | |||
@@ -3,14 +3,15 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.int_; | 6 | package tools.refinery.logic.term.int_; |
7 | 7 | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 8 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.Arguments; | 9 | import org.junit.jupiter.params.provider.Arguments; |
10 | import org.junit.jupiter.params.provider.CsvSource; | 10 | import org.junit.jupiter.params.provider.CsvSource; |
11 | import org.junit.jupiter.params.provider.MethodSource; | 11 | import org.junit.jupiter.params.provider.MethodSource; |
12 | import tools.refinery.store.query.term.real.RealTerms; | 12 | import tools.refinery.logic.term.int_.IntTerms; |
13 | import tools.refinery.store.query.valuation.Valuation; | 13 | import tools.refinery.logic.term.real.RealTerms; |
14 | import tools.refinery.logic.valuation.Valuation; | ||
14 | 15 | ||
15 | import java.util.stream.Stream; | 16 | import java.util.stream.Stream; |
16 | 17 | ||
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/real/RealTermEvaluateTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/real/RealTermEvaluateTest.java index 6a8eebf1..042d1807 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/real/RealTermEvaluateTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/real/RealTermEvaluateTest.java | |||
@@ -3,13 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.real; | 6 | package tools.refinery.logic.term.real; |
7 | 7 | ||
8 | import org.hamcrest.Matcher; | 8 | import org.hamcrest.Matcher; |
9 | import org.junit.jupiter.params.ParameterizedTest; | 9 | import org.junit.jupiter.params.ParameterizedTest; |
10 | import org.junit.jupiter.params.provider.CsvSource; | 10 | import org.junit.jupiter.params.provider.CsvSource; |
11 | import tools.refinery.store.query.term.int_.IntTerms; | 11 | import tools.refinery.logic.term.int_.IntTerms; |
12 | import tools.refinery.store.query.valuation.Valuation; | 12 | import tools.refinery.logic.term.real.RealTerms; |
13 | import tools.refinery.logic.valuation.Valuation; | ||
13 | 14 | ||
14 | import static org.hamcrest.MatcherAssert.assertThat; | 15 | import static org.hamcrest.MatcherAssert.assertThat; |
15 | import static org.hamcrest.Matchers.*; | 16 | import static org.hamcrest.Matchers.*; |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinalityTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/FiniteUpperCardinalityTest.java index 7c641c47..8a57f029 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinalityTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/FiniteUpperCardinalityTest.java | |||
@@ -3,10 +3,9 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
10 | 9 | ||
11 | import static org.junit.jupiter.api.Assertions.assertThrows; | 10 | import static org.junit.jupiter.api.Assertions.assertThrows; |
12 | 11 | ||
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitiesTest.java index e403eec2..bdb6a833 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitiesTest.java | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import org.junit.jupiter.params.ParameterizedTest; | 9 | import org.junit.jupiter.params.ParameterizedTest; |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregatorStreamTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitySumAggregatorStreamTest.java index 31baf36e..fc8522d4 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregatorStreamTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitySumAggregatorStreamTest.java | |||
@@ -3,26 +3,24 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.hamcrest.Matchers; | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 9 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.Arguments; | 10 | import org.junit.jupiter.params.provider.Arguments; |
10 | import org.junit.jupiter.params.provider.MethodSource; | 11 | import org.junit.jupiter.params.provider.MethodSource; |
11 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
12 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
13 | 12 | ||
14 | import java.util.List; | 13 | import java.util.List; |
15 | import java.util.stream.Stream; | 14 | import java.util.stream.Stream; |
16 | 15 | ||
17 | import static org.hamcrest.MatcherAssert.assertThat; | 16 | import static org.hamcrest.MatcherAssert.assertThat; |
18 | import static org.hamcrest.Matchers.is; | ||
19 | 17 | ||
20 | class UpperCardinalitySumAggregatorStreamTest { | 18 | class UpperCardinalitySumAggregatorStreamTest { |
21 | @ParameterizedTest | 19 | @ParameterizedTest |
22 | @MethodSource | 20 | @MethodSource |
23 | void testStream(List<UpperCardinality> list, UpperCardinality expected) { | 21 | void testStream(List<UpperCardinality> list, UpperCardinality expected) { |
24 | var result = UpperCardinalitySumAggregator.INSTANCE.aggregateStream(list.stream()); | 22 | var result = UpperCardinalitySumAggregator.INSTANCE.aggregateStream(list.stream()); |
25 | assertThat(result, is(expected)); | 23 | assertThat(result, Matchers.is(expected)); |
26 | } | 24 | } |
27 | 25 | ||
28 | static Stream<Arguments> testStream() { | 26 | static Stream<Arguments> testStream() { |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregatorTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitySumAggregatorTest.java index 780cd0ab..e252b097 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregatorTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalitySumAggregatorTest.java | |||
@@ -3,16 +3,15 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.hamcrest.MatcherAssert; | ||
9 | import org.hamcrest.Matchers; | ||
8 | import org.junit.jupiter.api.BeforeEach; | 10 | import org.junit.jupiter.api.BeforeEach; |
9 | import org.junit.jupiter.api.Test; | 11 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.query.term.StatefulAggregate; | 12 | import tools.refinery.logic.term.StatefulAggregate; |
11 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
12 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
13 | 13 | ||
14 | import static org.hamcrest.MatcherAssert.assertThat; | 14 | import static org.hamcrest.MatcherAssert.assertThat; |
15 | import static org.hamcrest.Matchers.is; | ||
16 | 15 | ||
17 | class UpperCardinalitySumAggregatorTest { | 16 | class UpperCardinalitySumAggregatorTest { |
18 | private StatefulAggregate<UpperCardinality, UpperCardinality> accumulator; | 17 | private StatefulAggregate<UpperCardinality, UpperCardinality> accumulator; |
@@ -24,33 +23,33 @@ class UpperCardinalitySumAggregatorTest { | |||
24 | 23 | ||
25 | @Test | 24 | @Test |
26 | void emptyAggregationTest() { | 25 | void emptyAggregationTest() { |
27 | assertThat(accumulator.getResult(), is(UpperCardinality.of(0))); | 26 | MatcherAssert.assertThat(accumulator.getResult(), Matchers.is(UpperCardinality.of(0))); |
28 | } | 27 | } |
29 | 28 | ||
30 | @Test | 29 | @Test |
31 | void singleBoundedTest() { | 30 | void singleBoundedTest() { |
32 | accumulator.add(UpperCardinality.of(3)); | 31 | accumulator.add(UpperCardinality.of(3)); |
33 | assertThat(accumulator.getResult(), is(UpperCardinality.of(3))); | 32 | MatcherAssert.assertThat(accumulator.getResult(), Matchers.is(UpperCardinality.of(3))); |
34 | } | 33 | } |
35 | 34 | ||
36 | @Test | 35 | @Test |
37 | void multipleBoundedTest() { | 36 | void multipleBoundedTest() { |
38 | accumulator.add(UpperCardinality.of(2)); | 37 | accumulator.add(UpperCardinality.of(2)); |
39 | accumulator.add(UpperCardinality.of(3)); | 38 | accumulator.add(UpperCardinality.of(3)); |
40 | assertThat(accumulator.getResult(), is(UpperCardinality.of(5))); | 39 | MatcherAssert.assertThat(accumulator.getResult(), Matchers.is(UpperCardinality.of(5))); |
41 | } | 40 | } |
42 | 41 | ||
43 | @Test | 42 | @Test |
44 | void singleUnboundedTest() { | 43 | void singleUnboundedTest() { |
45 | accumulator.add(UpperCardinalities.UNBOUNDED); | 44 | accumulator.add(UpperCardinalities.UNBOUNDED); |
46 | assertThat(accumulator.getResult(), is(UpperCardinalities.UNBOUNDED)); | 45 | assertThat(accumulator.getResult(), Matchers.is(UpperCardinalities.UNBOUNDED)); |
47 | } | 46 | } |
48 | 47 | ||
49 | @Test | 48 | @Test |
50 | void multipleUnboundedTest() { | 49 | void multipleUnboundedTest() { |
51 | accumulator.add(UpperCardinalities.UNBOUNDED); | 50 | accumulator.add(UpperCardinalities.UNBOUNDED); |
52 | accumulator.add(UpperCardinalities.UNBOUNDED); | 51 | accumulator.add(UpperCardinalities.UNBOUNDED); |
53 | assertThat(accumulator.getResult(), is(UpperCardinalities.UNBOUNDED)); | 52 | assertThat(accumulator.getResult(), Matchers.is(UpperCardinalities.UNBOUNDED)); |
54 | } | 53 | } |
55 | 54 | ||
56 | @Test | 55 | @Test |
@@ -58,7 +57,7 @@ class UpperCardinalitySumAggregatorTest { | |||
58 | accumulator.add(UpperCardinality.of(2)); | 57 | accumulator.add(UpperCardinality.of(2)); |
59 | accumulator.add(UpperCardinality.of(3)); | 58 | accumulator.add(UpperCardinality.of(3)); |
60 | accumulator.remove(UpperCardinality.of(2)); | 59 | accumulator.remove(UpperCardinality.of(2)); |
61 | assertThat(accumulator.getResult(), is(UpperCardinality.of(3))); | 60 | MatcherAssert.assertThat(accumulator.getResult(), Matchers.is(UpperCardinality.of(3))); |
62 | } | 61 | } |
63 | 62 | ||
64 | @Test | 63 | @Test |
@@ -66,7 +65,7 @@ class UpperCardinalitySumAggregatorTest { | |||
66 | accumulator.add(UpperCardinalities.UNBOUNDED); | 65 | accumulator.add(UpperCardinalities.UNBOUNDED); |
67 | accumulator.add(UpperCardinality.of(3)); | 66 | accumulator.add(UpperCardinality.of(3)); |
68 | accumulator.remove(UpperCardinalities.UNBOUNDED); | 67 | accumulator.remove(UpperCardinalities.UNBOUNDED); |
69 | assertThat(accumulator.getResult(), is(UpperCardinality.of(3))); | 68 | MatcherAssert.assertThat(accumulator.getResult(), Matchers.is(UpperCardinality.of(3))); |
70 | } | 69 | } |
71 | 70 | ||
72 | @Test | 71 | @Test |
@@ -75,6 +74,6 @@ class UpperCardinalitySumAggregatorTest { | |||
75 | accumulator.add(UpperCardinalities.UNBOUNDED); | 74 | accumulator.add(UpperCardinalities.UNBOUNDED); |
76 | accumulator.add(UpperCardinality.of(3)); | 75 | accumulator.add(UpperCardinality.of(3)); |
77 | accumulator.remove(UpperCardinalities.UNBOUNDED); | 76 | accumulator.remove(UpperCardinalities.UNBOUNDED); |
78 | assertThat(accumulator.getResult(), is(UpperCardinalities.UNBOUNDED)); | 77 | assertThat(accumulator.getResult(), Matchers.is(UpperCardinalities.UNBOUNDED)); |
79 | } | 78 | } |
80 | } | 79 | } |
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityTermsEvaluateTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityTermsEvaluateTest.java index 9d0f3bde..ab71b716 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalityTermsEvaluateTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityTermsEvaluateTest.java | |||
@@ -3,14 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.term.uppercardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.hamcrest.Matchers; | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 9 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.Arguments; | 10 | import org.junit.jupiter.params.provider.Arguments; |
10 | import org.junit.jupiter.params.provider.MethodSource; | 11 | import org.junit.jupiter.params.provider.MethodSource; |
11 | import tools.refinery.store.query.valuation.Valuation; | 12 | import tools.refinery.logic.valuation.Valuation; |
12 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
13 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
14 | 13 | ||
15 | import java.util.stream.Stream; | 14 | import java.util.stream.Stream; |
16 | 15 | ||
@@ -23,7 +22,7 @@ class UpperCardinalityTermsEvaluateTest { | |||
23 | void minTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { | 22 | void minTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { |
24 | var term = UpperCardinalityTerms.min(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); | 23 | var term = UpperCardinalityTerms.min(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); |
25 | assertThat(term.getType(), is(UpperCardinality.class)); | 24 | assertThat(term.getType(), is(UpperCardinality.class)); |
26 | assertThat(term.evaluate(Valuation.empty()), is(expected)); | 25 | assertThat(term.evaluate(Valuation.empty()), Matchers.is(expected)); |
27 | } | 26 | } |
28 | 27 | ||
29 | static Stream<Arguments> minTest() { | 28 | static Stream<Arguments> minTest() { |
@@ -45,7 +44,7 @@ class UpperCardinalityTermsEvaluateTest { | |||
45 | void maxTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { | 44 | void maxTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { |
46 | var term = UpperCardinalityTerms.max(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); | 45 | var term = UpperCardinalityTerms.max(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); |
47 | assertThat(term.getType(), is(UpperCardinality.class)); | 46 | assertThat(term.getType(), is(UpperCardinality.class)); |
48 | assertThat(term.evaluate(Valuation.empty()), is(expected)); | 47 | assertThat(term.evaluate(Valuation.empty()), Matchers.is(expected)); |
49 | } | 48 | } |
50 | 49 | ||
51 | static Stream<Arguments> maxTest() { | 50 | static Stream<Arguments> maxTest() { |
@@ -67,7 +66,7 @@ class UpperCardinalityTermsEvaluateTest { | |||
67 | void addTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { | 66 | void addTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { |
68 | var term = UpperCardinalityTerms.add(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); | 67 | var term = UpperCardinalityTerms.add(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); |
69 | assertThat(term.getType(), is(UpperCardinality.class)); | 68 | assertThat(term.getType(), is(UpperCardinality.class)); |
70 | assertThat(term.evaluate(Valuation.empty()), is(expected)); | 69 | assertThat(term.evaluate(Valuation.empty()), Matchers.is(expected)); |
71 | } | 70 | } |
72 | 71 | ||
73 | static Stream<Arguments> addTest() { | 72 | static Stream<Arguments> addTest() { |
@@ -87,7 +86,7 @@ class UpperCardinalityTermsEvaluateTest { | |||
87 | void mulTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { | 86 | void mulTest(UpperCardinality a, UpperCardinality b, UpperCardinality expected) { |
88 | var term = UpperCardinalityTerms.mul(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); | 87 | var term = UpperCardinalityTerms.mul(UpperCardinalityTerms.constant(a), UpperCardinalityTerms.constant(b)); |
89 | assertThat(term.getType(), is(UpperCardinality.class)); | 88 | assertThat(term.getType(), is(UpperCardinality.class)); |
90 | assertThat(term.evaluate(Valuation.empty()), is(expected)); | 89 | assertThat(term.evaluate(Valuation.empty()), Matchers.is(expected)); |
91 | } | 90 | } |
92 | 91 | ||
93 | static Stream<Arguments> mulTest() { | 92 | static Stream<Arguments> mulTest() { |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalityTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityTest.java index 10b4dd20..70cb6695 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalityTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/term/uppercardinality/UpperCardinalityTest.java | |||
@@ -3,13 +3,11 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.representation.cardinality; | 6 | package tools.refinery.logic.term.uppercardinality; |
7 | 7 | ||
8 | import org.junit.jupiter.params.ParameterizedTest; | 8 | import org.junit.jupiter.params.ParameterizedTest; |
9 | import org.junit.jupiter.params.provider.Arguments; | 9 | import org.junit.jupiter.params.provider.Arguments; |
10 | import org.junit.jupiter.params.provider.MethodSource; | 10 | import org.junit.jupiter.params.provider.MethodSource; |
11 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
12 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
13 | 11 | ||
14 | import java.util.stream.Stream; | 12 | import java.util.stream.Stream; |
15 | 13 | ||
diff --git a/subprojects/logic/src/test/java/tools/refinery/logic/tests/FakeFunctionView.java b/subprojects/logic/src/test/java/tools/refinery/logic/tests/FakeFunctionView.java new file mode 100644 index 00000000..4a55f561 --- /dev/null +++ b/subprojects/logic/src/test/java/tools/refinery/logic/tests/FakeFunctionView.java | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic.tests; | ||
7 | |||
8 | import tools.refinery.logic.Constraint; | ||
9 | import tools.refinery.logic.term.*; | ||
10 | |||
11 | import java.util.ArrayList; | ||
12 | import java.util.Arrays; | ||
13 | import java.util.List; | ||
14 | |||
15 | public record FakeFunctionView<T>(String name, int keyArity, Class<T> valueType) implements Constraint { | ||
16 | @Override | ||
17 | public int arity() { | ||
18 | return keyArity + 1; | ||
19 | } | ||
20 | |||
21 | @Override | ||
22 | public List<Parameter> getParameters() { | ||
23 | var parameters = new Parameter[keyArity + 1]; | ||
24 | Arrays.fill(parameters, Parameter.NODE_OUT); | ||
25 | parameters[keyArity] = new Parameter(valueType, ParameterDirection.OUT); | ||
26 | return List.of(parameters); | ||
27 | } | ||
28 | |||
29 | public <R> AssignedValue<R> aggregate(Aggregator<R, T> aggregator, List<NodeVariable> arguments) { | ||
30 | return targetVariable -> { | ||
31 | var placeholderVariable = Variable.of(valueType); | ||
32 | var argumentsWithPlaceholder = new ArrayList<Variable>(arguments.size() + 1); | ||
33 | argumentsWithPlaceholder.addAll(arguments); | ||
34 | argumentsWithPlaceholder.add(placeholderVariable); | ||
35 | return aggregateBy(placeholderVariable, aggregator, argumentsWithPlaceholder).toLiteral(targetVariable); | ||
36 | }; | ||
37 | } | ||
38 | |||
39 | public <R> AssignedValue<R> aggregate(Aggregator<R, T> aggregator, NodeVariable... arguments) { | ||
40 | return aggregate(aggregator, List.of(arguments)); | ||
41 | } | ||
42 | |||
43 | public AssignedValue<T> leftJoin(T defaultValue, List<NodeVariable> arguments) { | ||
44 | return targetVariable -> { | ||
45 | var placeholderVariable = Variable.of(valueType); | ||
46 | var argumentsWithPlaceholder = new ArrayList<Variable>(arguments.size() + 1); | ||
47 | argumentsWithPlaceholder.addAll(arguments); | ||
48 | argumentsWithPlaceholder.add(placeholderVariable); | ||
49 | return leftJoinBy(placeholderVariable, defaultValue, argumentsWithPlaceholder).toLiteral(targetVariable); | ||
50 | }; | ||
51 | } | ||
52 | |||
53 | public AssignedValue<T> leftJoin(T defaultValue, NodeVariable... arguments) { | ||
54 | return leftJoin(defaultValue, List.of(arguments)); | ||
55 | |||
56 | } | ||
57 | } | ||
diff --git a/subprojects/logic/src/test/java/tools/refinery/logic/tests/FakeKeyOnlyView.java b/subprojects/logic/src/test/java/tools/refinery/logic/tests/FakeKeyOnlyView.java new file mode 100644 index 00000000..7e09ddab --- /dev/null +++ b/subprojects/logic/src/test/java/tools/refinery/logic/tests/FakeKeyOnlyView.java | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.logic.tests; | ||
7 | |||
8 | import tools.refinery.logic.Constraint; | ||
9 | import tools.refinery.logic.term.Parameter; | ||
10 | |||
11 | import java.util.Arrays; | ||
12 | import java.util.List; | ||
13 | |||
14 | public record FakeKeyOnlyView(String name, int arity) implements Constraint { | ||
15 | @Override | ||
16 | public List<Parameter> getParameters() { | ||
17 | var parameters = new Parameter[arity]; | ||
18 | Arrays.fill(parameters, Parameter.NODE_OUT); | ||
19 | return List.of(parameters); | ||
20 | } | ||
21 | } | ||
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/tests/StructurallyEqualToRawTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/tests/StructurallyEqualToRawTest.java index d447e99c..52a22ce1 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/tests/StructurallyEqualToRawTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/tests/StructurallyEqualToRawTest.java | |||
@@ -3,17 +3,15 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.tests; | 6 | package tools.refinery.logic.tests; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.dnf.SymbolicParameter; | 10 | import tools.refinery.logic.dnf.Dnf; |
11 | import tools.refinery.store.query.term.NodeVariable; | 11 | import tools.refinery.logic.dnf.SymbolicParameter; |
12 | import tools.refinery.store.query.term.ParameterDirection; | 12 | import tools.refinery.logic.term.NodeVariable; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.logic.term.Variable; |
15 | import tools.refinery.store.query.view.KeyOnlyView; | ||
16 | import tools.refinery.store.representation.Symbol; | ||
17 | 15 | ||
18 | import java.util.List; | 16 | import java.util.List; |
19 | 17 | ||
@@ -21,13 +19,11 @@ import static org.hamcrest.CoreMatchers.containsString; | |||
21 | import static org.hamcrest.MatcherAssert.assertThat; | 19 | import static org.hamcrest.MatcherAssert.assertThat; |
22 | import static org.hamcrest.Matchers.allOf; | 20 | import static org.hamcrest.Matchers.allOf; |
23 | import static org.junit.jupiter.api.Assertions.assertThrows; | 21 | import static org.junit.jupiter.api.Assertions.assertThrows; |
24 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 22 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
25 | 23 | ||
26 | class StructurallyEqualToRawTest { | 24 | class StructurallyEqualToRawTest { |
27 | private static final Symbol<Boolean> person = Symbol.of("Person", 1); | 25 | private static final Constraint personView = new FakeKeyOnlyView("Person", 1); |
28 | private static final Symbol<Boolean> friend = Symbol.of("friend", 2); | 26 | private static final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
29 | private static final AnySymbolView personView = new KeyOnlyView<>(person); | ||
30 | private static final AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
31 | private static final NodeVariable p = Variable.of("p"); | 27 | private static final NodeVariable p = Variable.of("p"); |
32 | private static final NodeVariable q = Variable.of("q"); | 28 | private static final NodeVariable q = Variable.of("q"); |
33 | 29 | ||
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/tests/StructurallyEqualToTest.java b/subprojects/logic/src/test/java/tools/refinery/logic/tests/StructurallyEqualToTest.java index f716b805..663b115a 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/tests/StructurallyEqualToTest.java +++ b/subprojects/logic/src/test/java/tools/refinery/logic/tests/StructurallyEqualToTest.java | |||
@@ -3,27 +3,23 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.tests; | 6 | package tools.refinery.logic.tests; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.query.term.NodeVariable; | 10 | import tools.refinery.logic.dnf.Dnf; |
11 | import tools.refinery.store.query.term.ParameterDirection; | 11 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.ParameterDirection; |
13 | import tools.refinery.store.query.view.AnySymbolView; | 13 | import tools.refinery.logic.term.Variable; |
14 | import tools.refinery.store.query.view.KeyOnlyView; | ||
15 | import tools.refinery.store.representation.Symbol; | ||
16 | 14 | ||
17 | import static org.hamcrest.CoreMatchers.containsString; | 15 | import static org.hamcrest.CoreMatchers.containsString; |
18 | import static org.hamcrest.MatcherAssert.assertThat; | 16 | import static org.hamcrest.MatcherAssert.assertThat; |
19 | import static org.junit.jupiter.api.Assertions.assertThrows; | 17 | import static org.junit.jupiter.api.Assertions.assertThrows; |
20 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 18 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
21 | 19 | ||
22 | class StructurallyEqualToTest { | 20 | class StructurallyEqualToTest { |
23 | private static final Symbol<Boolean> person = Symbol.of("Person", 1); | 21 | private static final Constraint personView = new FakeKeyOnlyView("Person", 1); |
24 | private static final Symbol<Boolean> friend = Symbol.of("friend", 2); | 22 | private static final Constraint friendView = new FakeKeyOnlyView("friend", 2); |
25 | private static final AnySymbolView personView = new KeyOnlyView<>(person); | ||
26 | private static final AnySymbolView friendView = new KeyOnlyView<>(friend); | ||
27 | private static final NodeVariable p = Variable.of("p"); | 23 | private static final NodeVariable p = Variable.of("p"); |
28 | private static final NodeVariable q = Variable.of("q"); | 24 | private static final NodeVariable q = Variable.of("q"); |
29 | 25 | ||
diff --git a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/MismatchDescribingDnfEqualityChecker.java b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/MismatchDescribingDnfEqualityChecker.java index 6a3301b3..aa73baec 100644 --- a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/MismatchDescribingDnfEqualityChecker.java +++ b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/MismatchDescribingDnfEqualityChecker.java | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.tests; | 6 | package tools.refinery.logic.tests; |
7 | 7 | ||
8 | import org.hamcrest.Description; | 8 | import org.hamcrest.Description; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.dnf.Dnf; |
10 | import tools.refinery.store.query.dnf.SymbolicParameter; | 10 | import tools.refinery.logic.dnf.SymbolicParameter; |
11 | import tools.refinery.store.query.equality.DeepDnfEqualityChecker; | 11 | import tools.refinery.logic.equality.DeepDnfEqualityChecker; |
12 | import tools.refinery.store.query.literal.Literal; | 12 | import tools.refinery.logic.literal.Literal; |
13 | 13 | ||
14 | import java.util.List; | 14 | import java.util.List; |
15 | 15 | ||
diff --git a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/QueryMatchers.java b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/QueryMatchers.java index cd449a6a..40332a8c 100644 --- a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/QueryMatchers.java +++ b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/QueryMatchers.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.tests; | 6 | package tools.refinery.logic.tests; |
7 | 7 | ||
8 | import org.hamcrest.Matcher; | 8 | import org.hamcrest.Matcher; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.dnf.Dnf; |
10 | import tools.refinery.store.query.dnf.SymbolicParameter; | 10 | import tools.refinery.logic.dnf.SymbolicParameter; |
11 | import tools.refinery.store.query.literal.Literal; | 11 | import tools.refinery.logic.literal.Literal; |
12 | 12 | ||
13 | import java.util.List; | 13 | import java.util.List; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/StructurallyEqualTo.java b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/StructurallyEqualTo.java index 86149141..257e6850 100644 --- a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/StructurallyEqualTo.java +++ b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/StructurallyEqualTo.java | |||
@@ -3,12 +3,12 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.tests; | 6 | package tools.refinery.logic.tests; |
7 | 7 | ||
8 | import org.hamcrest.Description; | 8 | import org.hamcrest.Description; |
9 | import org.hamcrest.TypeSafeMatcher; | 9 | import org.hamcrest.TypeSafeMatcher; |
10 | import tools.refinery.store.query.dnf.Dnf; | 10 | import tools.refinery.logic.dnf.Dnf; |
11 | import tools.refinery.store.query.equality.DeepDnfEqualityChecker; | 11 | import tools.refinery.logic.equality.DeepDnfEqualityChecker; |
12 | 12 | ||
13 | public class StructurallyEqualTo extends TypeSafeMatcher<Dnf> { | 13 | public class StructurallyEqualTo extends TypeSafeMatcher<Dnf> { |
14 | private final Dnf expected; | 14 | private final Dnf expected; |
diff --git a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/StructurallyEqualToRaw.java b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/StructurallyEqualToRaw.java index 2f8c2944..944ab1ac 100644 --- a/subprojects/store-query/src/testFixtures/java/tools/refinery/store/query/tests/StructurallyEqualToRaw.java +++ b/subprojects/logic/src/testFixtures/java/tools/refinery/logic/tests/StructurallyEqualToRaw.java | |||
@@ -3,14 +3,14 @@ | |||
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.tests; | 6 | package tools.refinery.logic.tests; |
7 | 7 | ||
8 | import org.hamcrest.Description; | 8 | import org.hamcrest.Description; |
9 | import org.hamcrest.TypeSafeMatcher; | 9 | import org.hamcrest.TypeSafeMatcher; |
10 | import tools.refinery.store.query.dnf.Dnf; | 10 | import tools.refinery.logic.dnf.Dnf; |
11 | import tools.refinery.store.query.dnf.SymbolicParameter; | 11 | import tools.refinery.logic.dnf.SymbolicParameter; |
12 | import tools.refinery.store.query.equality.DeepDnfEqualityChecker; | 12 | import tools.refinery.logic.equality.DeepDnfEqualityChecker; |
13 | import tools.refinery.store.query.literal.Literal; | 13 | import tools.refinery.logic.literal.Literal; |
14 | 14 | ||
15 | import java.util.List; | 15 | import java.util.List; |
16 | 16 | ||
diff --git a/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java index ef10dd30..5d0a3292 100644 --- a/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java +++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java | |||
@@ -11,7 +11,7 @@ import tools.refinery.store.map.Version; | |||
11 | import tools.refinery.store.model.Interpretation; | 11 | import tools.refinery.store.model.Interpretation; |
12 | import tools.refinery.store.model.Model; | 12 | import tools.refinery.store.model.Model; |
13 | import tools.refinery.store.representation.AnySymbol; | 13 | import tools.refinery.store.representation.AnySymbol; |
14 | import tools.refinery.store.representation.TruthValue; | 14 | import tools.refinery.logic.term.truthvalue.TruthValue; |
15 | import tools.refinery.store.tuple.Tuple; | 15 | import tools.refinery.store.tuple.Tuple; |
16 | import tools.refinery.visualization.ModelVisualizerAdapter; | 16 | import tools.refinery.visualization.ModelVisualizerAdapter; |
17 | import tools.refinery.visualization.ModelVisualizerStoreAdapter; | 17 | import tools.refinery.visualization.ModelVisualizerStoreAdapter; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java index 5b86a5e1..a6c58381 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java | |||
@@ -9,7 +9,7 @@ import tools.refinery.store.dse.modification.ModificationAdapter; | |||
9 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; | 9 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; |
10 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; | 10 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; |
11 | import tools.refinery.store.model.Model; | 11 | import tools.refinery.store.model.Model; |
12 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.logic.term.NodeVariable; |
13 | 13 | ||
14 | import java.util.List; | 14 | import java.util.List; |
15 | 15 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java index 18ad2b9d..e13e9c11 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java | |||
@@ -10,7 +10,7 @@ import tools.refinery.store.dse.modification.ModificationAdapter; | |||
10 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; | 10 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; |
11 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; | 11 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; |
12 | import tools.refinery.store.model.Model; | 12 | import tools.refinery.store.model.Model; |
13 | import tools.refinery.store.query.term.NodeVariable; | 13 | import tools.refinery.logic.term.NodeVariable; |
14 | import tools.refinery.store.tuple.Tuple; | 14 | import tools.refinery.store.tuple.Tuple; |
15 | 15 | ||
16 | import java.util.List; | 16 | import java.util.List; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java index 31f50ac7..4de482f0 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.modification.actions; | 6 | package tools.refinery.store.dse.modification.actions; |
7 | 7 | ||
8 | import tools.refinery.store.dse.modification.DanglingEdges; | 8 | import tools.refinery.store.dse.modification.DanglingEdges; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | public class ModificationActionLiterals { | 11 | public class ModificationActionLiterals { |
12 | private ModificationActionLiterals() { | 12 | private ModificationActionLiterals() { |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java index ff45ed3e..14a9c556 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java | |||
@@ -9,7 +9,7 @@ import tools.refinery.store.dse.transition.actions.Action; | |||
9 | import tools.refinery.store.dse.transition.actions.BoundAction; | 9 | import tools.refinery.store.dse.transition.actions.BoundAction; |
10 | import tools.refinery.store.dse.transition.callback.*; | 10 | import tools.refinery.store.dse.transition.callback.*; |
11 | import tools.refinery.store.model.Model; | 11 | import tools.refinery.store.model.Model; |
12 | import tools.refinery.store.query.dnf.RelationalQuery; | 12 | import tools.refinery.logic.dnf.RelationalQuery; |
13 | 13 | ||
14 | public class Rule { | 14 | public class Rule { |
15 | private final String name; | 15 | private final String name; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java index 865ac369..c2e43e0d 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java | |||
@@ -8,9 +8,9 @@ package tools.refinery.store.dse.transition; | |||
8 | import tools.refinery.store.dse.transition.actions.Action; | 8 | import tools.refinery.store.dse.transition.actions.Action; |
9 | import tools.refinery.store.dse.transition.actions.ActionLiteral; | 9 | import tools.refinery.store.dse.transition.actions.ActionLiteral; |
10 | import tools.refinery.store.dse.transition.callback.*; | 10 | import tools.refinery.store.dse.transition.callback.*; |
11 | import tools.refinery.store.query.dnf.AbstractQueryBuilder; | 11 | import tools.refinery.logic.dnf.AbstractQueryBuilder; |
12 | import tools.refinery.store.query.dnf.Dnf; | 12 | import tools.refinery.logic.dnf.Dnf; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | 14 | ||
15 | import java.util.List; | 15 | import java.util.List; |
16 | 16 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java index d63ddfdd..0ce0c3a4 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java | |||
@@ -9,9 +9,9 @@ import org.eclipse.collections.api.factory.primitive.ObjectIntMaps; | |||
9 | import org.eclipse.collections.api.map.primitive.MutableObjectIntMap; | 9 | import org.eclipse.collections.api.map.primitive.MutableObjectIntMap; |
10 | import org.jetbrains.annotations.Nullable; | 10 | import org.jetbrains.annotations.Nullable; |
11 | import tools.refinery.store.model.Model; | 11 | import tools.refinery.store.model.Model; |
12 | import tools.refinery.store.query.dnf.RelationalQuery; | 12 | import tools.refinery.logic.dnf.RelationalQuery; |
13 | import tools.refinery.store.query.dnf.SymbolicParameter; | 13 | import tools.refinery.logic.dnf.SymbolicParameter; |
14 | import tools.refinery.store.query.term.NodeVariable; | 14 | import tools.refinery.logic.term.NodeVariable; |
15 | 15 | ||
16 | import java.util.*; | 16 | import java.util.*; |
17 | 17 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java index a721ef73..86b4e3cd 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.actions; | 6 | package tools.refinery.store.dse.transition.actions; |
7 | 7 | ||
8 | import tools.refinery.store.model.Model; | 8 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.List; | 11 | import java.util.List; |
12 | 12 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java index 275e1e25..d06e2479 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.actions; | 6 | package tools.refinery.store.dse.transition.actions; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.NodeVariable; | 8 | import tools.refinery.logic.term.NodeVariable; |
9 | import tools.refinery.store.representation.Symbol; | 9 | import tools.refinery.store.representation.Symbol; |
10 | 10 | ||
11 | import java.util.List; | 11 | import java.util.List; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java index 86288921..6657b157 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.actions; | 6 | package tools.refinery.store.dse.transition.actions; |
7 | 7 | ||
8 | import tools.refinery.store.model.Model; | 8 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | import tools.refinery.store.representation.Symbol; | 10 | import tools.refinery.store.representation.Symbol; |
11 | import tools.refinery.store.tuple.Tuple; | 11 | import tools.refinery.store.tuple.Tuple; |
12 | 12 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java index 869f1a96..7e1dd5b7 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; | 8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.List; | 11 | import java.util.List; |
12 | 12 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java index a648fc93..1361482d 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; | 8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.List; | 11 | import java.util.List; |
12 | 12 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java index a9b1d334..870ba088 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; | 8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.List; | 11 | import java.util.List; |
12 | 12 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java index aef1351c..46c056ef 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; | 8 | import tools.refinery.store.dse.transition.actions.ActionLiteral; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | import java.util.List; | 11 | import java.util.List; |
12 | 12 | ||
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java index bd7bf4f5..603500ae 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.RuleBuilder; | 8 | import tools.refinery.store.dse.transition.RuleBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface RuleCallback1 { | 12 | public interface RuleCallback1 { |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java index 7b02b68a..88d3e43c 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.RuleBuilder; | 8 | import tools.refinery.store.dse.transition.RuleBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface RuleCallback2 { | 12 | public interface RuleCallback2 { |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java index 6f112d48..d4d35e19 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.RuleBuilder; | 8 | import tools.refinery.store.dse.transition.RuleBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface RuleCallback3 { | 12 | public interface RuleCallback3 { |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java index dbcf8567..67690169 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.dse.transition.callback; | 6 | package tools.refinery.store.dse.transition.callback; |
7 | 7 | ||
8 | import tools.refinery.store.dse.transition.RuleBuilder; | 8 | import tools.refinery.store.dse.transition.RuleBuilder; |
9 | import tools.refinery.store.query.term.NodeVariable; | 9 | import tools.refinery.logic.term.NodeVariable; |
10 | 10 | ||
11 | @FunctionalInterface | 11 | @FunctionalInterface |
12 | public interface RuleCallback4 { | 12 | public interface RuleCallback4 { |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java index 0ad2b7a4..2a02ff14 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java | |||
@@ -5,9 +5,9 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.logic.literal.Reduction; | ||
8 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.literal.Reduction; | ||
11 | 11 | ||
12 | import java.util.ArrayList; | 12 | import java.util.ArrayList; |
13 | import java.util.Collection; | 13 | import java.util.Collection; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java index 5746cc7e..1f2defab 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.store.model.ModelStore; | ||
9 | import tools.refinery.store.model.ModelStoreBuilder; | 8 | import tools.refinery.store.model.ModelStoreBuilder; |
10 | import tools.refinery.store.query.literal.Reduction; | ||
11 | 9 | ||
12 | import java.util.*; | 10 | import java.util.Collection; |
11 | import java.util.LinkedHashSet; | ||
12 | import java.util.List; | ||
13 | 13 | ||
14 | public abstract sealed class CompositeCriterion implements Criterion permits AndCriterion, OrCriterion { | 14 | public abstract sealed class CompositeCriterion implements Criterion permits AndCriterion, OrCriterion { |
15 | private final List<Criterion> criteria; | 15 | private final List<Criterion> criteria; |
@@ -32,9 +32,6 @@ public abstract sealed class CompositeCriterion implements Criterion permits And | |||
32 | } | 32 | } |
33 | 33 | ||
34 | @Override | 34 | @Override |
35 | public abstract Reduction getReduction(ModelStore store); | ||
36 | |||
37 | @Override | ||
38 | public void configure(ModelStoreBuilder storeBuilder) { | 35 | public void configure(ModelStoreBuilder storeBuilder) { |
39 | for (var criterion : criteria) { | 36 | for (var criterion : criteria) { |
40 | criterion.configure(storeBuilder); | 37 | criterion.configure(storeBuilder); |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java index fbd05ded..f9fe1459 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java | |||
@@ -5,14 +5,14 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.RelationalQuery; | ||
9 | import tools.refinery.logic.literal.Reduction; | ||
8 | import tools.refinery.store.model.Model; | 10 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.model.ModelStore; | 11 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 12 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.query.ModelQueryAdapter; | 13 | import tools.refinery.store.query.ModelQueryAdapter; |
12 | import tools.refinery.store.query.ModelQueryBuilder; | 14 | import tools.refinery.store.query.ModelQueryBuilder; |
13 | import tools.refinery.store.query.ModelQueryStoreAdapter; | 15 | import tools.refinery.store.query.ModelQueryStoreAdapter; |
14 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
15 | import tools.refinery.store.query.literal.Reduction; | ||
16 | 16 | ||
17 | public class CountObjective implements Objective { | 17 | public class CountObjective implements Objective { |
18 | private final RelationalQuery query; | 18 | private final RelationalQuery query; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java index 0e4ec5c9..7d4c97ad 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.AnyQuery; | 8 | import tools.refinery.logic.dnf.AnyQuery; |
9 | 9 | ||
10 | import java.util.Collection; | 10 | import java.util.Collection; |
11 | import java.util.List; | 11 | import java.util.List; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java index c827f20e..da6b2102 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java | |||
@@ -5,10 +5,10 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.logic.literal.Reduction; | ||
8 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 11 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.query.literal.Reduction; | ||
12 | 12 | ||
13 | public interface Criterion { | 13 | public interface Criterion { |
14 | default void configure(ModelStoreBuilder storeBuilder) { | 14 | default void configure(ModelStoreBuilder storeBuilder) { |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java index e552d14c..d2364c6a 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java | |||
@@ -5,8 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.FunctionalQuery; | 8 | import tools.refinery.logic.dnf.FunctionalQuery; |
9 | import tools.refinery.store.query.dnf.RelationalQuery; | 9 | import tools.refinery.logic.dnf.RelationalQuery; |
10 | 10 | ||
11 | import java.util.Collection; | 11 | import java.util.Collection; |
12 | import java.util.List; | 12 | import java.util.List; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java index 7a8d7778..4f7fcb26 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java | |||
@@ -5,9 +5,9 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.logic.literal.Reduction; | ||
8 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.literal.Reduction; | ||
11 | 11 | ||
12 | import java.util.ArrayList; | 12 | import java.util.ArrayList; |
13 | import java.util.Collection; | 13 | import java.util.Collection; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java index e15e4e41..82dd8712 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java | |||
@@ -5,14 +5,14 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.dse.transition.objectives; | 6 | package tools.refinery.store.dse.transition.objectives; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.AnyQuery; | ||
9 | import tools.refinery.logic.literal.Reduction; | ||
8 | import tools.refinery.store.model.Model; | 10 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.model.ModelStore; | 11 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 12 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.query.ModelQueryAdapter; | 13 | import tools.refinery.store.query.ModelQueryAdapter; |
12 | import tools.refinery.store.query.ModelQueryBuilder; | 14 | import tools.refinery.store.query.ModelQueryBuilder; |
13 | import tools.refinery.store.query.ModelQueryStoreAdapter; | 15 | import tools.refinery.store.query.ModelQueryStoreAdapter; |
14 | import tools.refinery.store.query.dnf.AnyQuery; | ||
15 | import tools.refinery.store.query.literal.Reduction; | ||
16 | 16 | ||
17 | public class QueryCriterion implements Criterion { | 17 | public class QueryCriterion implements Criterion { |
18 | protected final boolean satisfiedIfHasMatch; | 18 | protected final boolean satisfiedIfHasMatch; |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java index 5a7ba8f4..1fa6327e 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java | |||
@@ -9,7 +9,7 @@ import tools.refinery.store.model.Model; | |||
9 | import tools.refinery.store.model.ModelStoreBuilder; | 9 | import tools.refinery.store.model.ModelStoreBuilder; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.ModelQueryBuilder; | 11 | import tools.refinery.store.query.ModelQueryBuilder; |
12 | import tools.refinery.store.query.dnf.FunctionalQuery; | 12 | import tools.refinery.logic.dnf.FunctionalQuery; |
13 | 13 | ||
14 | public class QueryObjective implements Objective { | 14 | public class QueryObjective implements Objective { |
15 | protected final FunctionalQuery<? extends Number> objectiveFunction; | 15 | protected final FunctionalQuery<? extends Number> objectiveFunction; |
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java index fa0b3c73..7502f350 100644 --- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java +++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java | |||
@@ -18,9 +18,9 @@ import tools.refinery.store.dse.transition.objectives.Criteria; | |||
18 | import tools.refinery.store.dse.transition.objectives.Objectives; | 18 | import tools.refinery.store.dse.transition.objectives.Objectives; |
19 | import tools.refinery.store.model.ModelStore; | 19 | import tools.refinery.store.model.ModelStore; |
20 | import tools.refinery.store.query.ModelQueryAdapter; | 20 | import tools.refinery.store.query.ModelQueryAdapter; |
21 | import tools.refinery.store.query.dnf.Query; | 21 | import tools.refinery.logic.dnf.Query; |
22 | import tools.refinery.store.query.dnf.RelationalQuery; | 22 | import tools.refinery.logic.dnf.RelationalQuery; |
23 | import tools.refinery.store.query.term.Variable; | 23 | import tools.refinery.logic.term.Variable; |
24 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; | 24 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; |
25 | import tools.refinery.store.query.view.AnySymbolView; | 25 | import tools.refinery.store.query.view.AnySymbolView; |
26 | import tools.refinery.store.query.view.KeyOnlyView; | 26 | import tools.refinery.store.query.view.KeyOnlyView; |
@@ -36,7 +36,7 @@ import static tools.refinery.store.dse.modification.actions.ModificationActionLi | |||
36 | import static tools.refinery.store.dse.modification.actions.ModificationActionLiterals.delete; | 36 | import static tools.refinery.store.dse.modification.actions.ModificationActionLiterals.delete; |
37 | import static tools.refinery.store.dse.transition.actions.ActionLiterals.add; | 37 | import static tools.refinery.store.dse.transition.actions.ActionLiterals.add; |
38 | import static tools.refinery.store.dse.transition.actions.ActionLiterals.remove; | 38 | import static tools.refinery.store.dse.transition.actions.ActionLiterals.remove; |
39 | import static tools.refinery.store.query.literal.Literals.not; | 39 | import static tools.refinery.logic.literal.Literals.not; |
40 | 40 | ||
41 | class CRAExamplesTest { | 41 | class CRAExamplesTest { |
42 | private static final Symbol<String> name = Symbol.of("Name", 1, String.class); | 42 | private static final Symbol<String> name = Symbol.of("Name", 1, String.class); |
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java index a79547ec..eb0ca8f9 100644 --- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java +++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java | |||
@@ -6,17 +6,17 @@ | |||
6 | package tools.refinery.store.dse.transition; | 6 | package tools.refinery.store.dse.transition; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.logic.dnf.FunctionalQuery; | ||
10 | import tools.refinery.logic.dnf.Query; | ||
11 | import tools.refinery.logic.dnf.RelationalQuery; | ||
12 | import tools.refinery.logic.term.Variable; | ||
13 | import tools.refinery.logic.term.int_.IntTerms; | ||
9 | import tools.refinery.store.dse.modification.ModificationAdapter; | 14 | import tools.refinery.store.dse.modification.ModificationAdapter; |
10 | import tools.refinery.store.dse.transition.objectives.Criteria; | 15 | import tools.refinery.store.dse.transition.objectives.Criteria; |
11 | import tools.refinery.store.dse.transition.objectives.Objectives; | 16 | import tools.refinery.store.dse.transition.objectives.Objectives; |
12 | import tools.refinery.store.model.Model; | 17 | import tools.refinery.store.model.Model; |
13 | import tools.refinery.store.model.ModelStore; | 18 | import tools.refinery.store.model.ModelStore; |
14 | import tools.refinery.store.query.ModelQueryAdapter; | 19 | import tools.refinery.store.query.ModelQueryAdapter; |
15 | import tools.refinery.store.query.dnf.FunctionalQuery; | ||
16 | import tools.refinery.store.query.dnf.Query; | ||
17 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
18 | import tools.refinery.store.query.term.Variable; | ||
19 | import tools.refinery.store.query.term.int_.IntTerms; | ||
20 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; | 20 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; |
21 | import tools.refinery.store.query.view.AnySymbolView; | 21 | import tools.refinery.store.query.view.AnySymbolView; |
22 | import tools.refinery.store.query.view.KeyOnlyView; | 22 | import tools.refinery.store.query.view.KeyOnlyView; |
@@ -27,8 +27,8 @@ import tools.refinery.store.tuple.Tuple; | |||
27 | import java.util.List; | 27 | import java.util.List; |
28 | 28 | ||
29 | import static org.junit.jupiter.api.Assertions.*; | 29 | import static org.junit.jupiter.api.Assertions.*; |
30 | import static tools.refinery.store.query.literal.Literals.check; | 30 | import static tools.refinery.logic.literal.Literals.check; |
31 | import static tools.refinery.store.query.literal.Literals.not; | 31 | import static tools.refinery.logic.literal.Literals.not; |
32 | 32 | ||
33 | class TransitionBuildTests { | 33 | class TransitionBuildTests { |
34 | Symbol<Boolean> person = new Symbol<>("Person", 1, Boolean.class, false); | 34 | Symbol<Boolean> person = new Symbol<>("Person", 1, Boolean.class, false); |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/QueryInterpreterBuilder.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/QueryInterpreterBuilder.java index 6e167d0d..010164e2 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/QueryInterpreterBuilder.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/QueryInterpreterBuilder.java | |||
@@ -7,9 +7,9 @@ package tools.refinery.store.query.interpreter; | |||
7 | 7 | ||
8 | import tools.refinery.store.model.ModelStore; | 8 | import tools.refinery.store.model.ModelStore; |
9 | import tools.refinery.store.query.ModelQueryBuilder; | 9 | import tools.refinery.store.query.ModelQueryBuilder; |
10 | import tools.refinery.store.query.dnf.AnyQuery; | 10 | import tools.refinery.logic.dnf.AnyQuery; |
11 | import tools.refinery.store.query.dnf.Dnf; | 11 | import tools.refinery.logic.dnf.Dnf; |
12 | import tools.refinery.store.query.rewriter.DnfRewriter; | 12 | import tools.refinery.logic.rewriter.DnfRewriter; |
13 | import tools.refinery.interpreter.api.InterpreterEngineOptions; | 13 | import tools.refinery.interpreter.api.InterpreterEngineOptions; |
14 | import tools.refinery.interpreter.matchers.backend.IQueryBackendFactory; | 14 | import tools.refinery.interpreter.matchers.backend.IQueryBackendFactory; |
15 | import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; | 15 | import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterAdapterImpl.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterAdapterImpl.java index ee527fd3..c5423223 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterAdapterImpl.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterAdapterImpl.java | |||
@@ -7,10 +7,10 @@ package tools.refinery.store.query.interpreter.internal; | |||
7 | 7 | ||
8 | import tools.refinery.store.model.Model; | 8 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.model.ModelListener; | 9 | import tools.refinery.store.model.ModelListener; |
10 | import tools.refinery.store.query.dnf.AnyQuery; | 10 | import tools.refinery.logic.dnf.AnyQuery; |
11 | import tools.refinery.store.query.dnf.FunctionalQuery; | 11 | import tools.refinery.logic.dnf.FunctionalQuery; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.dnf.RelationalQuery; | 13 | import tools.refinery.logic.dnf.RelationalQuery; |
14 | import tools.refinery.store.query.resultset.AnyResultSet; | 14 | import tools.refinery.store.query.resultset.AnyResultSet; |
15 | import tools.refinery.store.query.resultset.EmptyResultSet; | 15 | import tools.refinery.store.query.resultset.EmptyResultSet; |
16 | import tools.refinery.store.query.resultset.ResultSet; | 16 | import tools.refinery.store.query.resultset.ResultSet; |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterBuilderImpl.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterBuilderImpl.java index 4e839b43..1791e626 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterBuilderImpl.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterBuilderImpl.java | |||
@@ -9,12 +9,12 @@ import org.eclipse.emf.ecore.EPackage; | |||
9 | import tools.refinery.interpreter.rete.recipes.RecipesPackage; | 9 | import tools.refinery.interpreter.rete.recipes.RecipesPackage; |
10 | import tools.refinery.store.adapter.AbstractModelAdapterBuilder; | 10 | import tools.refinery.store.adapter.AbstractModelAdapterBuilder; |
11 | import tools.refinery.store.model.ModelStore; | 11 | import tools.refinery.store.model.ModelStore; |
12 | import tools.refinery.store.query.dnf.AnyQuery; | 12 | import tools.refinery.logic.dnf.AnyQuery; |
13 | import tools.refinery.store.query.dnf.Dnf; | 13 | import tools.refinery.logic.dnf.Dnf; |
14 | import tools.refinery.store.query.rewriter.CompositeRewriter; | 14 | import tools.refinery.logic.rewriter.CompositeRewriter; |
15 | import tools.refinery.store.query.rewriter.DnfRewriter; | 15 | import tools.refinery.logic.rewriter.DnfRewriter; |
16 | import tools.refinery.store.query.rewriter.DuplicateDnfRemover; | 16 | import tools.refinery.logic.rewriter.DuplicateDnfRemover; |
17 | import tools.refinery.store.query.rewriter.InputParameterResolver; | 17 | import tools.refinery.logic.rewriter.InputParameterResolver; |
18 | import tools.refinery.store.query.interpreter.QueryInterpreterBuilder; | 18 | import tools.refinery.store.query.interpreter.QueryInterpreterBuilder; |
19 | import tools.refinery.store.query.interpreter.internal.localsearch.FlatCostFunction; | 19 | import tools.refinery.store.query.interpreter.internal.localsearch.FlatCostFunction; |
20 | import tools.refinery.store.query.interpreter.internal.matcher.RawPatternMatcher; | 20 | import tools.refinery.store.query.interpreter.internal.matcher.RawPatternMatcher; |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterStoreAdapterImpl.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterStoreAdapterImpl.java index 10e7a402..d1ec3e3e 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterStoreAdapterImpl.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/QueryInterpreterStoreAdapterImpl.java | |||
@@ -11,8 +11,8 @@ import tools.refinery.interpreter.api.InterpreterEngineOptions; | |||
11 | import tools.refinery.interpreter.matchers.context.IInputKey; | 11 | import tools.refinery.interpreter.matchers.context.IInputKey; |
12 | import tools.refinery.store.model.Model; | 12 | import tools.refinery.store.model.Model; |
13 | import tools.refinery.store.model.ModelStore; | 13 | import tools.refinery.store.model.ModelStore; |
14 | import tools.refinery.store.query.dnf.AnyQuery; | 14 | import tools.refinery.logic.dnf.AnyQuery; |
15 | import tools.refinery.store.query.dnf.Query; | 15 | import tools.refinery.logic.dnf.Query; |
16 | import tools.refinery.store.query.interpreter.QueryInterpreterStoreAdapter; | 16 | import tools.refinery.store.query.interpreter.QueryInterpreterStoreAdapter; |
17 | import tools.refinery.store.query.interpreter.internal.matcher.RawPatternMatcher; | 17 | import tools.refinery.store.query.interpreter.internal.matcher.RawPatternMatcher; |
18 | import tools.refinery.store.query.view.AnySymbolView; | 18 | import tools.refinery.store.query.view.AnySymbolView; |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/context/RelationalQueryMetaContext.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/context/RelationalQueryMetaContext.java index 2b1ff2b4..117e81ba 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/context/RelationalQueryMetaContext.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/context/RelationalQueryMetaContext.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -48,7 +48,7 @@ public class RelationalQueryMetaContext extends AbstractQueryMetaContext { | |||
48 | } | 48 | } |
49 | var symbolView = checkKey(implyingKey); | 49 | var symbolView = checkKey(implyingKey); |
50 | var relationViewImplications = symbolView.getImpliedRelationViews(); | 50 | var relationViewImplications = symbolView.getImpliedRelationViews(); |
51 | var inputKeyImplications = new HashSet<InputKeyImplication>(relationViewImplications.size()); | 51 | var inputKeyImplications = HashSet.<InputKeyImplication>newHashSet(relationViewImplications.size()); |
52 | for (var relationViewImplication : relationViewImplications) { | 52 | for (var relationViewImplication : relationViewImplications) { |
53 | if (!symbolView.equals(relationViewImplication.implyingView())) { | 53 | if (!symbolView.equals(relationViewImplication.implyingView())) { |
54 | throw new IllegalArgumentException("Relation view %s returned unrelated implication %s".formatted( | 54 | throw new IllegalArgumentException("Relation view %s returned unrelated implication %s".formatted( |
@@ -82,7 +82,7 @@ public class RelationalQueryMetaContext extends AbstractQueryMetaContext { | |||
82 | } | 82 | } |
83 | var relationView = checkKey(key); | 83 | var relationView = checkKey(key); |
84 | var functionalDependencies = relationView.getFunctionalDependencies(); | 84 | var functionalDependencies = relationView.getFunctionalDependencies(); |
85 | var flattened = new HashMap<Set<Integer>, Set<Integer>>(functionalDependencies.size()); | 85 | var flattened = HashMap.<Set<Integer>, Set<Integer>>newHashMap(functionalDependencies.size()); |
86 | for (var functionalDependency : functionalDependencies) { | 86 | for (var functionalDependency : functionalDependencies) { |
87 | var forEach = functionalDependency.forEach(); | 87 | var forEach = functionalDependency.forEach(); |
88 | checkValidIndices(relationView, forEach); | 88 | checkValidIndices(relationView, forEach); |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/AbstractInterpretedMatcher.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/AbstractInterpretedMatcher.java index 8cec0bf6..8e6a74ed 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/AbstractInterpretedMatcher.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/AbstractInterpretedMatcher.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.query.interpreter.internal.matcher; | |||
7 | 7 | ||
8 | import tools.refinery.interpreter.matchers.backend.IQueryResultProvider; | 8 | import tools.refinery.interpreter.matchers.backend.IQueryResultProvider; |
9 | import tools.refinery.interpreter.matchers.backend.IUpdateable; | 9 | import tools.refinery.interpreter.matchers.backend.IUpdateable; |
10 | import tools.refinery.store.query.dnf.Query; | 10 | import tools.refinery.logic.dnf.Query; |
11 | import tools.refinery.store.query.resultset.AbstractResultSet; | 11 | import tools.refinery.store.query.resultset.AbstractResultSet; |
12 | import tools.refinery.store.query.interpreter.internal.QueryInterpreterAdapterImpl; | 12 | import tools.refinery.store.query.interpreter.internal.QueryInterpreterAdapterImpl; |
13 | 13 | ||
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedFunctionalMatcher.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedFunctionalMatcher.java index 249664a4..bf707487 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedFunctionalMatcher.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedFunctionalMatcher.java | |||
@@ -11,7 +11,7 @@ import tools.refinery.interpreter.matchers.tuple.Tuples; | |||
11 | import tools.refinery.interpreter.rete.index.IterableIndexer; | 11 | import tools.refinery.interpreter.rete.index.IterableIndexer; |
12 | import tools.refinery.interpreter.rete.matcher.RetePatternMatcher; | 12 | import tools.refinery.interpreter.rete.matcher.RetePatternMatcher; |
13 | import tools.refinery.store.map.Cursor; | 13 | import tools.refinery.store.map.Cursor; |
14 | import tools.refinery.store.query.dnf.FunctionalQuery; | 14 | import tools.refinery.logic.dnf.FunctionalQuery; |
15 | import tools.refinery.store.query.interpreter.internal.QueryInterpreterAdapterImpl; | 15 | import tools.refinery.store.query.interpreter.internal.QueryInterpreterAdapterImpl; |
16 | import tools.refinery.store.tuple.Tuple; | 16 | import tools.refinery.store.tuple.Tuple; |
17 | 17 | ||
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedRelationalMatcher.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedRelationalMatcher.java index 9278b46d..9d9c3042 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedRelationalMatcher.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/matcher/InterpretedRelationalMatcher.java | |||
@@ -12,7 +12,7 @@ import tools.refinery.interpreter.rete.index.Indexer; | |||
12 | import tools.refinery.interpreter.rete.matcher.RetePatternMatcher; | 12 | import tools.refinery.interpreter.rete.matcher.RetePatternMatcher; |
13 | import tools.refinery.store.map.Cursor; | 13 | import tools.refinery.store.map.Cursor; |
14 | import tools.refinery.store.map.Cursors; | 14 | import tools.refinery.store.map.Cursors; |
15 | import tools.refinery.store.query.dnf.RelationalQuery; | 15 | import tools.refinery.logic.dnf.RelationalQuery; |
16 | import tools.refinery.store.query.interpreter.internal.QueryInterpreterAdapterImpl; | 16 | import tools.refinery.store.query.interpreter.internal.QueryInterpreterAdapterImpl; |
17 | import tools.refinery.store.tuple.Tuple; | 17 | import tools.refinery.store.tuple.Tuple; |
18 | 18 | ||
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/CheckEvaluator.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/CheckEvaluator.java index 4a71e879..8cfc2226 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/CheckEvaluator.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/CheckEvaluator.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.interpreter.internal.pquery; | 6 | package tools.refinery.store.query.interpreter.internal.pquery; |
7 | 7 | ||
8 | import tools.refinery.interpreter.matchers.psystem.IValueProvider; | 8 | import tools.refinery.interpreter.matchers.psystem.IValueProvider; |
9 | import tools.refinery.store.query.term.Term; | 9 | import tools.refinery.logic.term.Term; |
10 | 10 | ||
11 | class CheckEvaluator extends TermEvaluator<Boolean> { | 11 | class CheckEvaluator extends TermEvaluator<Boolean> { |
12 | public CheckEvaluator(Term<Boolean> term) { | 12 | public CheckEvaluator(Term<Boolean> term) { |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/Dnf2PQuery.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/Dnf2PQuery.java index 24205cf4..0ffaa6b2 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/Dnf2PQuery.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/Dnf2PQuery.java | |||
@@ -1,25 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.interpreter.internal.pquery; | 6 | package tools.refinery.store.query.interpreter.internal.pquery; |
7 | 7 | ||
8 | import tools.refinery.interpreter.matchers.psystem.annotations.ParameterReference; | ||
9 | import tools.refinery.interpreter.matchers.psystem.basicdeferred.*; | ||
10 | import tools.refinery.interpreter.matchers.psystem.basicenumerables.*; | ||
11 | import tools.refinery.interpreter.matchers.psystem.basicenumerables.Connectivity; | ||
12 | import tools.refinery.store.query.Constraint; | ||
13 | import tools.refinery.store.query.dnf.Dnf; | ||
14 | import tools.refinery.store.query.dnf.DnfClause; | ||
15 | import tools.refinery.store.query.dnf.SymbolicParameter; | ||
16 | import tools.refinery.store.query.literal.*; | ||
17 | import tools.refinery.store.query.term.ConstantTerm; | ||
18 | import tools.refinery.store.query.term.StatefulAggregator; | ||
19 | import tools.refinery.store.query.term.StatelessAggregator; | ||
20 | import tools.refinery.store.query.term.Variable; | ||
21 | import tools.refinery.store.query.view.AnySymbolView; | ||
22 | import tools.refinery.store.util.CycleDetectingMapper; | ||
23 | import tools.refinery.interpreter.matchers.backend.IQueryBackendFactory; | 8 | import tools.refinery.interpreter.matchers.backend.IQueryBackendFactory; |
24 | import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; | 9 | import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; |
25 | import tools.refinery.interpreter.matchers.context.IInputKey; | 10 | import tools.refinery.interpreter.matchers.context.IInputKey; |
@@ -28,11 +13,27 @@ import tools.refinery.interpreter.matchers.psystem.PVariable; | |||
28 | import tools.refinery.interpreter.matchers.psystem.aggregations.BoundAggregator; | 13 | import tools.refinery.interpreter.matchers.psystem.aggregations.BoundAggregator; |
29 | import tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator; | 14 | import tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator; |
30 | import tools.refinery.interpreter.matchers.psystem.annotations.PAnnotation; | 15 | import tools.refinery.interpreter.matchers.psystem.annotations.PAnnotation; |
16 | import tools.refinery.interpreter.matchers.psystem.annotations.ParameterReference; | ||
17 | import tools.refinery.interpreter.matchers.psystem.basicdeferred.*; | ||
18 | import tools.refinery.interpreter.matchers.psystem.basicenumerables.Connectivity; | ||
19 | import tools.refinery.interpreter.matchers.psystem.basicenumerables.*; | ||
31 | import tools.refinery.interpreter.matchers.psystem.queries.PParameter; | 20 | import tools.refinery.interpreter.matchers.psystem.queries.PParameter; |
32 | import tools.refinery.interpreter.matchers.psystem.queries.PParameterDirection; | 21 | import tools.refinery.interpreter.matchers.psystem.queries.PParameterDirection; |
33 | import tools.refinery.interpreter.matchers.psystem.queries.PQuery; | 22 | import tools.refinery.interpreter.matchers.psystem.queries.PQuery; |
34 | import tools.refinery.interpreter.matchers.tuple.Tuple; | 23 | import tools.refinery.interpreter.matchers.tuple.Tuple; |
35 | import tools.refinery.interpreter.matchers.tuple.Tuples; | 24 | import tools.refinery.interpreter.matchers.tuple.Tuples; |
25 | import tools.refinery.logic.Constraint; | ||
26 | import tools.refinery.logic.dnf.Dnf; | ||
27 | import tools.refinery.logic.dnf.DnfClause; | ||
28 | import tools.refinery.logic.dnf.FunctionalDependency; | ||
29 | import tools.refinery.logic.dnf.SymbolicParameter; | ||
30 | import tools.refinery.logic.literal.*; | ||
31 | import tools.refinery.logic.term.ConstantTerm; | ||
32 | import tools.refinery.logic.term.StatefulAggregator; | ||
33 | import tools.refinery.logic.term.StatelessAggregator; | ||
34 | import tools.refinery.logic.term.Variable; | ||
35 | import tools.refinery.logic.util.CycleDetectingMapper; | ||
36 | import tools.refinery.store.query.view.AnySymbolView; | ||
36 | 37 | ||
37 | import java.util.ArrayList; | 38 | import java.util.ArrayList; |
38 | import java.util.HashMap; | 39 | import java.util.HashMap; |
@@ -79,15 +80,7 @@ public class Dnf2PQuery { | |||
79 | pQuery.setParameters(parameterList); | 80 | pQuery.setParameters(parameterList); |
80 | 81 | ||
81 | for (var functionalDependency : dnfQuery.getFunctionalDependencies()) { | 82 | for (var functionalDependency : dnfQuery.getFunctionalDependencies()) { |
82 | var functionalDependencyAnnotation = new PAnnotation("FunctionalDependency"); | 83 | var functionalDependencyAnnotation = getFunctionalDependencyAnnotation(functionalDependency); |
83 | for (var forEachVariable : functionalDependency.forEach()) { | ||
84 | var reference = new ParameterReference(forEachVariable.getUniqueName()); | ||
85 | functionalDependencyAnnotation.addAttribute("forEach", reference); | ||
86 | } | ||
87 | for (var uniqueVariable : functionalDependency.unique()) { | ||
88 | var reference = new ParameterReference(uniqueVariable.getUniqueName()); | ||
89 | functionalDependencyAnnotation.addAttribute("unique", reference); | ||
90 | } | ||
91 | pQuery.addAnnotation(functionalDependencyAnnotation); | 84 | pQuery.addAnnotation(functionalDependencyAnnotation); |
92 | } | 85 | } |
93 | 86 | ||
@@ -108,26 +101,33 @@ public class Dnf2PQuery { | |||
108 | return pQuery; | 101 | return pQuery; |
109 | } | 102 | } |
110 | 103 | ||
111 | private void translateLiteral(Literal literal, PBody body) { | 104 | private static PAnnotation getFunctionalDependencyAnnotation(FunctionalDependency<Variable> functionalDependency) { |
112 | if (literal instanceof EquivalenceLiteral equivalenceLiteral) { | 105 | var functionalDependencyAnnotation = new PAnnotation("FunctionalDependency"); |
113 | translateEquivalenceLiteral(equivalenceLiteral, body); | 106 | for (var forEachVariable : functionalDependency.forEach()) { |
114 | } else if (literal instanceof CallLiteral callLiteral) { | 107 | var reference = new ParameterReference(forEachVariable.getUniqueName()); |
115 | translateCallLiteral(callLiteral, body); | 108 | functionalDependencyAnnotation.addAttribute("forEach", reference); |
116 | } else if (literal instanceof ConstantLiteral constantLiteral) { | ||
117 | translateConstantLiteral(constantLiteral, body); | ||
118 | } else if (literal instanceof AssignLiteral<?> assignLiteral) { | ||
119 | translateAssignLiteral(assignLiteral, body); | ||
120 | } else if (literal instanceof CheckLiteral checkLiteral) { | ||
121 | translateCheckLiteral(checkLiteral, body); | ||
122 | } else if (literal instanceof CountLiteral countLiteral) { | ||
123 | translateCountLiteral(countLiteral, body); | ||
124 | } else if (literal instanceof AggregationLiteral<?, ?> aggregationLiteral) { | ||
125 | translateAggregationLiteral(aggregationLiteral, body); | ||
126 | } else if (literal instanceof RepresentativeElectionLiteral representativeElectionLiteral) { | ||
127 | translateRepresentativeElectionLiteral(representativeElectionLiteral, body); | ||
128 | } else { | ||
129 | throw new IllegalArgumentException("Unknown literal: " + literal.toString()); | ||
130 | } | 109 | } |
110 | for (var uniqueVariable : functionalDependency.unique()) { | ||
111 | var reference = new ParameterReference(uniqueVariable.getUniqueName()); | ||
112 | functionalDependencyAnnotation.addAttribute("unique", reference); | ||
113 | } | ||
114 | return functionalDependencyAnnotation; | ||
115 | } | ||
116 | |||
117 | private void translateLiteral(Literal literal, PBody body) { | ||
118 | switch (literal) { | ||
119 | case EquivalenceLiteral equivalenceLiteral -> translateEquivalenceLiteral(equivalenceLiteral, body); | ||
120 | case CallLiteral callLiteral -> translateCallLiteral(callLiteral, body); | ||
121 | case ConstantLiteral constantLiteral -> translateConstantLiteral(constantLiteral, body); | ||
122 | case AssignLiteral<?> assignLiteral -> translateAssignLiteral(assignLiteral, body); | ||
123 | case CheckLiteral checkLiteral -> translateCheckLiteral(checkLiteral, body); | ||
124 | case CountLiteral countLiteral -> translateCountLiteral(countLiteral, body); | ||
125 | case AggregationLiteral<?, ?> aggregationLiteral -> translateAggregationLiteral(aggregationLiteral, body); | ||
126 | case LeftJoinLiteral<?> leftJoinLiteral -> translateLeftJoinLiteral(leftJoinLiteral, body); | ||
127 | case RepresentativeElectionLiteral representativeElectionLiteral -> | ||
128 | translateRepresentativeElectionLiteral(representativeElectionLiteral, body); | ||
129 | case null, default -> throw new IllegalArgumentException("Unknown literal: " + literal); | ||
130 | } | ||
131 | } | 131 | } |
132 | 132 | ||
133 | private void translateEquivalenceLiteral(EquivalenceLiteral equivalenceLiteral, PBody body) { | 133 | private void translateEquivalenceLiteral(EquivalenceLiteral equivalenceLiteral, PBody body) { |
@@ -244,6 +244,21 @@ public class Dnf2PQuery { | |||
244 | aggregatedColumn); | 244 | aggregatedColumn); |
245 | } | 245 | } |
246 | 246 | ||
247 | private <T> void translateLeftJoinLiteral(LeftJoinLiteral<T> leftJoinLiteral, PBody body) { | ||
248 | var wrappedCall = wrapperFactory.maybeWrapConstraint(leftJoinLiteral); | ||
249 | var substitution = translateSubstitution(wrappedCall.remappedArguments(), body); | ||
250 | var placeholderVariable = body.getOrCreateVariableByName( | ||
251 | leftJoinLiteral.getPlaceholderVariable().getUniqueName()); | ||
252 | var optionalColumn = substitution.invertIndex().get(placeholderVariable); | ||
253 | if (optionalColumn == null) { | ||
254 | throw new IllegalStateException("Placeholder variable %s not found in substitution %s" | ||
255 | .formatted(placeholderVariable, substitution)); | ||
256 | } | ||
257 | var resultVariable = body.getOrCreateVariableByName(leftJoinLiteral.getResultVariable().getUniqueName()); | ||
258 | new LeftJoinConstraint(body, substitution, wrappedCall.pattern(), resultVariable, optionalColumn, | ||
259 | leftJoinLiteral.getDefaultValue()); | ||
260 | } | ||
261 | |||
247 | private void translateRepresentativeElectionLiteral(RepresentativeElectionLiteral literal, PBody body) { | 262 | private void translateRepresentativeElectionLiteral(RepresentativeElectionLiteral literal, PBody body) { |
248 | var substitution = translateSubstitution(literal.getArguments(), body); | 263 | var substitution = translateSubstitution(literal.getArguments(), body); |
249 | var pattern = wrapConstraintWithIdentityArguments(literal.getTarget()); | 264 | var pattern = wrapConstraintWithIdentityArguments(literal.getTarget()); |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/QueryWrapperFactory.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/QueryWrapperFactory.java index a710dab3..f855f1f0 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/QueryWrapperFactory.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/QueryWrapperFactory.java | |||
@@ -16,15 +16,15 @@ import tools.refinery.interpreter.matchers.psystem.queries.PQuery; | |||
16 | import tools.refinery.interpreter.matchers.psystem.queries.PVisibility; | 16 | import tools.refinery.interpreter.matchers.psystem.queries.PVisibility; |
17 | import tools.refinery.interpreter.matchers.tuple.Tuple; | 17 | import tools.refinery.interpreter.matchers.tuple.Tuple; |
18 | import tools.refinery.interpreter.matchers.tuple.Tuples; | 18 | import tools.refinery.interpreter.matchers.tuple.Tuples; |
19 | import tools.refinery.store.query.Constraint; | 19 | import tools.refinery.logic.Constraint; |
20 | import tools.refinery.store.query.dnf.Dnf; | 20 | import tools.refinery.logic.dnf.Dnf; |
21 | import tools.refinery.store.query.dnf.DnfUtils; | 21 | import tools.refinery.logic.dnf.DnfUtils; |
22 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 22 | import tools.refinery.logic.literal.AbstractCallLiteral; |
23 | import tools.refinery.store.query.term.ParameterDirection; | 23 | import tools.refinery.logic.term.ParameterDirection; |
24 | import tools.refinery.store.query.term.Variable; | 24 | import tools.refinery.logic.term.Variable; |
25 | import tools.refinery.store.query.view.AnySymbolView; | 25 | import tools.refinery.store.query.view.AnySymbolView; |
26 | import tools.refinery.store.query.view.SymbolView; | 26 | import tools.refinery.store.query.view.SymbolView; |
27 | import tools.refinery.store.util.CycleDetectingMapper; | 27 | import tools.refinery.logic.util.CycleDetectingMapper; |
28 | 28 | ||
29 | import java.util.*; | 29 | import java.util.*; |
30 | import java.util.function.ToIntFunction; | 30 | import java.util.function.ToIntFunction; |
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatefulMultisetAggregator.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatefulMultisetAggregator.java index 7552117b..936b3513 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatefulMultisetAggregator.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatefulMultisetAggregator.java | |||
@@ -6,8 +6,8 @@ | |||
6 | package tools.refinery.store.query.interpreter.internal.pquery; | 6 | package tools.refinery.store.query.interpreter.internal.pquery; |
7 | 7 | ||
8 | import tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator; | 8 | import tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator; |
9 | import tools.refinery.store.query.term.StatefulAggregate; | 9 | import tools.refinery.logic.term.StatefulAggregate; |
10 | import tools.refinery.store.query.term.StatefulAggregator; | 10 | import tools.refinery.logic.term.StatefulAggregator; |
11 | 11 | ||
12 | import java.util.stream.Stream; | 12 | import java.util.stream.Stream; |
13 | 13 | ||
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatelessMultisetAggregator.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatelessMultisetAggregator.java index 2da7ba87..01432a5b 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatelessMultisetAggregator.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/StatelessMultisetAggregator.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.interpreter.internal.pquery; | 6 | package tools.refinery.store.query.interpreter.internal.pquery; |
7 | 7 | ||
8 | import tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator; | 8 | import tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator; |
9 | import tools.refinery.store.query.term.StatelessAggregator; | 9 | import tools.refinery.logic.term.StatelessAggregator; |
10 | 10 | ||
11 | import java.util.stream.Stream; | 11 | import java.util.stream.Stream; |
12 | 12 | ||
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/TermEvaluator.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/TermEvaluator.java index ed991091..8da9ece7 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/TermEvaluator.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/TermEvaluator.java | |||
@@ -5,8 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.interpreter.internal.pquery; | 6 | package tools.refinery.store.query.interpreter.internal.pquery; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Term; | 8 | import tools.refinery.logic.term.Term; |
9 | import tools.refinery.store.query.term.Variable; | 9 | import tools.refinery.logic.term.Variable; |
10 | import tools.refinery.interpreter.matchers.psystem.IExpressionEvaluator; | 10 | import tools.refinery.interpreter.matchers.psystem.IExpressionEvaluator; |
11 | import tools.refinery.interpreter.matchers.psystem.IValueProvider; | 11 | import tools.refinery.interpreter.matchers.psystem.IValueProvider; |
12 | 12 | ||
diff --git a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/ValueProviderBasedValuation.java b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/ValueProviderBasedValuation.java index 4124c9bb..a69c8bd2 100644 --- a/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/ValueProviderBasedValuation.java +++ b/subprojects/store-query-interpreter/src/main/java/tools/refinery/store/query/interpreter/internal/pquery/ValueProviderBasedValuation.java | |||
@@ -6,8 +6,8 @@ | |||
6 | package tools.refinery.store.query.interpreter.internal.pquery; | 6 | package tools.refinery.store.query.interpreter.internal.pquery; |
7 | 7 | ||
8 | import tools.refinery.interpreter.matchers.psystem.IValueProvider; | 8 | import tools.refinery.interpreter.matchers.psystem.IValueProvider; |
9 | import tools.refinery.store.query.term.DataVariable; | 9 | import tools.refinery.logic.term.DataVariable; |
10 | import tools.refinery.store.query.valuation.Valuation; | 10 | import tools.refinery.logic.valuation.Valuation; |
11 | 11 | ||
12 | public record ValueProviderBasedValuation(IValueProvider valueProvider) implements Valuation { | 12 | public record ValueProviderBasedValuation(IValueProvider valueProvider) implements Valuation { |
13 | @Override | 13 | @Override |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/AggregatorBatchingTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/AggregatorBatchingTest.java index d8e06d82..209d7ac0 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/AggregatorBatchingTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/AggregatorBatchingTest.java | |||
@@ -9,10 +9,10 @@ import org.junit.jupiter.api.Test; | |||
9 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
10 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
11 | import tools.refinery.store.query.ModelQueryAdapter; | 11 | import tools.refinery.store.query.ModelQueryAdapter; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.term.StatefulAggregate; | 13 | import tools.refinery.logic.term.StatefulAggregate; |
14 | import tools.refinery.store.query.term.StatefulAggregator; | 14 | import tools.refinery.logic.term.StatefulAggregator; |
15 | import tools.refinery.store.query.term.Variable; | 15 | import tools.refinery.logic.term.Variable; |
16 | import tools.refinery.store.query.view.AnySymbolView; | 16 | import tools.refinery.store.query.view.AnySymbolView; |
17 | import tools.refinery.store.query.view.FunctionView; | 17 | import tools.refinery.store.query.view.FunctionView; |
18 | import tools.refinery.store.query.view.KeyOnlyView; | 18 | import tools.refinery.store.query.view.KeyOnlyView; |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/DiagonalQueryTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/DiagonalQueryTest.java index 76de8679..eba7173b 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/DiagonalQueryTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/DiagonalQueryTest.java | |||
@@ -8,8 +8,8 @@ package tools.refinery.store.query.interpreter; | |||
8 | import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; | 8 | import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; |
9 | import tools.refinery.store.model.ModelStore; | 9 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Dnf; | 11 | import tools.refinery.logic.dnf.Dnf; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.interpreter.tests.QueryEngineTest; | 13 | import tools.refinery.store.query.interpreter.tests.QueryEngineTest; |
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.store.query.view.AnySymbolView; |
15 | import tools.refinery.store.query.view.FunctionView; | 15 | import tools.refinery.store.query.view.FunctionView; |
@@ -21,8 +21,8 @@ import java.util.List; | |||
21 | import java.util.Map; | 21 | import java.util.Map; |
22 | import java.util.Optional; | 22 | import java.util.Optional; |
23 | 23 | ||
24 | import static tools.refinery.store.query.literal.Literals.not; | 24 | import static tools.refinery.logic.literal.Literals.not; |
25 | import static tools.refinery.store.query.term.int_.IntTerms.INT_SUM; | 25 | import static tools.refinery.logic.term.int_.IntTerms.INT_SUM; |
26 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertNullableResults; | 26 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertNullableResults; |
27 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; | 27 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; |
28 | 28 | ||
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/FunctionalQueryTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/FunctionalQueryTest.java index b6c96676..c845e5ff 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/FunctionalQueryTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/FunctionalQueryTest.java | |||
@@ -9,15 +9,15 @@ import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; | |||
9 | import tools.refinery.store.map.Cursor; | 9 | import tools.refinery.store.map.Cursor; |
10 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
11 | import tools.refinery.store.query.ModelQueryAdapter; | 11 | import tools.refinery.store.query.ModelQueryAdapter; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | import tools.refinery.store.query.interpreter.tests.QueryEngineTest; | 14 | import tools.refinery.store.query.interpreter.tests.QueryEngineTest; |
15 | import tools.refinery.store.query.view.AnySymbolView; | 15 | import tools.refinery.store.query.view.AnySymbolView; |
16 | import tools.refinery.store.query.view.FilteredView; | 16 | import tools.refinery.store.query.view.FilteredView; |
17 | import tools.refinery.store.query.view.FunctionView; | 17 | import tools.refinery.store.query.view.FunctionView; |
18 | import tools.refinery.store.query.view.KeyOnlyView; | 18 | import tools.refinery.store.query.view.KeyOnlyView; |
19 | import tools.refinery.store.representation.Symbol; | 19 | import tools.refinery.store.representation.Symbol; |
20 | import tools.refinery.store.representation.TruthValue; | 20 | import tools.refinery.logic.term.truthvalue.TruthValue; |
21 | import tools.refinery.store.tuple.Tuple; | 21 | import tools.refinery.store.tuple.Tuple; |
22 | 22 | ||
23 | import java.util.List; | 23 | import java.util.List; |
@@ -29,8 +29,8 @@ import static org.hamcrest.Matchers.is; | |||
29 | import static org.hamcrest.Matchers.nullValue; | 29 | import static org.hamcrest.Matchers.nullValue; |
30 | import static org.junit.jupiter.api.Assertions.assertAll; | 30 | import static org.junit.jupiter.api.Assertions.assertAll; |
31 | import static org.junit.jupiter.api.Assertions.assertThrows; | 31 | import static org.junit.jupiter.api.Assertions.assertThrows; |
32 | import static tools.refinery.store.query.literal.Literals.check; | 32 | import static tools.refinery.logic.literal.Literals.check; |
33 | import static tools.refinery.store.query.term.int_.IntTerms.*; | 33 | import static tools.refinery.logic.term.int_.IntTerms.*; |
34 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertNullableResults; | 34 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertNullableResults; |
35 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; | 35 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; |
36 | 36 | ||
@@ -554,7 +554,6 @@ class FunctionalQueryTest { | |||
554 | friendInterpretation.put(Tuple.of(1, 2), TruthValue.TRUE); | 554 | friendInterpretation.put(Tuple.of(1, 2), TruthValue.TRUE); |
555 | 555 | ||
556 | queryEngine.flushChanges(); | 556 | queryEngine.flushChanges(); |
557 | queryEngine.flushChanges(); | ||
558 | assertNullableResults(Map.of( | 557 | assertNullableResults(Map.of( |
559 | Tuple.of(0), Optional.of(25), | 558 | Tuple.of(0), Optional.of(25), |
560 | Tuple.of(1), Optional.of(32), | 559 | Tuple.of(1), Optional.of(32), |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/LeftJoinTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/LeftJoinTest.java new file mode 100644 index 00000000..6633b3b1 --- /dev/null +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/LeftJoinTest.java | |||
@@ -0,0 +1,129 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.query.interpreter; | ||
7 | |||
8 | import org.junit.jupiter.api.Test; | ||
9 | import tools.refinery.store.model.ModelStore; | ||
10 | import tools.refinery.store.query.ModelQueryAdapter; | ||
11 | import tools.refinery.logic.dnf.Query; | ||
12 | import tools.refinery.logic.term.int_.IntTerms; | ||
13 | import tools.refinery.store.query.view.AnySymbolView; | ||
14 | import tools.refinery.store.query.view.FunctionView; | ||
15 | import tools.refinery.store.query.view.KeyOnlyView; | ||
16 | import tools.refinery.store.representation.Symbol; | ||
17 | import tools.refinery.store.tuple.Tuple; | ||
18 | |||
19 | import java.util.List; | ||
20 | import java.util.Map; | ||
21 | import java.util.Optional; | ||
22 | |||
23 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertNullableResults; | ||
24 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; | ||
25 | |||
26 | class LeftJoinTest { | ||
27 | private static final Symbol<Boolean> person = Symbol.of("Person", 1); | ||
28 | private static final Symbol<Integer> age = Symbol.of("age", 1, Integer.class); | ||
29 | private static final AnySymbolView personView = new KeyOnlyView<>(person); | ||
30 | private static final FunctionView<Integer> ageView = new FunctionView<>(age); | ||
31 | |||
32 | @Test | ||
33 | void unarySymbolTest() { | ||
34 | var query = Query.of("Query", Integer.class, (builder, p1, output) -> builder | ||
35 | .clause( | ||
36 | personView.call(p1), | ||
37 | output.assign(ageView.leftJoin(18, p1)) | ||
38 | )); | ||
39 | |||
40 | var store = ModelStore.builder() | ||
41 | .symbols(person, age) | ||
42 | .with(QueryInterpreterAdapter.builder() | ||
43 | .queries(query)) | ||
44 | .build(); | ||
45 | |||
46 | var model = store.createEmptyModel(); | ||
47 | var personInterpretation = model.getInterpretation(person); | ||
48 | var ageInterpretation = model.getInterpretation(age); | ||
49 | var queryEngine = model.getAdapter(ModelQueryAdapter.class); | ||
50 | var queryResultSet = queryEngine.getResultSet(query); | ||
51 | |||
52 | personInterpretation.put(Tuple.of(0), true); | ||
53 | personInterpretation.put(Tuple.of(1), true); | ||
54 | personInterpretation.put(Tuple.of(2), true); | ||
55 | |||
56 | ageInterpretation.put(Tuple.of(2), 24); | ||
57 | |||
58 | queryEngine.flushChanges(); | ||
59 | assertNullableResults(Map.of( | ||
60 | Tuple.of(0), Optional.of(18), | ||
61 | Tuple.of(1), Optional.of(18), | ||
62 | Tuple.of(2), Optional.of(24), | ||
63 | Tuple.of(3), Optional.empty() | ||
64 | ), queryResultSet); | ||
65 | |||
66 | personInterpretation.put(Tuple.of(0), false); | ||
67 | |||
68 | ageInterpretation.put(Tuple.of(1), 20); | ||
69 | ageInterpretation.put(Tuple.of(2), null); | ||
70 | |||
71 | queryEngine.flushChanges(); | ||
72 | assertNullableResults(Map.of( | ||
73 | Tuple.of(0), Optional.empty(), | ||
74 | Tuple.of(1), Optional.of(20), | ||
75 | Tuple.of(2), Optional.of(18), | ||
76 | Tuple.of(3), Optional.empty() | ||
77 | ), queryResultSet); | ||
78 | } | ||
79 | |||
80 | @Test | ||
81 | void unarySymbolWithAssignmentTest() { | ||
82 | // Tests an edge case where the outer joined variable is already bound in the query plan. | ||
83 | var query = Query.of("Query", (builder, p1) -> builder | ||
84 | .clause(Integer.class, v1 -> List.of( | ||
85 | personView.call(p1), | ||
86 | v1.assign(IntTerms.constant(18)), | ||
87 | v1.assign(ageView.leftJoin(18, p1)) | ||
88 | ))); | ||
89 | |||
90 | var store = ModelStore.builder() | ||
91 | .symbols(person, age) | ||
92 | .with(QueryInterpreterAdapter.builder() | ||
93 | .queries(query)) | ||
94 | .build(); | ||
95 | |||
96 | var model = store.createEmptyModel(); | ||
97 | var personInterpretation = model.getInterpretation(person); | ||
98 | var ageInterpretation = model.getInterpretation(age); | ||
99 | var queryEngine = model.getAdapter(ModelQueryAdapter.class); | ||
100 | var queryResultSet = queryEngine.getResultSet(query); | ||
101 | |||
102 | personInterpretation.put(Tuple.of(0), true); | ||
103 | personInterpretation.put(Tuple.of(1), true); | ||
104 | personInterpretation.put(Tuple.of(2), true); | ||
105 | |||
106 | ageInterpretation.put(Tuple.of(2), 24); | ||
107 | |||
108 | queryEngine.flushChanges(); | ||
109 | assertResults(Map.of( | ||
110 | Tuple.of(0), true, | ||
111 | Tuple.of(1), true, | ||
112 | Tuple.of(2), false, | ||
113 | Tuple.of(3), false | ||
114 | ), queryResultSet); | ||
115 | |||
116 | personInterpretation.put(Tuple.of(0), false); | ||
117 | |||
118 | ageInterpretation.put(Tuple.of(1), 20); | ||
119 | ageInterpretation.put(Tuple.of(2), null); | ||
120 | |||
121 | queryEngine.flushChanges(); | ||
122 | assertResults(Map.of( | ||
123 | Tuple.of(0), false, | ||
124 | Tuple.of(1), false, | ||
125 | Tuple.of(2), true, | ||
126 | Tuple.of(3), false | ||
127 | ), queryResultSet); | ||
128 | } | ||
129 | } | ||
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/OrderedResultSetTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/OrderedResultSetTest.java index 96d0f302..cc3ddc10 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/OrderedResultSetTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/OrderedResultSetTest.java | |||
@@ -8,9 +8,9 @@ package tools.refinery.store.query.interpreter; | |||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.model.ModelStore; | 9 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Query; | 11 | import tools.refinery.logic.dnf.Query; |
12 | import tools.refinery.store.query.resultset.OrderedResultSet; | 12 | import tools.refinery.store.query.resultset.OrderedResultSet; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.store.query.view.AnySymbolView; |
15 | import tools.refinery.store.query.view.KeyOnlyView; | 15 | import tools.refinery.store.query.view.KeyOnlyView; |
16 | import tools.refinery.store.representation.Symbol; | 16 | import tools.refinery.store.representation.Symbol; |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTest.java index 72728dcd..59f43147 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTest.java | |||
@@ -9,26 +9,26 @@ import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; | |||
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
11 | import tools.refinery.store.query.ModelQueryAdapter; | 11 | import tools.refinery.store.query.ModelQueryAdapter; |
12 | import tools.refinery.store.query.dnf.Dnf; | 12 | import tools.refinery.logic.dnf.Dnf; |
13 | import tools.refinery.store.query.dnf.Query; | 13 | import tools.refinery.logic.dnf.Query; |
14 | import tools.refinery.store.query.term.ParameterDirection; | 14 | import tools.refinery.logic.term.ParameterDirection; |
15 | import tools.refinery.store.query.term.Variable; | 15 | import tools.refinery.logic.term.Variable; |
16 | import tools.refinery.store.query.interpreter.tests.QueryEngineTest; | 16 | import tools.refinery.store.query.interpreter.tests.QueryEngineTest; |
17 | import tools.refinery.store.query.view.AnySymbolView; | 17 | import tools.refinery.store.query.view.AnySymbolView; |
18 | import tools.refinery.store.query.view.FilteredView; | 18 | import tools.refinery.store.query.view.FilteredView; |
19 | import tools.refinery.store.query.view.FunctionView; | 19 | import tools.refinery.store.query.view.FunctionView; |
20 | import tools.refinery.store.query.view.KeyOnlyView; | 20 | import tools.refinery.store.query.view.KeyOnlyView; |
21 | import tools.refinery.store.representation.Symbol; | 21 | import tools.refinery.store.representation.Symbol; |
22 | import tools.refinery.store.representation.TruthValue; | 22 | import tools.refinery.logic.term.truthvalue.TruthValue; |
23 | import tools.refinery.store.tuple.Tuple; | 23 | import tools.refinery.store.tuple.Tuple; |
24 | 24 | ||
25 | import java.util.List; | 25 | import java.util.List; |
26 | import java.util.Map; | 26 | import java.util.Map; |
27 | 27 | ||
28 | import static tools.refinery.store.query.literal.Literals.check; | 28 | import static tools.refinery.logic.literal.Literals.check; |
29 | import static tools.refinery.store.query.literal.Literals.not; | 29 | import static tools.refinery.logic.literal.Literals.not; |
30 | import static tools.refinery.store.query.term.int_.IntTerms.constant; | 30 | import static tools.refinery.logic.term.int_.IntTerms.constant; |
31 | import static tools.refinery.store.query.term.int_.IntTerms.greaterEq; | 31 | import static tools.refinery.logic.term.int_.IntTerms.greaterEq; |
32 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; | 32 | import static tools.refinery.store.query.interpreter.tests.QueryAssertions.assertResults; |
33 | 33 | ||
34 | class QueryTest { | 34 | class QueryTest { |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTransactionTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTransactionTest.java index 1cd05d91..eb1ed68a 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTransactionTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/QueryTransactionTest.java | |||
@@ -9,8 +9,8 @@ import tools.refinery.interpreter.matchers.backend.QueryEvaluationHint; | |||
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
11 | import tools.refinery.store.query.ModelQueryAdapter; | 11 | import tools.refinery.store.query.ModelQueryAdapter; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.dnf.RelationalQuery; | 13 | import tools.refinery.logic.dnf.RelationalQuery; |
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.store.query.view.AnySymbolView; |
15 | import tools.refinery.store.query.view.FilteredView; | 15 | import tools.refinery.store.query.view.FilteredView; |
16 | import tools.refinery.store.query.view.FunctionView; | 16 | import tools.refinery.store.query.view.FunctionView; |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/StronglyConnectedComponentsTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/StronglyConnectedComponentsTest.java index edbd9aff..f8b12d19 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/StronglyConnectedComponentsTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/StronglyConnectedComponentsTest.java | |||
@@ -6,11 +6,11 @@ | |||
6 | package tools.refinery.store.query.interpreter; | 6 | package tools.refinery.store.query.interpreter; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.logic.dnf.Query; | ||
10 | import tools.refinery.logic.literal.Connectivity; | ||
11 | import tools.refinery.logic.literal.RepresentativeElectionLiteral; | ||
9 | import tools.refinery.store.model.ModelStore; | 12 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 13 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Query; | ||
12 | import tools.refinery.store.query.literal.Connectivity; | ||
13 | import tools.refinery.store.query.literal.RepresentativeElectionLiteral; | ||
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.store.query.view.AnySymbolView; |
15 | import tools.refinery.store.query.view.KeyOnlyView; | 15 | import tools.refinery.store.query.view.KeyOnlyView; |
16 | import tools.refinery.store.representation.Symbol; | 16 | import tools.refinery.store.representation.Symbol; |
diff --git a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/WeaklyConnectedComponentsTest.java b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/WeaklyConnectedComponentsTest.java index 3fc85480..95b37f09 100644 --- a/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/WeaklyConnectedComponentsTest.java +++ b/subprojects/store-query-interpreter/src/test/java/tools/refinery/store/query/interpreter/WeaklyConnectedComponentsTest.java | |||
@@ -6,11 +6,11 @@ | |||
6 | package tools.refinery.store.query.interpreter; | 6 | package tools.refinery.store.query.interpreter; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.logic.dnf.Query; | ||
10 | import tools.refinery.logic.literal.Connectivity; | ||
11 | import tools.refinery.logic.literal.RepresentativeElectionLiteral; | ||
9 | import tools.refinery.store.model.ModelStore; | 12 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 13 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Query; | ||
12 | import tools.refinery.store.query.literal.Connectivity; | ||
13 | import tools.refinery.store.query.literal.RepresentativeElectionLiteral; | ||
14 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.store.query.view.AnySymbolView; |
15 | import tools.refinery.store.query.view.KeyOnlyView; | 15 | import tools.refinery.store.query.view.KeyOnlyView; |
16 | import tools.refinery.store.representation.Symbol; | 16 | import tools.refinery.store.representation.Symbol; |
diff --git a/subprojects/store-query/build.gradle.kts b/subprojects/store-query/build.gradle.kts index 4d8e2605..f5cbdebc 100644 --- a/subprojects/store-query/build.gradle.kts +++ b/subprojects/store-query/build.gradle.kts | |||
@@ -6,10 +6,9 @@ | |||
6 | 6 | ||
7 | plugins { | 7 | plugins { |
8 | id("tools.refinery.gradle.java-library") | 8 | id("tools.refinery.gradle.java-library") |
9 | id("tools.refinery.gradle.java-test-fixtures") | ||
10 | } | 9 | } |
11 | 10 | ||
12 | dependencies { | 11 | dependencies { |
12 | api(project(":refinery-logic")) | ||
13 | api(project(":refinery-store")) | 13 | api(project(":refinery-store")) |
14 | testFixturesApi(libs.hamcrest) | ||
15 | } | 14 | } |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryAdapter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryAdapter.java index 1fa96a07..513825b7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryAdapter.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryAdapter.java | |||
@@ -6,8 +6,8 @@ | |||
6 | package tools.refinery.store.query; | 6 | package tools.refinery.store.query; |
7 | 7 | ||
8 | import tools.refinery.store.adapter.ModelAdapter; | 8 | import tools.refinery.store.adapter.ModelAdapter; |
9 | import tools.refinery.store.query.dnf.AnyQuery; | 9 | import tools.refinery.logic.dnf.AnyQuery; |
10 | import tools.refinery.store.query.dnf.Query; | 10 | import tools.refinery.logic.dnf.Query; |
11 | import tools.refinery.store.query.resultset.AnyResultSet; | 11 | import tools.refinery.store.query.resultset.AnyResultSet; |
12 | import tools.refinery.store.query.resultset.ResultSet; | 12 | import tools.refinery.store.query.resultset.ResultSet; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java index 332e6381..71e2c5bf 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java | |||
@@ -7,8 +7,8 @@ package tools.refinery.store.query; | |||
7 | 7 | ||
8 | import tools.refinery.store.adapter.ModelAdapterBuilder; | 8 | import tools.refinery.store.adapter.ModelAdapterBuilder; |
9 | import tools.refinery.store.model.ModelStore; | 9 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.dnf.AnyQuery; | 10 | import tools.refinery.logic.dnf.AnyQuery; |
11 | import tools.refinery.store.query.rewriter.DnfRewriter; | 11 | import tools.refinery.logic.rewriter.DnfRewriter; |
12 | 12 | ||
13 | import java.util.Collection; | 13 | import java.util.Collection; |
14 | import java.util.List; | 14 | import java.util.List; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java index 8b67c5c1..fec8c999 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java | |||
@@ -7,8 +7,8 @@ package tools.refinery.store.query; | |||
7 | 7 | ||
8 | import tools.refinery.store.adapter.ModelStoreAdapter; | 8 | import tools.refinery.store.adapter.ModelStoreAdapter; |
9 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
10 | import tools.refinery.store.query.dnf.AnyQuery; | 10 | import tools.refinery.logic.dnf.AnyQuery; |
11 | import tools.refinery.store.query.dnf.Query; | 11 | import tools.refinery.logic.dnf.Query; |
12 | import tools.refinery.store.query.view.AnySymbolView; | 12 | import tools.refinery.store.query.view.AnySymbolView; |
13 | 13 | ||
14 | import java.util.Collection; | 14 | import java.util.Collection; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java index dcfe6cc5..f8290b48 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.resultset; | 6 | package tools.refinery.store.query.resultset; |
7 | 7 | ||
8 | import tools.refinery.store.query.ModelQueryAdapter; | 8 | import tools.refinery.store.query.ModelQueryAdapter; |
9 | import tools.refinery.store.query.dnf.Query; | 9 | import tools.refinery.logic.dnf.Query; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | import java.util.ArrayList; | 12 | import java.util.ArrayList; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java index 5b75b103..038ca7f9 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.resultset; | 6 | package tools.refinery.store.query.resultset; |
7 | 7 | ||
8 | import tools.refinery.store.query.ModelQueryAdapter; | 8 | import tools.refinery.store.query.ModelQueryAdapter; |
9 | import tools.refinery.store.query.dnf.AnyQuery; | 9 | import tools.refinery.logic.dnf.AnyQuery; |
10 | 10 | ||
11 | public sealed interface AnyResultSet permits ResultSet { | 11 | public sealed interface AnyResultSet permits ResultSet { |
12 | ModelQueryAdapter getAdapter(); | 12 | ModelQueryAdapter getAdapter(); |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java index 991b1e32..daebfe7c 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java | |||
@@ -8,7 +8,7 @@ package tools.refinery.store.query.resultset; | |||
8 | import tools.refinery.store.map.Cursor; | 8 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.map.Cursors; | 9 | import tools.refinery.store.map.Cursors; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Query; | 11 | import tools.refinery.logic.dnf.Query; |
12 | import tools.refinery.store.tuple.Tuple; | 12 | import tools.refinery.store.tuple.Tuple; |
13 | 13 | ||
14 | public record EmptyResultSet<T>(ModelQueryAdapter adapter, Query<T> query) implements ResultSet<T> { | 14 | public record EmptyResultSet<T>(ModelQueryAdapter adapter, Query<T> query) implements ResultSet<T> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java index df12b967..606e197c 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.query.resultset; | |||
7 | 7 | ||
8 | import tools.refinery.store.map.Cursor; | 8 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.query.ModelQueryAdapter; | 9 | import tools.refinery.store.query.ModelQueryAdapter; |
10 | import tools.refinery.store.query.dnf.Query; | 10 | import tools.refinery.logic.dnf.Query; |
11 | import tools.refinery.store.query.utils.OrderStatisticTree; | 11 | import tools.refinery.store.query.utils.OrderStatisticTree; |
12 | import tools.refinery.store.tuple.Tuple; | 12 | import tools.refinery.store.tuple.Tuple; |
13 | 13 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java index a6e99784..e84634ac 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.resultset; | 6 | package tools.refinery.store.query.resultset; |
7 | 7 | ||
8 | import tools.refinery.store.map.Cursor; | 8 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.query.dnf.Query; | 9 | import tools.refinery.logic.dnf.Query; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | public non-sealed interface ResultSet<T> extends AnyResultSet { | 12 | public non-sealed interface ResultSet<T> extends AnyResultSet { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java index f130fa59..d9809991 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java | |||
@@ -7,8 +7,8 @@ package tools.refinery.store.query.view; | |||
7 | 7 | ||
8 | import tools.refinery.store.map.CursorAsIterator; | 8 | import tools.refinery.store.map.CursorAsIterator; |
9 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
10 | import tools.refinery.store.query.dnf.FunctionalDependency; | 10 | import tools.refinery.logic.dnf.FunctionalDependency; |
11 | import tools.refinery.store.query.term.Parameter; | 11 | import tools.refinery.logic.term.Parameter; |
12 | import tools.refinery.store.representation.Symbol; | 12 | import tools.refinery.store.representation.Symbol; |
13 | import tools.refinery.store.tuple.Tuple; | 13 | import tools.refinery.store.tuple.Tuple; |
14 | import tools.refinery.store.tuple.Tuple1; | 14 | import tools.refinery.store.tuple.Tuple1; |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java index 7e9bf6df..b01c3988 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java | |||
@@ -5,10 +5,10 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.FunctionalDependency; | ||
8 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.query.dnf.FunctionalDependency; | 10 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.representation.AnySymbol; | 11 | import tools.refinery.store.representation.AnySymbol; |
11 | import tools.refinery.store.query.Constraint; | ||
12 | 12 | ||
13 | import java.util.Set; | 13 | import java.util.Set; |
14 | 14 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java index 924277ed..7ce07442 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.tuple.Tuple; | 9 | import tools.refinery.store.tuple.Tuple; |
10 | import tools.refinery.store.representation.Symbol; | 10 | import tools.refinery.store.representation.Symbol; |
11 | 11 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/ForbiddenView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/ForbiddenView.java index c312330e..8323ace7 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/ForbiddenView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/ForbiddenView.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.store.representation.Symbol; | 8 | import tools.refinery.store.representation.Symbol; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | public class ForbiddenView extends TuplePreservingView<TruthValue> { | 12 | public class ForbiddenView extends TuplePreservingView<TruthValue> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FunctionView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FunctionView.java index 74a5be07..5585f5f2 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FunctionView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FunctionView.java | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.*; | 8 | import tools.refinery.logic.term.*; |
9 | import tools.refinery.store.representation.Symbol; | 9 | import tools.refinery.store.representation.Symbol; |
10 | 10 | ||
11 | import java.util.ArrayList; | 11 | import java.util.ArrayList; |
@@ -33,4 +33,18 @@ public final class FunctionView<T> extends AbstractFunctionView<T> { | |||
33 | public <R> AssignedValue<R> aggregate(Aggregator<R, T> aggregator, NodeVariable... arguments) { | 33 | public <R> AssignedValue<R> aggregate(Aggregator<R, T> aggregator, NodeVariable... arguments) { |
34 | return aggregate(aggregator, List.of(arguments)); | 34 | return aggregate(aggregator, List.of(arguments)); |
35 | } | 35 | } |
36 | |||
37 | public AssignedValue<T> leftJoin(T defaultValue, List<NodeVariable> arguments) { | ||
38 | return targetVariable -> { | ||
39 | var placeholderVariable = Variable.of(getSymbol().valueType()); | ||
40 | var argumentsWithPlaceholder = new ArrayList<Variable>(arguments.size() + 1); | ||
41 | argumentsWithPlaceholder.addAll(arguments); | ||
42 | argumentsWithPlaceholder.add(placeholderVariable); | ||
43 | return leftJoinBy(placeholderVariable, defaultValue, argumentsWithPlaceholder).toLiteral(targetVariable); | ||
44 | }; | ||
45 | } | ||
46 | |||
47 | public AssignedValue<T> leftJoin(T defaultValue, NodeVariable... arguments) { | ||
48 | return leftJoin(defaultValue, List.of(arguments)); | ||
49 | } | ||
36 | } | 50 | } |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MayView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MayView.java index c322e220..3a6cc93b 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MayView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MayView.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.store.representation.Symbol; | 8 | import tools.refinery.store.representation.Symbol; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | public class MayView extends TuplePreservingView<TruthValue> { | 12 | public class MayView extends TuplePreservingView<TruthValue> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MustView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MustView.java index 65bb4e4c..af984327 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MustView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/MustView.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.store.representation.Symbol; | 8 | import tools.refinery.store.representation.Symbol; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | public class MustView extends TuplePreservingView<TruthValue> { | 12 | public class MustView extends TuplePreservingView<TruthValue> { |
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/NodeFunctionView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/NodeFunctionView.java index fcf11506..01865cbe 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/NodeFunctionView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/NodeFunctionView.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.query.view; | 6 | package tools.refinery.store.query.view; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Parameter; | 8 | import tools.refinery.logic.term.Parameter; |
9 | import tools.refinery.store.representation.Symbol; | 9 | import tools.refinery.store.representation.Symbol; |
10 | import tools.refinery.store.tuple.Tuple1; | 10 | import tools.refinery.store.tuple.Tuple1; |
11 | 11 | ||
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java index ed12cd9d..6841488d 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.query.view; | |||
7 | 7 | ||
8 | import tools.refinery.store.map.CursorAsIterator; | 8 | import tools.refinery.store.map.CursorAsIterator; |
9 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
10 | import tools.refinery.store.query.term.Parameter; | 10 | import tools.refinery.logic.term.Parameter; |
11 | import tools.refinery.store.representation.Symbol; | 11 | import tools.refinery.store.representation.Symbol; |
12 | import tools.refinery.store.tuple.Tuple; | 12 | import tools.refinery.store.tuple.Tuple; |
13 | import tools.refinery.store.tuple.Tuple1; | 13 | import tools.refinery.store.tuple.Tuple1; |
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java index ecca6117..3a9efa58 100644 --- a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java +++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java | |||
@@ -13,12 +13,17 @@ import org.eclipse.collections.api.factory.primitive.IntObjectMaps; | |||
13 | import org.eclipse.collections.api.factory.primitive.IntSets; | 13 | import org.eclipse.collections.api.factory.primitive.IntSets; |
14 | import org.eclipse.collections.api.map.primitive.MutableIntObjectMap; | 14 | import org.eclipse.collections.api.map.primitive.MutableIntObjectMap; |
15 | import org.eclipse.collections.api.set.primitive.MutableIntSet; | 15 | import org.eclipse.collections.api.set.primitive.MutableIntSet; |
16 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; | ||
17 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; | ||
18 | import tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality; | ||
19 | import tools.refinery.logic.term.uppercardinality.UnboundedUpperCardinality; | ||
20 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
21 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
16 | import tools.refinery.store.dse.propagation.BoundPropagator; | 22 | import tools.refinery.store.dse.propagation.BoundPropagator; |
17 | import tools.refinery.store.dse.propagation.PropagationResult; | 23 | import tools.refinery.store.dse.propagation.PropagationResult; |
18 | import tools.refinery.store.model.Interpretation; | 24 | import tools.refinery.store.model.Interpretation; |
19 | import tools.refinery.store.model.Model; | 25 | import tools.refinery.store.model.Model; |
20 | import tools.refinery.store.query.ModelQueryAdapter; | 26 | import tools.refinery.store.query.ModelQueryAdapter; |
21 | import tools.refinery.store.representation.cardinality.*; | ||
22 | import tools.refinery.store.tuple.Tuple; | 27 | import tools.refinery.store.tuple.Tuple; |
23 | 28 | ||
24 | class BoundScopePropagator implements BoundPropagator { | 29 | class BoundScopePropagator implements BoundPropagator { |
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java index 702e570f..0700c696 100644 --- a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java +++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java | |||
@@ -5,26 +5,26 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.scope; | 6 | package tools.refinery.store.reasoning.scope; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.AnyQuery; | ||
9 | import tools.refinery.logic.dnf.Query; | ||
10 | import tools.refinery.logic.dnf.RelationalQuery; | ||
11 | import tools.refinery.logic.term.Variable; | ||
12 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
13 | import tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms; | ||
8 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; | 14 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; |
9 | import tools.refinery.store.dse.transition.objectives.Criteria; | 15 | import tools.refinery.store.dse.transition.objectives.Criteria; |
10 | import tools.refinery.store.dse.transition.objectives.Objectives; | 16 | import tools.refinery.store.dse.transition.objectives.Objectives; |
11 | import tools.refinery.store.model.ModelStoreBuilder; | 17 | import tools.refinery.store.model.ModelStoreBuilder; |
12 | import tools.refinery.store.query.dnf.AnyQuery; | ||
13 | import tools.refinery.store.query.dnf.Query; | ||
14 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
15 | import tools.refinery.store.query.term.Variable; | ||
16 | import tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms; | ||
17 | import tools.refinery.store.reasoning.ReasoningBuilder; | 18 | import tools.refinery.store.reasoning.ReasoningBuilder; |
18 | import tools.refinery.store.reasoning.literal.CountCandidateLowerBoundLiteral; | 19 | import tools.refinery.store.reasoning.literal.CountCandidateLowerBoundLiteral; |
19 | import tools.refinery.store.reasoning.literal.CountUpperBoundLiteral; | 20 | import tools.refinery.store.reasoning.literal.CountUpperBoundLiteral; |
20 | import tools.refinery.store.reasoning.representation.PartialRelation; | 21 | import tools.refinery.store.reasoning.representation.PartialRelation; |
21 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
22 | 22 | ||
23 | import java.util.Collection; | 23 | import java.util.Collection; |
24 | import java.util.List; | 24 | import java.util.List; |
25 | 25 | ||
26 | import static tools.refinery.store.query.literal.Literals.check; | 26 | import static tools.refinery.logic.literal.Literals.check; |
27 | import static tools.refinery.store.query.term.int_.IntTerms.*; | 27 | import static tools.refinery.logic.term.int_.IntTerms.*; |
28 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; | 28 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; |
29 | import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW; | 29 | import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW; |
30 | 30 | ||
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java index 25b1966c..94e6bbd7 100644 --- a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java +++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java | |||
@@ -13,8 +13,8 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
13 | import tools.refinery.store.reasoning.translator.TranslationException; | 13 | import tools.refinery.store.reasoning.translator.TranslationException; |
14 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 14 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
15 | import tools.refinery.store.representation.Symbol; | 15 | import tools.refinery.store.representation.Symbol; |
16 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 16 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
17 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | 17 | import tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality; |
18 | 18 | ||
19 | import java.util.*; | 19 | import java.util.*; |
20 | 20 | ||
@@ -48,7 +48,7 @@ public class ScopePropagator implements ModelStoreConfiguration { | |||
48 | } | 48 | } |
49 | var newValue = scopes.compute(type, (ignoredKey, oldValue) -> | 49 | var newValue = scopes.compute(type, (ignoredKey, oldValue) -> |
50 | oldValue == null ? interval : oldValue.meet(interval)); | 50 | oldValue == null ? interval : oldValue.meet(interval)); |
51 | if (newValue.isEmpty()) { | 51 | if (newValue.isError()) { |
52 | throw new TranslationException(type, "Unsatisfiable scope for type %s".formatted(type)); | 52 | throw new TranslationException(type, "Unsatisfiable scope for type %s".formatted(type)); |
53 | } | 53 | } |
54 | return this; | 54 | return this; |
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java index 193c132c..d117b0e2 100644 --- a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java +++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java | |||
@@ -8,8 +8,8 @@ package tools.refinery.store.reasoning.scope; | |||
8 | import com.google.ortools.linearsolver.MPConstraint; | 8 | import com.google.ortools.linearsolver.MPConstraint; |
9 | import tools.refinery.store.model.ModelStoreBuilder; | 9 | import tools.refinery.store.model.ModelStoreBuilder; |
10 | import tools.refinery.store.query.ModelQueryBuilder; | 10 | import tools.refinery.store.query.ModelQueryBuilder; |
11 | import tools.refinery.store.query.dnf.AnyQuery; | 11 | import tools.refinery.logic.dnf.AnyQuery; |
12 | import tools.refinery.store.query.dnf.RelationalQuery; | 12 | import tools.refinery.logic.dnf.RelationalQuery; |
13 | import tools.refinery.store.query.resultset.ResultSet; | 13 | import tools.refinery.store.query.resultset.ResultSet; |
14 | import tools.refinery.store.tuple.Tuple; | 14 | import tools.refinery.store.tuple.Tuple; |
15 | 15 | ||
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java index b2f8d39b..ad56b9bd 100644 --- a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java +++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java | |||
@@ -5,14 +5,14 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.scope; | 6 | package tools.refinery.store.reasoning.scope; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.AnyQuery; | ||
9 | import tools.refinery.logic.dnf.Query; | ||
10 | import tools.refinery.logic.dnf.RelationalQuery; | ||
11 | import tools.refinery.logic.term.Variable; | ||
8 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; | 12 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; |
9 | import tools.refinery.store.dse.transition.objectives.Criteria; | 13 | import tools.refinery.store.dse.transition.objectives.Criteria; |
10 | import tools.refinery.store.dse.transition.objectives.Objectives; | 14 | import tools.refinery.store.dse.transition.objectives.Objectives; |
11 | import tools.refinery.store.model.ModelStoreBuilder; | 15 | import tools.refinery.store.model.ModelStoreBuilder; |
12 | import tools.refinery.store.query.dnf.AnyQuery; | ||
13 | import tools.refinery.store.query.dnf.Query; | ||
14 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
15 | import tools.refinery.store.query.term.Variable; | ||
16 | import tools.refinery.store.reasoning.ReasoningBuilder; | 16 | import tools.refinery.store.reasoning.ReasoningBuilder; |
17 | import tools.refinery.store.reasoning.literal.CountCandidateUpperBoundLiteral; | 17 | import tools.refinery.store.reasoning.literal.CountCandidateUpperBoundLiteral; |
18 | import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral; | 18 | import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral; |
@@ -21,8 +21,8 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
21 | import java.util.Collection; | 21 | import java.util.Collection; |
22 | import java.util.List; | 22 | import java.util.List; |
23 | 23 | ||
24 | import static tools.refinery.store.query.literal.Literals.check; | 24 | import static tools.refinery.logic.literal.Literals.check; |
25 | import static tools.refinery.store.query.term.int_.IntTerms.*; | 25 | import static tools.refinery.logic.term.int_.IntTerms.*; |
26 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; | 26 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; |
27 | import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW; | 27 | import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW; |
28 | 28 | ||
diff --git a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java index 97b9fa5e..2b8b4557 100644 --- a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java +++ b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java | |||
@@ -20,9 +20,9 @@ import tools.refinery.store.reasoning.seed.ModelSeed; | |||
20 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | 20 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; |
21 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 21 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
22 | import tools.refinery.store.representation.Symbol; | 22 | import tools.refinery.store.representation.Symbol; |
23 | import tools.refinery.store.representation.TruthValue; | 23 | import tools.refinery.logic.term.truthvalue.TruthValue; |
24 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 24 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
25 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 25 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
26 | import tools.refinery.store.tuple.Tuple; | 26 | import tools.refinery.store.tuple.Tuple; |
27 | 27 | ||
28 | import static org.hamcrest.MatcherAssert.assertThat; | 28 | import static org.hamcrest.MatcherAssert.assertThat; |
diff --git a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/PredicateScopeTest.java b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/PredicateScopeTest.java index 5ee97ce1..f4d5fb60 100644 --- a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/PredicateScopeTest.java +++ b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/PredicateScopeTest.java | |||
@@ -9,13 +9,15 @@ import org.junit.jupiter.api.Tag; | |||
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import org.junit.jupiter.params.ParameterizedTest; | 10 | import org.junit.jupiter.params.ParameterizedTest; |
11 | import org.junit.jupiter.params.provider.ValueSource; | 11 | import org.junit.jupiter.params.provider.ValueSource; |
12 | import tools.refinery.logic.dnf.Query; | ||
13 | import tools.refinery.logic.term.Variable; | ||
14 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; | ||
15 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
12 | import tools.refinery.store.dse.propagation.PropagationAdapter; | 16 | import tools.refinery.store.dse.propagation.PropagationAdapter; |
13 | import tools.refinery.store.dse.strategy.BestFirstStoreManager; | 17 | import tools.refinery.store.dse.strategy.BestFirstStoreManager; |
14 | import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter; | 18 | import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter; |
15 | import tools.refinery.store.model.ModelStore; | 19 | import tools.refinery.store.model.ModelStore; |
16 | import tools.refinery.store.query.dnf.Query; | ||
17 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; | 20 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; |
18 | import tools.refinery.store.query.term.Variable; | ||
19 | import tools.refinery.store.reasoning.ReasoningAdapter; | 21 | import tools.refinery.store.reasoning.ReasoningAdapter; |
20 | import tools.refinery.store.reasoning.ReasoningStoreAdapter; | 22 | import tools.refinery.store.reasoning.ReasoningStoreAdapter; |
21 | import tools.refinery.store.reasoning.interpretation.PartialInterpretation; | 23 | import tools.refinery.store.reasoning.interpretation.PartialInterpretation; |
@@ -27,14 +29,12 @@ import tools.refinery.store.reasoning.translator.containment.ContainmentHierarch | |||
27 | import tools.refinery.store.reasoning.translator.metamodel.Metamodel; | 29 | import tools.refinery.store.reasoning.translator.metamodel.Metamodel; |
28 | import tools.refinery.store.reasoning.translator.metamodel.MetamodelTranslator; | 30 | import tools.refinery.store.reasoning.translator.metamodel.MetamodelTranslator; |
29 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 31 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
30 | import tools.refinery.store.representation.TruthValue; | ||
31 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | ||
32 | import tools.refinery.store.statecoding.StateCoderAdapter; | 32 | import tools.refinery.store.statecoding.StateCoderAdapter; |
33 | import tools.refinery.store.tuple.Tuple; | 33 | import tools.refinery.store.tuple.Tuple; |
34 | 34 | ||
35 | import static org.hamcrest.MatcherAssert.assertThat; | 35 | import static org.hamcrest.MatcherAssert.assertThat; |
36 | import static org.hamcrest.Matchers.is; | 36 | import static org.hamcrest.Matchers.is; |
37 | import static tools.refinery.store.query.literal.Literals.not; | 37 | import static tools.refinery.logic.literal.Literals.not; |
38 | 38 | ||
39 | class PredicateScopeTest { | 39 | class PredicateScopeTest { |
40 | private static final PartialRelation index = new PartialRelation("Index", 1); | 40 | private static final PartialRelation index = new PartialRelation("Index", 1); |
diff --git a/subprojects/store-reasoning-smt/build.gradle.kts b/subprojects/store-reasoning-smt/build.gradle.kts new file mode 100644 index 00000000..4a784e42 --- /dev/null +++ b/subprojects/store-reasoning-smt/build.gradle.kts | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | dependencies { | ||
12 | api(project(":refinery-store-reasoning")) | ||
13 | implementation(libs.refinery.z3) | ||
14 | testImplementation(project(":refinery-store-query-interpreter")) | ||
15 | } | ||
diff --git a/subprojects/store-reasoning-smt/src/main/java/tools/refinery/store/reasoning/smt/SmtPropagator.java b/subprojects/store-reasoning-smt/src/main/java/tools/refinery/store/reasoning/smt/SmtPropagator.java new file mode 100644 index 00000000..b63ab561 --- /dev/null +++ b/subprojects/store-reasoning-smt/src/main/java/tools/refinery/store/reasoning/smt/SmtPropagator.java | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.reasoning.smt; | ||
7 | |||
8 | import com.microsoft.z3.Context; | ||
9 | import tools.refinery.z3.Z3SolverLoader; | ||
10 | |||
11 | public class SmtPropagator { | ||
12 | public void propagate() { | ||
13 | Z3SolverLoader.loadNativeLibraries(); | ||
14 | try (var context = new Context()) { | ||
15 | var solver = context.mkSolver(); | ||
16 | solver.check(); | ||
17 | } | ||
18 | } | ||
19 | } | ||
diff --git a/subprojects/store-reasoning/build.gradle.kts b/subprojects/store-reasoning/build.gradle.kts index 068256c2..d1d3c2e5 100644 --- a/subprojects/store-reasoning/build.gradle.kts +++ b/subprojects/store-reasoning/build.gradle.kts | |||
@@ -10,6 +10,6 @@ plugins { | |||
10 | 10 | ||
11 | dependencies { | 11 | dependencies { |
12 | api(project(":refinery-store-dse")) | 12 | api(project(":refinery-store-dse")) |
13 | testImplementation(testFixtures(project(":refinery-store-query"))) | 13 | testImplementation(testFixtures(project(":refinery-logic"))) |
14 | testImplementation(project(":refinery-store-query-interpreter")) | 14 | testImplementation(project(":refinery-store-query-interpreter")) |
15 | } | 15 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java index 7f0ef8b4..a9b3141a 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java | |||
@@ -1,11 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning; | 6 | package tools.refinery.store.reasoning; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.logic.AbstractValue; | ||
9 | import tools.refinery.store.adapter.ModelAdapter; | 10 | import tools.refinery.store.adapter.ModelAdapter; |
10 | import tools.refinery.store.reasoning.internal.ReasoningBuilderImpl; | 11 | import tools.refinery.store.reasoning.internal.ReasoningBuilderImpl; |
11 | import tools.refinery.store.reasoning.interpretation.AnyPartialInterpretation; | 12 | import tools.refinery.store.reasoning.interpretation.AnyPartialInterpretation; |
@@ -27,17 +28,19 @@ public interface ReasoningAdapter extends ModelAdapter { | |||
27 | 28 | ||
28 | default AnyPartialInterpretation getPartialInterpretation(Concreteness concreteness, | 29 | default AnyPartialInterpretation getPartialInterpretation(Concreteness concreteness, |
29 | AnyPartialSymbol partialSymbol) { | 30 | AnyPartialSymbol partialSymbol) { |
30 | return getPartialInterpretation(concreteness, (PartialSymbol<?, ?>) partialSymbol); | 31 | var typedPartialSymbol = (PartialSymbol<?, ?>) partialSymbol; |
32 | return getPartialInterpretation(concreteness, typedPartialSymbol); | ||
31 | } | 33 | } |
32 | 34 | ||
33 | <A, C> PartialInterpretation<A, C> getPartialInterpretation(Concreteness concreteness, | 35 | <A extends AbstractValue<A, C>, C> PartialInterpretation<A, C> getPartialInterpretation( |
34 | PartialSymbol<A, C> partialSymbol); | 36 | Concreteness concreteness, PartialSymbol<A, C> partialSymbol); |
35 | 37 | ||
36 | default AnyPartialInterpretationRefiner getRefiner(AnyPartialSymbol partialSymbol) { | 38 | default AnyPartialInterpretationRefiner getRefiner(AnyPartialSymbol partialSymbol) { |
37 | return getRefiner((PartialSymbol<?, ?>) partialSymbol); | 39 | var typedPartialSymbol = (PartialSymbol<?, ?>) partialSymbol; |
40 | return getRefiner(typedPartialSymbol); | ||
38 | } | 41 | } |
39 | 42 | ||
40 | <A, C> PartialInterpretationRefiner<A, C> getRefiner(PartialSymbol<A, C> partialSymbol); | 43 | <A extends AbstractValue<A, C>, C> PartialInterpretationRefiner<A, C> getRefiner(PartialSymbol<A, C> partialSymbol); |
41 | 44 | ||
42 | @Nullable | 45 | @Nullable |
43 | Tuple1 split(int parentMultiObject); | 46 | Tuple1 split(int parentMultiObject); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java index 79bce33e..7ffa6faa 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java | |||
@@ -8,10 +8,10 @@ package tools.refinery.store.reasoning; | |||
8 | import tools.refinery.store.adapter.ModelAdapterBuilder; | 8 | import tools.refinery.store.adapter.ModelAdapterBuilder; |
9 | import tools.refinery.store.dse.transition.objectives.Objective; | 9 | import tools.refinery.store.dse.transition.objectives.Objective; |
10 | import tools.refinery.store.model.ModelStore; | 10 | import tools.refinery.store.model.ModelStore; |
11 | import tools.refinery.store.query.dnf.Dnf; | 11 | import tools.refinery.logic.dnf.Dnf; |
12 | import tools.refinery.store.query.dnf.FunctionalQuery; | 12 | import tools.refinery.logic.dnf.FunctionalQuery; |
13 | import tools.refinery.store.query.dnf.Query; | 13 | import tools.refinery.logic.dnf.Query; |
14 | import tools.refinery.store.query.dnf.RelationalQuery; | 14 | import tools.refinery.logic.dnf.RelationalQuery; |
15 | import tools.refinery.store.reasoning.literal.Concreteness; | 15 | import tools.refinery.store.reasoning.literal.Concreteness; |
16 | import tools.refinery.store.reasoning.literal.Modality; | 16 | import tools.refinery.store.reasoning.literal.Modality; |
17 | import tools.refinery.store.reasoning.refinement.PartialModelInitializer; | 17 | import tools.refinery.store.reasoning.refinement.PartialModelInitializer; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java index 62c35cee..6a0004d9 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java | |||
@@ -8,7 +8,7 @@ package tools.refinery.store.reasoning.actions; | |||
8 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; | 8 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; |
9 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; | 9 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; |
10 | import tools.refinery.store.model.Model; | 10 | import tools.refinery.store.model.Model; |
11 | import tools.refinery.store.query.term.NodeVariable; | 11 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.reasoning.ReasoningAdapter; | 12 | import tools.refinery.store.reasoning.ReasoningAdapter; |
13 | import tools.refinery.store.tuple.Tuple; | 13 | import tools.refinery.store.tuple.Tuple; |
14 | 14 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java index 5a6f22d2..c819a1f9 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java | |||
@@ -8,7 +8,7 @@ package tools.refinery.store.reasoning.actions; | |||
8 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; | 8 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; |
9 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; | 9 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; |
10 | import tools.refinery.store.model.Model; | 10 | import tools.refinery.store.model.Model; |
11 | import tools.refinery.store.query.term.NodeVariable; | 11 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.reasoning.ReasoningAdapter; | 12 | import tools.refinery.store.reasoning.ReasoningAdapter; |
13 | 13 | ||
14 | import java.util.List; | 14 | import java.util.List; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java index 8d0d7961..86256331 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java | |||
@@ -1,21 +1,22 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.actions; | 6 | package tools.refinery.store.reasoning.actions; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; | 9 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; |
9 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; | 10 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; |
10 | import tools.refinery.store.model.Model; | 11 | import tools.refinery.store.model.Model; |
11 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.reasoning.ReasoningAdapter; | 13 | import tools.refinery.store.reasoning.ReasoningAdapter; |
13 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 14 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
14 | import tools.refinery.store.tuple.Tuple; | 15 | import tools.refinery.store.tuple.Tuple; |
15 | 16 | ||
16 | import java.util.List; | 17 | import java.util.List; |
17 | 18 | ||
18 | public class MergeActionLiteral<A, C> extends AbstractActionLiteral { | 19 | public class MergeActionLiteral<A extends AbstractValue<A, C>, C> extends AbstractActionLiteral { |
19 | private final PartialSymbol<A, C> partialSymbol; | 20 | private final PartialSymbol<A, C> partialSymbol; |
20 | private final List<NodeVariable> parameters; | 21 | private final List<NodeVariable> parameters; |
21 | private final A value; | 22 | private final A value; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java index f36fde44..e8e6880a 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java | |||
@@ -5,10 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.actions; | 6 | package tools.refinery.store.reasoning.actions; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.NodeVariable; | 8 | import tools.refinery.logic.AbstractValue; |
9 | import tools.refinery.logic.term.NodeVariable; | ||
9 | import tools.refinery.store.reasoning.representation.PartialRelation; | 10 | import tools.refinery.store.reasoning.representation.PartialRelation; |
10 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
11 | import tools.refinery.store.representation.TruthValue; | 12 | import tools.refinery.logic.term.truthvalue.TruthValue; |
12 | 13 | ||
13 | import java.util.List; | 14 | import java.util.List; |
14 | 15 | ||
@@ -17,8 +18,8 @@ public final class PartialActionLiterals { | |||
17 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); | 18 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); |
18 | } | 19 | } |
19 | 20 | ||
20 | public static <A, C> MergeActionLiteral<A, C> merge(PartialSymbol<A, C> partialSymbol, A value, | 21 | public static <A extends AbstractValue<A, C>, C> MergeActionLiteral<A, C> merge( |
21 | NodeVariable... parameters) { | 22 | PartialSymbol<A, C> partialSymbol, A value, NodeVariable... parameters) { |
22 | return new MergeActionLiteral<>(partialSymbol, value, List.of(parameters)); | 23 | return new MergeActionLiteral<>(partialSymbol, value, List.of(parameters)); |
23 | } | 24 | } |
24 | 25 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java index 40993235..dc508a7b 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java | |||
@@ -5,25 +5,25 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.internal; | 6 | package tools.refinery.store.reasoning.internal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.dnf.Dnf; |
10 | import tools.refinery.store.query.dnf.DnfBuilder; | 10 | import tools.refinery.logic.dnf.DnfBuilder; |
11 | import tools.refinery.store.query.dnf.DnfClause; | 11 | import tools.refinery.logic.dnf.DnfClause; |
12 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 12 | import tools.refinery.logic.literal.AbstractCallLiteral; |
13 | import tools.refinery.store.query.literal.AbstractCountLiteral; | 13 | import tools.refinery.logic.literal.AbstractCountLiteral; |
14 | import tools.refinery.store.query.literal.CallPolarity; | 14 | import tools.refinery.logic.literal.CallPolarity; |
15 | import tools.refinery.store.query.literal.Literal; | 15 | import tools.refinery.logic.literal.Literal; |
16 | import tools.refinery.store.query.term.Aggregator; | 16 | import tools.refinery.logic.term.Aggregator; |
17 | import tools.refinery.store.query.term.ConstantTerm; | 17 | import tools.refinery.logic.term.ConstantTerm; |
18 | import tools.refinery.store.query.term.Term; | 18 | import tools.refinery.logic.term.Term; |
19 | import tools.refinery.store.query.term.Variable; | 19 | import tools.refinery.logic.term.Variable; |
20 | import tools.refinery.store.query.term.int_.IntTerms; | 20 | import tools.refinery.logic.term.int_.IntTerms; |
21 | import tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms; | 21 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; |
22 | import tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms; | ||
22 | import tools.refinery.store.reasoning.ReasoningAdapter; | 23 | import tools.refinery.store.reasoning.ReasoningAdapter; |
23 | import tools.refinery.store.reasoning.literal.*; | 24 | import tools.refinery.store.reasoning.literal.*; |
24 | import tools.refinery.store.reasoning.representation.PartialRelation; | 25 | import tools.refinery.store.reasoning.representation.PartialRelation; |
25 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 26 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
26 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
27 | 27 | ||
28 | import java.util.*; | 28 | import java.util.*; |
29 | import java.util.function.BinaryOperator; | 29 | import java.util.function.BinaryOperator; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java index 79cba263..9a916b69 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java | |||
@@ -5,8 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.internal; | 6 | package tools.refinery.store.reasoning.internal; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Dnf; | 8 | import tools.refinery.logic.dnf.Dnf; |
9 | import tools.refinery.store.query.rewriter.AbstractRecursiveRewriter; | 9 | import tools.refinery.logic.rewriter.AbstractRecursiveRewriter; |
10 | import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter; | 10 | import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter; |
11 | import tools.refinery.store.reasoning.lifting.DnfLifter; | 11 | import tools.refinery.store.reasoning.lifting.DnfLifter; |
12 | import tools.refinery.store.reasoning.representation.PartialRelation; | 12 | import tools.refinery.store.reasoning.representation.PartialRelation; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java index bd16bdfa..386ae1d8 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java | |||
@@ -1,11 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.internal; | 6 | package tools.refinery.store.reasoning.internal; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.logic.AbstractValue; | ||
9 | import tools.refinery.store.model.Interpretation; | 10 | import tools.refinery.store.model.Interpretation; |
10 | import tools.refinery.store.model.Model; | 11 | import tools.refinery.store.model.Model; |
11 | import tools.refinery.store.reasoning.ReasoningAdapter; | 12 | import tools.refinery.store.reasoning.ReasoningAdapter; |
@@ -19,8 +20,8 @@ import tools.refinery.store.reasoning.representation.AnyPartialSymbol; | |||
19 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 20 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
20 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 21 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
21 | import tools.refinery.store.representation.Symbol; | 22 | import tools.refinery.store.representation.Symbol; |
22 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 23 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
23 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 24 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
24 | import tools.refinery.store.tuple.Tuple; | 25 | import tools.refinery.store.tuple.Tuple; |
25 | import tools.refinery.store.tuple.Tuple1; | 26 | import tools.refinery.store.tuple.Tuple1; |
26 | 27 | ||
@@ -49,7 +50,7 @@ class ReasoningAdapterImpl implements ReasoningAdapter { | |||
49 | createPartialInterpretations(); | 50 | createPartialInterpretations(); |
50 | 51 | ||
51 | var refinerFactories = storeAdapter.getSymbolRefiners(); | 52 | var refinerFactories = storeAdapter.getSymbolRefiners(); |
52 | refiners = new HashMap<>(refinerFactories.size()); | 53 | refiners = HashMap.newHashMap(refinerFactories.size()); |
53 | createRefiners(); | 54 | createRefiners(); |
54 | 55 | ||
55 | storageRefiners = storeAdapter.createStorageRefiner(model); | 56 | storageRefiners = storeAdapter.createStorageRefiner(model); |
@@ -69,7 +70,7 @@ class ReasoningAdapterImpl implements ReasoningAdapter { | |||
69 | for (int i = 0; i < concretenessLength; i++) { | 70 | for (int i = 0; i < concretenessLength; i++) { |
70 | var concreteness = Concreteness.values()[i]; | 71 | var concreteness = Concreteness.values()[i]; |
71 | if (supportedInterpretations.contains(concreteness)) { | 72 | if (supportedInterpretations.contains(concreteness)) { |
72 | partialInterpretations[i] = new HashMap<>(interpretationFactories.size()); | 73 | partialInterpretations[i] = HashMap.newHashMap(interpretationFactories.size()); |
73 | } | 74 | } |
74 | } | 75 | } |
75 | // Create the partial interpretations in order so that factories may refer to interpretations of symbols | 76 | // Create the partial interpretations in order so that factories may refer to interpretations of symbols |
@@ -87,7 +88,7 @@ class ReasoningAdapterImpl implements ReasoningAdapter { | |||
87 | } | 88 | } |
88 | } | 89 | } |
89 | 90 | ||
90 | private <A, C> PartialInterpretation<A, C> createPartialInterpretation( | 91 | private <A extends AbstractValue<A, C>, C> PartialInterpretation<A, C> createPartialInterpretation( |
91 | Concreteness concreteness, PartialInterpretation.Factory<A, C> interpreter, AnyPartialSymbol symbol) { | 92 | Concreteness concreteness, PartialInterpretation.Factory<A, C> interpreter, AnyPartialSymbol symbol) { |
92 | // The builder only allows well-typed assignment of interpreters to symbols. | 93 | // The builder only allows well-typed assignment of interpreters to symbols. |
93 | @SuppressWarnings("unchecked") | 94 | @SuppressWarnings("unchecked") |
@@ -107,7 +108,7 @@ class ReasoningAdapterImpl implements ReasoningAdapter { | |||
107 | } | 108 | } |
108 | } | 109 | } |
109 | 110 | ||
110 | private <A, C> PartialInterpretationRefiner<A, C> createRefiner( | 111 | private <A extends AbstractValue<A, C>, C> PartialInterpretationRefiner<A, C> createRefiner( |
111 | PartialInterpretationRefiner.Factory<A, C> factory, AnyPartialSymbol symbol) { | 112 | PartialInterpretationRefiner.Factory<A, C> factory, AnyPartialSymbol symbol) { |
112 | // The builder only allows well-typed assignment of interpreters to symbols. | 113 | // The builder only allows well-typed assignment of interpreters to symbols. |
113 | @SuppressWarnings("unchecked") | 114 | @SuppressWarnings("unchecked") |
@@ -126,8 +127,8 @@ class ReasoningAdapterImpl implements ReasoningAdapter { | |||
126 | } | 127 | } |
127 | 128 | ||
128 | @Override | 129 | @Override |
129 | public <A, C> PartialInterpretation<A, C> getPartialInterpretation(Concreteness concreteness, | 130 | public <A extends AbstractValue<A, C>, C> PartialInterpretation<A, C> getPartialInterpretation( |
130 | PartialSymbol<A, C> partialSymbol) { | 131 | Concreteness concreteness, PartialSymbol<A, C> partialSymbol) { |
131 | var map = partialInterpretations[concreteness.ordinal()]; | 132 | var map = partialInterpretations[concreteness.ordinal()]; |
132 | if (map == null) { | 133 | if (map == null) { |
133 | throw new IllegalArgumentException("No interpretation for concreteness: " + concreteness); | 134 | throw new IllegalArgumentException("No interpretation for concreteness: " + concreteness); |
@@ -143,7 +144,8 @@ class ReasoningAdapterImpl implements ReasoningAdapter { | |||
143 | } | 144 | } |
144 | 145 | ||
145 | @Override | 146 | @Override |
146 | public <A, C> PartialInterpretationRefiner<A, C> getRefiner(PartialSymbol<A, C> partialSymbol) { | 147 | public <A extends AbstractValue<A, C>, C> PartialInterpretationRefiner<A, C> getRefiner( |
148 | PartialSymbol<A, C> partialSymbol) { | ||
147 | var refiner = refiners.get(partialSymbol); | 149 | var refiner = refiners.get(partialSymbol); |
148 | if (refiner == null) { | 150 | if (refiner == null) { |
149 | throw new IllegalArgumentException("No refiner for partial symbol: " + partialSymbol); | 151 | throw new IllegalArgumentException("No refiner for partial symbol: " + partialSymbol); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java index 722458c8..87122b1d 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java | |||
@@ -12,10 +12,10 @@ import tools.refinery.store.dse.transition.objectives.Objectives; | |||
12 | import tools.refinery.store.model.ModelStore; | 12 | import tools.refinery.store.model.ModelStore; |
13 | import tools.refinery.store.model.ModelStoreBuilder; | 13 | import tools.refinery.store.model.ModelStoreBuilder; |
14 | import tools.refinery.store.query.ModelQueryBuilder; | 14 | import tools.refinery.store.query.ModelQueryBuilder; |
15 | import tools.refinery.store.query.dnf.Dnf; | 15 | import tools.refinery.logic.dnf.Dnf; |
16 | import tools.refinery.store.query.dnf.FunctionalQuery; | 16 | import tools.refinery.logic.dnf.FunctionalQuery; |
17 | import tools.refinery.store.query.dnf.Query; | 17 | import tools.refinery.logic.dnf.Query; |
18 | import tools.refinery.store.query.dnf.RelationalQuery; | 18 | import tools.refinery.logic.dnf.RelationalQuery; |
19 | import tools.refinery.store.reasoning.ReasoningBuilder; | 19 | import tools.refinery.store.reasoning.ReasoningBuilder; |
20 | import tools.refinery.store.reasoning.interpretation.PartialInterpretation; | 20 | import tools.refinery.store.reasoning.interpretation.PartialInterpretation; |
21 | import tools.refinery.store.reasoning.lifting.DnfLifter; | 21 | import tools.refinery.store.reasoning.lifting.DnfLifter; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java index ed291eac..4f51957b 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java | |||
@@ -5,11 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.interpretation; | 6 | package tools.refinery.store.reasoning.interpretation; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.reasoning.ReasoningAdapter; | 9 | import tools.refinery.store.reasoning.ReasoningAdapter; |
9 | import tools.refinery.store.reasoning.literal.Concreteness; | 10 | import tools.refinery.store.reasoning.literal.Concreteness; |
10 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
11 | 12 | ||
12 | public abstract class AbstractPartialInterpretation<A, C> implements PartialInterpretation<A, C> { | 13 | public abstract class AbstractPartialInterpretation<A extends AbstractValue<A, C>, C> |
14 | implements PartialInterpretation<A, C> { | ||
13 | private final ReasoningAdapter adapter; | 15 | private final ReasoningAdapter adapter; |
14 | private final PartialSymbol<A, C> partialSymbol; | 16 | private final PartialSymbol<A, C> partialSymbol; |
15 | private final Concreteness concreteness; | 17 | private final Concreteness concreteness; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java index 86ffe751..5a304030 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java | |||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.interpretation; | 6 | package tools.refinery.store.reasoning.interpretation; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.map.Cursor; | 9 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.model.ModelStoreBuilder; | 10 | import tools.refinery.store.model.ModelStoreBuilder; |
10 | import tools.refinery.store.reasoning.ReasoningAdapter; | 11 | import tools.refinery.store.reasoning.ReasoningAdapter; |
@@ -14,7 +15,7 @@ import tools.refinery.store.tuple.Tuple; | |||
14 | 15 | ||
15 | import java.util.Set; | 16 | import java.util.Set; |
16 | 17 | ||
17 | public non-sealed interface PartialInterpretation<A, C> extends AnyPartialInterpretation { | 18 | public non-sealed interface PartialInterpretation<A extends AbstractValue<A, C>, C> extends AnyPartialInterpretation { |
18 | @Override | 19 | @Override |
19 | PartialSymbol<A, C> getPartialSymbol(); | 20 | PartialSymbol<A, C> getPartialSymbol(); |
20 | 21 | ||
@@ -23,7 +24,7 @@ public non-sealed interface PartialInterpretation<A, C> extends AnyPartialInterp | |||
23 | Cursor<Tuple, A> getAll(); | 24 | Cursor<Tuple, A> getAll(); |
24 | 25 | ||
25 | @FunctionalInterface | 26 | @FunctionalInterface |
26 | interface Factory<A, C> { | 27 | interface Factory<A extends AbstractValue<A, C>, C> { |
27 | PartialInterpretation<A, C> create(ReasoningAdapter adapter, Concreteness concreteness, | 28 | PartialInterpretation<A, C> create(ReasoningAdapter adapter, Concreteness concreteness, |
28 | PartialSymbol<A, C> partialSymbol); | 29 | PartialSymbol<A, C> partialSymbol); |
29 | 30 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java index 6ad35c20..72ad386c 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java | |||
@@ -5,9 +5,9 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.interpretation; | 6 | package tools.refinery.store.reasoning.interpretation; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 8 | import tools.refinery.logic.literal.AbstractCallLiteral; |
9 | import tools.refinery.store.query.literal.Literal; | 9 | import tools.refinery.logic.literal.Literal; |
10 | import tools.refinery.store.query.term.Variable; | 10 | import tools.refinery.logic.term.Variable; |
11 | import tools.refinery.store.reasoning.literal.Concreteness; | 11 | import tools.refinery.store.reasoning.literal.Concreteness; |
12 | import tools.refinery.store.reasoning.literal.Modality; | 12 | import tools.refinery.store.reasoning.literal.Modality; |
13 | 13 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java index 5cdaa185..8fe34b27 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java | |||
@@ -9,12 +9,12 @@ import tools.refinery.store.map.Cursor; | |||
9 | import tools.refinery.store.model.ModelStoreBuilder; | 9 | import tools.refinery.store.model.ModelStoreBuilder; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.ModelQueryBuilder; | 11 | import tools.refinery.store.query.ModelQueryBuilder; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.resultset.ResultSet; | 13 | import tools.refinery.store.query.resultset.ResultSet; |
14 | import tools.refinery.store.reasoning.ReasoningAdapter; | 14 | import tools.refinery.store.reasoning.ReasoningAdapter; |
15 | import tools.refinery.store.reasoning.literal.Concreteness; | 15 | import tools.refinery.store.reasoning.literal.Concreteness; |
16 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 16 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
17 | import tools.refinery.store.representation.TruthValue; | 17 | import tools.refinery.logic.term.truthvalue.TruthValue; |
18 | import tools.refinery.store.tuple.Tuple; | 18 | import tools.refinery.store.tuple.Tuple; |
19 | 19 | ||
20 | import java.util.Set; | 20 | import java.util.Set; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java index 78fdbb89..a6850e75 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java | |||
@@ -5,10 +5,10 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.interpretation; | 6 | package tools.refinery.store.reasoning.interpretation; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.RelationalQuery; | 8 | import tools.refinery.logic.dnf.RelationalQuery; |
9 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 9 | import tools.refinery.logic.literal.AbstractCallLiteral; |
10 | import tools.refinery.store.query.literal.Literal; | 10 | import tools.refinery.logic.literal.Literal; |
11 | import tools.refinery.store.query.term.Variable; | 11 | import tools.refinery.logic.term.Variable; |
12 | import tools.refinery.store.reasoning.literal.Concreteness; | 12 | import tools.refinery.store.reasoning.literal.Concreteness; |
13 | import tools.refinery.store.reasoning.literal.Modality; | 13 | import tools.refinery.store.reasoning.literal.Modality; |
14 | 14 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java index 17916c02..02e16dc5 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java | |||
@@ -5,13 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.lifting; | 6 | package tools.refinery.store.reasoning.lifting; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.dnf.Dnf; | 9 | import tools.refinery.logic.dnf.Dnf; |
10 | import tools.refinery.store.query.dnf.DnfClause; | 10 | import tools.refinery.logic.dnf.DnfClause; |
11 | import tools.refinery.store.query.literal.*; | 11 | import tools.refinery.logic.literal.*; |
12 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.logic.term.NodeVariable; |
13 | import tools.refinery.store.query.term.ParameterDirection; | 13 | import tools.refinery.logic.term.ParameterDirection; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | import tools.refinery.store.reasoning.ReasoningAdapter; | 15 | import tools.refinery.store.reasoning.ReasoningAdapter; |
16 | import tools.refinery.store.reasoning.literal.Concreteness; | 16 | import tools.refinery.store.reasoning.literal.Concreteness; |
17 | import tools.refinery.store.reasoning.literal.ModalConstraint; | 17 | import tools.refinery.store.reasoning.literal.ModalConstraint; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java index 889f595f..1eeb5de1 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java | |||
@@ -5,9 +5,9 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.lifting; | 6 | package tools.refinery.store.reasoning.lifting; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.*; | 8 | import tools.refinery.logic.dnf.*; |
9 | import tools.refinery.store.query.equality.DnfEqualityChecker; | 9 | import tools.refinery.logic.equality.DnfEqualityChecker; |
10 | import tools.refinery.store.query.literal.Literal; | 10 | import tools.refinery.logic.literal.Literal; |
11 | import tools.refinery.store.reasoning.literal.Concreteness; | 11 | import tools.refinery.store.reasoning.literal.Concreteness; |
12 | import tools.refinery.store.reasoning.literal.Modality; | 12 | import tools.refinery.store.reasoning.literal.Modality; |
13 | 13 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java index 91dd2b72..e4c180fc 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java | |||
@@ -5,13 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 9 | import tools.refinery.logic.literal.AbstractCallLiteral; |
10 | import tools.refinery.store.query.literal.AbstractCountLiteral; | 10 | import tools.refinery.logic.literal.AbstractCountLiteral; |
11 | import tools.refinery.store.query.literal.Literal; | 11 | import tools.refinery.logic.literal.Literal; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.DataVariable; | 13 | import tools.refinery.logic.term.DataVariable; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.List; | 16 | import java.util.List; |
17 | 17 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java index 94c9399d..2faeda22 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java | |||
@@ -5,13 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 9 | import tools.refinery.logic.literal.AbstractCallLiteral; |
10 | import tools.refinery.store.query.literal.AbstractCountLiteral; | 10 | import tools.refinery.logic.literal.AbstractCountLiteral; |
11 | import tools.refinery.store.query.literal.Literal; | 11 | import tools.refinery.logic.literal.Literal; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.DataVariable; | 13 | import tools.refinery.logic.term.DataVariable; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.List; | 16 | import java.util.List; |
17 | 17 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java index b75b0cab..c009cfae 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java | |||
@@ -5,13 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 9 | import tools.refinery.logic.literal.AbstractCallLiteral; |
10 | import tools.refinery.store.query.literal.AbstractCountLiteral; | 10 | import tools.refinery.logic.literal.AbstractCountLiteral; |
11 | import tools.refinery.store.query.literal.Literal; | 11 | import tools.refinery.logic.literal.Literal; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.DataVariable; | 13 | import tools.refinery.logic.term.DataVariable; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | 15 | ||
16 | import java.util.List; | 16 | import java.util.List; |
17 | 17 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java index 03842143..84bea8c0 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java | |||
@@ -5,15 +5,15 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 9 | import tools.refinery.logic.literal.AbstractCallLiteral; |
10 | import tools.refinery.store.query.literal.AbstractCountLiteral; | 10 | import tools.refinery.logic.literal.AbstractCountLiteral; |
11 | import tools.refinery.store.query.literal.Literal; | 11 | import tools.refinery.logic.literal.Literal; |
12 | import tools.refinery.store.query.substitution.Substitution; | 12 | import tools.refinery.logic.substitution.Substitution; |
13 | import tools.refinery.store.query.term.DataVariable; | 13 | import tools.refinery.logic.term.DataVariable; |
14 | import tools.refinery.store.query.term.Variable; | 14 | import tools.refinery.logic.term.Variable; |
15 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | 15 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; |
16 | import tools.refinery.store.representation.cardinality.UpperCardinality; | 16 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; |
17 | 17 | ||
18 | import java.util.List; | 18 | import java.util.List; |
19 | 19 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java index 2235a95d..6b8af460 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.Constraint; |
9 | import tools.refinery.store.query.InvalidQueryException; | 9 | import tools.refinery.logic.InvalidQueryException; |
10 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 10 | import tools.refinery.logic.equality.LiteralEqualityHelper; |
11 | import tools.refinery.store.query.literal.Reduction; | 11 | import tools.refinery.logic.literal.Reduction; |
12 | import tools.refinery.store.query.term.Parameter; | 12 | import tools.refinery.logic.term.Parameter; |
13 | import tools.refinery.store.query.view.AnySymbolView; | 13 | import tools.refinery.store.query.view.AnySymbolView; |
14 | 14 | ||
15 | import java.util.List; | 15 | import java.util.List; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java index c99a0399..045b7147 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java | |||
@@ -5,7 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.literal.CallPolarity; | 8 | |
9 | import tools.refinery.logic.literal.CallPolarity; | ||
9 | 10 | ||
10 | import java.util.Locale; | 11 | import java.util.Locale; |
11 | 12 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java index 2614c26e..72b085a5 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java | |||
@@ -5,8 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.literal; | 6 | package tools.refinery.store.reasoning.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.InvalidQueryException; | 8 | import tools.refinery.logic.InvalidQueryException; |
9 | import tools.refinery.store.query.literal.CallLiteral; | 9 | import tools.refinery.logic.literal.CallLiteral; |
10 | 10 | ||
11 | public final class PartialLiterals { | 11 | public final class PartialLiterals { |
12 | private PartialLiterals() { | 12 | private PartialLiterals() { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java index a7fc5b7e..42943490 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java | |||
@@ -1,14 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.refinement; | 6 | package tools.refinery.store.reasoning.refinement; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.reasoning.ReasoningAdapter; | 9 | import tools.refinery.store.reasoning.ReasoningAdapter; |
9 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 10 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
10 | 11 | ||
11 | public abstract class AbstractPartialInterpretationRefiner<A, C> implements PartialInterpretationRefiner<A, C> { | 12 | public abstract class AbstractPartialInterpretationRefiner<A extends AbstractValue<A, C>, C> |
13 | implements PartialInterpretationRefiner<A, C> { | ||
12 | private final ReasoningAdapter adapter; | 14 | private final ReasoningAdapter adapter; |
13 | private final PartialSymbol<A, C> partialSymbol; | 15 | private final PartialSymbol<A, C> partialSymbol; |
14 | 16 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java index ebb9b824..d6ac0e9d 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java | |||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.refinement; | 6 | package tools.refinery.store.reasoning.refinement; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.model.Interpretation; | 9 | import tools.refinery.store.model.Interpretation; |
9 | import tools.refinery.store.reasoning.ReasoningAdapter; | 10 | import tools.refinery.store.reasoning.ReasoningAdapter; |
10 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
@@ -13,7 +14,8 @@ import tools.refinery.store.tuple.Tuple; | |||
13 | 14 | ||
14 | import java.util.Objects; | 15 | import java.util.Objects; |
15 | 16 | ||
16 | public class ConcreteSymbolRefiner<A, C> extends AbstractPartialInterpretationRefiner<A, C> { | 17 | public class ConcreteSymbolRefiner<A extends AbstractValue<A, C>, C> |
18 | extends AbstractPartialInterpretationRefiner<A, C> { | ||
17 | private final Interpretation<A> interpretation; | 19 | private final Interpretation<A> interpretation; |
18 | 20 | ||
19 | public ConcreteSymbolRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol, | 21 | public ConcreteSymbolRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol, |
@@ -25,14 +27,14 @@ public class ConcreteSymbolRefiner<A, C> extends AbstractPartialInterpretationRe | |||
25 | @Override | 27 | @Override |
26 | public boolean merge(Tuple key, A value) { | 28 | public boolean merge(Tuple key, A value) { |
27 | var currentValue = interpretation.get(key); | 29 | var currentValue = interpretation.get(key); |
28 | var mergedValue = getPartialSymbol().abstractDomain().commonRefinement(currentValue, value); | 30 | var mergedValue = currentValue.meet(value); |
29 | if (!Objects.equals(currentValue, mergedValue)) { | 31 | if (!Objects.equals(currentValue, mergedValue)) { |
30 | interpretation.put(key, mergedValue); | 32 | interpretation.put(key, mergedValue); |
31 | } | 33 | } |
32 | return true; | 34 | return true; |
33 | } | 35 | } |
34 | 36 | ||
35 | public static <A1, C1> Factory<A1, C1> of(Symbol<A1> concreteSymbol) { | 37 | public static <A1 extends AbstractValue<A1, C1>, C1> Factory<A1, C1> of(Symbol<A1> concreteSymbol) { |
36 | return (adapter, partialSymbol) -> new ConcreteSymbolRefiner<>(adapter, partialSymbol, concreteSymbol); | 38 | return (adapter, partialSymbol) -> new ConcreteSymbolRefiner<>(adapter, partialSymbol, concreteSymbol); |
37 | } | 39 | } |
38 | } | 40 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java index f48d1d1f..c8b182b8 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java | |||
@@ -1,22 +1,24 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.refinement; | 6 | package tools.refinery.store.reasoning.refinement; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.reasoning.ReasoningAdapter; | 9 | import tools.refinery.store.reasoning.ReasoningAdapter; |
9 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 10 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
10 | import tools.refinery.store.tuple.Tuple; | 11 | import tools.refinery.store.tuple.Tuple; |
11 | 12 | ||
12 | public non-sealed interface PartialInterpretationRefiner<A, C> extends AnyPartialInterpretationRefiner { | 13 | public non-sealed interface PartialInterpretationRefiner<A extends AbstractValue<A, C>, C> |
14 | extends AnyPartialInterpretationRefiner { | ||
13 | @Override | 15 | @Override |
14 | PartialSymbol<A, C> getPartialSymbol(); | 16 | PartialSymbol<A, C> getPartialSymbol(); |
15 | 17 | ||
16 | boolean merge(Tuple key, A value); | 18 | boolean merge(Tuple key, A value); |
17 | 19 | ||
18 | @FunctionalInterface | 20 | @FunctionalInterface |
19 | interface Factory<A, C> { | 21 | interface Factory<A extends AbstractValue<A, C>, C> { |
20 | PartialInterpretationRefiner<A, C> create(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol); | 22 | PartialInterpretationRefiner<A, C> create(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol); |
21 | } | 23 | } |
22 | } | 24 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java index b6bccb01..1a2c03a6 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java | |||
@@ -1,16 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.refinement; | 6 | package tools.refinery.store.reasoning.refinement; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.reasoning.ReasoningAdapter; | 10 | import tools.refinery.store.reasoning.ReasoningAdapter; |
10 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
11 | import tools.refinery.store.reasoning.seed.ModelSeed; | 12 | import tools.refinery.store.reasoning.seed.ModelSeed; |
12 | 13 | ||
13 | public class RefinementBasedInitializer<A, C> implements PartialModelInitializer { | 14 | public class RefinementBasedInitializer<A extends AbstractValue<A, C>, C> implements PartialModelInitializer { |
14 | private final PartialSymbol<A, C> partialSymbol; | 15 | private final PartialSymbol<A, C> partialSymbol; |
15 | 16 | ||
16 | public RefinementBasedInitializer(PartialSymbol<A, C> partialSymbol) { | 17 | public RefinementBasedInitializer(PartialSymbol<A, C> partialSymbol) { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/AnyPartialSymbol.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/AnyPartialSymbol.java index 788eef73..3e10c6c1 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/AnyPartialSymbol.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/AnyPartialSymbol.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.representation; | 6 | package tools.refinery.store.reasoning.representation; |
7 | 7 | ||
8 | import tools.refinery.store.representation.AnyAbstractDomain; | 8 | import tools.refinery.logic.AnyAbstractDomain; |
9 | 9 | ||
10 | public sealed interface AnyPartialSymbol permits AnyPartialFunction, PartialSymbol { | 10 | public sealed interface AnyPartialSymbol permits AnyPartialFunction, PartialSymbol { |
11 | String name(); | 11 | String name(); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java index e59c8af8..88b98da8 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java | |||
@@ -1,14 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.representation; | 6 | package tools.refinery.store.reasoning.representation; |
7 | 7 | ||
8 | import tools.refinery.store.representation.AbstractDomain; | 8 | import tools.refinery.logic.AbstractDomain; |
9 | import tools.refinery.logic.AbstractValue; | ||
9 | 10 | ||
10 | public record PartialFunction<A, C>(String name, int arity, AbstractDomain<A, C> abstractDomain) | 11 | public record PartialFunction<A extends AbstractValue<A, C>, C>( |
11 | implements AnyPartialFunction, PartialSymbol<A, C> { | 12 | String name, int arity, AbstractDomain<A, C> abstractDomain) implements AnyPartialFunction, |
13 | PartialSymbol<A, C> { | ||
12 | @Override | 14 | @Override |
13 | public A defaultValue() { | 15 | public A defaultValue() { |
14 | return null; | 16 | return null; |
@@ -21,7 +23,7 @@ public record PartialFunction<A, C>(String name, int arity, AbstractDomain<A, C> | |||
21 | 23 | ||
22 | @Override | 24 | @Override |
23 | public int hashCode() { | 25 | public int hashCode() { |
24 | // Compare by identity to make hash table lookups more efficient. | 26 | // Compare by identity to make hash table look-ups more efficient. |
25 | return System.identityHashCode(this); | 27 | return System.identityHashCode(this); |
26 | } | 28 | } |
27 | 29 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java index 4ccb7033..0f108247 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.representation; | 6 | package tools.refinery.store.reasoning.representation; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.logic.AbstractDomain; |
9 | import tools.refinery.store.query.term.Parameter; | 9 | import tools.refinery.logic.Constraint; |
10 | import tools.refinery.store.representation.AbstractDomain; | 10 | import tools.refinery.logic.term.Parameter; |
11 | import tools.refinery.store.representation.TruthValue; | 11 | import tools.refinery.logic.term.truthvalue.TruthValue; |
12 | import tools.refinery.store.representation.TruthValueDomain; | 12 | import tools.refinery.logic.term.truthvalue.TruthValueDomain; |
13 | 13 | ||
14 | import java.util.Arrays; | 14 | import java.util.Arrays; |
15 | import java.util.List; | 15 | import java.util.List; |
@@ -44,7 +44,7 @@ public record PartialRelation(String name, int arity) implements PartialSymbol<T | |||
44 | 44 | ||
45 | @Override | 45 | @Override |
46 | public int hashCode() { | 46 | public int hashCode() { |
47 | // Compare by identity to make hash table lookups more efficient. | 47 | // Compare by identity to make hash table look-ups more efficient. |
48 | return System.identityHashCode(this); | 48 | return System.identityHashCode(this); |
49 | } | 49 | } |
50 | 50 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java index 38b2e466..21cbfefa 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java | |||
@@ -1,13 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.representation; | 6 | package tools.refinery.store.reasoning.representation; |
7 | 7 | ||
8 | import tools.refinery.store.representation.AbstractDomain; | 8 | import tools.refinery.logic.AbstractDomain; |
9 | import tools.refinery.logic.AbstractValue; | ||
9 | 10 | ||
10 | public sealed interface PartialSymbol<A, C> extends AnyPartialSymbol permits PartialFunction, PartialRelation { | 11 | public sealed interface PartialSymbol<A extends AbstractValue<A, C>, C> extends AnyPartialSymbol |
12 | permits PartialFunction, PartialRelation { | ||
11 | @Override | 13 | @Override |
12 | AbstractDomain<A, C> abstractDomain(); | 14 | AbstractDomain<A, C> abstractDomain(); |
13 | 15 | ||
@@ -17,7 +19,8 @@ public sealed interface PartialSymbol<A, C> extends AnyPartialSymbol permits Par | |||
17 | return new PartialRelation(name, arity); | 19 | return new PartialRelation(name, arity); |
18 | } | 20 | } |
19 | 21 | ||
20 | static <A, C> PartialFunction<A, C> of(String name, int arity, AbstractDomain<A, C> abstractDomain) { | 22 | static <A extends AbstractValue<A, C>, C> PartialFunction<A, C> of( |
23 | String name, int arity, AbstractDomain<A, C> abstractDomain) { | ||
21 | return new PartialFunction<>(name, arity, abstractDomain); | 24 | return new PartialFunction<>(name, arity, abstractDomain); |
22 | } | 25 | } |
23 | } | 26 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java index e6b3eaf9..9cd4862b 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java | |||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.seed; | 6 | package tools.refinery.store.reasoning.seed; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.map.Cursor; | 9 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.reasoning.representation.AnyPartialSymbol; | 10 | import tools.refinery.store.reasoning.representation.AnyPartialSymbol; |
10 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
@@ -29,7 +30,7 @@ public class ModelSeed { | |||
29 | return nodeCount; | 30 | return nodeCount; |
30 | } | 31 | } |
31 | 32 | ||
32 | public <A> Seed<A> getSeed(PartialSymbol<A, ?> partialSymbol) { | 33 | public <A extends AbstractValue<A, ?>> Seed<A> getSeed(PartialSymbol<A, ?> partialSymbol) { |
33 | var seed = seeds.get(partialSymbol); | 34 | var seed = seeds.get(partialSymbol); |
34 | if (seed == null) { | 35 | if (seed == null) { |
35 | throw new IllegalArgumentException("No seed for partial symbol " + partialSymbol); | 36 | throw new IllegalArgumentException("No seed for partial symbol " + partialSymbol); |
@@ -48,7 +49,8 @@ public class ModelSeed { | |||
48 | return Collections.unmodifiableSet(seeds.keySet()); | 49 | return Collections.unmodifiableSet(seeds.keySet()); |
49 | } | 50 | } |
50 | 51 | ||
51 | public <A> Cursor<Tuple, A> getCursor(PartialSymbol<A, ?> partialSymbol, A defaultValue) { | 52 | public <A extends AbstractValue<A, ?>> Cursor<Tuple, A> getCursor(PartialSymbol<A, ?> partialSymbol, |
53 | A defaultValue) { | ||
52 | return getSeed(partialSymbol).getCursor(defaultValue, nodeCount); | 54 | return getSeed(partialSymbol).getCursor(defaultValue, nodeCount); |
53 | } | 55 | } |
54 | 56 | ||
@@ -67,7 +69,7 @@ public class ModelSeed { | |||
67 | this.nodeCount = nodeCount; | 69 | this.nodeCount = nodeCount; |
68 | } | 70 | } |
69 | 71 | ||
70 | public <A> Builder seed(PartialSymbol<A, ?> partialSymbol, Seed<A> seed) { | 72 | public <A extends AbstractValue<A, ?>> Builder seed(PartialSymbol<A, ?> partialSymbol, Seed<A> seed) { |
71 | if (seed.arity() != partialSymbol.arity()) { | 73 | if (seed.arity() != partialSymbol.arity()) { |
72 | throw new IllegalStateException("Expected seed of arity %d for partial symbol %s, but got %d instead" | 74 | throw new IllegalStateException("Expected seed of arity %d for partial symbol %s, but got %d instead" |
73 | .formatted(partialSymbol.arity(), partialSymbol, seed.arity())); | 75 | .formatted(partialSymbol.arity(), partialSymbol, seed.arity())); |
@@ -82,7 +84,8 @@ public class ModelSeed { | |||
82 | return this; | 84 | return this; |
83 | } | 85 | } |
84 | 86 | ||
85 | public <A> Builder seed(PartialSymbol<A, ?> partialSymbol, Consumer<Seed.Builder<A>> callback) { | 87 | public <A extends AbstractValue<A, ?>> Builder seed(PartialSymbol<A, ?> partialSymbol, |
88 | Consumer<Seed.Builder<A>> callback) { | ||
86 | var builder = Seed.builder(partialSymbol); | 89 | var builder = Seed.builder(partialSymbol); |
87 | callback.accept(builder); | 90 | callback.accept(builder); |
88 | return seed(partialSymbol, builder.build()); | 91 | return seed(partialSymbol, builder.build()); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java index d9bad866..32562f01 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java | |||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.seed; | 6 | package tools.refinery.store.reasoning.seed; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.map.Cursor; | 9 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 10 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
10 | import tools.refinery.store.representation.Symbol; | 11 | import tools.refinery.store.representation.Symbol; |
@@ -33,7 +34,7 @@ public interface Seed<T> { | |||
33 | return builder(symbol.arity(), symbol.valueType(), symbol.defaultValue()); | 34 | return builder(symbol.arity(), symbol.valueType(), symbol.defaultValue()); |
34 | } | 35 | } |
35 | 36 | ||
36 | static <T> Builder<T> builder(PartialSymbol<T, ?> partialSymbol) { | 37 | static <T extends AbstractValue<T, ?>> Builder<T> builder(PartialSymbol<T, ?> partialSymbol) { |
37 | return builder(partialSymbol.arity(), partialSymbol.abstractDomain().abstractType(), | 38 | return builder(partialSymbol.arity(), partialSymbol.abstractDomain().abstractType(), |
38 | partialSymbol.defaultValue()); | 39 | partialSymbol.defaultValue()); |
39 | } | 40 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java index 9af457d8..138e3a64 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java | |||
@@ -1,16 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.seed; | 6 | package tools.refinery.store.reasoning.seed; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
9 | import tools.refinery.store.reasoning.refinement.PartialModelInitializer; | 10 | import tools.refinery.store.reasoning.refinement.PartialModelInitializer; |
10 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
11 | import tools.refinery.store.representation.Symbol; | 12 | import tools.refinery.store.representation.Symbol; |
12 | 13 | ||
13 | public class SeedInitializer<T> implements PartialModelInitializer { | 14 | public class SeedInitializer<T extends AbstractValue<T, ?>> implements PartialModelInitializer { |
14 | private final Symbol<T> symbol; | 15 | private final Symbol<T> symbol; |
15 | private final PartialSymbol<T, ?> partialSymbol; | 16 | private final PartialSymbol<T, ?> partialSymbol; |
16 | 17 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java index c2039afc..75fb3397 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java | |||
@@ -5,18 +5,19 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator; | 6 | package tools.refinery.store.reasoning.translator; |
7 | 7 | ||
8 | import tools.refinery.logic.Constraint; | ||
9 | import tools.refinery.logic.dnf.Query; | ||
10 | import tools.refinery.logic.dnf.QueryBuilder; | ||
11 | import tools.refinery.logic.dnf.RelationalQuery; | ||
12 | import tools.refinery.logic.literal.Literal; | ||
13 | import tools.refinery.logic.term.NodeVariable; | ||
14 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
8 | import tools.refinery.store.dse.transition.Rule; | 15 | import tools.refinery.store.dse.transition.Rule; |
9 | import tools.refinery.store.dse.transition.objectives.Criteria; | 16 | import tools.refinery.store.dse.transition.objectives.Criteria; |
10 | import tools.refinery.store.dse.transition.objectives.Criterion; | 17 | import tools.refinery.store.dse.transition.objectives.Criterion; |
11 | import tools.refinery.store.dse.transition.objectives.Objective; | 18 | import tools.refinery.store.dse.transition.objectives.Objective; |
12 | import tools.refinery.store.dse.transition.objectives.Objectives; | 19 | import tools.refinery.store.dse.transition.objectives.Objectives; |
13 | import tools.refinery.store.model.ModelStoreBuilder; | 20 | import tools.refinery.store.model.ModelStoreBuilder; |
14 | import tools.refinery.store.query.Constraint; | ||
15 | import tools.refinery.store.query.dnf.Query; | ||
16 | import tools.refinery.store.query.dnf.QueryBuilder; | ||
17 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
18 | import tools.refinery.store.query.literal.Literal; | ||
19 | import tools.refinery.store.query.term.NodeVariable; | ||
20 | import tools.refinery.store.query.view.MayView; | 21 | import tools.refinery.store.query.view.MayView; |
21 | import tools.refinery.store.query.view.MustView; | 22 | import tools.refinery.store.query.view.MustView; |
22 | import tools.refinery.store.reasoning.ReasoningAdapter; | 23 | import tools.refinery.store.reasoning.ReasoningAdapter; |
@@ -36,12 +37,11 @@ import tools.refinery.store.reasoning.refinement.StorageRefiner; | |||
36 | import tools.refinery.store.reasoning.representation.PartialRelation; | 37 | import tools.refinery.store.reasoning.representation.PartialRelation; |
37 | import tools.refinery.store.representation.AnySymbol; | 38 | import tools.refinery.store.representation.AnySymbol; |
38 | import tools.refinery.store.representation.Symbol; | 39 | import tools.refinery.store.representation.Symbol; |
39 | import tools.refinery.store.representation.TruthValue; | ||
40 | 40 | ||
41 | import java.util.ArrayList; | 41 | import java.util.ArrayList; |
42 | import java.util.function.BiConsumer; | 42 | import java.util.function.BiConsumer; |
43 | 43 | ||
44 | import static tools.refinery.store.query.literal.Literals.not; | 44 | import static tools.refinery.logic.literal.Literals.not; |
45 | 45 | ||
46 | @SuppressWarnings("UnusedReturnValue") | 46 | @SuppressWarnings("UnusedReturnValue") |
47 | public final class PartialRelationTranslator extends PartialSymbolTranslator<TruthValue, Boolean> { | 47 | public final class PartialRelationTranslator extends PartialSymbolTranslator<TruthValue, Boolean> { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java index 6cdb287d..f2583098 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java | |||
@@ -6,6 +6,7 @@ | |||
6 | package tools.refinery.store.reasoning.translator; | 6 | package tools.refinery.store.reasoning.translator; |
7 | 7 | ||
8 | import org.jetbrains.annotations.Nullable; | 8 | import org.jetbrains.annotations.Nullable; |
9 | import tools.refinery.logic.AbstractValue; | ||
9 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; | 10 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; |
10 | import tools.refinery.store.dse.transition.Rule; | 11 | import tools.refinery.store.dse.transition.Rule; |
11 | import tools.refinery.store.dse.transition.objectives.Criterion; | 12 | import tools.refinery.store.dse.transition.objectives.Criterion; |
@@ -25,8 +26,8 @@ import java.util.ArrayList; | |||
25 | import java.util.List; | 26 | import java.util.List; |
26 | 27 | ||
27 | @SuppressWarnings("UnusedReturnValue") | 28 | @SuppressWarnings("UnusedReturnValue") |
28 | public abstract sealed class PartialSymbolTranslator<A, C> implements AnyPartialSymbolTranslator | 29 | public abstract sealed class PartialSymbolTranslator<A extends AbstractValue<A, C>, C> |
29 | permits PartialRelationTranslator { | 30 | implements AnyPartialSymbolTranslator permits PartialRelationTranslator { |
30 | private final PartialSymbol<A, C> partialSymbol; | 31 | private final PartialSymbol<A, C> partialSymbol; |
31 | private boolean configured = false; | 32 | private boolean configured = false; |
32 | protected PartialInterpretationRefiner.Factory<A, C> interpretationRefiner; | 33 | protected PartialInterpretationRefiner.Factory<A, C> interpretationRefiner; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java index c85bd8b7..1183d456 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java | |||
@@ -5,16 +5,18 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.containment; | 6 | package tools.refinery.store.reasoning.translator.containment; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.Query; | ||
9 | import tools.refinery.logic.dnf.RelationalQuery; | ||
10 | import tools.refinery.logic.literal.Connectivity; | ||
11 | import tools.refinery.logic.literal.Literal; | ||
12 | import tools.refinery.logic.literal.RepresentativeElectionLiteral; | ||
13 | import tools.refinery.logic.term.Variable; | ||
14 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; | ||
15 | import tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality; | ||
8 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; | 16 | import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder; |
9 | import tools.refinery.store.dse.transition.Rule; | 17 | import tools.refinery.store.dse.transition.Rule; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 18 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.model.ModelStoreConfiguration; | 19 | import tools.refinery.store.model.ModelStoreConfiguration; |
12 | import tools.refinery.store.query.dnf.Query; | ||
13 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
14 | import tools.refinery.store.query.literal.Connectivity; | ||
15 | import tools.refinery.store.query.literal.Literal; | ||
16 | import tools.refinery.store.query.literal.RepresentativeElectionLiteral; | ||
17 | import tools.refinery.store.query.term.Variable; | ||
18 | import tools.refinery.store.query.view.AnySymbolView; | 20 | import tools.refinery.store.query.view.AnySymbolView; |
19 | import tools.refinery.store.reasoning.lifting.DnfLifter; | 21 | import tools.refinery.store.reasoning.lifting.DnfLifter; |
20 | import tools.refinery.store.reasoning.literal.Concreteness; | 22 | import tools.refinery.store.reasoning.literal.Concreteness; |
@@ -28,17 +30,15 @@ import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslat | |||
28 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; | 30 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; |
29 | import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator; | 31 | import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator; |
30 | import tools.refinery.store.representation.Symbol; | 32 | import tools.refinery.store.representation.Symbol; |
31 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | ||
32 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
33 | 33 | ||
34 | import java.util.ArrayList; | 34 | import java.util.ArrayList; |
35 | import java.util.List; | 35 | import java.util.List; |
36 | import java.util.Map; | 36 | import java.util.Map; |
37 | 37 | ||
38 | import static tools.refinery.store.query.literal.Literals.check; | 38 | import static tools.refinery.logic.term.int_.IntTerms.constant; |
39 | import static tools.refinery.store.query.literal.Literals.not; | 39 | import static tools.refinery.logic.term.int_.IntTerms.less; |
40 | import static tools.refinery.store.query.term.int_.IntTerms.constant; | 40 | import static tools.refinery.logic.literal.Literals.check; |
41 | import static tools.refinery.store.query.term.int_.IntTerms.less; | 41 | import static tools.refinery.logic.literal.Literals.not; |
42 | import static tools.refinery.store.reasoning.ReasoningAdapter.EXISTS_SYMBOL; | 42 | import static tools.refinery.store.reasoning.ReasoningAdapter.EXISTS_SYMBOL; |
43 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add; | 43 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add; |
44 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.focus; | 44 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.focus; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java index e44fcffd..e83c33ac 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java | |||
@@ -12,7 +12,7 @@ import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; | |||
12 | import tools.refinery.store.reasoning.representation.PartialRelation; | 12 | import tools.refinery.store.reasoning.representation.PartialRelation; |
13 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 13 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
14 | import tools.refinery.store.representation.Symbol; | 14 | import tools.refinery.store.representation.Symbol; |
15 | import tools.refinery.store.representation.TruthValue; | 15 | import tools.refinery.logic.term.truthvalue.TruthValue; |
16 | import tools.refinery.store.tuple.Tuple; | 16 | import tools.refinery.store.tuple.Tuple; |
17 | 17 | ||
18 | import java.util.ArrayList; | 18 | import java.util.ArrayList; |
@@ -64,7 +64,7 @@ class ContainmentLinkRefiner extends AbstractPartialInterpretationRefiner<TruthV | |||
64 | if (mustLinks.contains(factory.linkType)) { | 64 | if (mustLinks.contains(factory.linkType)) { |
65 | return oldValue; | 65 | return oldValue; |
66 | } | 66 | } |
67 | return new InferredContainment(oldValue.contains().merge(TruthValue.TRUE), | 67 | return new InferredContainment(oldValue.contains().meet(TruthValue.TRUE), |
68 | addToSet(mustLinks, factory.linkType), oldValue.forbiddenLinks()); | 68 | addToSet(mustLinks, factory.linkType), oldValue.forbiddenLinks()); |
69 | } | 69 | } |
70 | 70 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainsRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainsRefiner.java index a7196a1c..00820040 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainsRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainsRefiner.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -11,7 +11,7 @@ import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRe | |||
11 | import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; | 11 | import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; |
12 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 12 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
13 | import tools.refinery.store.representation.Symbol; | 13 | import tools.refinery.store.representation.Symbol; |
14 | import tools.refinery.store.representation.TruthValue; | 14 | import tools.refinery.logic.term.truthvalue.TruthValue; |
15 | import tools.refinery.store.tuple.Tuple; | 15 | import tools.refinery.store.tuple.Tuple; |
16 | 16 | ||
17 | import java.util.LinkedHashMap; | 17 | import java.util.LinkedHashMap; |
@@ -23,7 +23,7 @@ class ContainsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, B | |||
23 | 23 | ||
24 | static { | 24 | static { |
25 | var values = TruthValue.values(); | 25 | var values = TruthValue.values(); |
26 | EMPTY_VALUES = new LinkedHashMap<>(values.length); | 26 | EMPTY_VALUES = LinkedHashMap.newLinkedHashMap(values.length); |
27 | for (var value : values) { | 27 | for (var value : values) { |
28 | EMPTY_VALUES.put(value, new InferredContainment(value, Set.of(), Set.of())); | 28 | EMPTY_VALUES.put(value, new InferredContainment(value, Set.of(), Set.of())); |
29 | } | 29 | } |
@@ -53,7 +53,7 @@ class ContainsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, B | |||
53 | } | 53 | } |
54 | 54 | ||
55 | public InferredContainment mergeLink(InferredContainment oldValue, TruthValue toMerge) { | 55 | public InferredContainment mergeLink(InferredContainment oldValue, TruthValue toMerge) { |
56 | var newContains = oldValue.contains().merge(toMerge); | 56 | var newContains = oldValue.contains().meet(toMerge); |
57 | if (newContains.equals(oldValue.contains())) { | 57 | if (newContains.equals(oldValue.contains())) { |
58 | return oldValue; | 58 | return oldValue; |
59 | } | 59 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java index 8a757ed2..0b6503c3 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.reasoning.translator.containment; | 6 | package tools.refinery.store.reasoning.translator.containment; |
7 | 7 | ||
8 | import tools.refinery.store.reasoning.representation.PartialRelation; | 8 | import tools.refinery.store.reasoning.representation.PartialRelation; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | 10 | ||
11 | import java.util.Objects; | 11 | import java.util.Objects; |
12 | import java.util.Set; | 12 | import java.util.Set; |
@@ -31,11 +31,11 @@ final class InferredContainment { | |||
31 | Set<PartialRelation> forbiddenLinks) { | 31 | Set<PartialRelation> forbiddenLinks) { |
32 | var result = contains; | 32 | var result = contains; |
33 | if (!mustLinks.isEmpty()) { | 33 | if (!mustLinks.isEmpty()) { |
34 | result = result.merge(TruthValue.TRUE); | 34 | result = result.meet(TruthValue.TRUE); |
35 | } | 35 | } |
36 | boolean hasErrorLink = mustLinks.stream().anyMatch(forbiddenLinks::contains); | 36 | boolean hasErrorLink = mustLinks.stream().anyMatch(forbiddenLinks::contains); |
37 | if (mustLinks.size() >= 2 || hasErrorLink) { | 37 | if (mustLinks.size() >= 2 || hasErrorLink) { |
38 | result = result.merge(TruthValue.ERROR); | 38 | result = result.meet(TruthValue.ERROR); |
39 | } | 39 | } |
40 | return result; | 40 | return result; |
41 | } | 41 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java index c4a2f2b3..26449df5 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java | |||
@@ -5,22 +5,22 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.crossreference; | 6 | package tools.refinery.store.reasoning.translator.crossreference; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Query; | 8 | import tools.refinery.logic.dnf.Query; |
9 | import tools.refinery.store.query.dnf.RelationalQuery; | 9 | import tools.refinery.logic.dnf.RelationalQuery; |
10 | import tools.refinery.store.query.literal.Literal; | 10 | import tools.refinery.logic.literal.Literal; |
11 | import tools.refinery.store.query.term.NodeVariable; | 11 | import tools.refinery.logic.term.NodeVariable; |
12 | import tools.refinery.store.query.term.Variable; | 12 | import tools.refinery.logic.term.Variable; |
13 | import tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality; | ||
13 | import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral; | 14 | import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral; |
14 | import tools.refinery.store.reasoning.representation.PartialRelation; | 15 | import tools.refinery.store.reasoning.representation.PartialRelation; |
15 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 16 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
16 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
17 | 17 | ||
18 | import java.util.ArrayList; | 18 | import java.util.ArrayList; |
19 | import java.util.List; | 19 | import java.util.List; |
20 | 20 | ||
21 | import static tools.refinery.store.query.literal.Literals.check; | 21 | import static tools.refinery.logic.literal.Literals.check; |
22 | import static tools.refinery.store.query.term.int_.IntTerms.constant; | 22 | import static tools.refinery.logic.term.int_.IntTerms.constant; |
23 | import static tools.refinery.store.query.term.int_.IntTerms.less; | 23 | import static tools.refinery.logic.term.int_.IntTerms.less; |
24 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; | 24 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; |
25 | 25 | ||
26 | class CrossReferenceUtils { | 26 | class CrossReferenceUtils { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java index 7241b032..982f835f 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.reasoning.translator.crossreference; | |||
7 | 7 | ||
8 | import tools.refinery.store.reasoning.representation.PartialRelation; | 8 | import tools.refinery.store.reasoning.representation.PartialRelation; |
9 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 9 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
10 | import tools.refinery.store.representation.TruthValue; | 10 | import tools.refinery.logic.term.truthvalue.TruthValue; |
11 | 11 | ||
12 | public record DirectedCrossReferenceInfo(PartialRelation sourceType, Multiplicity sourceMultiplicity, | 12 | public record DirectedCrossReferenceInfo(PartialRelation sourceType, Multiplicity sourceMultiplicity, |
13 | PartialRelation targetType, Multiplicity targetMultiplicity, | 13 | PartialRelation targetType, Multiplicity targetMultiplicity, |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInitializer.java index 9347e91e..7cb16a28 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInitializer.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInitializer.java | |||
@@ -11,7 +11,7 @@ import tools.refinery.store.reasoning.refinement.PartialModelInitializer; | |||
11 | import tools.refinery.store.reasoning.representation.PartialRelation; | 11 | import tools.refinery.store.reasoning.representation.PartialRelation; |
12 | import tools.refinery.store.reasoning.seed.ModelSeed; | 12 | import tools.refinery.store.reasoning.seed.ModelSeed; |
13 | import tools.refinery.store.representation.Symbol; | 13 | import tools.refinery.store.representation.Symbol; |
14 | import tools.refinery.store.representation.TruthValue; | 14 | import tools.refinery.logic.term.truthvalue.TruthValue; |
15 | import tools.refinery.store.tuple.Tuple; | 15 | import tools.refinery.store.tuple.Tuple; |
16 | 16 | ||
17 | class DirectedCrossReferenceInitializer implements PartialModelInitializer { | 17 | class DirectedCrossReferenceInitializer implements PartialModelInitializer { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java index 2e804b44..75dd5dad 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java | |||
@@ -11,7 +11,7 @@ import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; | |||
11 | import tools.refinery.store.reasoning.representation.PartialRelation; | 11 | import tools.refinery.store.reasoning.representation.PartialRelation; |
12 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 12 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
13 | import tools.refinery.store.representation.Symbol; | 13 | import tools.refinery.store.representation.Symbol; |
14 | import tools.refinery.store.representation.TruthValue; | 14 | import tools.refinery.logic.term.truthvalue.TruthValue; |
15 | import tools.refinery.store.tuple.Tuple; | 15 | import tools.refinery.store.tuple.Tuple; |
16 | 16 | ||
17 | class DirectedCrossReferenceRefiner extends ConcreteSymbolRefiner<TruthValue, Boolean> { | 17 | class DirectedCrossReferenceRefiner extends ConcreteSymbolRefiner<TruthValue, Boolean> { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java index fc7477f1..5bf1f5ab 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java | |||
@@ -5,12 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.crossreference; | 6 | package tools.refinery.store.reasoning.translator.crossreference; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.Query; | ||
9 | import tools.refinery.logic.dnf.RelationalQuery; | ||
10 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
8 | import tools.refinery.store.dse.propagation.PropagationBuilder; | 11 | import tools.refinery.store.dse.propagation.PropagationBuilder; |
9 | import tools.refinery.store.dse.transition.Rule; | 12 | import tools.refinery.store.dse.transition.Rule; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 13 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.model.ModelStoreConfiguration; | 14 | import tools.refinery.store.model.ModelStoreConfiguration; |
12 | import tools.refinery.store.query.dnf.Query; | ||
13 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
14 | import tools.refinery.store.query.view.ForbiddenView; | 15 | import tools.refinery.store.query.view.ForbiddenView; |
15 | import tools.refinery.store.reasoning.lifting.DnfLifter; | 16 | import tools.refinery.store.reasoning.lifting.DnfLifter; |
16 | import tools.refinery.store.reasoning.literal.Concreteness; | 17 | import tools.refinery.store.reasoning.literal.Concreteness; |
@@ -21,9 +22,8 @@ import tools.refinery.store.reasoning.translator.TranslationException; | |||
21 | import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator; | 22 | import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator; |
22 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 23 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
23 | import tools.refinery.store.representation.Symbol; | 24 | import tools.refinery.store.representation.Symbol; |
24 | import tools.refinery.store.representation.TruthValue; | ||
25 | 25 | ||
26 | import static tools.refinery.store.query.literal.Literals.not; | 26 | import static tools.refinery.logic.literal.Literals.not; |
27 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add; | 27 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add; |
28 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.merge; | 28 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.merge; |
29 | import static tools.refinery.store.reasoning.literal.PartialLiterals.*; | 29 | import static tools.refinery.store.reasoning.literal.PartialLiterals.*; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java index 34e9032a..560eb04a 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.reasoning.translator.crossreference; | |||
7 | 7 | ||
8 | import tools.refinery.store.reasoning.representation.PartialRelation; | 8 | import tools.refinery.store.reasoning.representation.PartialRelation; |
9 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 9 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
10 | import tools.refinery.store.representation.TruthValue; | 10 | import tools.refinery.logic.term.truthvalue.TruthValue; |
11 | 11 | ||
12 | public record UndirectedCrossReferenceInfo(PartialRelation type, Multiplicity multiplicity, TruthValue defaultValue) { | 12 | public record UndirectedCrossReferenceInfo(PartialRelation type, Multiplicity multiplicity, TruthValue defaultValue) { |
13 | public boolean isConstrained() { | 13 | public boolean isConstrained() { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInitializer.java index 77339aa0..84dcfdc5 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInitializer.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInitializer.java | |||
@@ -13,7 +13,7 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
13 | import tools.refinery.store.reasoning.seed.ModelSeed; | 13 | import tools.refinery.store.reasoning.seed.ModelSeed; |
14 | import tools.refinery.store.reasoning.translator.TranslationException; | 14 | import tools.refinery.store.reasoning.translator.TranslationException; |
15 | import tools.refinery.store.representation.Symbol; | 15 | import tools.refinery.store.representation.Symbol; |
16 | import tools.refinery.store.representation.TruthValue; | 16 | import tools.refinery.logic.term.truthvalue.TruthValue; |
17 | import tools.refinery.store.tuple.Tuple; | 17 | import tools.refinery.store.tuple.Tuple; |
18 | 18 | ||
19 | import java.util.LinkedHashMap; | 19 | import java.util.LinkedHashMap; |
@@ -73,7 +73,7 @@ class UndirectedCrossReferenceInitializer implements PartialModelInitializer { | |||
73 | // Already processed entry. | 73 | // Already processed entry. |
74 | continue; | 74 | continue; |
75 | } | 75 | } |
76 | var mergedValue = value.merge(oppositeValue == null ? defaultValue : oppositeValue); | 76 | var mergedValue = value.meet(oppositeValue == null ? defaultValue : oppositeValue); |
77 | mergedMap.put(key, mergedValue); | 77 | mergedMap.put(key, mergedValue); |
78 | if (first != second) { | 78 | if (first != second) { |
79 | mergedMap.put(oppositeKey, mergedValue); | 79 | mergedMap.put(oppositeKey, mergedValue); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java index 43c1462b..54aca80f 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java | |||
@@ -11,7 +11,7 @@ import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; | |||
11 | import tools.refinery.store.reasoning.representation.PartialRelation; | 11 | import tools.refinery.store.reasoning.representation.PartialRelation; |
12 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 12 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
13 | import tools.refinery.store.representation.Symbol; | 13 | import tools.refinery.store.representation.Symbol; |
14 | import tools.refinery.store.representation.TruthValue; | 14 | import tools.refinery.logic.term.truthvalue.TruthValue; |
15 | import tools.refinery.store.tuple.Tuple; | 15 | import tools.refinery.store.tuple.Tuple; |
16 | 16 | ||
17 | class UndirectedCrossReferenceRefiner extends ConcreteSymbolRefiner<TruthValue, Boolean> { | 17 | class UndirectedCrossReferenceRefiner extends ConcreteSymbolRefiner<TruthValue, Boolean> { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java index b76838b3..97c0b800 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java | |||
@@ -9,7 +9,7 @@ import tools.refinery.store.dse.propagation.PropagationBuilder; | |||
9 | import tools.refinery.store.dse.transition.Rule; | 9 | import tools.refinery.store.dse.transition.Rule; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 10 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.model.ModelStoreConfiguration; | 11 | import tools.refinery.store.model.ModelStoreConfiguration; |
12 | import tools.refinery.store.query.dnf.Query; | 12 | import tools.refinery.logic.dnf.Query; |
13 | import tools.refinery.store.query.view.ForbiddenView; | 13 | import tools.refinery.store.query.view.ForbiddenView; |
14 | import tools.refinery.store.reasoning.lifting.DnfLifter; | 14 | import tools.refinery.store.reasoning.lifting.DnfLifter; |
15 | import tools.refinery.store.reasoning.literal.Concreteness; | 15 | import tools.refinery.store.reasoning.literal.Concreteness; |
@@ -19,9 +19,9 @@ import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | |||
19 | import tools.refinery.store.reasoning.translator.TranslationException; | 19 | import tools.refinery.store.reasoning.translator.TranslationException; |
20 | import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator; | 20 | import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator; |
21 | import tools.refinery.store.representation.Symbol; | 21 | import tools.refinery.store.representation.Symbol; |
22 | import tools.refinery.store.representation.TruthValue; | 22 | import tools.refinery.logic.term.truthvalue.TruthValue; |
23 | 23 | ||
24 | import static tools.refinery.store.query.literal.Literals.not; | 24 | import static tools.refinery.logic.literal.Literals.not; |
25 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add; | 25 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add; |
26 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.merge; | 26 | import static tools.refinery.store.reasoning.actions.PartialActionLiterals.merge; |
27 | import static tools.refinery.store.reasoning.literal.PartialLiterals.*; | 27 | import static tools.refinery.store.reasoning.literal.PartialLiterals.*; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java index a5047768..d1979b8c 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java | |||
@@ -131,7 +131,7 @@ public class MetamodelBuilder { | |||
131 | var oppositeInfo = referenceInfoMap.get(opposite); | 131 | var oppositeInfo = referenceInfoMap.get(opposite); |
132 | validateOpposite(linkType, info, opposite, oppositeInfo); | 132 | validateOpposite(linkType, info, opposite, oppositeInfo); |
133 | targetMultiplicity = oppositeInfo.multiplicity(); | 133 | targetMultiplicity = oppositeInfo.multiplicity(); |
134 | defaultValue = defaultValue.merge(oppositeInfo.defaultValue()); | 134 | defaultValue = defaultValue.meet(oppositeInfo.defaultValue()); |
135 | if (oppositeInfo.containment()) { | 135 | if (oppositeInfo.containment()) { |
136 | // Skip processing this reference and process it once we encounter its containment opposite. | 136 | // Skip processing this reference and process it once we encounter its containment opposite. |
137 | return; | 137 | return; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java index 9d7fc9c3..47a2e95f 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.reasoning.translator.metamodel; | |||
7 | 7 | ||
8 | import tools.refinery.store.reasoning.representation.PartialRelation; | 8 | import tools.refinery.store.reasoning.representation.PartialRelation; |
9 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 9 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
10 | import tools.refinery.store.representation.TruthValue; | 10 | import tools.refinery.logic.term.truthvalue.TruthValue; |
11 | 11 | ||
12 | public record ReferenceInfo(boolean containment, PartialRelation sourceType, Multiplicity multiplicity, | 12 | public record ReferenceInfo(boolean containment, PartialRelation sourceType, Multiplicity multiplicity, |
13 | PartialRelation targetType, PartialRelation opposite, TruthValue defaultValue) { | 13 | PartialRelation targetType, PartialRelation opposite, TruthValue defaultValue) { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfoBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfoBuilder.java index 43d01503..39240d6b 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfoBuilder.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfoBuilder.java | |||
@@ -11,8 +11,8 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
11 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; | 11 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; |
12 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 12 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
13 | import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity; | 13 | import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity; |
14 | import tools.refinery.store.representation.TruthValue; | 14 | import tools.refinery.logic.term.truthvalue.TruthValue; |
15 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 15 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
16 | 16 | ||
17 | public final class ReferenceInfoBuilder { | 17 | public final class ReferenceInfoBuilder { |
18 | private boolean containment; | 18 | private boolean containment; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java index d8db4ec4..07595932 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java | |||
@@ -10,9 +10,9 @@ import tools.refinery.store.reasoning.ReasoningAdapter; | |||
10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; | 10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; |
11 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
12 | import tools.refinery.store.representation.Symbol; | 12 | import tools.refinery.store.representation.Symbol; |
13 | import tools.refinery.store.representation.TruthValue; | 13 | import tools.refinery.logic.term.truthvalue.TruthValue; |
14 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 14 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
15 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 15 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
16 | import tools.refinery.store.tuple.Tuple; | 16 | import tools.refinery.store.tuple.Tuple; |
17 | 17 | ||
18 | public class EqualsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> { | 18 | public class EqualsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> { |
@@ -51,7 +51,7 @@ public class EqualsRefiner extends AbstractPartialInterpretationRefiner<TruthVal | |||
51 | return false; | 51 | return false; |
52 | } | 52 | } |
53 | var newCount = currentCount.meet(CardinalityIntervals.LONE); | 53 | var newCount = currentCount.meet(CardinalityIntervals.LONE); |
54 | if (newCount.isEmpty()) { | 54 | if (newCount.isError()) { |
55 | return false; | 55 | return false; |
56 | } | 56 | } |
57 | countInterpretation.put(unaryKey, newCount); | 57 | countInterpretation.put(unaryKey, newCount); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java index 61b9488c..d4852f91 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java | |||
@@ -5,25 +5,25 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiobject; | 6 | package tools.refinery.store.reasoning.translator.multiobject; |
7 | 7 | ||
8 | import tools.refinery.store.query.dnf.Query; | 8 | import tools.refinery.logic.dnf.Query; |
9 | import tools.refinery.store.query.dnf.RelationalQuery; | 9 | import tools.refinery.logic.dnf.RelationalQuery; |
10 | import tools.refinery.store.query.literal.AbstractCallLiteral; | 10 | import tools.refinery.logic.literal.AbstractCallLiteral; |
11 | import tools.refinery.store.query.literal.CallLiteral; | 11 | import tools.refinery.logic.literal.CallLiteral; |
12 | import tools.refinery.store.query.literal.Literal; | 12 | import tools.refinery.logic.literal.Literal; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
15 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
14 | import tools.refinery.store.query.view.AnySymbolView; | 16 | import tools.refinery.store.query.view.AnySymbolView; |
15 | import tools.refinery.store.reasoning.interpretation.QueryBasedRelationRewriter; | 17 | import tools.refinery.store.reasoning.interpretation.QueryBasedRelationRewriter; |
16 | import tools.refinery.store.reasoning.literal.Concreteness; | 18 | import tools.refinery.store.reasoning.literal.Concreteness; |
17 | import tools.refinery.store.reasoning.literal.Modality; | 19 | import tools.refinery.store.reasoning.literal.Modality; |
18 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
19 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
20 | 20 | ||
21 | import java.util.List; | 21 | import java.util.List; |
22 | import java.util.Set; | 22 | import java.util.Set; |
23 | 23 | ||
24 | import static tools.refinery.store.query.literal.Literals.check; | 24 | import static tools.refinery.logic.literal.Literals.check; |
25 | import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.constant; | 25 | import static tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms.constant; |
26 | import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.lessEq; | 26 | import static tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms.lessEq; |
27 | 27 | ||
28 | class EqualsRelationRewriter extends QueryBasedRelationRewriter { | 28 | class EqualsRelationRewriter extends QueryBasedRelationRewriter { |
29 | private EqualsRelationRewriter(RelationalQuery may, RelationalQuery must) { | 29 | private EqualsRelationRewriter(RelationalQuery may, RelationalQuery must) { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java index f134fe92..83fa4377 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java | |||
@@ -10,9 +10,9 @@ import tools.refinery.store.reasoning.ReasoningAdapter; | |||
10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; | 10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; |
11 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
12 | import tools.refinery.store.representation.Symbol; | 12 | import tools.refinery.store.representation.Symbol; |
13 | import tools.refinery.store.representation.TruthValue; | 13 | import tools.refinery.logic.term.truthvalue.TruthValue; |
14 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 14 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
15 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 15 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
16 | import tools.refinery.store.tuple.Tuple; | 16 | import tools.refinery.store.tuple.Tuple; |
17 | 17 | ||
18 | public class ExistsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> { | 18 | public class ExistsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> { |
@@ -42,7 +42,7 @@ public class ExistsRefiner extends AbstractPartialInterpretationRefiner<TruthVal | |||
42 | } | 42 | } |
43 | default -> throw new IllegalArgumentException("Unknown TruthValue: " + value); | 43 | default -> throw new IllegalArgumentException("Unknown TruthValue: " + value); |
44 | } | 44 | } |
45 | if (newCount.isEmpty()) { | 45 | if (newCount.isError()) { |
46 | return false; | 46 | return false; |
47 | } | 47 | } |
48 | countInterpretation.put(key, newCount); | 48 | countInterpretation.put(key, newCount); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java index 9873888c..5691b9e3 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java | |||
@@ -5,10 +5,10 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiobject; | 6 | package tools.refinery.store.reasoning.translator.multiobject; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Parameter; | 8 | import tools.refinery.logic.term.Parameter; |
9 | import tools.refinery.store.query.view.AbstractFunctionView; | 9 | import tools.refinery.store.query.view.AbstractFunctionView; |
10 | import tools.refinery.store.representation.Symbol; | 10 | import tools.refinery.store.representation.Symbol; |
11 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 11 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
12 | 12 | ||
13 | class LowerCardinalityView extends AbstractFunctionView<CardinalityInterval> { | 13 | class LowerCardinalityView extends AbstractFunctionView<CardinalityInterval> { |
14 | public LowerCardinalityView(Symbol<CardinalityInterval> symbol) { | 14 | public LowerCardinalityView(Symbol<CardinalityInterval> symbol) { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java index 89918155..eb13174c 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java | |||
@@ -12,9 +12,9 @@ import tools.refinery.store.reasoning.refinement.PartialModelInitializer; | |||
12 | import tools.refinery.store.reasoning.seed.ModelSeed; | 12 | import tools.refinery.store.reasoning.seed.ModelSeed; |
13 | import tools.refinery.store.reasoning.translator.TranslationException; | 13 | import tools.refinery.store.reasoning.translator.TranslationException; |
14 | import tools.refinery.store.representation.Symbol; | 14 | import tools.refinery.store.representation.Symbol; |
15 | import tools.refinery.store.representation.TruthValue; | 15 | import tools.refinery.logic.term.truthvalue.TruthValue; |
16 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 16 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
17 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 17 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
18 | import tools.refinery.store.tuple.Tuple; | 18 | import tools.refinery.store.tuple.Tuple; |
19 | 19 | ||
20 | import java.util.Arrays; | 20 | import java.util.Arrays; |
@@ -37,7 +37,7 @@ class MultiObjectInitializer implements PartialModelInitializer { | |||
37 | var uniqueTable = new HashMap<CardinalityInterval, CardinalityInterval>(); | 37 | var uniqueTable = new HashMap<CardinalityInterval, CardinalityInterval>(); |
38 | for (int i = 0; i < intervals.length; i++) { | 38 | for (int i = 0; i < intervals.length; i++) { |
39 | var interval = intervals[i]; | 39 | var interval = intervals[i]; |
40 | if (interval.isEmpty()) { | 40 | if (interval.isError()) { |
41 | throw new TranslationException(ReasoningAdapter.EXISTS_SYMBOL, | 41 | throw new TranslationException(ReasoningAdapter.EXISTS_SYMBOL, |
42 | "Inconsistent existence or equality for node " + i); | 42 | "Inconsistent existence or equality for node " + i); |
43 | } | 43 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java index e48934d8..ab401f9e 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java | |||
@@ -9,8 +9,8 @@ import tools.refinery.store.model.Interpretation; | |||
9 | import tools.refinery.store.model.Model; | 9 | import tools.refinery.store.model.Model; |
10 | import tools.refinery.store.reasoning.refinement.StorageRefiner; | 10 | import tools.refinery.store.reasoning.refinement.StorageRefiner; |
11 | import tools.refinery.store.representation.Symbol; | 11 | import tools.refinery.store.representation.Symbol; |
12 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 12 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
13 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 13 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
14 | import tools.refinery.store.tuple.Tuple; | 14 | import tools.refinery.store.tuple.Tuple; |
15 | 15 | ||
16 | class MultiObjectStorageRefiner implements StorageRefiner { | 16 | class MultiObjectStorageRefiner implements StorageRefiner { |
@@ -28,7 +28,7 @@ class MultiObjectStorageRefiner implements StorageRefiner { | |||
28 | return false; | 28 | return false; |
29 | } | 29 | } |
30 | var newParentCount = parentCount.take(1); | 30 | var newParentCount = parentCount.take(1); |
31 | if (newParentCount.isEmpty()) { | 31 | if (newParentCount.isError()) { |
32 | return false; | 32 | return false; |
33 | } | 33 | } |
34 | var childKey = Tuple.of(childNode); | 34 | var childKey = Tuple.of(childNode); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java index 97fda9d5..be15b6d7 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java | |||
@@ -5,17 +5,21 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiobject; | 6 | package tools.refinery.store.reasoning.translator.multiobject; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.Query; | ||
9 | import tools.refinery.logic.literal.Literals; | ||
10 | import tools.refinery.logic.term.Variable; | ||
11 | import tools.refinery.logic.term.cardinalityinterval.CardinalityDomain; | ||
12 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; | ||
13 | import tools.refinery.logic.term.int_.IntTerms; | ||
14 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
15 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
16 | import tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms; | ||
8 | import tools.refinery.store.dse.propagation.PropagationBuilder; | 17 | import tools.refinery.store.dse.propagation.PropagationBuilder; |
9 | import tools.refinery.store.dse.transition.Rule; | 18 | import tools.refinery.store.dse.transition.Rule; |
10 | import tools.refinery.store.dse.transition.objectives.Criteria; | 19 | import tools.refinery.store.dse.transition.objectives.Criteria; |
11 | import tools.refinery.store.dse.transition.objectives.Objectives; | 20 | import tools.refinery.store.dse.transition.objectives.Objectives; |
12 | import tools.refinery.store.model.ModelStoreBuilder; | 21 | import tools.refinery.store.model.ModelStoreBuilder; |
13 | import tools.refinery.store.model.ModelStoreConfiguration; | 22 | import tools.refinery.store.model.ModelStoreConfiguration; |
14 | import tools.refinery.store.query.dnf.Query; | ||
15 | import tools.refinery.store.query.literal.Literals; | ||
16 | import tools.refinery.store.query.term.Variable; | ||
17 | import tools.refinery.store.query.term.int_.IntTerms; | ||
18 | import tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms; | ||
19 | import tools.refinery.store.query.view.AnySymbolView; | 23 | import tools.refinery.store.query.view.AnySymbolView; |
20 | import tools.refinery.store.reasoning.ReasoningAdapter; | 24 | import tools.refinery.store.reasoning.ReasoningAdapter; |
21 | import tools.refinery.store.reasoning.ReasoningBuilder; | 25 | import tools.refinery.store.reasoning.ReasoningBuilder; |
@@ -24,15 +28,11 @@ import tools.refinery.store.reasoning.representation.PartialFunction; | |||
24 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | 28 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; |
25 | import tools.refinery.store.reasoning.translator.RoundingMode; | 29 | import tools.refinery.store.reasoning.translator.RoundingMode; |
26 | import tools.refinery.store.representation.Symbol; | 30 | import tools.refinery.store.representation.Symbol; |
27 | import tools.refinery.store.representation.cardinality.CardinalityDomain; | ||
28 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | ||
29 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
30 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
31 | 31 | ||
32 | import java.util.List; | 32 | import java.util.List; |
33 | 33 | ||
34 | import static tools.refinery.store.query.literal.Literals.check; | 34 | import static tools.refinery.logic.literal.Literals.check; |
35 | import static tools.refinery.store.query.term.int_.IntTerms.*; | 35 | import static tools.refinery.logic.term.int_.IntTerms.*; |
36 | 36 | ||
37 | public class MultiObjectTranslator implements ModelStoreConfiguration { | 37 | public class MultiObjectTranslator implements ModelStoreConfiguration { |
38 | public static final Symbol<CardinalityInterval> COUNT_STORAGE = Symbol.of("COUNT", 1, CardinalityInterval.class, | 38 | public static final Symbol<CardinalityInterval> COUNT_STORAGE = Symbol.of("COUNT", 1, CardinalityInterval.class, |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java index 498bcd83..d81274b3 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java | |||
@@ -7,8 +7,8 @@ package tools.refinery.store.reasoning.translator.multiobject; | |||
7 | 7 | ||
8 | import tools.refinery.store.query.view.TuplePreservingView; | 8 | import tools.refinery.store.query.view.TuplePreservingView; |
9 | import tools.refinery.store.representation.Symbol; | 9 | import tools.refinery.store.representation.Symbol; |
10 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 10 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
11 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 11 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
12 | import tools.refinery.store.tuple.Tuple; | 12 | import tools.refinery.store.tuple.Tuple; |
13 | 13 | ||
14 | class MultiView extends TuplePreservingView<CardinalityInterval> { | 14 | class MultiView extends TuplePreservingView<CardinalityInterval> { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java index 6be6ae1b..5797c4b0 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiobject; | 6 | package tools.refinery.store.reasoning.translator.multiobject; |
7 | 7 | ||
8 | import tools.refinery.store.query.term.Parameter; | 8 | import tools.refinery.logic.term.Parameter; |
9 | import tools.refinery.store.query.view.AbstractFunctionView; | 9 | import tools.refinery.store.query.view.AbstractFunctionView; |
10 | import tools.refinery.store.representation.Symbol; | 10 | import tools.refinery.store.representation.Symbol; |
11 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 11 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
12 | import tools.refinery.store.representation.cardinality.UpperCardinality; | 12 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; |
13 | 13 | ||
14 | class UpperCardinalityView extends AbstractFunctionView<CardinalityInterval> { | 14 | class UpperCardinalityView extends AbstractFunctionView<CardinalityInterval> { |
15 | public UpperCardinalityView(Symbol<CardinalityInterval> symbol) { | 15 | public UpperCardinalityView(Symbol<CardinalityInterval> symbol) { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java index 9db9cc96..c327aac8 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java | |||
@@ -7,9 +7,9 @@ package tools.refinery.store.reasoning.translator.multiplicity; | |||
7 | 7 | ||
8 | import tools.refinery.store.reasoning.representation.PartialRelation; | 8 | import tools.refinery.store.reasoning.representation.PartialRelation; |
9 | import tools.refinery.store.reasoning.translator.TranslationException; | 9 | import tools.refinery.store.reasoning.translator.TranslationException; |
10 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 10 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
11 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 11 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
12 | import tools.refinery.store.representation.cardinality.NonEmptyCardinalityInterval; | 12 | import tools.refinery.logic.term.cardinalityinterval.NonEmptyCardinalityInterval; |
13 | 13 | ||
14 | public record ConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol) | 14 | public record ConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol) |
15 | implements Multiplicity { | 15 | implements Multiplicity { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java index a506d802..0ca6eac2 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java | |||
@@ -5,31 +5,26 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiplicity; | 6 | package tools.refinery.store.reasoning.translator.multiplicity; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.Query; | ||
9 | import tools.refinery.logic.term.Variable; | ||
10 | import tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality; | ||
11 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; | ||
12 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; | ||
13 | import tools.refinery.logic.term.uppercardinality.UpperCardinalityTerms; | ||
8 | import tools.refinery.store.dse.transition.objectives.Objectives; | 14 | import tools.refinery.store.dse.transition.objectives.Objectives; |
9 | import tools.refinery.store.model.ModelStoreBuilder; | 15 | import tools.refinery.store.model.ModelStoreBuilder; |
10 | import tools.refinery.store.model.ModelStoreConfiguration; | 16 | import tools.refinery.store.model.ModelStoreConfiguration; |
11 | import tools.refinery.store.query.dnf.Query; | ||
12 | import tools.refinery.store.query.term.Variable; | ||
13 | import tools.refinery.store.query.term.int_.IntTerms; | ||
14 | import tools.refinery.store.reasoning.ReasoningAdapter; | 17 | import tools.refinery.store.reasoning.ReasoningAdapter; |
15 | import tools.refinery.store.reasoning.lifting.DnfLifter; | 18 | import tools.refinery.store.reasoning.lifting.DnfLifter; |
16 | import tools.refinery.store.reasoning.literal.*; | 19 | import tools.refinery.store.reasoning.literal.*; |
17 | import tools.refinery.store.reasoning.representation.PartialRelation; | 20 | import tools.refinery.store.reasoning.representation.PartialRelation; |
18 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | 21 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; |
19 | import tools.refinery.store.reasoning.translator.TranslationException; | 22 | import tools.refinery.store.reasoning.translator.TranslationException; |
20 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
21 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
22 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
23 | 23 | ||
24 | import java.util.List; | 24 | import java.util.List; |
25 | 25 | ||
26 | import static tools.refinery.store.query.literal.Literals.check; | 26 | import static tools.refinery.logic.literal.Literals.check; |
27 | import static tools.refinery.store.query.term.int_.IntTerms.INT_SUM; | 27 | import static tools.refinery.logic.term.int_.IntTerms.*; |
28 | import static tools.refinery.store.query.term.int_.IntTerms.constant; | ||
29 | import static tools.refinery.store.query.term.int_.IntTerms.greater; | ||
30 | import static tools.refinery.store.query.term.int_.IntTerms.sub; | ||
31 | import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.constant; | ||
32 | import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.less; | ||
33 | import static tools.refinery.store.reasoning.literal.PartialLiterals.candidateMust; | 28 | import static tools.refinery.store.reasoning.literal.PartialLiterals.candidateMust; |
34 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; | 29 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; |
35 | 30 | ||
@@ -81,17 +76,18 @@ public class InvalidMultiplicityErrorTranslator implements ModelStoreConfigurati | |||
81 | mustBuilder.clause(UpperCardinality.class, existingContents -> List.of( | 76 | mustBuilder.clause(UpperCardinality.class, existingContents -> List.of( |
82 | must(nodeType.call(node)), | 77 | must(nodeType.call(node)), |
83 | new CountUpperBoundLiteral(existingContents, linkType, arguments), | 78 | new CountUpperBoundLiteral(existingContents, linkType, arguments), |
84 | check(less(existingContents, constant(lowerBoundCardinality))) | 79 | check(UpperCardinalityTerms.less(existingContents, |
80 | UpperCardinalityTerms.constant(lowerBoundCardinality))) | ||
85 | )); | 81 | )); |
86 | candidateMayBuilder.clause(Integer.class, existingContents -> List.of( | 82 | candidateMayBuilder.clause(Integer.class, existingContents -> List.of( |
87 | candidateMust(nodeType.call(node)), | 83 | candidateMust(nodeType.call(node)), |
88 | new CountCandidateLowerBoundLiteral(existingContents, linkType, arguments), | 84 | new CountCandidateLowerBoundLiteral(existingContents, linkType, arguments), |
89 | check(IntTerms.less(existingContents, constant(lowerBound))) | 85 | check(less(existingContents, constant(lowerBound))) |
90 | )); | 86 | )); |
91 | candidateMustBuilder.clause(Integer.class, existingContents -> List.of( | 87 | candidateMustBuilder.clause(Integer.class, existingContents -> List.of( |
92 | candidateMust(nodeType.call(node)), | 88 | candidateMust(nodeType.call(node)), |
93 | new CountCandidateUpperBoundLiteral(existingContents, linkType, arguments), | 89 | new CountCandidateUpperBoundLiteral(existingContents, linkType, arguments), |
94 | check(IntTerms.less(existingContents, constant(lowerBound))) | 90 | check(less(existingContents, constant(lowerBound))) |
95 | )); | 91 | )); |
96 | missingBuilder.clause(Integer.class, existingContents -> List.of( | 92 | missingBuilder.clause(Integer.class, existingContents -> List.of( |
97 | candidateMust(nodeType.call(node)), | 93 | candidateMust(nodeType.call(node)), |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java index d1d6dd1e..d6035781 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiplicity; | 6 | package tools.refinery.store.reasoning.translator.multiplicity; |
7 | 7 | ||
8 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 8 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
9 | 9 | ||
10 | public sealed interface Multiplicity permits ConstrainedMultiplicity, UnconstrainedMultiplicity { | 10 | public sealed interface Multiplicity permits ConstrainedMultiplicity, UnconstrainedMultiplicity { |
11 | CardinalityInterval multiplicity(); | 11 | CardinalityInterval multiplicity(); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java index 2159b88c..fb669a79 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java | |||
@@ -5,8 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.multiplicity; | 6 | package tools.refinery.store.reasoning.translator.multiplicity; |
7 | 7 | ||
8 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | 8 | import tools.refinery.logic.term.cardinalityinterval.CardinalityInterval; |
9 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 9 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
10 | 10 | ||
11 | // Singleton implementation, because there is only a single complete interval. | 11 | // Singleton implementation, because there is only a single complete interval. |
12 | @SuppressWarnings("squid:S6548") | 12 | @SuppressWarnings("squid:S6548") |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java index 7290ab40..75828086 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.opposite; | 6 | package tools.refinery.store.reasoning.translator.opposite; |
7 | 7 | ||
8 | 8 | import tools.refinery.logic.AbstractValue; | |
9 | import tools.refinery.store.map.AnyVersionedMap; | 9 | import tools.refinery.store.map.AnyVersionedMap; |
10 | import tools.refinery.store.map.Cursor; | 10 | import tools.refinery.store.map.Cursor; |
11 | import tools.refinery.store.reasoning.ReasoningAdapter; | 11 | import tools.refinery.store.reasoning.ReasoningAdapter; |
@@ -17,7 +17,7 @@ import tools.refinery.store.tuple.Tuple; | |||
17 | 17 | ||
18 | import java.util.Set; | 18 | import java.util.Set; |
19 | 19 | ||
20 | class OppositeInterpretation<A, C> extends AbstractPartialInterpretation<A, C> { | 20 | class OppositeInterpretation<A extends AbstractValue<A, C>, C> extends AbstractPartialInterpretation<A, C> { |
21 | private final PartialInterpretation<A, C> opposite; | 21 | private final PartialInterpretation<A, C> opposite; |
22 | 22 | ||
23 | private OppositeInterpretation(ReasoningAdapter adapter, Concreteness concreteness, | 23 | private OppositeInterpretation(ReasoningAdapter adapter, Concreteness concreteness, |
@@ -36,7 +36,7 @@ class OppositeInterpretation<A, C> extends AbstractPartialInterpretation<A, C> { | |||
36 | return new OppositeCursor<>(opposite.getAll()); | 36 | return new OppositeCursor<>(opposite.getAll()); |
37 | } | 37 | } |
38 | 38 | ||
39 | public static <A1, C1> Factory<A1, C1> of(PartialSymbol<A1, C1> oppositeSymbol) { | 39 | public static <A1 extends AbstractValue<A1, C1>, C1> Factory<A1, C1> of(PartialSymbol<A1, C1> oppositeSymbol) { |
40 | return (adapter, concreteness, partialSymbol) -> { | 40 | return (adapter, concreteness, partialSymbol) -> { |
41 | var opposite = adapter.getPartialInterpretation(concreteness, oppositeSymbol); | 41 | var opposite = adapter.getPartialInterpretation(concreteness, oppositeSymbol); |
42 | return new OppositeInterpretation<>(adapter, concreteness, partialSymbol, opposite); | 42 | return new OppositeInterpretation<>(adapter, concreteness, partialSymbol, opposite); |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java index d09684df..47e3ac6a 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java | |||
@@ -1,17 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.opposite; | 6 | package tools.refinery.store.reasoning.translator.opposite; |
7 | 7 | ||
8 | import tools.refinery.logic.AbstractValue; | ||
8 | import tools.refinery.store.reasoning.ReasoningAdapter; | 9 | import tools.refinery.store.reasoning.ReasoningAdapter; |
9 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; | 10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; |
10 | import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; | 11 | import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; |
11 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 12 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
12 | import tools.refinery.store.tuple.Tuple; | 13 | import tools.refinery.store.tuple.Tuple; |
13 | 14 | ||
14 | public class OppositeRefiner<A, C> extends AbstractPartialInterpretationRefiner<A, C> { | 15 | public class OppositeRefiner<A extends AbstractValue<A, C>, C> extends AbstractPartialInterpretationRefiner<A, C> { |
15 | private final PartialInterpretationRefiner<A, C> opposite; | 16 | private final PartialInterpretationRefiner<A, C> opposite; |
16 | 17 | ||
17 | protected OppositeRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol, | 18 | protected OppositeRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol, |
@@ -26,7 +27,7 @@ public class OppositeRefiner<A, C> extends AbstractPartialInterpretationRefiner< | |||
26 | return opposite.merge(oppositeKey, value); | 27 | return opposite.merge(oppositeKey, value); |
27 | } | 28 | } |
28 | 29 | ||
29 | public static <A1, C1> Factory<A1, C1> of(PartialSymbol<A1, C1> oppositeSymbol) { | 30 | public static <A1 extends AbstractValue<A1, C1>, C1> Factory<A1, C1> of(PartialSymbol<A1, C1> oppositeSymbol) { |
30 | return (adapter, partialSymbol) -> new OppositeRefiner<>(adapter, partialSymbol, oppositeSymbol); | 31 | return (adapter, partialSymbol) -> new OppositeRefiner<>(adapter, partialSymbol, oppositeSymbol); |
31 | } | 32 | } |
32 | } | 33 | } |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java index 6e15a628..29abed7a 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.opposite; | 6 | package tools.refinery.store.reasoning.translator.opposite; |
7 | 7 | ||
8 | import tools.refinery.logic.literal.AbstractCallLiteral; | ||
9 | import tools.refinery.logic.literal.Literal; | ||
10 | import tools.refinery.logic.term.Variable; | ||
8 | import tools.refinery.store.model.ModelStoreBuilder; | 11 | import tools.refinery.store.model.ModelStoreBuilder; |
9 | import tools.refinery.store.model.ModelStoreConfiguration; | 12 | import tools.refinery.store.model.ModelStoreConfiguration; |
10 | import tools.refinery.store.query.literal.AbstractCallLiteral; | ||
11 | import tools.refinery.store.query.literal.Literal; | ||
12 | import tools.refinery.store.query.term.Variable; | ||
13 | import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter; | 13 | import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter; |
14 | import tools.refinery.store.reasoning.literal.Concreteness; | 14 | import tools.refinery.store.reasoning.literal.Concreteness; |
15 | import tools.refinery.store.reasoning.literal.ModalConstraint; | 15 | import tools.refinery.store.reasoning.literal.ModalConstraint; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java index b401118e..010ce977 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java | |||
@@ -5,13 +5,14 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.predicate; | 6 | package tools.refinery.store.reasoning.translator.predicate; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.Query; | ||
9 | import tools.refinery.logic.dnf.RelationalQuery; | ||
10 | import tools.refinery.logic.literal.Literal; | ||
11 | import tools.refinery.logic.term.NodeVariable; | ||
12 | import tools.refinery.logic.term.Variable; | ||
13 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
8 | import tools.refinery.store.model.ModelStoreBuilder; | 14 | import tools.refinery.store.model.ModelStoreBuilder; |
9 | import tools.refinery.store.model.ModelStoreConfiguration; | 15 | import tools.refinery.store.model.ModelStoreConfiguration; |
10 | import tools.refinery.store.query.dnf.Query; | ||
11 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
12 | import tools.refinery.store.query.literal.Literal; | ||
13 | import tools.refinery.store.query.term.NodeVariable; | ||
14 | import tools.refinery.store.query.term.Variable; | ||
15 | import tools.refinery.store.query.view.ForbiddenView; | 16 | import tools.refinery.store.query.view.ForbiddenView; |
16 | import tools.refinery.store.query.view.MayView; | 17 | import tools.refinery.store.query.view.MayView; |
17 | import tools.refinery.store.query.view.MustView; | 18 | import tools.refinery.store.query.view.MustView; |
@@ -19,9 +20,8 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
19 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | 20 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; |
20 | import tools.refinery.store.reasoning.translator.TranslationException; | 21 | import tools.refinery.store.reasoning.translator.TranslationException; |
21 | import tools.refinery.store.representation.Symbol; | 22 | import tools.refinery.store.representation.Symbol; |
22 | import tools.refinery.store.representation.TruthValue; | ||
23 | 23 | ||
24 | import static tools.refinery.store.query.literal.Literals.not; | 24 | import static tools.refinery.logic.literal.Literals.not; |
25 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; | 25 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; |
26 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; | 26 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; |
27 | 27 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java index 45dc5bd2..50873993 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.proxy; | 6 | package tools.refinery.store.reasoning.translator.proxy; |
7 | 7 | ||
8 | import tools.refinery.logic.literal.AbstractCallLiteral; | ||
9 | import tools.refinery.logic.literal.Literal; | ||
10 | import tools.refinery.logic.term.Variable; | ||
8 | import tools.refinery.store.model.ModelStoreBuilder; | 11 | import tools.refinery.store.model.ModelStoreBuilder; |
9 | import tools.refinery.store.model.ModelStoreConfiguration; | 12 | import tools.refinery.store.model.ModelStoreConfiguration; |
10 | import tools.refinery.store.query.literal.AbstractCallLiteral; | ||
11 | import tools.refinery.store.query.literal.Literal; | ||
12 | import tools.refinery.store.query.term.Variable; | ||
13 | import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter; | 13 | import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter; |
14 | import tools.refinery.store.reasoning.literal.Concreteness; | 14 | import tools.refinery.store.reasoning.literal.Concreteness; |
15 | import tools.refinery.store.reasoning.literal.ModalConstraint; | 15 | import tools.refinery.store.reasoning.literal.ModalConstraint; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java index 40a7b3fa..257b9136 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java | |||
@@ -10,7 +10,7 @@ import tools.refinery.store.reasoning.ReasoningAdapter; | |||
10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; | 10 | import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner; |
11 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
12 | import tools.refinery.store.representation.Symbol; | 12 | import tools.refinery.store.representation.Symbol; |
13 | import tools.refinery.store.representation.TruthValue; | 13 | import tools.refinery.logic.term.truthvalue.TruthValue; |
14 | import tools.refinery.store.tuple.Tuple; | 14 | import tools.refinery.store.tuple.Tuple; |
15 | 15 | ||
16 | class InferredTypeRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> { | 16 | class InferredTypeRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> { |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java index ebe0d1b9..324e2b9e 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.reasoning.translator.typehierarchy; | 6 | package tools.refinery.store.reasoning.translator.typehierarchy; |
7 | 7 | ||
8 | import tools.refinery.store.reasoning.representation.PartialRelation; | 8 | import tools.refinery.store.reasoning.representation.PartialRelation; |
9 | import tools.refinery.store.representation.TruthValue; | 9 | import tools.refinery.logic.term.truthvalue.TruthValue; |
10 | 10 | ||
11 | import java.util.*; | 11 | import java.util.*; |
12 | 12 | ||
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java index 233e43f0..aa76d927 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java | |||
@@ -10,7 +10,7 @@ import tools.refinery.store.reasoning.refinement.PartialModelInitializer; | |||
10 | import tools.refinery.store.reasoning.representation.PartialRelation; | 10 | import tools.refinery.store.reasoning.representation.PartialRelation; |
11 | import tools.refinery.store.reasoning.seed.ModelSeed; | 11 | import tools.refinery.store.reasoning.seed.ModelSeed; |
12 | import tools.refinery.store.representation.Symbol; | 12 | import tools.refinery.store.representation.Symbol; |
13 | import tools.refinery.store.representation.TruthValue; | 13 | import tools.refinery.logic.term.truthvalue.TruthValue; |
14 | import tools.refinery.store.tuple.Tuple; | 14 | import tools.refinery.store.tuple.Tuple; |
15 | 15 | ||
16 | import java.util.Arrays; | 16 | import java.util.Arrays; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java index 37ea1448..700bbe88 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java | |||
@@ -5,11 +5,11 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.reasoning.translator.typehierarchy; | 6 | package tools.refinery.store.reasoning.translator.typehierarchy; |
7 | 7 | ||
8 | import tools.refinery.logic.dnf.Query; | ||
8 | import tools.refinery.store.dse.transition.Rule; | 9 | import tools.refinery.store.dse.transition.Rule; |
9 | import tools.refinery.store.dse.transition.actions.ActionLiteral; | 10 | import tools.refinery.store.dse.transition.actions.ActionLiteral; |
10 | import tools.refinery.store.model.ModelStoreBuilder; | 11 | import tools.refinery.store.model.ModelStoreBuilder; |
11 | import tools.refinery.store.model.ModelStoreConfiguration; | 12 | import tools.refinery.store.model.ModelStoreConfiguration; |
12 | import tools.refinery.store.query.dnf.Query; | ||
13 | import tools.refinery.store.reasoning.ReasoningBuilder; | 13 | import tools.refinery.store.reasoning.ReasoningBuilder; |
14 | import tools.refinery.store.reasoning.actions.PartialActionLiterals; | 14 | import tools.refinery.store.reasoning.actions.PartialActionLiterals; |
15 | import tools.refinery.store.reasoning.literal.PartialLiterals; | 15 | import tools.refinery.store.reasoning.literal.PartialLiterals; |
@@ -21,7 +21,7 @@ import tools.refinery.store.representation.Symbol; | |||
21 | 21 | ||
22 | import java.util.ArrayList; | 22 | import java.util.ArrayList; |
23 | 23 | ||
24 | import static tools.refinery.store.query.literal.Literals.not; | 24 | import static tools.refinery.logic.literal.Literals.not; |
25 | import static tools.refinery.store.reasoning.literal.PartialLiterals.candidateMust; | 25 | import static tools.refinery.store.reasoning.literal.PartialLiterals.candidateMust; |
26 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; | 26 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; |
27 | 27 | ||
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java index f8135102..2aa058a4 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java | |||
@@ -6,10 +6,11 @@ | |||
6 | package tools.refinery.store.reasoning; | 6 | package tools.refinery.store.reasoning; |
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.logic.dnf.Query; | ||
10 | import tools.refinery.logic.term.Variable; | ||
11 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
9 | import tools.refinery.store.model.ModelStore; | 12 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 13 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Query; | ||
12 | import tools.refinery.store.query.term.Variable; | ||
13 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; | 14 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; |
14 | import tools.refinery.store.query.view.ForbiddenView; | 15 | import tools.refinery.store.query.view.ForbiddenView; |
15 | import tools.refinery.store.reasoning.literal.Concreteness; | 16 | import tools.refinery.store.reasoning.literal.Concreteness; |
@@ -18,14 +19,13 @@ import tools.refinery.store.reasoning.seed.ModelSeed; | |||
18 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | 19 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; |
19 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 20 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
20 | import tools.refinery.store.representation.Symbol; | 21 | import tools.refinery.store.representation.Symbol; |
21 | import tools.refinery.store.representation.TruthValue; | ||
22 | import tools.refinery.store.tuple.Tuple; | 22 | import tools.refinery.store.tuple.Tuple; |
23 | 23 | ||
24 | import static org.hamcrest.MatcherAssert.assertThat; | 24 | import static org.hamcrest.MatcherAssert.assertThat; |
25 | import static org.hamcrest.Matchers.is; | 25 | import static org.hamcrest.Matchers.is; |
26 | import static org.hamcrest.Matchers.not; | 26 | import static org.hamcrest.Matchers.not; |
27 | import static org.hamcrest.Matchers.nullValue; | 27 | import static org.hamcrest.Matchers.nullValue; |
28 | import static tools.refinery.store.query.literal.Literals.not; | 28 | import static tools.refinery.logic.literal.Literals.not; |
29 | import static tools.refinery.store.reasoning.ReasoningAdapter.EQUALS_SYMBOL; | 29 | import static tools.refinery.store.reasoning.ReasoningAdapter.EQUALS_SYMBOL; |
30 | import static tools.refinery.store.reasoning.ReasoningAdapter.EXISTS_SYMBOL; | 30 | import static tools.refinery.store.reasoning.ReasoningAdapter.EXISTS_SYMBOL; |
31 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; | 31 | import static tools.refinery.store.reasoning.literal.PartialLiterals.may; |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java index 793d1cec..f3e4d3b0 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java | |||
@@ -7,9 +7,10 @@ package tools.refinery.store.reasoning.lifting; | |||
7 | 7 | ||
8 | import org.junit.jupiter.api.BeforeEach; | 8 | import org.junit.jupiter.api.BeforeEach; |
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.query.dnf.Dnf; | 10 | import tools.refinery.logic.dnf.Dnf; |
11 | import tools.refinery.store.query.dnf.Query; | 11 | import tools.refinery.logic.dnf.Query; |
12 | import tools.refinery.store.query.term.ParameterDirection; | 12 | import tools.refinery.logic.term.ParameterDirection; |
13 | import tools.refinery.logic.term.truthvalue.TruthValue; | ||
13 | import tools.refinery.store.query.view.AnySymbolView; | 14 | import tools.refinery.store.query.view.AnySymbolView; |
14 | import tools.refinery.store.query.view.FunctionView; | 15 | import tools.refinery.store.query.view.FunctionView; |
15 | import tools.refinery.store.query.view.MustView; | 16 | import tools.refinery.store.query.view.MustView; |
@@ -20,15 +21,14 @@ import tools.refinery.store.reasoning.literal.Modality; | |||
20 | import tools.refinery.store.reasoning.representation.PartialRelation; | 21 | import tools.refinery.store.reasoning.representation.PartialRelation; |
21 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 22 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
22 | import tools.refinery.store.representation.Symbol; | 23 | import tools.refinery.store.representation.Symbol; |
23 | import tools.refinery.store.representation.TruthValue; | ||
24 | 24 | ||
25 | import java.util.List; | 25 | import java.util.List; |
26 | 26 | ||
27 | import static org.hamcrest.MatcherAssert.assertThat; | 27 | import static org.hamcrest.MatcherAssert.assertThat; |
28 | import static tools.refinery.store.query.literal.Literals.check; | 28 | import static tools.refinery.logic.literal.Literals.check; |
29 | import static tools.refinery.store.query.literal.Literals.not; | 29 | import static tools.refinery.logic.literal.Literals.not; |
30 | import static tools.refinery.store.query.term.int_.IntTerms.*; | 30 | import static tools.refinery.logic.term.int_.IntTerms.*; |
31 | import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; | 31 | import static tools.refinery.logic.tests.QueryMatchers.structurallyEqualTo; |
32 | 32 | ||
33 | class DnfLifterTest { | 33 | class DnfLifterTest { |
34 | private static final Symbol<TruthValue> friendSymbol = Symbol.of("friend", 2, TruthValue.class, | 34 | private static final Symbol<TruthValue> friendSymbol = Symbol.of("friend", 2, TruthValue.class, |
@@ -49,7 +49,7 @@ class DnfLifterTest { | |||
49 | @Test | 49 | @Test |
50 | void liftPartialRelationCallTest() { | 50 | void liftPartialRelationCallTest() { |
51 | var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of( | 51 | var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of( |
52 | friend.call(p1, v1) | 52 | friend.call(p1, v1) |
53 | ))).getDnf(); | 53 | ))).getDnf(); |
54 | var actual = sut.lift(Modality.MUST, Concreteness.PARTIAL, input); | 54 | var actual = sut.lift(Modality.MUST, Concreteness.PARTIAL, input); |
55 | 55 | ||
@@ -204,7 +204,7 @@ class DnfLifterTest { | |||
204 | 204 | ||
205 | @Test | 205 | @Test |
206 | void liftPartialRelationTransitiveCallTest() { | 206 | void liftPartialRelationTransitiveCallTest() { |
207 | var input = Query.of("Actual", (builder, p1, p2)-> builder.clause( | 207 | var input = Query.of("Actual", (builder, p1, p2) -> builder.clause( |
208 | friend.callTransitive(p1, p2), | 208 | friend.callTransitive(p1, p2), |
209 | not(person.call(p2)) | 209 | not(person.call(p2)) |
210 | )).getDnf(); | 210 | )).getDnf(); |
@@ -233,7 +233,7 @@ class DnfLifterTest { | |||
233 | 233 | ||
234 | @Test | 234 | @Test |
235 | void liftPartialSymbolTransitiveCallTest() { | 235 | void liftPartialSymbolTransitiveCallTest() { |
236 | var input = Query.of("Actual", (builder, p1, p2)-> builder.clause( | 236 | var input = Query.of("Actual", (builder, p1, p2) -> builder.clause( |
237 | friendMustView.callTransitive(p1, p2), | 237 | friendMustView.callTransitive(p1, p2), |
238 | not(person.call(p2)) | 238 | not(person.call(p2)) |
239 | )).getDnf(); | 239 | )).getDnf(); |
@@ -332,7 +332,8 @@ class DnfLifterTest { | |||
332 | 332 | ||
333 | var expected = Query.of("Expected", (builder, p1, p2) -> builder.clause( | 333 | var expected = Query.of("Expected", (builder, p1, p2) -> builder.clause( |
334 | ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2), | 334 | ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2), |
335 | not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EQUALS_SYMBOL).call(p1, p2)) | 335 | not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EQUALS_SYMBOL).call(p1, |
336 | p2)) | ||
336 | )).getDnf(); | 337 | )).getDnf(); |
337 | 338 | ||
338 | assertThat(actual, structurallyEqualTo(expected)); | 339 | assertThat(actual, structurallyEqualTo(expected)); |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java index 1d0ac02d..e889b80d 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java | |||
@@ -18,8 +18,8 @@ import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslat | |||
18 | import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity; | 18 | import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity; |
19 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy; | 19 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy; |
20 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; | 20 | import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator; |
21 | import tools.refinery.store.representation.TruthValue; | 21 | import tools.refinery.logic.term.truthvalue.TruthValue; |
22 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 22 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
23 | import tools.refinery.store.tuple.Tuple; | 23 | import tools.refinery.store.tuple.Tuple; |
24 | 24 | ||
25 | import java.util.Map; | 25 | import java.util.Map; |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java index ba6ba6da..e2b3f31e 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java | |||
@@ -8,7 +8,7 @@ package tools.refinery.store.reasoning.translator.metamodel; | |||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.reasoning.representation.PartialRelation; | 9 | import tools.refinery.store.reasoning.representation.PartialRelation; |
10 | import tools.refinery.store.reasoning.translator.TranslationException; | 10 | import tools.refinery.store.reasoning.translator.TranslationException; |
11 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 11 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
12 | 12 | ||
13 | import static org.junit.jupiter.api.Assertions.assertThrows; | 13 | import static org.junit.jupiter.api.Assertions.assertThrows; |
14 | 14 | ||
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java index 88e6a4d7..f8e9e1b5 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java | |||
@@ -16,8 +16,8 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
16 | import tools.refinery.store.reasoning.seed.ModelSeed; | 16 | import tools.refinery.store.reasoning.seed.ModelSeed; |
17 | import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator; | 17 | import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator; |
18 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 18 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
19 | import tools.refinery.store.representation.TruthValue; | 19 | import tools.refinery.logic.term.truthvalue.TruthValue; |
20 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 20 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
21 | import tools.refinery.store.tuple.Tuple; | 21 | import tools.refinery.store.tuple.Tuple; |
22 | 22 | ||
23 | import static org.hamcrest.MatcherAssert.assertThat; | 23 | import static org.hamcrest.MatcherAssert.assertThat; |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java index 48a046fc..5ef189d5 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java | |||
@@ -8,9 +8,9 @@ package tools.refinery.store.reasoning.translator.multiobject; | |||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.model.ModelStore; | 9 | import tools.refinery.store.model.ModelStore; |
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.query.dnf.Query; | 11 | import tools.refinery.logic.dnf.Query; |
12 | import tools.refinery.store.query.resultset.ResultSet; | 12 | import tools.refinery.store.query.resultset.ResultSet; |
13 | import tools.refinery.store.query.term.Variable; | 13 | import tools.refinery.logic.term.Variable; |
14 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; | 14 | import tools.refinery.store.query.interpreter.QueryInterpreterAdapter; |
15 | import tools.refinery.store.reasoning.ReasoningAdapter; | 15 | import tools.refinery.store.reasoning.ReasoningAdapter; |
16 | import tools.refinery.store.reasoning.ReasoningStoreAdapter; | 16 | import tools.refinery.store.reasoning.ReasoningStoreAdapter; |
@@ -20,17 +20,17 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
20 | import tools.refinery.store.reasoning.seed.ModelSeed; | 20 | import tools.refinery.store.reasoning.seed.ModelSeed; |
21 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; | 21 | import tools.refinery.store.reasoning.translator.PartialRelationTranslator; |
22 | import tools.refinery.store.representation.Symbol; | 22 | import tools.refinery.store.representation.Symbol; |
23 | import tools.refinery.store.representation.TruthValue; | 23 | import tools.refinery.logic.term.truthvalue.TruthValue; |
24 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | 24 | import tools.refinery.logic.term.cardinalityinterval.CardinalityIntervals; |
25 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | 25 | import tools.refinery.logic.term.uppercardinality.UpperCardinalities; |
26 | import tools.refinery.store.representation.cardinality.UpperCardinality; | 26 | import tools.refinery.logic.term.uppercardinality.UpperCardinality; |
27 | import tools.refinery.store.tuple.Tuple; | 27 | import tools.refinery.store.tuple.Tuple; |
28 | 28 | ||
29 | import java.util.List; | 29 | import java.util.List; |
30 | 30 | ||
31 | import static org.hamcrest.MatcherAssert.assertThat; | 31 | import static org.hamcrest.MatcherAssert.assertThat; |
32 | import static org.hamcrest.Matchers.is; | 32 | import static org.hamcrest.Matchers.is; |
33 | import static tools.refinery.store.query.literal.Literals.not; | 33 | import static tools.refinery.logic.literal.Literals.not; |
34 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; | 34 | import static tools.refinery.store.reasoning.literal.PartialLiterals.must; |
35 | 35 | ||
36 | class PartialCountTest { | 36 | class PartialCountTest { |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java index 4bef9d8e..b9edcf75 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java | |||
@@ -14,7 +14,7 @@ import tools.refinery.store.reasoning.ReasoningStoreAdapter; | |||
14 | import tools.refinery.store.reasoning.literal.Concreteness; | 14 | import tools.refinery.store.reasoning.literal.Concreteness; |
15 | import tools.refinery.store.reasoning.representation.PartialRelation; | 15 | import tools.refinery.store.reasoning.representation.PartialRelation; |
16 | import tools.refinery.store.reasoning.seed.ModelSeed; | 16 | import tools.refinery.store.reasoning.seed.ModelSeed; |
17 | import tools.refinery.store.representation.TruthValue; | 17 | import tools.refinery.logic.term.truthvalue.TruthValue; |
18 | import tools.refinery.store.tuple.Tuple; | 18 | import tools.refinery.store.tuple.Tuple; |
19 | 19 | ||
20 | import static org.hamcrest.MatcherAssert.assertThat; | 20 | import static org.hamcrest.MatcherAssert.assertThat; |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java index d9a5477e..d860c7d6 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java | |||
@@ -9,7 +9,7 @@ import org.hamcrest.Matchers; | |||
9 | import org.junit.jupiter.api.BeforeEach; | 9 | import org.junit.jupiter.api.BeforeEach; |
10 | import org.junit.jupiter.api.Test; | 10 | import org.junit.jupiter.api.Test; |
11 | import tools.refinery.store.reasoning.representation.PartialRelation; | 11 | import tools.refinery.store.reasoning.representation.PartialRelation; |
12 | import tools.refinery.store.representation.TruthValue; | 12 | import tools.refinery.logic.term.truthvalue.TruthValue; |
13 | 13 | ||
14 | import java.util.Set; | 14 | import java.util.Set; |
15 | 15 | ||
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java index 5af725bb..e87b2684 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java | |||
@@ -16,7 +16,7 @@ import tools.refinery.store.reasoning.ReasoningStoreAdapter; | |||
16 | import tools.refinery.store.reasoning.literal.Concreteness; | 16 | import tools.refinery.store.reasoning.literal.Concreteness; |
17 | import tools.refinery.store.reasoning.representation.PartialRelation; | 17 | import tools.refinery.store.reasoning.representation.PartialRelation; |
18 | import tools.refinery.store.reasoning.seed.ModelSeed; | 18 | import tools.refinery.store.reasoning.seed.ModelSeed; |
19 | import tools.refinery.store.representation.TruthValue; | 19 | import tools.refinery.logic.term.truthvalue.TruthValue; |
20 | import tools.refinery.store.tuple.Tuple; | 20 | import tools.refinery.store.tuple.Tuple; |
21 | 21 | ||
22 | import static org.hamcrest.MatcherAssert.assertThat; | 22 | import static org.hamcrest.MatcherAssert.assertThat; |
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java index 931c62dd..b7c99d2d 100644 --- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java +++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java | |||
@@ -9,7 +9,7 @@ import org.hamcrest.Matchers; | |||
9 | import org.junit.jupiter.api.Test; | 9 | import org.junit.jupiter.api.Test; |
10 | import tools.refinery.store.reasoning.representation.PartialRelation; | 10 | import tools.refinery.store.reasoning.representation.PartialRelation; |
11 | import tools.refinery.store.reasoning.translator.TranslationException; | 11 | import tools.refinery.store.reasoning.translator.TranslationException; |
12 | import tools.refinery.store.representation.TruthValue; | 12 | import tools.refinery.logic.term.truthvalue.TruthValue; |
13 | 13 | ||
14 | import java.util.Set; | 14 | import java.util.Set; |
15 | 15 | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java b/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java deleted file mode 100644 index dfdb43bd..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.representation; | ||
7 | |||
8 | import java.util.Objects; | ||
9 | import java.util.Optional; | ||
10 | |||
11 | public non-sealed interface AbstractDomain<A, C> extends AnyAbstractDomain { | ||
12 | @Override | ||
13 | Class<A> abstractType(); | ||
14 | |||
15 | @Override | ||
16 | Class<C> concreteType(); | ||
17 | |||
18 | A toAbstract(C concreteValue); | ||
19 | |||
20 | Optional<C> toConcrete(A abstractValue); | ||
21 | |||
22 | default boolean isConcrete(A abstractValue) { | ||
23 | return toConcrete(abstractValue).isPresent(); | ||
24 | } | ||
25 | |||
26 | default boolean isRefinement(A originalValue, A refinedValue) { | ||
27 | return Objects.equals(commonRefinement(originalValue, refinedValue), refinedValue); | ||
28 | } | ||
29 | |||
30 | A commonRefinement(A leftValue, A rightValue); | ||
31 | |||
32 | A commonAncestor(A leftValue, A rightValue); | ||
33 | |||
34 | A unknown(); | ||
35 | |||
36 | boolean isError(A abstractValue); | ||
37 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java b/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java deleted file mode 100644 index 61696dca..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.representation; | ||
7 | |||
8 | import java.util.Optional; | ||
9 | |||
10 | // Singleton pattern, because there is only one domain for truth values. | ||
11 | @SuppressWarnings("squid:S6548") | ||
12 | public final class TruthValueDomain implements AbstractDomain<TruthValue, Boolean> { | ||
13 | public static final TruthValueDomain INSTANCE = new TruthValueDomain(); | ||
14 | |||
15 | private TruthValueDomain() { | ||
16 | } | ||
17 | |||
18 | @Override | ||
19 | public Class<TruthValue> abstractType() { | ||
20 | return TruthValue.class; | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public Class<Boolean> concreteType() { | ||
25 | return Boolean.class; | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public TruthValue toAbstract(Boolean concreteValue) { | ||
30 | return TruthValue.toTruthValue(concreteValue); | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | public Optional<Boolean> toConcrete(TruthValue abstractValue) { | ||
35 | return switch (abstractValue) { | ||
36 | case TRUE -> Optional.of(true); | ||
37 | case FALSE -> Optional.of(false); | ||
38 | default -> Optional.empty(); | ||
39 | }; | ||
40 | } | ||
41 | |||
42 | @Override | ||
43 | public boolean isConcrete(TruthValue abstractValue) { | ||
44 | return abstractValue.isConcrete(); | ||
45 | } | ||
46 | |||
47 | @Override | ||
48 | public TruthValue commonRefinement(TruthValue leftValue, TruthValue rightValue) { | ||
49 | return leftValue.merge(rightValue); | ||
50 | } | ||
51 | |||
52 | @Override | ||
53 | public TruthValue commonAncestor(TruthValue leftValue, TruthValue rightValue) { | ||
54 | return leftValue.join(rightValue); | ||
55 | } | ||
56 | |||
57 | @Override | ||
58 | public TruthValue unknown() { | ||
59 | return TruthValue.UNKNOWN; | ||
60 | } | ||
61 | |||
62 | @Override | ||
63 | public boolean isError(TruthValue abstractValue) { | ||
64 | return !abstractValue.isConsistent(); | ||
65 | } | ||
66 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java deleted file mode 100644 index 7ae2d935..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.representation.cardinality; | ||
7 | |||
8 | import tools.refinery.store.representation.AbstractDomain; | ||
9 | |||
10 | import java.util.Optional; | ||
11 | |||
12 | // Singleton pattern, because there is only one domain for truth values. | ||
13 | @SuppressWarnings("squid:S6548") | ||
14 | public class CardinalityDomain implements AbstractDomain<CardinalityInterval, Integer> { | ||
15 | public static final CardinalityDomain INSTANCE = new CardinalityDomain(); | ||
16 | |||
17 | private CardinalityDomain() { | ||
18 | } | ||
19 | |||
20 | @Override | ||
21 | public Class<CardinalityInterval> abstractType() { | ||
22 | return CardinalityInterval.class; | ||
23 | } | ||
24 | |||
25 | @Override | ||
26 | public Class<Integer> concreteType() { | ||
27 | return Integer.class; | ||
28 | } | ||
29 | |||
30 | @Override | ||
31 | public CardinalityInterval toAbstract(Integer concreteValue) { | ||
32 | return CardinalityIntervals.exactly(concreteValue); | ||
33 | } | ||
34 | |||
35 | @Override | ||
36 | public Optional<Integer> toConcrete(CardinalityInterval abstractValue) { | ||
37 | return isConcrete(abstractValue) ? Optional.of(abstractValue.lowerBound()) : Optional.empty(); | ||
38 | } | ||
39 | |||
40 | @Override | ||
41 | public boolean isConcrete(CardinalityInterval abstractValue) { | ||
42 | if (!(abstractValue instanceof NonEmptyCardinalityInterval nonEmptyValue) || | ||
43 | !((nonEmptyValue.upperBound()) instanceof FiniteUpperCardinality finiteUpperCardinality)) { | ||
44 | return false; | ||
45 | } | ||
46 | return nonEmptyValue.lowerBound() == finiteUpperCardinality.finiteUpperBound(); | ||
47 | } | ||
48 | |||
49 | @Override | ||
50 | public CardinalityInterval commonRefinement(CardinalityInterval leftValue, CardinalityInterval rightValue) { | ||
51 | return leftValue.meet(rightValue); | ||
52 | } | ||
53 | |||
54 | @Override | ||
55 | public CardinalityInterval commonAncestor(CardinalityInterval leftValue, CardinalityInterval rightValue) { | ||
56 | return leftValue.join(rightValue); | ||
57 | } | ||
58 | |||
59 | @Override | ||
60 | public CardinalityInterval unknown() { | ||
61 | return CardinalityIntervals.SET; | ||
62 | } | ||
63 | |||
64 | @Override | ||
65 | public boolean isError(CardinalityInterval abstractValue) { | ||
66 | return abstractValue.isEmpty(); | ||
67 | } | ||
68 | } | ||
diff --git a/z3/build.gradle.kts b/z3/build.gradle.kts new file mode 100644 index 00000000..74ee6bc8 --- /dev/null +++ b/z3/build.gradle.kts | |||
@@ -0,0 +1,9 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | alias(libs.plugins.versions) | ||
9 | } | ||
diff --git a/z3/buildSrc/build.gradle.kts b/z3/buildSrc/build.gradle.kts new file mode 100644 index 00000000..adc19562 --- /dev/null +++ b/z3/buildSrc/build.gradle.kts | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | `kotlin-dsl` | ||
9 | alias(libs.plugins.versions) | ||
10 | } | ||
11 | |||
12 | repositories { | ||
13 | mavenCentral() | ||
14 | } | ||
15 | |||
16 | dependencies { | ||
17 | implementation(libs.asm) | ||
18 | } | ||
diff --git a/z3/buildSrc/settings.gradle.kts b/z3/buildSrc/settings.gradle.kts new file mode 100644 index 00000000..095ab24c --- /dev/null +++ b/z3/buildSrc/settings.gradle.kts | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | dependencyResolutionManagement { | ||
8 | versionCatalogs { | ||
9 | create("libs") { | ||
10 | from(files("../gradle/libs.versions.toml")) | ||
11 | } | ||
12 | } | ||
13 | } | ||
diff --git a/z3/buildSrc/src/main/java/tools/refinery/z3/gradle/ClassFilePatcher.java b/z3/buildSrc/src/main/java/tools/refinery/z3/gradle/ClassFilePatcher.java new file mode 100644 index 00000000..5ac56005 --- /dev/null +++ b/z3/buildSrc/src/main/java/tools/refinery/z3/gradle/ClassFilePatcher.java | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | package tools.refinery.z3.gradle; | ||
7 | |||
8 | import org.objectweb.asm.*; | ||
9 | |||
10 | import java.io.File; | ||
11 | import java.io.FileInputStream; | ||
12 | import java.io.FileOutputStream; | ||
13 | import java.io.IOException; | ||
14 | |||
15 | public final class ClassFilePatcher { | ||
16 | private ClassFilePatcher() { | ||
17 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); | ||
18 | } | ||
19 | |||
20 | public static void removeClassInitializer(File classFile) throws IOException { | ||
21 | byte[] resultBytes; | ||
22 | try (var fileReader = new FileInputStream(classFile)) { | ||
23 | var classReader = new ClassReader(fileReader); | ||
24 | var classWriter = new ClassWriter(classReader, 0); | ||
25 | var classVisitor = new Visitor(classWriter); | ||
26 | classReader.accept(classVisitor, 0); | ||
27 | resultBytes = classWriter.toByteArray(); | ||
28 | } | ||
29 | try (var fileWriter = new FileOutputStream(classFile)) { | ||
30 | fileWriter.write(resultBytes); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | private static class Visitor extends ClassVisitor { | ||
35 | protected Visitor(ClassVisitor classVisitor) { | ||
36 | super(Opcodes.ASM9, classVisitor); | ||
37 | } | ||
38 | |||
39 | @Override | ||
40 | public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, | ||
41 | String[] exceptions) { | ||
42 | if (name.equals("<clinit>")) { | ||
43 | return null; | ||
44 | } | ||
45 | return super.visitMethod(access, name, descriptor, signature, exceptions); | ||
46 | } | ||
47 | } | ||
48 | } | ||
diff --git a/z3/buildSrc/src/main/kotlin/tools/refinery/z3/gradle/java-library.gradle.kts b/z3/buildSrc/src/main/kotlin/tools/refinery/z3/gradle/java-library.gradle.kts new file mode 100644 index 00000000..75d64a6f --- /dev/null +++ b/z3/buildSrc/src/main/kotlin/tools/refinery/z3/gradle/java-library.gradle.kts | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | package tools.refinery.z3.gradle | ||
7 | |||
8 | plugins { | ||
9 | `java-library` | ||
10 | `maven-publish` | ||
11 | } | ||
12 | |||
13 | java { | ||
14 | toolchain { | ||
15 | languageVersion.set(JavaLanguageVersion.of(21)) | ||
16 | } | ||
17 | } | ||
18 | |||
19 | repositories { | ||
20 | mavenCentral() | ||
21 | |||
22 | // Configuration based on https://stackoverflow.com/a/34327202 to pretend that GitHub is an Ivy repository | ||
23 | // in order to take advantage of Gradle dependency caching. | ||
24 | val github = ivy { | ||
25 | setUrl("https://github.com") | ||
26 | patternLayout { | ||
27 | artifact("/[organisation]/[module]/releases/download/[module]-[revision]/[classifier].[ext]") | ||
28 | artifact("/[organisation]/[module]/archive/refs/tags/[module]-[revision].[ext]") | ||
29 | } | ||
30 | metadataSources { | ||
31 | artifact() | ||
32 | } | ||
33 | } | ||
34 | |||
35 | exclusiveContent { | ||
36 | forRepositories(github) | ||
37 | filter { | ||
38 | includeGroup("Z3Prover") | ||
39 | } | ||
40 | } | ||
41 | } | ||
42 | |||
43 | val z3: Provider<Configuration> by configurations.registering { | ||
44 | isCanBeConsumed = false | ||
45 | isCanBeResolved = true | ||
46 | } | ||
47 | |||
48 | tasks { | ||
49 | jar { | ||
50 | manifest { | ||
51 | attributes( | ||
52 | "Bundle-SymbolicName" to "${project.group}.${project.name}", | ||
53 | "Bundle-Version" to project.version | ||
54 | ) | ||
55 | } | ||
56 | } | ||
57 | } | ||
58 | |||
59 | publishing.publications { | ||
60 | register<MavenPublication>("mavenJava") { | ||
61 | from(components["java"]) | ||
62 | pom { | ||
63 | licenses { | ||
64 | license { | ||
65 | name = "MIT License" | ||
66 | url = "https://raw.githubusercontent.com/Z3Prover/z3/master/LICENSE.txt" | ||
67 | } | ||
68 | license { | ||
69 | name = "The Apache License, Version 2.0" | ||
70 | url = "http://www.apache.org/licenses/LICENSE-2.0.txt" | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | } | ||
75 | } | ||
diff --git a/z3/docker/.gitignore b/z3/docker/.gitignore new file mode 100644 index 00000000..d5b53f81 --- /dev/null +++ b/z3/docker/.gitignore | |||
@@ -0,0 +1,5 @@ | |||
1 | # SPDX-FileCopyrightText: 2023 The Refinery Authors | ||
2 | # | ||
3 | # SPDX-License-Identifier: CC0-1.0 | ||
4 | |||
5 | out/ | ||
diff --git a/z3/docker/README.md b/z3/docker/README.md new file mode 100644 index 00000000..d979fd5e --- /dev/null +++ b/z3/docker/README.md | |||
@@ -0,0 +1,14 @@ | |||
1 | <!-- | ||
2 | SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | |||
4 | SPDX-License-Identifier: Apache-2.0 | ||
5 | --> | ||
6 | |||
7 | # Scripts for cross-building Z3 for linux-aarch64 | ||
8 | |||
9 | We intentionally build in Ubuntu Focal to avoid a dependency on glibc 2.35. | ||
10 | See https://github.com/Z3Prover/z3/issues/6572 for details. | ||
11 | |||
12 | This should not be necessary once Z3 4.12.3 is released, as now Z3 nighly | ||
13 | includes linux-aarch64 builds. | ||
14 | See https://github.com/Z3Prover/z3/issues/6835 for details. | ||
diff --git a/z3/docker/build_in_docker.sh b/z3/docker/build_in_docker.sh new file mode 100755 index 00000000..549e823d --- /dev/null +++ b/z3/docker/build_in_docker.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | # SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
4 | # | ||
5 | # SPDX-License-Identifier: Apache-2.0 | ||
6 | |||
7 | set -euo pipefail | ||
8 | |||
9 | z3_version="$1" | ||
10 | target_uid="$2" | ||
11 | target_gid="$3" | ||
12 | |||
13 | apt-get update | ||
14 | apt-get install -y python3 make gcc-aarch64-linux-gnu g++-aarch64-linux-gnu unzip | ||
15 | wget "https://github.com/Z3Prover/z3/archive/refs/tags/z3-${z3_version}.zip" | ||
16 | unzip "z3-${z3_version}.zip" | ||
17 | cd "z3-z3-${z3_version}" | ||
18 | export CC=aarch64-linux-gnu-gcc | ||
19 | export CXX=aarch64-linux-gnu-g++ | ||
20 | # See https://docs.aws.amazon.com/linux/al2023/ug/performance-optimizations.html | ||
21 | export CFLAGS="-march=armv8.2-a+crypto -mtune=neoverse-n1 -ftree-vectorize" | ||
22 | export CXXFLAGS="${CFLAGS}" | ||
23 | python3 scripts/mk_unix_dist.py -f --nodotnet --arch=arm64 | ||
24 | cp --preserve=all "./dist/z3-${z3_version}-arm64-glibc-2.31/bin"/*.so /data/out/ | ||
25 | chown "${target_uid}:${target_gid}" /data/out/* | ||
diff --git a/z3/docker/cross_build.sh b/z3/docker/cross_build.sh new file mode 100755 index 00000000..522d5c02 --- /dev/null +++ b/z3/docker/cross_build.sh | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | # SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
4 | # | ||
5 | # SPDX-License-Identifier: Apache-2.0 | ||
6 | |||
7 | set -euo pipefail | ||
8 | |||
9 | z3_version="$(grep '^version=' ../gradle.properties | cut -d'=' -f2)" | ||
10 | |||
11 | rm -rf out | ||
12 | mkdir out | ||
13 | docker run --platform linux/amd64 --rm -it -v "${PWD}:/data" --entrypoint /bin/bash docker.io/eclipse-temurin:17-jdk-focal /data/build_in_docker.sh "${z3_version}" "$(id -u)" "$(id -g)" | ||
14 | rm -rf ../subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/*.so | ||
15 | cp ./out/* ../subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/ | ||
diff --git a/z3/gradle.properties b/z3/gradle.properties new file mode 100644 index 00000000..73b4d596 --- /dev/null +++ b/z3/gradle.properties | |||
@@ -0,0 +1,9 @@ | |||
1 | # SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
2 | # | ||
3 | # SPDX-License-Identifier: Apache-2.0 | ||
4 | |||
5 | file.encoding=UTF-8 | ||
6 | group=tools.refinery.z3 | ||
7 | org.gradle.configuration-cache=false | ||
8 | org.gradle.parallel=true | ||
9 | version=4.12.6 | ||
diff --git a/z3/gradle/libs.versions.toml b/z3/gradle/libs.versions.toml new file mode 100644 index 00000000..7c6c5ad7 --- /dev/null +++ b/z3/gradle/libs.versions.toml | |||
@@ -0,0 +1,15 @@ | |||
1 | # SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
2 | # | ||
3 | # SPDX-License-Identifier: Apache-2.0 | ||
4 | |||
5 | [versions] | ||
6 | junit = "5.10.2" | ||
7 | |||
8 | [libraries] | ||
9 | asm = { group = "org.ow2.asm", name = "asm", version = "9.6" } | ||
10 | jna = { group = "net.java.dev.jna", name = "jna", version = "5.14.0" } | ||
11 | junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" } | ||
12 | junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" } | ||
13 | |||
14 | [plugins] | ||
15 | versions = { id = "com.github.ben-manes.versions", version = "0.51.0" } | ||
diff --git a/z3/settings.gradle.kts b/z3/settings.gradle.kts new file mode 100644 index 00000000..a857f5ce --- /dev/null +++ b/z3/settings.gradle.kts | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | rootProject.name = "refinery-z3" | ||
8 | |||
9 | include( | ||
10 | "solver", | ||
11 | "solver-darwin-aarch64", | ||
12 | "solver-darwin-x86-64", | ||
13 | "solver-linux-aarch64", | ||
14 | "solver-linux-x86-64", | ||
15 | "solver-win32-x86-64", | ||
16 | ) | ||
17 | |||
18 | for (project in rootProject.children) { | ||
19 | val projectName = project.name | ||
20 | project.name = "${rootProject.name}-$projectName" | ||
21 | project.projectDir = file("subprojects/$projectName") | ||
22 | } | ||
diff --git a/z3/subprojects/solver-darwin-aarch64/build.gradle.kts b/z3/subprojects/solver-darwin-aarch64/build.gradle.kts new file mode 100644 index 00000000..21c9739c --- /dev/null +++ b/z3/subprojects/solver-darwin-aarch64/build.gradle.kts | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.z3.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | val classifier = "z3-${version}-arm64-osx-11.0" | ||
12 | val library = "z3java-darwin-aarch64" | ||
13 | |||
14 | dependencies { | ||
15 | z3("Z3Prover:z3:${version}:${classifier}@zip") | ||
16 | } | ||
17 | |||
18 | val extractZ3Libs by tasks.registering(Sync::class) { | ||
19 | dependsOn(configurations.z3) | ||
20 | from({ | ||
21 | val zipFile = configurations.z3.map { it.singleFile } | ||
22 | zipTree(zipFile).matching { | ||
23 | include("${classifier}/bin/*.so") | ||
24 | includeEmptyDirs = false | ||
25 | } | ||
26 | }) | ||
27 | eachFile { | ||
28 | val pathInBin = relativePath.segments.drop(2).toTypedArray() | ||
29 | relativePath = RelativePath(true, library, *pathInBin) | ||
30 | } | ||
31 | into(layout.buildDirectory.dir("z3-extracted")) | ||
32 | } | ||
33 | |||
34 | sourceSets.main { | ||
35 | resources.srcDir(extractZ3Libs) | ||
36 | } | ||
diff --git a/z3/subprojects/solver-darwin-x86-64/build.gradle.kts b/z3/subprojects/solver-darwin-x86-64/build.gradle.kts new file mode 100644 index 00000000..75e59267 --- /dev/null +++ b/z3/subprojects/solver-darwin-x86-64/build.gradle.kts | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.z3.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | val classifier = "z3-${version}-x64-osx-10.16" | ||
12 | val library = "z3java-darwin-x86-64" | ||
13 | |||
14 | dependencies { | ||
15 | z3("Z3Prover:z3:${version}:${classifier}@zip") | ||
16 | } | ||
17 | |||
18 | val extractZ3Libs by tasks.registering(Sync::class) { | ||
19 | dependsOn(configurations.z3) | ||
20 | from({ | ||
21 | val zipFile = configurations.z3.map { it.singleFile } | ||
22 | zipTree(zipFile).matching { | ||
23 | include("${classifier}/bin/*.so") | ||
24 | includeEmptyDirs = false | ||
25 | } | ||
26 | }) | ||
27 | eachFile { | ||
28 | val pathInBin = relativePath.segments.drop(2).toTypedArray() | ||
29 | relativePath = RelativePath(true, library, *pathInBin) | ||
30 | } | ||
31 | into(layout.buildDirectory.dir("z3-extracted")) | ||
32 | } | ||
33 | |||
34 | sourceSets.main { | ||
35 | resources.srcDir(extractZ3Libs) | ||
36 | } | ||
diff --git a/z3/subprojects/solver-linux-aarch64/build.gradle.kts b/z3/subprojects/solver-linux-aarch64/build.gradle.kts new file mode 100644 index 00000000..a8e7e259 --- /dev/null +++ b/z3/subprojects/solver-linux-aarch64/build.gradle.kts | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.z3.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | tasks.jar { | ||
12 | // License information is redundant here, since it already gets added to the POM. | ||
13 | exclude("**/*.license") | ||
14 | } | ||
diff --git a/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3.so b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3.so new file mode 100755 index 00000000..574ee3ab --- /dev/null +++ b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3.so | |||
Binary files differ | |||
diff --git a/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3.so.license b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3.so.license new file mode 100644 index 00000000..0993dbf7 --- /dev/null +++ b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3.so.license | |||
@@ -0,0 +1,6 @@ | |||
1 | Copyright (c) Microsoft Corporations | ||
2 | |||
3 | SPDX-License-Identifier: MIT | ||
4 | |||
5 | This file was created from the Z3 4.12.6 release sources using the | ||
6 | z3/docker/cross_build.sh script in this repository. | ||
diff --git a/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3java.so b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3java.so new file mode 100755 index 00000000..aace2c30 --- /dev/null +++ b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3java.so | |||
Binary files differ | |||
diff --git a/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3java.so.license b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3java.so.license new file mode 100644 index 00000000..0993dbf7 --- /dev/null +++ b/z3/subprojects/solver-linux-aarch64/src/main/resources/z3java-linux-aarch64/libz3java.so.license | |||
@@ -0,0 +1,6 @@ | |||
1 | Copyright (c) Microsoft Corporations | ||
2 | |||
3 | SPDX-License-Identifier: MIT | ||
4 | |||
5 | This file was created from the Z3 4.12.6 release sources using the | ||
6 | z3/docker/cross_build.sh script in this repository. | ||
diff --git a/z3/subprojects/solver-linux-x86-64/build.gradle.kts b/z3/subprojects/solver-linux-x86-64/build.gradle.kts new file mode 100644 index 00000000..89c737b6 --- /dev/null +++ b/z3/subprojects/solver-linux-x86-64/build.gradle.kts | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.z3.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | val classifier = "z3-${version}-x64-glibc-2.31" | ||
12 | val library = "z3java-linux-x86-64" | ||
13 | |||
14 | dependencies { | ||
15 | z3("Z3Prover:z3:${version}:${classifier}@zip") | ||
16 | } | ||
17 | |||
18 | val extractZ3Libs by tasks.registering(Sync::class) { | ||
19 | dependsOn(configurations.z3) | ||
20 | from({ | ||
21 | val zipFile = configurations.z3.map { it.singleFile } | ||
22 | zipTree(zipFile).matching { | ||
23 | include("${classifier}/bin/*.so") | ||
24 | includeEmptyDirs = false | ||
25 | } | ||
26 | }) | ||
27 | eachFile { | ||
28 | val pathInBin = relativePath.segments.drop(2).toTypedArray() | ||
29 | relativePath = RelativePath(true, library, *pathInBin) | ||
30 | } | ||
31 | into(layout.buildDirectory.dir("z3-extracted")) | ||
32 | } | ||
33 | |||
34 | sourceSets.main { | ||
35 | resources.srcDir(extractZ3Libs) | ||
36 | } | ||
diff --git a/z3/subprojects/solver-win32-x86-64/build.gradle.kts b/z3/subprojects/solver-win32-x86-64/build.gradle.kts new file mode 100644 index 00000000..c5fa0421 --- /dev/null +++ b/z3/subprojects/solver-win32-x86-64/build.gradle.kts | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | plugins { | ||
8 | id("tools.refinery.z3.gradle.java-library") | ||
9 | } | ||
10 | |||
11 | val classifier = "z3-${version}-x64-win" | ||
12 | val library = "z3java-win32-x86-64" | ||
13 | |||
14 | dependencies { | ||
15 | z3("Z3Prover:z3:${version}:${classifier}@zip") | ||
16 | } | ||
17 | |||
18 | val extractZ3Libs by tasks.registering(Sync::class) { | ||
19 | dependsOn(configurations.z3) | ||
20 | from({ | ||
21 | val zipFile = configurations.z3.map { it.singleFile } | ||
22 | zipTree(zipFile).matching { | ||
23 | include("${classifier}/bin/*.dll") | ||
24 | // Do not include .NET assembly. | ||
25 | exclude("${classifier}/bin/Microsoft.Z3.dll") | ||
26 | includeEmptyDirs = false | ||
27 | } | ||
28 | }) | ||
29 | eachFile { | ||
30 | val pathInBin = relativePath.segments.drop(2).toTypedArray() | ||
31 | relativePath = RelativePath(true, library, *pathInBin) | ||
32 | } | ||
33 | into(layout.buildDirectory.dir("z3-extracted")) | ||
34 | } | ||
35 | |||
36 | sourceSets.main { | ||
37 | resources.srcDir(extractZ3Libs) | ||
38 | } | ||
diff --git a/z3/subprojects/solver/build.gradle.kts b/z3/subprojects/solver/build.gradle.kts new file mode 100644 index 00000000..7e898b3e --- /dev/null +++ b/z3/subprojects/solver/build.gradle.kts | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | |||
7 | import tools.refinery.z3.gradle.ClassFilePatcher | ||
8 | |||
9 | plugins { | ||
10 | id("tools.refinery.z3.gradle.java-library") | ||
11 | } | ||
12 | |||
13 | val classifier = "z3-${version}-x64-glibc-2.31" | ||
14 | val extractedClassesDir = layout.buildDirectory.dir("z3-extracted") | ||
15 | val extractedSourcesDir = layout.buildDirectory.dir("z3-sources") | ||
16 | |||
17 | java { | ||
18 | withJavadocJar() | ||
19 | withSourcesJar() | ||
20 | } | ||
21 | |||
22 | val z3Source: Configuration by configurations.creating { | ||
23 | isCanBeConsumed = false | ||
24 | isCanBeResolved = true | ||
25 | } | ||
26 | |||
27 | val extractZ3Jar by tasks.registering(Sync::class) { | ||
28 | dependsOn(configurations.z3) | ||
29 | from({ | ||
30 | val zipFile = configurations.z3.map { it.singleFile } | ||
31 | val jarFile = zipTree(zipFile).matching { | ||
32 | include("${classifier}/bin/com.microsoft.z3.jar") | ||
33 | }.singleFile | ||
34 | zipTree(jarFile).matching { | ||
35 | exclude("META-INF/MANIFEST.MF") | ||
36 | includeEmptyDirs = false | ||
37 | } | ||
38 | }) | ||
39 | into(extractedClassesDir) | ||
40 | doLast { | ||
41 | // The class initializer off {@see com.microsoft.z3.Native} will try to load the Z3 native libraries | ||
42 | // from the system default library path unless the {@code z3.skipLibraryLoad} system property is set. | ||
43 | // Since we don't control the library path or system properties, we remove the class initializer entirely. | ||
44 | val nativeClassFile = extractedClassesDir.get().file("com/microsoft/z3/Native.class").asFile | ||
45 | ClassFilePatcher.removeClassInitializer(nativeClassFile) | ||
46 | } | ||
47 | } | ||
48 | |||
49 | val extractZ3Source by tasks.registering(Sync::class) { | ||
50 | dependsOn(z3Source) | ||
51 | from({ | ||
52 | val zipFile = z3Source.singleFile | ||
53 | zipTree(zipFile).matching { | ||
54 | include("z3-z3-${version}/src/api/java/**/*") | ||
55 | includeEmptyDirs = false | ||
56 | } | ||
57 | }) | ||
58 | eachFile { | ||
59 | val pathInBin = relativePath.segments.drop(4).toTypedArray() | ||
60 | relativePath = RelativePath(true, "com", "microsoft", "z3", *pathInBin) | ||
61 | } | ||
62 | into(extractedSourcesDir) | ||
63 | } | ||
64 | |||
65 | tasks.jar { | ||
66 | // Add class files to our jar manually. | ||
67 | from(extractZ3Jar) | ||
68 | } | ||
69 | |||
70 | tasks.test { | ||
71 | useJUnitPlatform() | ||
72 | } | ||
73 | |||
74 | tasks.named<Jar>("sourcesJar") { | ||
75 | from(extractZ3Source) | ||
76 | } | ||
77 | |||
78 | tasks.named<Javadoc>("javadoc") { | ||
79 | source(sourceSets.main.map { it.allJava }) | ||
80 | source(fileTree(extractedSourcesDir) { | ||
81 | builtBy(extractZ3Source) | ||
82 | include("**/*.java") | ||
83 | }) | ||
84 | options { | ||
85 | this as StandardJavadocDocletOptions | ||
86 | addBooleanOption("Xdoclint:none", true) | ||
87 | // {@code -Xmaxwarns 0} will print all warnings, so we must keep at least one. | ||
88 | addStringOption("Xmaxwarns", "1") | ||
89 | quiet() | ||
90 | } | ||
91 | } | ||
92 | |||
93 | dependencies { | ||
94 | z3("Z3Prover:z3:${version}:${classifier}@zip") | ||
95 | z3Source("Z3Prover:z3:${version}@zip") | ||
96 | // This dependency doesn't get added to Maven metadata, so we have to add the class files to our jar manually. | ||
97 | api(files(extractZ3Jar)) | ||
98 | implementation(libs.jna) | ||
99 | implementation(project(":refinery-z3-solver-darwin-aarch64")) | ||
100 | implementation(project(":refinery-z3-solver-darwin-x86-64")) | ||
101 | implementation(project(":refinery-z3-solver-linux-aarch64")) | ||
102 | implementation(project(":refinery-z3-solver-linux-x86-64")) | ||
103 | implementation(project(":refinery-z3-solver-win32-x86-64")) | ||
104 | testImplementation(libs.junit.api) | ||
105 | testRuntimeOnly(libs.junit.engine) | ||
106 | testRuntimeOnly("org.junit.platform:junit-platform-launcher") | ||
107 | } | ||
diff --git a/z3/subprojects/solver/src/main/java/tools/refinery/z3/Z3SolverLoader.java b/z3/subprojects/solver/src/main/java/tools/refinery/z3/Z3SolverLoader.java new file mode 100644 index 00000000..84f99540 --- /dev/null +++ b/z3/subprojects/solver/src/main/java/tools/refinery/z3/Z3SolverLoader.java | |||
@@ -0,0 +1,154 @@ | |||
1 | /* | ||
2 | * Copyright 2010-2022 Google LLC | ||
3 | * Copyright 2023 The Refinery Authors <https://refinery.tools/> | ||
4 | * | ||
5 | * SPDX-License-Identifier: Apache-2.0 | ||
6 | * | ||
7 | * This file is based on | ||
8 | * https://github.com/google/or-tools/blob/f3d1d5f6a67356ec38a7fd2ab607624eea8ad3a6/ortools/java/com/google/ortools/Loader.java | ||
9 | * We adapted the loader logic to extract the JNI libraries of Z3 and the corresponding dependencies instead of the | ||
10 | * Google OR-Tools JNI libraries. | ||
11 | */ | ||
12 | package tools.refinery.z3; | ||
13 | |||
14 | import com.sun.jna.Platform; | ||
15 | |||
16 | import java.io.IOException; | ||
17 | import java.net.URI; | ||
18 | import java.net.URISyntaxException; | ||
19 | import java.nio.file.*; | ||
20 | import java.nio.file.attribute.BasicFileAttributes; | ||
21 | import java.util.Map; | ||
22 | |||
23 | public final class Z3SolverLoader { | ||
24 | private static final String JNI_LIBRARY_NAME = "z3java"; | ||
25 | private static final String SOLVER_LIBRARY_NAME = "z3"; | ||
26 | |||
27 | private static boolean loaded; | ||
28 | |||
29 | private Z3SolverLoader() { | ||
30 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); | ||
31 | } | ||
32 | |||
33 | public static synchronized void loadNativeLibraries() { | ||
34 | if (loaded) { | ||
35 | return; | ||
36 | } | ||
37 | try { | ||
38 | System.loadLibrary(getOsSpecificLibraryName(JNI_LIBRARY_NAME)); | ||
39 | loaded = true; | ||
40 | return; | ||
41 | } catch (UnsatisfiedLinkError e) { | ||
42 | // Continue, we'll have to extract the libraries from the classpath. | ||
43 | } | ||
44 | try { | ||
45 | extractAndLoad(); | ||
46 | loaded = true; | ||
47 | } catch (IOException e) { | ||
48 | throw new IllegalStateException("Could not extract and load " + JNI_LIBRARY_NAME, e); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | private static void extractAndLoad() throws IOException { | ||
53 | var resourceName = JNI_LIBRARY_NAME + "-" + Platform.RESOURCE_PREFIX; | ||
54 | var resource = Z3SolverLoader.class.getClassLoader().getResource(resourceName); | ||
55 | if (resource == null) { | ||
56 | throw new IllegalStateException("Resource %s was not found".formatted(resourceName)); | ||
57 | } | ||
58 | URI resourceUri; | ||
59 | try { | ||
60 | resourceUri = resource.toURI(); | ||
61 | } catch (URISyntaxException e) { | ||
62 | throw new IllegalStateException("Invalid resource URI: " + resource); | ||
63 | } | ||
64 | FileSystem fileSystem = null; | ||
65 | boolean newFileSystem = false; | ||
66 | Path extractedPath; | ||
67 | try { | ||
68 | try { | ||
69 | fileSystem = FileSystems.newFileSystem(resourceUri, Map.of()); | ||
70 | newFileSystem = true; | ||
71 | } catch (FileSystemAlreadyExistsException e) { | ||
72 | fileSystem = FileSystems.getFileSystem(resourceUri); | ||
73 | } | ||
74 | var resourcePath = fileSystem.provider().getPath(resourceUri); | ||
75 | if (fileSystem.equals(FileSystems.getDefault())) { | ||
76 | extractedPath = resourcePath; | ||
77 | } else { | ||
78 | extractedPath = extract(resourcePath); | ||
79 | } | ||
80 | } finally { | ||
81 | if (newFileSystem) { | ||
82 | fileSystem.close(); | ||
83 | } | ||
84 | } | ||
85 | // We can't rely on RPATH, so we load libraries in reverse dependency order manually. | ||
86 | try { | ||
87 | loadFromPath(extractedPath, SOLVER_LIBRARY_NAME); | ||
88 | } catch (UnsatisfiedLinkError e) { | ||
89 | if (Platform.isWindows()) { | ||
90 | // Try again with our packaged msvcp140 if the system one is missing. | ||
91 | loadFromPathExactName(extractedPath, "vcruntime140.dll"); | ||
92 | loadFromPathExactName(extractedPath, "vcruntime140_1.dll"); | ||
93 | loadFromPathExactName(extractedPath, "msvcp140.dll"); | ||
94 | loadFromPath(extractedPath, SOLVER_LIBRARY_NAME); | ||
95 | } else { | ||
96 | throw e; | ||
97 | } | ||
98 | } | ||
99 | loadFromPath(extractedPath, JNI_LIBRARY_NAME); | ||
100 | } | ||
101 | |||
102 | private static Path extract(Path resourcePath) throws IOException { | ||
103 | var tempDir = Files.createTempDirectory(JNI_LIBRARY_NAME).toAbsolutePath(); | ||
104 | tempDir.toFile().deleteOnExit(); | ||
105 | Files.walkFileTree(resourcePath, new SimpleFileVisitor<>() { | ||
106 | @Override | ||
107 | public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { | ||
108 | var result = super.preVisitDirectory(dir, attrs); | ||
109 | var targetPath = getTargetPath(dir, resourcePath, tempDir); | ||
110 | if (!Files.exists(targetPath)) { | ||
111 | Files.createDirectory(targetPath); | ||
112 | targetPath.toFile().deleteOnExit(); | ||
113 | } | ||
114 | return result; | ||
115 | } | ||
116 | |||
117 | @Override | ||
118 | public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { | ||
119 | var result = super.visitFile(file, attrs); | ||
120 | var targetPath = getTargetPath(file, resourcePath, tempDir); | ||
121 | Files.copy(file, targetPath); | ||
122 | targetPath.toFile().deleteOnExit(); | ||
123 | return result; | ||
124 | } | ||
125 | }); | ||
126 | return tempDir; | ||
127 | } | ||
128 | |||
129 | private static Path getTargetPath(Path sourcePath, Path resourcePath, Path tempDir) { | ||
130 | var targetPath = tempDir.resolve(resourcePath.relativize(sourcePath).toString()).normalize(); | ||
131 | if (!targetPath.startsWith(tempDir)) { | ||
132 | throw new IllegalStateException("Target path '%s' for '%s' is outside '%s'" | ||
133 | .formatted(targetPath, sourcePath, tempDir)); | ||
134 | } | ||
135 | return targetPath; | ||
136 | } | ||
137 | |||
138 | private static String getOsSpecificLibraryName(String libraryName) { | ||
139 | var osSpecificLibraryNamePrefix = Platform.isWindows() ? "lib" : ""; | ||
140 | return osSpecificLibraryNamePrefix + libraryName; | ||
141 | } | ||
142 | |||
143 | private static void loadFromPath(Path extractedPath, String libraryName) { | ||
144 | var osSpecificLibraryName = getOsSpecificLibraryName(libraryName); | ||
145 | loadFromPathExactName(extractedPath, System.mapLibraryName(osSpecificLibraryName)); | ||
146 | } | ||
147 | |||
148 | private static void loadFromPathExactName(Path extractedPath, String exactName) { | ||
149 | var library = extractedPath.resolve(exactName) | ||
150 | .toAbsolutePath() | ||
151 | .toString(); | ||
152 | System.load(library); | ||
153 | } | ||
154 | } | ||
diff --git a/z3/subprojects/solver/src/test/java/tools/refinery/z3/Z3SolverLoaderTest.java b/z3/subprojects/solver/src/test/java/tools/refinery/z3/Z3SolverLoaderTest.java new file mode 100644 index 00000000..df3139cc --- /dev/null +++ b/z3/subprojects/solver/src/test/java/tools/refinery/z3/Z3SolverLoaderTest.java | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: Apache-2.0 | ||
5 | */ | ||
6 | package tools.refinery.z3; | ||
7 | |||
8 | import com.microsoft.z3.*; | ||
9 | import org.junit.jupiter.api.Test; | ||
10 | |||
11 | import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; | ||
12 | import static org.junit.jupiter.api.Assertions.assertEquals; | ||
13 | |||
14 | class Z3SolverLoaderTest { | ||
15 | @Test | ||
16 | void testLoad() { | ||
17 | assertDoesNotThrow(Z3SolverLoader::loadNativeLibraries); | ||
18 | try (var context = new Context()) { | ||
19 | var solver = context.mkSolver(); | ||
20 | var a = context.mkConst("a", context.getIntSort()); | ||
21 | var b = context.mkConst("b", context.getIntSort()); | ||
22 | solver.add(context.mkEq(a, context.mkInt(3))); | ||
23 | solver.add(context.mkEq(b, context.mkMul(context.mkInt(2), a))); | ||
24 | assertEquals(Status.SATISFIABLE, solver.check()); | ||
25 | var model = solver.getModel(); | ||
26 | var bValue = (IntNum) model.getConstInterp(b); | ||
27 | assertEquals(6, bValue.getInt()); | ||
28 | } | ||
29 | } | ||
30 | } | ||