PrologDSL

io.github.kelvindev15.prolog.dsl.PrologDSL
trait PrologDSL

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def &&(terms: Term*): Term

Returns a term which is a Conjunction of goals if more than one term is provided. otherwise it returns the provided term.

Returns a term which is a Conjunction of goals if more than one term is provided. otherwise it returns the provided term.

Value parameters

terms

the terms to put in conjunction.

Attributes

def atomOf(value: String): Atom

Returns an Atom.

Returns an Atom.

Value parameters

value

the value of the atom.

Attributes

def cons(term: Term, tail: PrologList | Variable): PrologList

Returns a PrologList.

Returns a PrologList.

Value parameters

tail

the tail of the list.

term

the head of the list.

Attributes

def cons(terms: Term*)(tail: PrologList | Variable): PrologList

Returns a PrologList, simulating the pipe notation ([a, b, c | X])

Returns a PrologList, simulating the pipe notation ([a, b, c | X])

Value parameters

tail

the tail of the list

terms

the terms that would be before the pipe.

Attributes

def directiveOf(terms: Term*): Directive

Returns a Directive

Returns a Directive

Value parameters

terms

the arguments of the directive.

Attributes

def factOf(fact: Struct): Fact

Returns a Fact.

Returns a Fact.

Value parameters

fact

the struct representing the fact.

Attributes

def head(terms: Term*): Seq[Term]

Returns a sequence of terms

Returns a sequence of terms

Attributes

def list(terms: Term*): PrologList

Returns a PrologList holding the provided terms.

Returns a PrologList holding the provided terms.

Value parameters

terms

the terms to put in the list.

Attributes

An empty PrologList

An empty PrologList

Attributes

def numOf(value: Int | Double): Numeric

Returns a Constant.Numeric.

Returns a Constant.Numeric.

Value parameters

value

the value of the numeric constant.

Attributes

def ruleOf(head: Struct, body1: Term, others: Term*): Rule

Returns a Rule.

Returns a Rule.

Value parameters

body1

the first term of the rule's body.

head

the head of the rule.

others

the other terms of the rule's body.

Attributes

def structOf(functor: Atom, arguments: Term*): Struct

Returns a Struct.

Returns a Struct.

Value parameters

arguments

the arguments of the struct.

functor

the functor of the struct.

Attributes

def theory(clauses: Clause*): Theory

Returns a Theory of the provided clauses.

Returns a Theory of the provided clauses.

Value parameters

clauses

the clauses to include in the theory.

Attributes

def varOf(name: String): Variable

Returns a Variable.

Returns a Variable.

Value parameters

name

the name of the variable.

Attributes

def ||(terms: Term*): Term

Returns a term which is a Disjunction of goals if more than one term is provided. otherwise it returns the provided term.

Returns a term which is a Disjunction of goals if more than one term is provided. otherwise it returns the provided term.

Value parameters

terms

the terms to put in disjunction.

Attributes

Inherited methods

def !(goal: Term): Struct

Builds a +(X) Struct.

Builds a +(X) Struct.

Value parameters

goal

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def :-(terms: Term*): Directive

Returns a Directive

Returns a Directive

Value parameters

terms

the arguments of the directive.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def A: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def B: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def C: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def D: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def E: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def F: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def G: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def H: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def I: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def J: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def K: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def L: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def M: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def N: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def O: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def P: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def Q: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def R: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def S: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def T: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def U: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def V: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def W: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def X: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def Y: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def Z: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def `__`: Variable

Attributes

Inherited from:
DSLVariables (hidden)
def `var`(term: Term): Struct

Builds a var(X) Struct.

Builds a var(X) Struct.

Value parameters

term

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def append(l1: Term, l2: Term): Struct

Returns an append(l1, l2) Struct.

Returns an append(l1, l2) Struct.

Value parameters

l1

a term that should unify to a list

l2

a term that should unify to a list.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def arg(number: Term, term: Struct, arg: Term): Struct

