Solver

io.github.kelvindev15.prolog.solver.Solver
See theSolver companion trait
object Solver

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Solver.type

Members list

Type members

Classlikes

enum Solution

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Substitution

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

type Substitution = Map[Variable, Term]

A mapping from Variables to Terms

A mapping from Variables to Terms

Attributes

Value members

Concrete methods

def lazyQuery(using solver: Solver)(query: Term): LazyList[Solution]

Solves the goal on program with an empty theory using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Solves the goal on program with an empty theory using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Value parameters

query

the goal to be solved.

solver

the solver that should be used.

Attributes

Returns

a lazy list of the program's Solutions.

def lazySolve(using solver: Solver)(prologProgram: PrologProgram): LazyList[Solution]

Solves a program using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Solves a program using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Value parameters

prologProgram

the program to solve.

solver

the solver that should be used.

Attributes

Returns

a lazy list of the program's Solutions.

def query(using solver: Solver)(query: Term): Iterator[Solution]

Solves the goal on program with an empty theory using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Solves the goal on program with an empty theory using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Value parameters

query

the goal to be solved.

solver

the solver that should be used.

Attributes

Returns

an iterator over the program's Solutions.

def solutionsOf(using solver: Solver)(prologProgram: PrologProgram): Seq[Solution]

Solves a program using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Solves a program using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Value parameters

prologProgram

the program to solve.

solver

the solver that should be used.

Attributes

Returns

a list of the program's Solutions.

def solve(using solver: Solver)(prologProgram: PrologProgram): Iterator[Solution]

Solves a program using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Solves a program using a solver that is either provided as a context parameter, found as a given instance or by using the default one (TuPrologClassicSolver).

Value parameters

prologProgram

the program to solve.

solver

the solver that should be used.

Attributes

Returns

an iterator over the Solutions of the program.

Returns a Solver that leverages on the tuProlog engine.

Returns a Solver that leverages on the tuProlog engine.

Attributes