Class Sat4jSolver
- java.lang.Object
-
- ru.ispras.fortress.solver.engine.sat.Sat4jSolver
-
- All Implemented Interfaces:
Solver
public final class Sat4jSolver extends java.lang.Object implements Solver
Sat4jSolver
is a SAT-basedQF_BV
constraint solver.
-
-
Constructor Summary
Constructors Constructor Description Sat4jSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addCustomOperation(Function function)
Register a custom operation that extends the functionality of the solver.boolean
addCustomOperation(FunctionTemplate template)
Register a custom operation that extends the functionality of the solver.java.lang.String
getDescription()
Returns the description of the solver.java.lang.String
getName()
Returns the name of the solver.java.lang.String
getSolverPath()
Returns the path to the external solver executable used by the current solver object.boolean
isGeneric()
Returns true if the solver is generic and false if it is custom.boolean
isSupported(ConstraintKind kind)
Check whether the specified constraint kind is supported by the solver.void
setInitializer(Initializer initializer)
void
setSolverPath(java.lang.String value)
Sets the path to the external solver executable used by the current solver object.SolverResult
solve(Constraint constraint)
Solves the specified constraint.
-
-
-
Method Detail
-
setInitializer
public void setInitializer(Initializer initializer)
-
getName
public java.lang.String getName()
Description copied from interface:Solver
Returns the name of the solver.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:Solver
Returns the description of the solver.- Specified by:
getDescription
in interfaceSolver
- Returns:
- solver description.
-
isSupported
public boolean isSupported(ConstraintKind kind)
Description copied from interface:Solver
Check whether the specified constraint kind is supported by the solver.- Specified by:
isSupported
in interfaceSolver
- Parameters:
kind
- Constraint kind.- Returns:
- true if the constraint kind is supported or false otherwise.
-
isGeneric
public boolean isGeneric()
Description copied from interface:Solver
Returns true if the solver is generic and false if it is custom.
-
solve
public SolverResult solve(Constraint constraint)
Description copied from interface:Solver
Solves the specified constraint.
-
addCustomOperation
public boolean addCustomOperation(Function function)
Description copied from interface:Solver
Register a custom operation that extends the functionality of the solver. The operation is implemented in terms of existing operations and represents a function.- Specified by:
addCustomOperation
in interfaceSolver
- Parameters:
function
- Object describing the semantics and syntax of the function.- Returns:
true
if no such operation has been previously registered orfalse
otherwise.
-
addCustomOperation
public boolean addCustomOperation(FunctionTemplate template)
Description copied from interface:Solver
Register a custom operation that extends the functionality of the solver. The operation is implemented in terms of existing operation and represents a family of functions derived from the same template. Functions share the same logic, but may operate on different data types.- Specified by:
addCustomOperation
in interfaceSolver
- Parameters:
template
- Function template that describes the semantics and syntax of a family of similar functions.- Returns:
true
if no such operation has been previously registered orfalse
otherwise.
-
getSolverPath
public java.lang.String getSolverPath()
Description copied from interface:Solver
Returns the path to the external solver executable used by the current solver object.- Specified by:
getSolverPath
in interfaceSolver
- Returns:
- Path
-
setSolverPath
public void setSolverPath(java.lang.String value)
Description copied from interface:Solver
Sets the path to the external solver executable used by the current solver object.- Specified by:
setSolverPath
in interfaceSolver
- Parameters:
value
- Path
-
-