Returns an arg(N, T, L) Struct.

Returns an arg(N, T, L) Struct.

Value parameters

arg

a term that should unify the with number-th argument in term.

number

a term that should unify with the position of the arg in term.

term

a term

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def asserta(clause: Term): Struct

Returns an asserta(X) Struct.

Returns an asserta(X) Struct.

Value parameters

clause

the clause to assert.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def assertz(clause: Term): Struct

Returns an assertz(X) Struct.

Returns an assertz(X) Struct.

Value parameters

clause

the clause to assert.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def atom(term: Term): Struct

Builds a atom(X) Struct.

Builds a atom(X) Struct.

Value parameters

term

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def atom_chars(atom: Term, list: Term): Struct

Returns an atom_chars(A, L) Struct.

Returns an atom_chars(A, L) Struct.

Value parameters

atom

a term that should unify to an atom.

list

a term that should unify to a list containing the characters of atom.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def atomic(term: Term): Struct

Builds an atomic(X) Struct.

Builds an atomic(X) Struct.

Value parameters

term

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def call(goal: Term): Struct

Builds a goal(G) Struct.

Builds a goal(G) Struct.

Value parameters

goal

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def clause(head: Term, body: Term): Struct

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def dynamic(indicators: Indicator*): Struct

Returns a dynamic(t1, t2, ...) Struct.

Returns a dynamic(t1, t2, ...) Struct.

Value parameters

indicators

the indicators of the predicates.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def findall(res: Term, goal: Term, list: Term): Struct

Returns a findall(T, G, L) Struct.

Returns a findall(T, G, L) Struct.

Value parameters

list

a term that should unify to a list containing ???

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def functor(term: Term, functor: Term, arity: Term): Struct

Returns a functor(T, F, N) Struct.

Returns a functor(T, F, N) Struct.

Value parameters

arity

a term that should unify with the arity of the term.

functor

a term that should unify with the of the term functor.

term

a term.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def ground(term: Term): Struct

Builds a ground(X) Struct.

Builds a ground(X) Struct.

Value parameters

term

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def length(term: Term, len: Term): Struct

Returns a length(T, L) Struct.

Returns a length(T, L) Struct.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def member(term: Term, l: Term): Struct

Returns a member(t, l) Struct.

Returns a member(t, l) Struct.

Value parameters

l

a term that should unify to a list.

term

a term

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def nonvar(term: Term): Struct

Builds a nonvar(X) Struct.

Builds a nonvar(X) Struct.

Value parameters

term

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def not(goal: Term): Struct

Builds a not(G) Struct.

Builds a not(G) Struct.

Value parameters

goal

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def number(term: Term): Struct

Builds a number(X) Struct.

Builds a number(X) Struct.

Value parameters

term

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def number_chars(atom: Term, list: Term): Struct

Returns an number_chars(A, L) Struct.

Returns an number_chars(A, L) Struct.

Value parameters

atom

a term that should unify to an numeric constant

list

a term that should unify with a list containing the characters composing the constant.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def once(goal: Term): Struct

Builds a once(G) Struct.

Builds a once(G) Struct.

Value parameters

goal

the argument of the structure

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def op(precedence: Numeric, associativity: AssociativitySpec, name: Atom): Struct

Returns an op(I, A, N) Struct.

Returns an op(I, A, N) Struct.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
def retract(clause: Term): Struct

Returns an retract(X) Struct.

Returns an retract(X) Struct.

Value parameters

clause

the clause to retract.

Attributes

Inherited from:
DSLPrologBuiltins (hidden)

Inherited fields

val !: Atom

The cut predicate

The cut predicate

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
val []: Atom

An empty list functor

An empty list functor

Attributes

Inherited from:
DSLPrologBuiltins (hidden)
val repeat: Atom

The repeat predicate

The repeat predicate

Attributes

Inherited from:
DSLPrologBuiltins (hidden)

