Companion
object Companion
Functions
Link copied to clipboard
fun forArgument(context: ExecutionContext, procedure: Signature, expectedDomain: DomainError.Expected, actualValue: Term, index: Int? = null): DomainError
Creates a DomainError reporting that the (optionally index-th) argument of procedure should have belonged to expectedDomain, but actualValue was provided instead.
Link copied to clipboard
fun forFlagValues(context: ExecutionContext, procedure: Signature, flagValues: Iterable<Term>, actualValue: Term, index: Int? = null): DomainError
Creates a DomainError reporting that the (optionally index-th) argument of procedure should have been one of flagValues, but actualValue was provided instead. Used when validating a Prolog flag value against its admissible set (see it.unibo.tuprolog.solve.flags.NotableFlag).
Link copied to clipboard
fun forGoal(context: ExecutionContext, procedure: Signature, expectedDomain: DomainError.Expected, actualValue: Term): DomainError
Creates a DomainError reporting that subgoal actualValue of procedure does not belong to expectedDomain.
Link copied to clipboard
fun forTerm(context: ExecutionContext, expectedDomain: DomainError.Expected, actualValue: Term): DomainError
Creates a DomainError reporting that actualValue is not a valid member of expectedDomain.