Solver

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

Instances of this trait solve PrologPrograms.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def solve(program: PrologProgram): Iterator[Solution]

Solves a program.

Solves a program.

Value parameters

program

the program to solve.

Attributes

Returns

an iterator over the program's Solutions.

Concrete methods

def hasSolutionFor(program: PrologProgram): Boolean

Returns true if the program admits at least one solution.

Returns true if the program admits at least one solution.

Value parameters

program

the program to solve.

Attributes

def hasSolutionFor(goal: Term): Boolean

Returns true if the provided goal admits at least one solution.

Returns true if the provided goal admits at least one solution.

Value parameters

goal

the program to satisfy.

Attributes

def lazySolve(program: PrologProgram): LazyList[Solution]

Solves a program.

Solves a program.

Value parameters

program

the program to solve.

Attributes

Returns

a lazy list of the program's Solutions.

def solutionsOf(program: PrologProgram): Seq[Solution]

Solves a program.

Solves a program.

Value parameters

program

the program to solve.

Attributes

Returns

a list of the program's Solutions.