MissingPredicate

class MissingPredicate(cause: Throwable?, contexts: Array<ExecutionContext>, val signature: Signature) : Warning

A Warning reported when a goal invokes signature and no such predicate exists, but the unknown Prolog flag (see it.unibo.tuprolog.solve.flags.Unknown) is set to warn rather than raise an it.unibo.tuprolog.solve.exception.error.ExistenceError or fail silently.

Constructors

Link copied to clipboard
constructor(cause: Throwable?, contexts: Array<ExecutionContext>, signature: Signature)
constructor(cause: Throwable?, context: ExecutionContext, signature: Signature)
constructor(context: ExecutionContext, signature: Signature)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The exception stacktrace; shorthand for context.prologStackTrace

Link copied to clipboard
expect open val message: String?
Link copied to clipboard

Functions

Link copied to clipboard
open override fun pushContext(newContext: ExecutionContext): MissingPredicate
Link copied to clipboard
open override fun updateContext(newContext: ExecutionContext, index: Int = 0): MissingPredicate

Creates a new exception instance with the context with in position index updated to newContext. Subclasses should override this method and return the correct instance.

Link copied to clipboard
open override fun updateLastContext(newContext: ExecutionContext): MissingPredicate