commonMain.it.unibo.tuprolog.solve.Extensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
@file:JvmName("Extensions")
package it.unibo.tuprolog.solve
import it.unibo.tuprolog.core.Scope
import it.unibo.tuprolog.core.Struct
import kotlin.js.JsName
import kotlin.jvm.JvmName
/** Extracts this [Struct] indicator and converts it to [Signature] */
@JsName("extractSignature")
fun Struct.extractSignature(): Signature = Signature.fromIndicator(indicator)!!
@JsName("solve")
fun Solver.solve(
maxDuration: TimeDuration = TimeDuration.MAX_VALUE,
scopedContext: Scope.() -> Struct,
): Sequence = solve(scopedContext(Scope.empty()), maxDuration)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy