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

commonMain.it.unibo.tuprolog.solve.Solver.kt Maven / Gradle / Ivy

package it.unibo.tuprolog.solve

import it.unibo.tuprolog.core.Struct
import kotlin.js.JsName

/**
 * Represents a Prolog Goal solver
 *
 * @author Enrico
 */
interface Solver : ExecutionContextAware {

    /** Solves the provided goal, returning lazily initialized sequence of solutions, optionally limiting computation [maxDuration] */
    @JsName("solve")
    fun solve(goal: Struct, maxDuration: TimeDuration): Sequence

    @JsName("solveMaxDuration")
    fun solve(goal: Struct): Sequence = solve(goal, TimeDuration.MAX_VALUE)

    companion object {
        // To be extended through extension methods
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy