lp.trans
Class DlpSolver
java.lang.Object
lp.trans.Solver<StableModel>
lp.trans.DlpSolver
public class DlpSolver
- extends Solver<StableModel>
A class that computes refined dynamic stable models of a dynamic logic
program given its transformational equivalent.
- Version:
- 1.0.0
- Author:
- Martin Slota
- See Also:
DlpGrounder
Field Summary |
private LpParser |
parser
Parser used to convert the string representation of a model into object
representations of the atoms in the model. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parser
private final LpParser parser
- Parser used to convert the string representation of a model into object
representations of the atoms in the model.
DlpSolver
public DlpSolver()
- Creates a new instance of
DlpSolver
. It will also create new
instances of LparseWrapper
and SmodelsWrapper
. They are
used them to compute the stable models of transformational equivalents of
dynamic logic programs passed in through the
Solver.solve(LogicProgram, Consumer)
method.
DlpSolver
public DlpSolver(LparseWrapper lparseWrapper,
SmodelsWrapper smodelsWrapper)
- Creates a new instance of
DlpSolver
. It will use the given
instances of LparseWrapper
and SmodelsWrapper
classes and
use them to compute the stable models of transformational equivalents of
dynamic logic programs passed in through the
Solver.solve(LogicProgram, Consumer)
method.
- Parameters:
lparseWrapper
- the object used to execute lparsesmodelsWrapper
- the object used to execute smodels
parseModel
protected StableModel parseModel(String modelString)
- Parses
modelString
and returns the model that it represents.
- Specified by:
parseModel
in class Solver<StableModel>
- Parameters:
modelString
- a string representation of a model returned by smodels
- Returns:
- the object representation of the model