All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.solve.stdlib.primitive.Halt.kt Maven / Gradle / Ivy

package it.unibo.tuprolog.solve.stdlib.primitive

import it.unibo.tuprolog.solve.ExecutionContext
import it.unibo.tuprolog.solve.exception.HaltException
import it.unibo.tuprolog.solve.primitive.PredicateWithoutArguments
import it.unibo.tuprolog.solve.primitive.Solve

/**
 * Implementation of primitive handling `halt/0` behaviour
 *
 * @author Enrico
 */
object Halt : PredicateWithoutArguments.NonBacktrackable("halt") {
    override fun Solve.Request.computeOne(): Solve.Response {
        throw HaltException(context = context)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy