Class TuPrologProver

  • All Implemented Interfaces:
    Serializable, Prover

    public class TuPrologProver
    extends AbstractProver
    Represents a Prolog knowledge base and provides methods for solving queries on it. The prover itself is not responsible for processing the solutions.
    See Also:
    Serialized Form
    • Constructor Detail

      • TuPrologProver

        public TuPrologProver​(ConversionPolicy conversionPolicy)
        Creates a tuProlog prover.
    • Method Detail

      • loadDefaultLibraries

        protected void loadDefaultLibraries()
      • getEngine

        public alice.tuprolog.Prolog getEngine()
        Returns the tuProlog engine used by the prover.
        Returns:
        the tuProlog engine
      • query

        public Query query​(String goal)
        Description copied from interface: Prover
        Creates a Prolog query that can be solved later.
        Parameters:
        goal - the Prolog goal
        Returns:
        a query object to be solved later
      • loadLibrary

        public void loadLibrary​(String className)
        Description copied from interface: Prover
        Loads in a Prolog library of the specified name.
        Parameters:
        className - the name of the library
      • addTheory

        public void addTheory​(String theory)
        Description copied from interface: Prover
        Adds a Prolog theory to the knowledge base.
        Parameters:
        theory - the Prolog theory
      • addTheory

        public void addTheory​(String... theory)
        Description copied from interface: Prover
        Adds a Prolog theory to the knowledge base. The elements of the arguments must represent individual Prolog facts and rules.
        Parameters:
        theory - the Prolog theory