JTMS

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

Standalone implementation of justification-based truth maintenance systems.

Type Params
D

Type of data associated with each Node of this JTMS.

I

Type of informants in the external system.

R

Type of rules which may be associated with each Node of this JTMS.

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.

Constructor

The title argument is required; others are optional.

class Object
trait Matchable
class Any

Document{}

List of assumption nodes.

List of assumption nodes.

Pass all believed contradiction nodes to the contradictionHandler.

Pass all believed contradiction nodes to the contradictionHandler.

List of contradiction nodes.

List of contradiction nodes.

def createNode(datum: D, assumptionP: Boolean, contradictionP: Boolean): Node[D, I, R]

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

Main gateway for debugging messages.

Main gateway for debugging messages.

Value Params
msg

This debugging message.

Print a verbose debugging output of this JTMS as text.

Print a verbose debugging output of this JTMS as text.

Print a verbose list of the current nodes.

Print a verbose list of the current nodes.

Return the list of the currently enabled assumptions.

Return the list of the currently enabled assumptions.

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.

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.

Unique namer for justifications.

Unique namer for justifications.

def justifyNode(informant: I, consequence: Node[D, I, R], antecedents: ListBuffer[Node[D, I, R]]): 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.

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.

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

Print a verbose debugging output list of the contradictions in this JTMS.

Print a verbose debugging output list of the contradictions in this JTMS.

Value Params
nodes

The list of contradictions to be printed.

Print the JTMS by name.

Print the JTMS by name.

def propagateOutness(node: Node[D, I, R]): List[Node[D, I, R]]

Propagate the retraction of an assumption by finding all other nodes which used that assumption in their justification.

Propagate the retraction of an assumption by finding all other nodes which used that assumption in their justification.

Value Params
node

The node which has been recently disbelieved.

Returns

List of node which may now also no longer be believed.

Print the justifications of the current nodes.

Print the justifications of the current nodes.

Value members