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 | 55 |
1 files changed, 40 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 6e3c5235..ddd25aac 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,7 +49,7 @@ 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 | */ |
@@ -54,10 +63,15 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | |||
54 | public var nonContainmentWeight = 1 | 63 | public var nonContainmentWeight = 1 |
55 | public var unfinishedWFWeight = 1 | 64 | public var unfinishedWFWeight = 1 |
56 | 65 | ||
57 | public var calculateObjectCreationCosts = false | 66 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( |
67 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) | ||
68 | |||
69 | public var List<LinearTypeConstraintHint> hints = newArrayList | ||
70 | |||
71 | public var List<CostObjectiveConfiguration> costObjectives = newArrayList | ||
58 | } | 72 | } |
59 | 73 | ||
60 | public class DiversityDescriptor { | 74 | class DiversityDescriptor { |
61 | public var ensureDiversity = false | 75 | public var ensureDiversity = false |
62 | public static val FixPointRange = -1 | 76 | public static val FixPointRange = -1 |
63 | public var int range = FixPointRange | 77 | public var int range = FixPointRange |
@@ -67,20 +81,31 @@ public class DiversityDescriptor { | |||
67 | public var Set<RelationDeclaration> relevantRelations = null | 81 | public var Set<RelationDeclaration> relevantRelations = null |
68 | } | 82 | } |
69 | 83 | ||
70 | public class DebugConfiguration { | 84 | class DebugConfiguration { |
71 | public var logging = false | 85 | public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null |
72 | public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null; | ||
73 | public var partalInterpretationVisualisationFrequency = 1 | 86 | public var partalInterpretationVisualisationFrequency = 1 |
74 | } | 87 | } |
75 | 88 | ||
76 | public class InternalConsistencyCheckerConfiguration { | 89 | class InternalConsistencyCheckerConfiguration { |
77 | public var LogicReasoner internalIncosnsitencyDetector = null | 90 | public var LogicReasoner internalIncosnsitencyDetector = null |
78 | public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null | 91 | public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null |
79 | public var incternalConsistencyCheckingFrequency = 1 | 92 | public var incternalConsistencyCheckingFrequency = 1 |
80 | } | 93 | } |
81 | 94 | ||
82 | public class SearchSpaceConstraint { | 95 | class SearchSpaceConstraint { |
83 | public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE | 96 | public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE |
84 | public var int maxDepth = UNLIMITED_MAXDEPTH | 97 | public var int maxDepth = UNLIMITED_MAXDEPTH |
85 | public var List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList | 98 | public var List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList |
86 | } \ No newline at end of file | 99 | } |
100 | |||
101 | class CostObjectiveConfiguration { | ||
102 | public var List<CostObjectiveElementConfiguration> elements = newArrayList | ||
103 | public var ObjectiveKind kind | ||
104 | public var ObjectiveThreshold threshold | ||
105 | public var boolean findExtremum | ||
106 | } | ||
107 | |||
108 | class CostObjectiveElementConfiguration { | ||
109 | public var String patternQualifiedName | ||
110 | public var int weight | ||
111 | } | ||