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

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

There is a newer version: 1.0.4
Show newest version
@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