Fail

object Fail: Substitution, Map<Var, Term>

The Failed Substitution instance

Fields

Name Description
val isFailed: Boolean

Whether this Substitution is a failed one

Methods

getOriginal

fun getOriginal(variable: Var): Var?

Retrieves the original variable name of the provided variable, if any, or null otherwise

Consider for instance the substitution { X -> Y, Y -> Z }, then the invocation of getOriginal(Z) should retrieve X

Parameters

Name Description
variable: Var

ReturnValue

Name Description
Var?

minus

fun minus(other: Substitution): Fail

Returns a new substitution containing all entries of the original substitution except those entries which variable keys are contained in the given other substitution.

Parameters

Name Description
other: Substitution

ReturnValue

Name Description
Fail

minus

fun minus(keys: Iterable<Var>): Fail

Returns a new substitution containing all entries of the original substitution except those entries which variable keys are contained in the given keys iterable.

Parameters

Name Description
keys: Iterable<Var>

ReturnValue

Name Description
Fail

filter

fun filter(predicate: (Entry<Var, Term>)->Boolean): Fail

Returns a new substitution containing all key-value pairs matching the given predicate.

The returned map preserves the entry iteration order of the original map.

Parameters

Name Description
predicate: (Entry<Var, Term>)->Boolean

ReturnValue

Name Description
Fail

filter

fun filter(predicate: (Var, Term)->Boolean): Fail

Returns a new substitution containing all key-value pairs matching the given predicate.

The returned map preserves the entry iteration order of the original map.

Parameters

Name Description
predicate: (Var, Term)->Boolean

ReturnValue

Name Description
Fail

filter

fun filter(variables: Collection<Var>): Fail

Returns a new substitution containing all key-value pairs whose key is in variables.

The returned map preserves the entry iteration order of the original map.

Parameters

Name Description
variables: Collection<Var>

ReturnValue

Name Description
Fail

toString

fun toString(): String

ReturnValue

Name Description
String