Givens

Inherited givens

given given_Conversion_AnyVal_Constant: Conversion[AnyVal, Constant]

Attributes

Inherited from:
DSLConversions (hidden)

Attributes

Inherited from:
DSLConversions (hidden)
given given_Conversion_String_Atom: Conversion[String, Atom]

Attributes

Inherited from:
DSLConversions (hidden)

Attributes

Inherited from:
DSLConversions (hidden)

Attributes

Inherited from:
DSLConversions (hidden)

Extensions

Extensions

extension (list: Seq[Term])

Simulates the list pipe notation.

Simulates the list pipe notation.

Attributes

Inherited extensions

extension (atom: Atom)
def apply(terms: Term*): Struct

Creates Struct using the this atom as a functor.

Creates Struct using the this atom as a functor.

Attributes

Inherited from:
DSLExtensions (hidden)
extension (struct: Struct)
def :-(body: Term): Rule

Creates a Rule using this struct as the head of the rule and the provided term as the body.

Creates a Rule using this struct as the head of the rule and the provided term as the body.

Attributes

Inherited from:
DSLExtensions (hidden)
extension (term: Term)
def &:(other: Term): Struct

Returns this term in Conjunction with another term

Returns this term in Conjunction with another term

Attributes

Inherited from:
DSLExtensions (hidden)
def *(other: Term): Struct

Returns a "*(term, other)" Struct

Returns a "*(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def +(other: Term): Struct

Returns a "+(term, other)" Struct

Returns a "+(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def -(other: Term): Struct

Returns a "-(term, other)" Struct

Returns a "-(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def /(other: Term): Struct

Returns a "/(term, other)" Struct

Returns a "/(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def //(other: Term): Struct

Returns a "//(term, other)" Struct

Returns a "//(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def <(other: Term): Struct

Returns a "<(term, other)" Struct

Returns a "<(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def =..(other: Term): Struct

Returns a "=..(term, other)" Struct

Returns a "=..(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def =:=(other: Term): Struct

Returns a "=:=(term, other)" Struct

Returns a "=:=(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def =<(other: Term): Struct

Returns a "=<(term, other)" Struct

Returns a "=<(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def =\=(other: Term): Struct

Returns a "==(term, other)" Struct

Returns a "==(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def >(other: Term): Struct

Returns a ">(term, other)" Struct

Returns a ">(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def >=(other: Term): Struct

Returns a ">=(term, other)" Struct

Returns a ">=(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def @<(other: Term): Struct

Returns a "@<(term, other)" Struct

Returns a "@<(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def @=<(other: Term): Struct

Returns a "@=<(term, other)" Struct

Returns a "@=<(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def @>(other: Term): Struct

Returns a "@>(term, other)" Struct

Returns a "@>(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def @>=(other: Term): Struct

Returns a "@>=(term, other)" Struct

Returns a "@>=(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def `=`(other: Term): Struct

Returns a "=(term, other)" Struct

Returns a "=(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def and(other: Term): Struct

Returns this term in Conjunction with another term

Returns this term in Conjunction with another term

Attributes

Inherited from:
DSLExtensions (hidden)
def is(other: Term): Struct

Returns a "is(term, other)" Struct

Returns a "is(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def mod(other: Term): Struct

Returns a "mod(term, other)" Struct

Returns a "mod(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def or(other: Term): Struct

Returns this term in Conjunction with another term

Returns this term in Conjunction with another term

Attributes

Inherited from:
DSLExtensions (hidden)
def strictEq(other: Term): Struct

Returns a "==(term, other)" Struct

Returns a "==(term, other)" Struct

Value parameters

other

the other term to put as second argument.

Attributes

Inherited from:
DSLExtensions (hidden)
def |:(other: Term): Struct

Returns this term in Conjunction with another term

Returns this term in Conjunction with another term

Attributes

Inherited from:
DSLExtensions (hidden)