JTMS

class JTMS[D, I](val title: String, val nodeString: Node[D, I] => String, var debugging: Boolean, val checkingContradictions: Boolean, var enqueueProcedure: Option[Rule[I] => Unit], var contradictionHandler: Option[(JTMS[D, I], ListBuffer[Node[D, I]]) => Unit])

Implementation of justification-based truth maintenance systems.

Type Params
I

Type of (external) informants in justifications.

Value Params
checkingContradictions

For external systems.

contradictionHandler

External handler for detecting contradictions.

debugging

Debugging flag.

nodeString

Default formatter for TMS nodes.

title

Name of this TMS, for output.

class Object
trait Matchable
class Any

Value members

Concrete methods

def askUserHandler(contradictions: List[Node[D, I]]): Unit
def contradictionCheck(flag: Boolean, body: (JTMS[D, I], Boolean) => Unit): Unit
def createNode(datum: D, assumptionP: Boolean, contradictionP: Boolean): Node[D, I]

Create a new node in this JTMS.

Create a new node in this JTMS.

Value Params
assumptionP

True indicates that this node might be used as an assumption. But note that an assumption node must be enabled before a judgment can use the node as a premise. The default value is false.

contradictionP

True indicates that this node denotes a contradiction. The default value is false.

datum

The piece of data associated with the node.

inline
def dbg(msg: String): Unit

Search for support for nodes which were disbelieved after an assumption retraction.

Search for support for nodes which were disbelieved after an assumption retraction.

The original Lisp code returns the justification when short-circuiting from the inner loop. But this return value is never used; moreover there is no return value used from callers of this function. So in this type-checked translation, we return the unit value.

Value Params
outQueue

List of nodes which have lost support. The naming of the parameter as a queue in the Lisp code is odd: the list is only read; nothing is ever enqueued.

def handleOneContradiction(contraNode: Node[D, I]): Unit

Increment the justifications counter and return its value.

Increment the justifications counter and return its value.

Increment the node counter and return its value.

Increment the node counter and return its value.

def justifyNode(informant: I, consequence: Node[D, I], antecedents: ListBuffer[Node[D, I]]): Unit

Add a rule for concluding belief in a node.

Add a rule for concluding belief in a node.

Value Params
antecedents

The premises required to trigger belief in the `consequence.

consequence

Node concluded by ths justification.

informant

Information value associated with this justification.

def printContraList(nodes: List[Node[D, I]]): Unit

Print the JTMS by name.

Print the JTMS by name.

def propagateOutness(node: Node[D, I]): List[Node[D, I]]
def tmsAnswer(num: Int): Unit

Concrete fields

List of assumption nodes.

List of assumption nodes.

List of contradiction nodes.

List of contradiction nodes.

Unique namer for justifications.

Unique namer for justifications.

List of all justifications.

List of all justifications.

Unique namer for nodes.

Unique namer for nodes.

List of all tms nodes.

List of all tms nodes.