diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend | 47 |
1 files changed, 47 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 new file mode 100644 index 00000000..2e3d57cf --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend | |||
@@ -0,0 +1,47 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.logic.model.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | ||
6 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
7 | |||
8 | abstract class LogicReasoner { | ||
9 | def abstract LogicResult solve( | ||
10 | LogicProblem problem, | ||
11 | LogicSolverConfiguration configuration, | ||
12 | ReasonerWorkspace workspace) throws LogicReasonerException | ||
13 | def abstract LogicModelInterpretation getInterpretation(ModelResult modelResult) | ||
14 | } | ||
15 | |||
16 | public class LogicReasonerException extends Exception { | ||
17 | new(String message, Exception cause) { super(message,cause) } | ||
18 | new(Exception cause) { super("The reasoner has failed",cause)} | ||
19 | new(String message) { super(message) } | ||
20 | } | ||
21 | |||
22 | abstract class LogicSolverConfiguration { | ||
23 | public static val Unlimited = -1; | ||
24 | public static val String UndefinedPath = null | ||
25 | |||
26 | /** The URI string to the independent solver application */ | ||
27 | public String solverPath = UndefinedPath | ||
28 | /** Max runtime limit in seconds. */ | ||
29 | public int runtimeLimit = Unlimited | ||
30 | /** Max runtime limit in seconds. */ | ||
31 | public int memoryLimit = Unlimited | ||
32 | |||
33 | public var TypeScopes typeScopes = new TypeScopes; | ||
34 | public var SolutionScope solutionScope = new SolutionScope | ||
35 | } | ||
36 | |||
37 | public class TypeScopes{ | ||
38 | public static val Unlimited = -1; | ||
39 | public var maxIntScope = Unlimited | ||
40 | public var minNewElements = 0 | ||
41 | public var maxNewElements = Unlimited | ||
42 | } | ||
43 | |||
44 | public class SolutionScope{ | ||
45 | public static val Unlimited = -1; | ||
46 | public var numberOfRequiredSolution = 1 | ||
47 | } \ No newline at end of file | ||