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 | 54 |
1 files changed, 39 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..a5f42a5f 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,27 @@ 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 |
14 | 19 | ||
15 | public enum StateCoderStrategy { | 20 | enum StateCoderStrategy { |
16 | Neighbourhood, NeighbourhoodWithEquivalence, IDBased, DefinedByDiversity | 21 | Neighbourhood, |
22 | PairwiseNeighbourhood, | ||
23 | NeighbourhoodWithEquivalence, | ||
24 | IDBased, | ||
25 | DefinedByDiversity | ||
17 | } | 26 | } |
18 | 27 | ||
19 | class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | 28 | class ViatraReasonerConfiguration extends LogicSolverConfiguration { |
20 | //public var Iterable<PQuery> existingQueries | 29 | // public var Iterable<PQuery> existingQueries |
21 | |||
22 | public var nameNewElements = false | 30 | public var nameNewElements = false |
23 | public var StateCoderStrategy stateCoderStrategy = StateCoderStrategy.Neighbourhood | 31 | public var StateCoderStrategy stateCoderStrategy = StateCoderStrategy.Neighbourhood |
24 | public var TypeInferenceMethod typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis | 32 | public var TypeInferenceMethod typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis |
@@ -26,7 +34,7 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | |||
26 | * Once per 1/randomBacktrackChance the search selects a random state. | 34 | * Once per 1/randomBacktrackChance the search selects a random state. |
27 | */ | 35 | */ |
28 | public var int randomBacktrackChance = 20; | 36 | public var int randomBacktrackChance = 20; |
29 | 37 | ||
30 | /** | 38 | /** |
31 | * Describes the required diversity between the solutions. | 39 | * Describes the required diversity between the solutions. |
32 | * Null means that the solutions have to have different state codes only. | 40 | * Null means that the solutions have to have different state codes only. |
@@ -40,14 +48,19 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | |||
40 | /** | 48 | /** |
41 | * Configuration for debugging support. | 49 | * Configuration for debugging support. |
42 | */ | 50 | */ |
43 | public var DebugConfiguration debugCongiguration = new DebugConfiguration | 51 | public var DebugConfiguration debugConfiguration = new DebugConfiguration |
44 | /** | 52 | /** |
45 | * Configuration for cutting search space. | 53 | * Configuration for cutting search space. |
46 | */ | 54 | */ |
47 | public var SearchSpaceConstraint searchSpaceConstraints = new SearchSpaceConstraint | 55 | public var SearchSpaceConstraint searchSpaceConstraints = new SearchSpaceConstraint |
56 | |||
57 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( | ||
58 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) | ||
59 | |||
60 | public var List<CostObjectiveConfiguration> costObjectives = newArrayList | ||
48 | } | 61 | } |
49 | 62 | ||
50 | public class DiversityDescriptor { | 63 | class DiversityDescriptor { |
51 | public var ensureDiversity = false | 64 | public var ensureDiversity = false |
52 | public static val FixPointRange = -1 | 65 | public static val FixPointRange = -1 |
53 | public var int range = FixPointRange | 66 | public var int range = FixPointRange |
@@ -57,20 +70,31 @@ public class DiversityDescriptor { | |||
57 | public var Set<RelationDeclaration> relevantRelations = null | 70 | public var Set<RelationDeclaration> relevantRelations = null |
58 | } | 71 | } |
59 | 72 | ||
60 | public class DebugConfiguration { | 73 | class DebugConfiguration { |
61 | public var logging = false | 74 | public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null |
62 | public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null; | ||
63 | public var partalInterpretationVisualisationFrequency = 1 | 75 | public var partalInterpretationVisualisationFrequency = 1 |
64 | } | 76 | } |
65 | 77 | ||
66 | public class InternalConsistencyCheckerConfiguration { | 78 | class InternalConsistencyCheckerConfiguration { |
67 | public var LogicReasoner internalIncosnsitencyDetector = null | 79 | public var LogicReasoner internalIncosnsitencyDetector = null |
68 | public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null | 80 | public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null |
69 | public var incternalConsistencyCheckingFrequency = 1 | 81 | public var incternalConsistencyCheckingFrequency = 1 |
70 | } | 82 | } |
71 | 83 | ||
72 | public class SearchSpaceConstraint { | 84 | class SearchSpaceConstraint { |
73 | public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE | 85 | public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE |
74 | public var int maxDepth = UNLIMITED_MAXDEPTH | 86 | public var int maxDepth = UNLIMITED_MAXDEPTH |
75 | public var List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList | 87 | public var List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList |
76 | } \ No newline at end of file | 88 | } |
89 | |||
90 | class CostObjectiveConfiguration { | ||
91 | public var List<CostObjectiveElementConfiguration> elements = newArrayList | ||
92 | public var ObjectiveKind kind | ||
93 | public var ObjectiveThreshold threshold | ||
94 | public var boolean findExtremum | ||
95 | } | ||
96 | |||
97 | class CostObjectiveElementConfiguration { | ||
98 | public var String patternQualifiedName | ||
99 | public var int weight | ||
100 | } | ||