diff options
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend index c4d7e231..6f38d261 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend | |||
@@ -6,19 +6,28 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | |||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | 6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | 7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod |
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | 8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod |
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorConstraints | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorSolver | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualiser | 12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualiser |
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveThreshold | ||
10 | import java.util.LinkedList | 15 | import java.util.LinkedList |
11 | import java.util.List | 16 | import java.util.List |
12 | import java.util.Set | 17 | import java.util.Set |
13 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | 18 | import org.eclipse.xtext.xbase.lib.Functions.Function1 |
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
14 | 20 | ||
15 | public enum StateCoderStrategy { | 21 | enum StateCoderStrategy { |
16 | Neighbourhood, NeighbourhoodWithEquivalence, IDBased, DefinedByDiversity | 22 | Neighbourhood, |
23 | PairwiseNeighbourhood, | ||
24 | NeighbourhoodWithEquivalence, | ||
25 | IDBased, | ||
26 | DefinedByDiversity | ||
17 | } | 27 | } |
18 | 28 | ||
19 | class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | 29 | class ViatraReasonerConfiguration extends LogicSolverConfiguration { |
20 | //public var Iterable<PQuery> existingQueries | 30 | // public var Iterable<PQuery> existingQueries |
21 | |||
22 | public var nameNewElements = false | 31 | public var nameNewElements = false |
23 | public var StateCoderStrategy stateCoderStrategy = StateCoderStrategy.Neighbourhood | 32 | public var StateCoderStrategy stateCoderStrategy = StateCoderStrategy.Neighbourhood |
24 | public var TypeInferenceMethod typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis | 33 | public var TypeInferenceMethod typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis |
@@ -26,7 +35,7 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | |||
26 | * Once per 1/randomBacktrackChance the search selects a random state. | 35 | * Once per 1/randomBacktrackChance the search selects a random state. |
27 | */ | 36 | */ |
28 | public var int randomBacktrackChance = 20; | 37 | public var int randomBacktrackChance = 20; |
29 | 38 | ||
30 | /** | 39 | /** |
31 | * Describes the required diversity between the solutions. | 40 | * Describes the required diversity between the solutions. |
32 | * Null means that the solutions have to have different state codes only. | 41 | * Null means that the solutions have to have different state codes only. |
@@ -40,14 +49,21 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | |||
40 | /** | 49 | /** |
41 | * Configuration for debugging support. | 50 | * Configuration for debugging support. |
42 | */ | 51 | */ |
43 | public var DebugConfiguration debugCongiguration = new DebugConfiguration | 52 | public var DebugConfiguration debugConfiguration = new DebugConfiguration |
44 | /** | 53 | /** |
45 | * Configuration for cutting search space. | 54 | * Configuration for cutting search space. |
46 | */ | 55 | */ |
47 | public var SearchSpaceConstraint searchSpaceConstraints = new SearchSpaceConstraint | 56 | public var SearchSpaceConstraint searchSpaceConstraints = new SearchSpaceConstraint |
57 | |||
58 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( | ||
59 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) | ||
60 | |||
61 | public var List<LinearTypeConstraintHint> hints = newArrayList | ||
62 | |||
63 | public var List<CostObjectiveConfiguration> costObjectives = newArrayList | ||
48 | } | 64 | } |
49 | 65 | ||
50 | public class DiversityDescriptor { | 66 | class DiversityDescriptor { |
51 | public var ensureDiversity = false | 67 | public var ensureDiversity = false |
52 | public static val FixPointRange = -1 | 68 | public static val FixPointRange = -1 |
53 | public var int range = FixPointRange | 69 | public var int range = FixPointRange |
@@ -57,20 +73,31 @@ public class DiversityDescriptor { | |||
57 | public var Set<RelationDeclaration> relevantRelations = null | 73 | public var Set<RelationDeclaration> relevantRelations = null |
58 | } | 74 | } |
59 | 75 | ||
60 | public class DebugConfiguration { | 76 | class DebugConfiguration { |
61 | public var logging = false | 77 | public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null |
62 | public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null; | ||
63 | public var partalInterpretationVisualisationFrequency = 1 | 78 | public var partalInterpretationVisualisationFrequency = 1 |
64 | } | 79 | } |
65 | 80 | ||
66 | public class InternalConsistencyCheckerConfiguration { | 81 | class InternalConsistencyCheckerConfiguration { |
67 | public var LogicReasoner internalIncosnsitencyDetector = null | 82 | public var LogicReasoner internalIncosnsitencyDetector = null |
68 | public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null | 83 | public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null |
69 | public var incternalConsistencyCheckingFrequency = 1 | 84 | public var incternalConsistencyCheckingFrequency = 1 |
70 | } | 85 | } |
71 | 86 | ||
72 | public class SearchSpaceConstraint { | 87 | class SearchSpaceConstraint { |
73 | public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE | 88 | public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE |
74 | public var int maxDepth = UNLIMITED_MAXDEPTH | 89 | public var int maxDepth = UNLIMITED_MAXDEPTH |
75 | public var List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList | 90 | public var List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList |
76 | } \ No newline at end of file | 91 | } |
92 | |||
93 | class CostObjectiveConfiguration { | ||
94 | public var List<CostObjectiveElementConfiguration> elements = newArrayList | ||
95 | public var ObjectiveKind kind | ||
96 | public var ObjectiveThreshold threshold | ||
97 | public var boolean findExtremum | ||
98 | } | ||
99 | |||
100 | class CostObjectiveElementConfiguration { | ||
101 | public var String patternQualifiedName | ||
102 | public var int weight | ||
103 | } | ||