Class Sat4jSolver

  • All Implemented Interfaces:
    Solver

    public final class Sat4jSolver
    extends java.lang.Object
    implements Solver
    Sat4jSolver is a SAT-based QF_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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sat4jSolver

        public Sat4jSolver()
    • 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.
        Specified by:
        getName in interface Solver
        Returns:
        Solver name.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Solver
        Returns the description of the solver.
        Specified by:
        getDescription in interface Solver
        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 interface Solver
        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.
        Specified by:
        isGeneric in interface Solver
        Returns:
        true for generic solvers or false for custom ones.
      • solve

        public SolverResult solve​(Constraint constraint)
        Description copied from interface: Solver
        Solves the specified constraint.
        Specified by:
        solve in interface Solver
        Parameters:
        constraint - A constraint object.
        Returns:
        Result of solving the 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 interface Solver
        Parameters:
        function - Object describing the semantics and syntax of the function.
        Returns:
        true if no such operation has been previously registered or false 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 interface Solver
        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 or false 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 interface Solver
        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 interface Solver
        Parameters:
        value - Path