Drot.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Csaba Gabor August 19, 1987 8:19:18 pm PDT
Bertrand Serlet August 21, 1987 2:29:59 pm PDT
Parsing step
BoolTreeFromExpressionList:
PROC [outputs:
LIST
OF
ROPE, includeGlobalVariablesp:
BOOL ←
FALSE]
RETURNS [tree: Dag];
Given a list of expressions, this will return a Dag which is a representation for this set of expressions. Each gate is represented as a node (as are inputs) with the inputs to a gate being its children.
AugmentBoolTreeBySingleExpression:
PROC [tree: Dag, output:
ROPE];
Given a single expression and a Dag, this will cause that expression to be incorporated into the Dag.
Building a Dag
MakeNewBoolTree: PROC [] RETURNS [tree: Dag];
This creates a new Dag with no children
MakeNewVariableNode:
PROC [tree: Dag, name:
ROPE]
RETURNS [newNode: Node];
This creates a new node in tree which is treated as an input node with name the given name.
MakeNewNotNode:
PROC [tree: Dag, node: Node]
RETURNS [newNode: Node];
This creates a new node in tree which is the not of node.
MakeNewOrNode:
PROC [tree: Dag, nodes:
LIST
OF Node]
RETURNS [newNode: Node];
This creates a new node in tree which is the OR of all the nodes in the list of nodes.
MakeNewAndNode:
PROC [tree: Dag, nodes:
LIST
OF Node]
RETURNS [newNode: Node];
This creates a new node in tree which is the AND of all the nodes in the list of nodes.
NameNode:
PROC [node: Node, name:
ROPE];
This assigns the specified name to the specified node. This is useful for later referencing that node by name.
MakeOutputNode:
PROC [tree: Dag, node: Node];
This causes the specified node to be viewed as one of the outputs.