diff options
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner')
7 files changed, 14 insertions, 12 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend index 8d6523b1..300f8b51 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend | |||
@@ -4,6 +4,8 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | |||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | 4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace |
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory |
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator |
7 | import java.util.Map | ||
8 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
7 | 9 | ||
8 | class FileSystemHint extends Ecore2LogicTraceBasedHint { | 10 | class FileSystemHint extends Ecore2LogicTraceBasedHint { |
9 | static val REMAINING_CONTENTS_ROOT = "hint_root" | 11 | static val REMAINING_CONTENTS_ROOT = "hint_root" |
@@ -12,7 +14,7 @@ class FileSystemHint extends Ecore2LogicTraceBasedHint { | |||
12 | super(ecore2Logic, trace) | 14 | super(ecore2Logic, trace) |
13 | } | 15 | } |
14 | 16 | ||
15 | override getAdditionalPatterns(PatternGenerator it) ''' | 17 | override getAdditionalPatterns(PatternGenerator it, Map<String, PQuery> fqnToPQuery) ''' |
16 | pattern «REMAINING_CONTENTS_ROOT»(problem:LogicProblem, interpretation:PartialInterpretation, remainingContents:java Integer) { | 18 | pattern «REMAINING_CONTENTS_ROOT»(problem:LogicProblem, interpretation:PartialInterpretation, remainingContents:java Integer) { |
17 | find interpretation(problem, interpretation); | 19 | find interpretation(problem, interpretation); |
18 | remainingContents == sum find remainingContents_root_reference_Dir_helper(problem, interpretation, _, #_) | 20 | remainingContents == sum find remainingContents_root_reference_Dir_helper(problem, interpretation, _, #_) |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend index f4f36951..9cc6e415 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend | |||
@@ -1,10 +1,10 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | 1 | package hu.bme.mit.inf.dslreasoner.run |
2 | 2 | ||
3 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint |
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | ||
7 | import org.eclipse.viatra.dse.base.ThreadContext | 6 | import org.eclipse.viatra.dse.base.ThreadContext |
7 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
8 | 8 | ||
9 | class FileSystemInconsistencyDetector extends ModelGenerationMethodBasedGlobalConstraint { | 9 | class FileSystemInconsistencyDetector extends ModelGenerationMethodBasedGlobalConstraint { |
10 | var PartialInterpretation partialInterpretation | 10 | var PartialInterpretation partialInterpretation |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend index bf9ca274..cbc692b3 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend | |||
@@ -12,8 +12,8 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | |||
12 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor | 12 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor |
13 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns | 13 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns |
14 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor | 14 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor |
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | 15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint |
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod | ||
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint |
18 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | 18 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace |
19 | import java.util.Collection | 19 | import java.util.Collection |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend index 97ce4ee6..9a84f777 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend | |||
@@ -4,13 +4,15 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | |||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | 4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace |
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory |
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator |
7 | import java.util.Map | ||
8 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
7 | 9 | ||
8 | class SGraphHint extends Ecore2LogicTraceBasedHint { | 10 | class SGraphHint extends Ecore2LogicTraceBasedHint { |
9 | new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | 11 | new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { |
10 | super(ecore2Logic, trace) | 12 | super(ecore2Logic, trace) |
11 | } | 13 | } |
12 | 14 | ||
13 | override getAdditionalPatterns(extension PatternGenerator patternGenerator) { | 15 | override getAdditionalPatterns(extension PatternGenerator patternGenerator, Map<String, PQuery> fqnToPQuery) { |
14 | "" | 16 | "" |
15 | } | 17 | } |
16 | 18 | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend index 22addd3d..b8167566 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend | |||
@@ -1,7 +1,7 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | 1 | package hu.bme.mit.inf.dslreasoner.run |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint |
6 | import org.eclipse.viatra.dse.base.ThreadContext | 6 | import org.eclipse.viatra.dse.base.ThreadContext |
7 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | 7 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend index ef5b779e..28954d60 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend | |||
@@ -5,6 +5,8 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality |
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator | 7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator |
8 | import java.util.Map | ||
9 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
8 | 10 | ||
9 | class SatelliteHint extends Ecore2LogicTraceBasedHint { | 11 | class SatelliteHint extends Ecore2LogicTraceBasedHint { |
10 | static val INTERFEROMETY_PAYLOAD = "hint_interferometryPayload" | 12 | static val INTERFEROMETY_PAYLOAD = "hint_interferometryPayload" |
@@ -14,7 +16,7 @@ class SatelliteHint extends Ecore2LogicTraceBasedHint { | |||
14 | super(ecore2Logic, trace) | 16 | super(ecore2Logic, trace) |
15 | } | 17 | } |
16 | 18 | ||
17 | override getAdditionalPatterns(PatternGenerator it) ''' | 19 | override getAdditionalPatterns(PatternGenerator it, Map<String, PQuery> fqnToPQuery) ''' |
18 | pattern «INTERFEROMETY_PAYLOAD»(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement) { | 20 | pattern «INTERFEROMETY_PAYLOAD»(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement) { |
19 | find interpretation(problem, interpretation); | 21 | find interpretation(problem, interpretation); |
20 | find mustExist(problem, interpretation, object); | 22 | find mustExist(problem, interpretation, object); |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend index b65826ad..5e2d0920 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend | |||
@@ -1,9 +1,8 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | 1 | package hu.bme.mit.inf.dslreasoner.run |
2 | 2 | ||
3 | import functionalarchitecture.FunctionalarchitecturePackage | 3 | import functionalarchitecture.FunctionalarchitecturePackage |
4 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model | ||
4 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns | 5 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns |
5 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Model | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Type | ||
7 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | 6 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic |
8 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration | 7 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration |
9 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor | 8 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor |
@@ -15,7 +14,6 @@ import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore | |||
15 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic | 14 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic |
16 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration | 15 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration |
17 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor | 16 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor |
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy | ||
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic |
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml | 19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml |
@@ -121,8 +119,6 @@ class SimpleRun { | |||
121 | val patterns = i.specifications.toList | 119 | val patterns = i.specifications.toList |
122 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet | 120 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet |
123 | val derivedFeatures = new LinkedHashMap | 121 | val derivedFeatures = new LinkedHashMap |
124 | derivedFeatures.put(Type.instance,metamodel.attributes.filter[it.name == "type"].head) | ||
125 | derivedFeatures.put(Model.instance,metamodel.references.filter[it.name == "model"].head) | ||
126 | val res = new ViatraQuerySetDescriptor( | 122 | val res = new ViatraQuerySetDescriptor( |
127 | patterns, | 123 | patterns, |
128 | wfPatterns, | 124 | wfPatterns, |