commonMain.it.unibo.tuprolog.solve.stdlib.CommonRules.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
package it.unibo.tuprolog.solve.stdlib
import it.unibo.tuprolog.core.Clause
import it.unibo.tuprolog.solve.ExecutionContext
import it.unibo.tuprolog.solve.rule.RuleWrapper
import it.unibo.tuprolog.solve.stdlib.rule.Append
import it.unibo.tuprolog.solve.stdlib.rule.Arrow
import it.unibo.tuprolog.solve.stdlib.rule.CurrentPrologFlag
import it.unibo.tuprolog.solve.stdlib.rule.Member
import it.unibo.tuprolog.solve.stdlib.rule.Not
import it.unibo.tuprolog.solve.stdlib.rule.Once
import it.unibo.tuprolog.solve.stdlib.rule.Semicolon
import it.unibo.tuprolog.solve.stdlib.rule.SetPrologFlag
object CommonRules {
val wrappers: Sequence> =
sequenceOf(
Not,
Arrow,
Semicolon.If.Then,
Semicolon.If.Else,
Semicolon.Or.Left,
Semicolon.Or.Right,
Member.Base,
Member.Recursive,
Append.Base,
Append.Recursive,
Once,
SetPrologFlag,
CurrentPrologFlag,
)
val clauses: List
get() = wrappers.map { it.implementation }.toList()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy