diff options
author | 2021-11-05 19:33:25 +0100 | |
---|---|---|
committer | 2021-11-05 20:00:06 +0100 | |
commit | a951628de0ce9902222ed290a1345c145f8af01a (patch) | |
tree | ad8414c17edebe50912bf87a26ed5509feb91683 /language-to-store | |
parent | Merge pull request #10 from kris7t/cm6-fixes (diff) | |
download | refinery-a951628de0ce9902222ed290a1345c145f8af01a.tar.gz refinery-a951628de0ce9902222ed290a1345c145f8af01a.tar.zst refinery-a951628de0ce9902222ed290a1345c145f8af01a.zip |
chore: rename unique to individual
Suggestion by @vincemolnar to match SysML V2 terminology more closely.
Diffstat (limited to 'language-to-store')
2 files changed, 4 insertions, 4 deletions
diff --git a/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java b/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java index 1593a237..8f90a743 100644 --- a/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java +++ b/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java | |||
@@ -12,6 +12,7 @@ import tools.refinery.language.model.problem.Assertion; | |||
12 | import tools.refinery.language.model.problem.AssertionArgument; | 12 | import tools.refinery.language.model.problem.AssertionArgument; |
13 | import tools.refinery.language.model.problem.ClassDeclaration; | 13 | import tools.refinery.language.model.problem.ClassDeclaration; |
14 | import tools.refinery.language.model.problem.EnumDeclaration; | 14 | import tools.refinery.language.model.problem.EnumDeclaration; |
15 | import tools.refinery.language.model.problem.IndividualDeclaration; | ||
15 | import tools.refinery.language.model.problem.LogicValue; | 16 | import tools.refinery.language.model.problem.LogicValue; |
16 | import tools.refinery.language.model.problem.Node; | 17 | import tools.refinery.language.model.problem.Node; |
17 | import tools.refinery.language.model.problem.NodeAssertionArgument; | 18 | import tools.refinery.language.model.problem.NodeAssertionArgument; |
@@ -19,7 +20,6 @@ import tools.refinery.language.model.problem.PredicateDefinition; | |||
19 | import tools.refinery.language.model.problem.Problem; | 20 | import tools.refinery.language.model.problem.Problem; |
20 | import tools.refinery.language.model.problem.ReferenceDeclaration; | 21 | import tools.refinery.language.model.problem.ReferenceDeclaration; |
21 | import tools.refinery.language.model.problem.Statement; | 22 | import tools.refinery.language.model.problem.Statement; |
22 | import tools.refinery.language.model.problem.UniqueDeclaration; | ||
23 | import tools.refinery.store.model.Model; | 23 | import tools.refinery.store.model.Model; |
24 | import tools.refinery.store.model.ModelStore; | 24 | import tools.refinery.store.model.ModelStore; |
25 | import tools.refinery.store.model.ModelStoreImpl; | 25 | import tools.refinery.store.model.ModelStoreImpl; |
@@ -183,7 +183,7 @@ public class PartialModelMapper { | |||
183 | for (Node n : ed.getLiterals()) { | 183 | for (Node n : ed.getLiterals()) { |
184 | enumNodeMap.put(n, nodeIter[0]++); | 184 | enumNodeMap.put(n, nodeIter[0]++); |
185 | } | 185 | } |
186 | } else if (s instanceof UniqueDeclaration ud) { | 186 | } else if (s instanceof IndividualDeclaration ud) { |
187 | for (Node n : ud.getNodes()) { | 187 | for (Node n : ud.getNodes()) { |
188 | uniqueNodeMap.put(n, nodeIter[0]++); | 188 | uniqueNodeMap.put(n, nodeIter[0]++); |
189 | } | 189 | } |
diff --git a/language-to-store/src/test/java/tools/refinery/language/mapping/tests/PartialModelMapperTest.xtend b/language-to-store/src/test/java/tools/refinery/language/mapping/tests/PartialModelMapperTest.xtend index 52b89bae..add73c87 100644 --- a/language-to-store/src/test/java/tools/refinery/language/mapping/tests/PartialModelMapperTest.xtend +++ b/language-to-store/src/test/java/tools/refinery/language/mapping/tests/PartialModelMapperTest.xtend | |||
@@ -290,7 +290,7 @@ class PartialModelMapperTest { | |||
290 | error invalidTaxStatus(Person p) <-> | 290 | error invalidTaxStatus(Person p) <-> |
291 | taxStatus(p, child), children(p, _q). | 291 | taxStatus(p, child), children(p, _q). |
292 | 292 | ||
293 | unique family. | 293 | individual family. |
294 | Family(family). | 294 | Family(family). |
295 | members(family, anne): true. | 295 | members(family, anne): true. |
296 | members(family, bob). | 296 | members(family, bob). |
@@ -322,7 +322,7 @@ class PartialModelMapperTest { | |||
322 | val anne = problem.node("anne") | 322 | val anne = problem.node("anne") |
323 | val bob = problem.node("bob") | 323 | val bob = problem.node("bob") |
324 | val ciri = problem.node("ciri") | 324 | val ciri = problem.node("ciri") |
325 | val family = problem.uniqueNode("family") | 325 | val family = problem.individualNode("family") |
326 | val adult = problem.findEnum("TaxStatus").literal("adult") | 326 | val adult = problem.findEnum("TaxStatus").literal("adult") |
327 | 327 | ||
328 | assertTrue(model.getDataRepresentations().contains(relationMap.get(Family))) | 328 | assertTrue(model.getDataRepresentations().contains(relationMap.get(Family))) |