diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/src')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend index aaf14ebb..06307e2e 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend | |||
@@ -8,6 +8,9 @@ import java.util.List | |||
8 | import java.util.TreeSet | 8 | import java.util.TreeSet |
9 | import java.util.SortedSet | 9 | import java.util.SortedSet |
10 | import java.math.BigDecimal | 10 | import java.math.BigDecimal |
11 | import java.util.HashMap | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
13 | import java.util.Map | ||
11 | 14 | ||
12 | abstract class LogicReasoner { | 15 | abstract class LogicReasoner { |
13 | def abstract LogicResult solve(LogicProblem problem, LogicSolverConfiguration configuration, | 16 | def abstract LogicResult solve(LogicProblem problem, LogicSolverConfiguration configuration, |
@@ -40,33 +43,62 @@ abstract class LogicSolverConfiguration { | |||
40 | public int runtimeLimit = Unlimited | 43 | public int runtimeLimit = Unlimited |
41 | /** Max runtime limit in seconds. */ | 44 | /** Max runtime limit in seconds. */ |
42 | public int memoryLimit = Unlimited | 45 | public int memoryLimit = Unlimited |
46 | /** Documentation level of the solver. */ | ||
47 | public DocumentationLevel documentationLevel = DocumentationLevel::NONE | ||
43 | 48 | ||
44 | public var TypeScopes typeScopes = new TypeScopes; | 49 | public var TypeScopes typeScopes = new TypeScopes; |
45 | public var SolutionScope solutionScope = new SolutionScope | 50 | public var SolutionScope solutionScope = new SolutionScope |
46 | } | 51 | } |
47 | 52 | ||
48 | /** | 53 | /** |
54 | * Describes the amount of debug information required to write to the workspace. | ||
55 | * | ||
56 | */ | ||
57 | public enum DocumentationLevel { | ||
58 | /** | ||
59 | * The solver writes only temporary files. | ||
60 | */ | ||
61 | NONE, | ||
62 | /** | ||
63 | * The solver is requested to write important artifacts and documents that are constructed during the generation. | ||
64 | * This option should not affect the performance of the solver seriously. | ||
65 | */ | ||
66 | NORMAL, | ||
67 | /** | ||
68 | * The solver is requested create additional documents to aid troubleshooting. | ||
69 | * The documents can constructed at the cost of performance. | ||
70 | */ | ||
71 | FULL | ||
72 | } | ||
73 | |||
74 | /** | ||
49 | * Defines the the size of the generated models. Constant <code>Unlimited</code> defines no upper limit to the type. | 75 | * Defines the the size of the generated models. Constant <code>Unlimited</code> defines no upper limit to the type. |
50 | */ | 76 | */ |
51 | public class TypeScopes { | 77 | public class TypeScopes { |
52 | public static val Unlimited = -1; | 78 | public static val Unlimited = -1; |
53 | 79 | ||
80 | /** | ||
81 | * Sets the Integers that are already in the scope of the problem. | ||
82 | */ | ||
54 | public var SortedSet<Integer> knownIntegers = new TreeSet | 83 | public var SortedSet<Integer> knownIntegers = new TreeSet |
55 | /** | 84 | /** |
56 | * Sets the number of Integers that has to be used to solve the problem. | 85 | * Sets the number of Integers that has to be used to solve the problem. |
57 | */ | 86 | */ |
87 | public var minNewIntegers = 0 | ||
58 | public var maxNewIntegers = Unlimited | 88 | public var maxNewIntegers = Unlimited |
59 | 89 | ||
60 | public var SortedSet<BigDecimal> knownReals = new TreeSet | 90 | public var SortedSet<BigDecimal> knownReals = new TreeSet |
61 | /** | 91 | /** |
62 | * Sets the number of Reals that has to be used to solve the problem. | 92 | * Sets the number of Reals that has to be used to solve the problem. |
63 | */ | 93 | */ |
94 | public var minNewReals = 0 | ||
64 | public var maxNewReals = Unlimited | 95 | public var maxNewReals = Unlimited |
65 | 96 | ||
66 | public var SortedSet<String> knownStrings = new TreeSet | 97 | public var SortedSet<String> knownStrings = new TreeSet |
67 | /** | 98 | /** |
68 | * Sets the number of Strings that has to be used to solve the problem. | 99 | * Sets the number of Strings that has to be used to solve the problem. |
69 | */ | 100 | */ |
101 | public var minNewStrings = 0 | ||
70 | public var maxNewStrings = Unlimited | 102 | public var maxNewStrings = Unlimited |
71 | 103 | ||
72 | /** | 104 | /** |
@@ -77,6 +109,14 @@ public class TypeScopes { | |||
77 | * Defines the maximal number of newly added elements. Default value is <code>TypeScopes.Unlimited</code>. | 109 | * Defines the maximal number of newly added elements. Default value is <code>TypeScopes.Unlimited</code>. |
78 | */ | 110 | */ |
79 | public var maxNewElements = Unlimited | 111 | public var maxNewElements = Unlimited |
112 | /** | ||
113 | * | ||
114 | */ | ||
115 | public var Map<Type,Integer> minNewElementsByType = new HashMap | ||
116 | /** | ||
117 | * | ||
118 | */ | ||
119 | public var Map<Type,Integer> maxNewElementsByType = new HashMap | ||
80 | } | 120 | } |
81 | 121 | ||
82 | /** | 122 | /** |