Package it.unibo.tuprolog.solve

Types

Link copied to clipboard
abstract class AbstractWrapper<out Wrapped>(val signature: Signature)

Signature to Wrapped type, abstract wrapper class

Link copied to clipboard
interface ExecutionContext : ExecutionContextAware

An interface representing the Solver execution context, containing important information that determines its behaviour

Link copied to clipboard
interface ExecutionContextAware

Base type for all entities which must be aware of the current state of a solver

Link copied to clipboard
data class JsClassName(val module: String, val qualifiedName: String)
Link copied to clipboard
interface MutableSolver : Solver

General type for mutable logic Solvers. MutableSolvers differ from Solvers in that they expose public methods for letting clients affect the state of the solver -- e.g. affecting the KB -- while no resolution process is ongoing.

Link copied to clipboard
data class Signature(    val name: String,     val arity: Int,     val vararg: Boolean = false)

The signature of a query Struct or a Primitive

Link copied to clipboard
interface Solution

A type representing a solution to a goal

Link copied to clipboard
interface SolutionFormatter
Link copied to clipboard
interface SolveOptions
Link copied to clipboard
interface Solver : ExecutionContextAware

General type for logic solvers, i.e. any entity capable of solving some logic query -- provided as a Struct -- according to some logic, implementing one or more inference rule, via some resolution strategy.

Link copied to clipboard
interface SolverFactory
Link copied to clipboard
typealias TimeDuration = Long

This type represents how the solver will see time duration

Link copied to clipboard
typealias TimeInstant = Long

This type represents how the solver will see time instants

Functions

Link copied to clipboard
expect fun classicSolverFactory(): SolverFactory
actual fun classicSolverFactory(): SolverFactory
actual fun classicSolverFactory(): SolverFactory
Link copied to clipboard
expect fun currentTimeInstant(): TimeInstant

A function returning current Time instant

actual fun currentTimeInstant(): TimeInstant

A function returning current Time instant

actual fun currentTimeInstant(): TimeInstant

A function returning current Time instant

Link copied to clipboard
fun <ERROR CLASS>.extractSignature(): Signature

Extracts this Struct indicator and converts it to Signature

Link copied to clipboard
inline fun <T> Iterable<T>.forEachWithLookahead(action: (T, Boolean) -> Unit)
inline fun <T> Iterator<T>.forEachWithLookahead(action: (T, Boolean) -> Unit)
inline fun <T> Sequence<T>.forEachWithLookahead(action: (T, Boolean) -> Unit)

Performs the given action on each element, giving a lookahead hint (i.e. if there's another element to process after).

Link copied to clipboard
fun Libraries.getAllOperators(): Sequence<<ERROR CLASS>>
fun Library.getAllOperators(): Sequence<<ERROR CLASS>>
fun Iterable<<ERROR CLASS>>.getAllOperators(): Sequence<<ERROR CLASS>>
fun getAllOperators(libraries: Libraries, vararg theories: <ERROR CLASS>): Sequence<<ERROR CLASS>>
Link copied to clipboard
expect fun problogSolverFactory(): SolverFactory
actual fun problogSolverFactory(): SolverFactory
actual fun problogSolverFactory(): SolverFactory
Link copied to clipboard
fun Solver.solve(maxDuration: TimeDuration = TimeDuration.MAX_VALUE, scopedContext: <ERROR CLASS>.() -> <ERROR CLASS>): Sequence<Solution>
Link copied to clipboard
expect fun streamsSolverFactory(): SolverFactory
actual fun streamsSolverFactory(): SolverFactory
actual fun streamsSolverFactory(): SolverFactory
Link copied to clipboard
fun Sequence<<ERROR CLASS>>.toOperatorSet(): <ERROR CLASS>