Theory

interface Theory : Iterable<Clause> , Taggable<Theory>

Types

Companion
Link copied to clipboard
object Companion

Functions

abolish
Link copied to clipboard
abstract fun abolish(indicator: Indicator): Theory
assertA
Link copied to clipboard
abstract fun assertA(clause: Clause): Theory
Adds given clause before all other clauses in this theory
open fun assertA(struct: Struct): Theory
Adds given clause before all other clauses in this theory
abstract fun assertA(clauses: Iterable<Clause>): Theory
Adds the given clauses before all other clauses in this theory
abstract fun assertA(clauses: Sequence<Clause>): Theory
Adds the given clauses before all other clauses in this theory
assertZ
Link copied to clipboard
abstract fun assertZ(clause: Clause): Theory
Adds given clause after all other clauses in this theory
open fun assertZ(struct: Struct): Theory
Adds given clause after all other clauses in this theory
abstract fun assertZ(clauses: Iterable<Clause>): Theory
Adds the given clauses after all other clauses in this theory
abstract fun assertZ(clauses: Sequence<Clause>): Theory
Adds the given clauses after all other clauses in this theory
clone
Link copied to clipboard
abstract fun clone(): Theory
contains
Link copied to clipboard
abstract operator fun contains(clause: Clause): Boolean
Checks if given clause is contained in this theory
abstract operator fun contains(indicator: Indicator): Boolean
Checks if clauses exists in this theory having the specified Indicator as head; this should be well-formed
abstract operator fun contains(head: Struct): Boolean
Checks if given clause is present in this theory
containsTag
Link copied to clipboard
open fun containsTag(name: String): Boolean
equals
Link copied to clipboard
abstract fun equals(other: Theory, useVarCompleteName: Boolean): Boolean
get
Link copied to clipboard
abstract operator fun get(clause: Clause): Sequence<Clause>
Retrieves matching clauses from this theory
abstract operator fun get(indicator: Indicator): Sequence<Rule>
Retrieves all rules in this theory having the specified Indicator as head; this should be well-formed
abstract operator fun get(head: Struct): Sequence<Rule>
Retrieves matching rules from this theory
getTag
Link copied to clipboard
open fun <T : Any> getTag(name: String): T?
iterator
Link copied to clipboard
abstract operator fun iterator(): Iterator<Clause>
plus
Link copied to clipboard
open operator fun plus(clause: Clause): Theory
Adds given Clause to this Theory
abstract operator fun plus(theory: Theory): Theory
Adds given Theory to this
replaceTags
Link copied to clipboard
abstract fun replaceTags(tags: Map<String, Any>): Theory
retract
Link copied to clipboard
abstract fun retract(clause: Clause): RetractResult<Theory>
Tries to delete a matching clause from this theory
open fun retract(head: Struct): RetractResult<Theory>
Tries to delete a matching clause from this theory
abstract fun retract(clauses: Iterable<Clause>): RetractResult<Theory>
Tries to delete the matching clauses from this theory
abstract fun retract(clauses: Sequence<Clause>): RetractResult<Theory>
Tries to delete the matching clauses from this theory
retractAll
Link copied to clipboard
abstract fun retractAll(clause: Clause): RetractResult<Theory>
Tries to delete all matching clauses from this theory
open fun retractAll(head: Struct): RetractResult<Theory>
Tries to delete all matching clauses from this theory
toImmutableTheory
Link copied to clipboard
abstract fun toImmutableTheory(): Theory
toMutableTheory
Link copied to clipboard
abstract fun toMutableTheory(): MutableTheory
toString
Link copied to clipboard
abstract fun toString(asPrologText: Boolean): String
An enhanced toString that prints the theory in a Prolog program format, if asPrologText is true

Properties

clauses
Link copied to clipboard
abstract val clauses: Iterable<Clause>
All Clauses in this theory
directives
Link copied to clipboard
open val directives: Iterable<Directive>
Only clauses that are Directives
isMutable
Link copied to clipboard
open val isMutable: Boolean
rules
Link copied to clipboard
open val rules: Iterable<Rule>
Only clauses that are Rules
size
Link copied to clipboard
abstract val size: Long
The amount of clauses in this Theory
tags
Link copied to clipboard
abstract val tags: Map<String, Any>

Inheritors

MutableTheory
Link copied to clipboard