ThymeGlobals:
CEDAR
DEFINITIONS = {
types:
itemType: TYPE = {name, comma, semi, colon, rightB, leftB, equal, number, leftC, rightC, eof, leftArrow, slash, upArrow, atSign, vertical, star, plus, minus, leftP, rightP, backSlash, greater, less, pound, squiggle, amperesand, quote, string, implies, greatEqual, lessEqual, maximum, minimum, nullItem};
keys: TYPE = {nodeKey, resKey, capKey, indKey, vsKey, isKey, runKey, printKey, circuitKey, modelKey, plotKey, icKey, dumpKey, assertsKey, checkPointKey, libraryKey, nullKey};
expressionPtr
operators: TYPE = {load, neg, add, sub, mul, div, power, store, abs, exp, num, log, sqrt, not, grt, les, geq, leq, eq, neq, and, or, int, max, min, nullOpr};
expressionPtr:
TYPE =
REF expressionNode;
expressionNode:
TYPE =
RECORD [
visited: BOOL ← FALSE,
next: expressionPtr ← NIL,
operands:
SELECT operator: operators
FROM
add, sub, mul, div, power, and, or, grt, les, geq, leq, eq, neq, max, min =>
[leftOp: expressionPtr ← NIL, rightOp: expressionPtr ← NIL],
abs, exp, neg, log, sqrt, not, int =>
[unaryOp: expressionPtr ← NIL],
load, store =>
[var: namePtr ← NIL, expr: expressionPtr ← NIL],
ENDCASE
];
namePtr
namePtr:
TYPE =
REF nameBlk;
nameBlk:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextName,
srchLink: namePtr ← NIL,
name: Rope.ROPE ← NIL,
expExpr: expressionPtr ← NIL,
realCopy: realThingPtr ← NIL,
details: REF ANY ← NIL]; -- cf. the following 8 REF types
RefNodeRec: TYPE = REF NodeRec;
NodeRec: TYPE = RECORD [];
RefBranchRec:
TYPE =
REF BranchRec;
BranchRec:
TYPE =
RECORD [
visited: BOOL ← FALSE,
branchType: elements ← nullElement,
posNode,
negNode,
controller: namePtr ← NIL,
modelIndex: NAT ← 0,
valExpr: expressionPtr ← NIL];
RefCircuitRec:
TYPE =
REF CircuitRec;
CircuitRec:
TYPE =
RECORD [
visited: BOOL ← FALSE,
names,
fakeNodes: namePtr ← NIL,
conCount: NAT ← 0,
parms,
father: namePtr ← NIL,
assertions: expressionPtr ← NIL];
RefConRec:
TYPE =
REF ConRec;
ConRec: TYPE = RECORD [];
RefParmRec:
TYPE =
REF ParmRec;
ParmRec:
TYPE =
RECORD [
visited: BOOL ← FALSE,
default: BOOL ← FALSE,
dfltValue: REAL ← 0.0,
nextParm: namePtr ← NIL];
RefCktInstRec:
TYPE =
REF CktInstance;
CktInstance:
TYPE =
RECORD [
visited: BOOL ← FALSE,
of: namePtr ← NIL,
connections: conLinkPtr ← NIL,
actualParms: expressionPtr ← NIL];
RefModelRec:
TYPE =
REF ModelRec;
ModelRec:
TYPE =
RECORD [
visited: BOOL ← FALSE,
modelProc: model ← NIL,
modelResults: argList ← NIL,
modelArgs: argNames ← NIL,
modelArgVec,
modelOldArgVec: argList ← NIL,
modelParms: expressionPtr ← NIL,
data: REF ANY ← NIL];
RefFunctionRec:
TYPE =
REF FunctionRec;
FunctionRec:
TYPE =
RECORD [
visited: BOOL ← FALSE,
functionProc: function ← NIL,
funcArgs: argNames ← NIL,
funcArgVec: argList ← NIL,
funcParms: expressionPtr ← NIL,
branch: namePtr ← NIL,
data: REF ANY ← NIL];
nodePtr
nodePtr:
TYPE =
REF node;
node:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextNode: nodePtr ← NIL,
nodeName: namePtr ← NIL,
treeLevel: instTreePtr ← NIL,
brotherNodes: nodePtr ← NIL,
branches: branchLinkPtr ← NIL,
curPtr: branchPtr ← NIL, -- vSource ptr
nextIntNode: nodePtr ← NIL,
nHist: history ← [],
integrate,
marked,
converged: BOOL ← FALSE,
entity: Graph.Entity ← NIL
];
branchPtr
elements: TYPE = {resistor, capacitor, inductor, vSource, iSource, nullElement};
branchPtr:
TYPE =
REF branch;
branch:
TYPE =
RECORD [
visited: BOOL ← FALSE,
branchName: namePtr ← NIL,
treeLevel: instTreePtr ← NIL,
brotherBranches: branchPtr ← NIL,
posNode,
negNode: nodePtr ← NIL,
comVal: REAL ← 0.0,
controller: modFuncPtr ← NIL,
modelIndex: NAT ← 0,
entity: Graph.Entity ← NIL,
body: REF ANY ← NIL]; -- cf. the following 5 REF types.
RefR:
TYPE =
REF ResistorBody;
ResistorBody: TYPE = RECORD [];
RefC:
TYPE =
REF CapacitorBody;
CapacitorBody:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextCapacitor: branchPtr ← NIL];
history: TYPE = RECORD [y, oldy, sumk, oldf, f0, f1, f2, f3, f4: REAL ← 0.0];
RefL:
TYPE =
REF InductorBody;
InductorBody:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextInductor: branchPtr ← NIL,
iHist: history ← []];
RefV:
TYPE =
REF VSourceBody;
VSourceBody:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextvSource: branchPtr ← NIL,
vsCurrent: REAL ← 0.0,
oldCurrent: REAL ← 0.0];
RefI:
TYPE =
REF ISourceBody;
ISourceBody:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextiSource: branchPtr ← NIL];
realThingPtr
realThings: TYPE = {realNode, realBranch, realParm, realModel, unReal};
realThingPtr:
TYPE =
REF realThing;
realThing:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextThing: realThingPtr ← NIL,
newLevel: BOOL ← TRUE,
thing: REF ANY ← NIL]; -- cf. the following 5 REF types
RefRealNode:
TYPE =
REF RealNode;
RealNode:
TYPE =
RECORD [
visited: BOOL ← FALSE,
rn: nodePtr ← NIL];
RefRealBranch:
TYPE =
REF RealBranch;
RealBranch:
TYPE =
RECORD [
visited: BOOL ← FALSE,
rb: branchPtr ← NIL];
RefRealParm:
TYPE =
REF RealParm;
RealParm:
TYPE =
RECORD [
visited: BOOL ← FALSE,
rp: REAL ← 0.0];
RefRealModel:
TYPE =
REF RealModel;
RealModel:
TYPE =
RECORD [
visited: BOOL ← FALSE,
rm: modFuncPtr ← NIL];
RefUnReal: TYPE = REF UnReal;
UnReal: TYPE = RECORD [];
branchLinkPtr, conLinkPtr, and instTreePtr
branchLinkPtr:
TYPE =
REF branchLink;
branchLink:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextLink: branchLinkPtr ← NIL,
branch: branchPtr ← NIL,
otherNode: nodePtr ← NIL,
pos: BOOL ← FALSE];
conLinkPtr:
TYPE =
REF conLink;
conLink:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextLink: conLinkPtr ← NIL,
namedNode: namePtr ← NIL];
instTreePtr:
TYPE =
REF instTreeNode;
instTreeNode:
TYPE =
RECORD [
visited: BOOL ← FALSE,
father,
brothers,
sons: instTreePtr ← NIL,
instance: namePtr ← NIL,
nodes: nodePtr ← NIL,
branches: branchPtr ← NIL];
modelFuncPtr
modFuncPtr:
TYPE =
REF modFuncBlk;
modFuncBlk:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextMFPtr: modFuncPtr ← NIL,
arguments: argNodes ← NIL,
argVector,
parmVector: argList ← NIL,
actualParms: expressionPtr ← NIL,
data: REF ANY ← NIL, -- for use by the model or function code
body: REF ANY ← NIL]; -- cf. the following two.
RefFuncBody:
TYPE =
REF FunctionBody;
FunctionBody:
TYPE =
RECORD [
visited: BOOL ← FALSE,
functionProc: function ← NIL,
branch: branchPtr ← NIL];
RefModBody:
TYPE =
REF ModelBody;
ModelBody:
TYPE =
RECORD [
visited: BOOL ← FALSE,
modelProc: model ← NIL,
modelResults: argList ← NIL,
modelName: namePtr ← NIL,
oldArgVector: argList ← NIL,
modelBranches: modBrPtr ← NIL];
modelBrPtr
modBrPtr:
TYPE =
REF modelBranch;
modelBranch:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextBranch: modBrPtr,
b: branchPtr];
ModelTablePtr and FuncTablePtr
ModelTable:
TYPE =
LIST
OF
REF ModelTableBlk;
ModelTableBlk:
TYPE =
RECORD [
name: Rope.ROPE,
proc: model,
numArgs, numParms, numResults: NAT,
data: REF ANY ← NIL];
FuncTable:
TYPE =
LIST
OF
REF FuncTableBlk;
FuncTableBlk:
TYPE =
RECORD [
name: Rope.ROPE,
proc: function,
numArgs, numParms: NAT,
data: REF ANY ← NIL];
List of model applications, sorted by the nodes that are their args
hashModulus: INT = 253;
HashKey: TYPE = [0..hashModulus);
ModelArgHash: TYPE = ARRAY HashKey OF LIST OF REF ANY ← ALL[NIL];
argList, argNames, argNodes
argList:
TYPE =
REF ValueSeq;
ValueSeq:
TYPE =
RECORD [
visited: BOOL ← FALSE,
handle: Handle ← NIL,
modFunc: modFuncPtr ← NIL,
value: SEQUENCE size: NAT OF REAL];
argNames:
TYPE =
REF namePtrSeq;
namePtrSeq:
TYPE =
RECORD [
visited: BOOL ← FALSE,
names: SEQUENCE size: NAT OF namePtr];
argNodes:
TYPE =
REF nodePtrSeq;
nodePtrSeq:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nodes: SEQUENCE size: NAT OF nodePtr];
model and function
model: TYPE = PROC[args, oldArgs, parms, results: argList];
function: TYPE = PROC[t: REAL, args, parms: argList] RETURNS [v: REAL];
Stages, Handle, ThymeToolRec and Variables
Stages: TYPE = {idle, input, bomb, topo, run};
Handle:
TYPE =
REF ThymeToolRec;
ThymeToolRec:
TYPE =
RECORD [
outer: Containers.Container ← NIL,
wDir, input: ViewerClasses.Viewer ← NIL,
output, time, step: Labels.Label ← NIL,
msgStream: IO.STREAM ← NIL,
showDetailsButton, echoInputButton, saveAllButton: Buttons.Button ← NIL,
showTimeStep: BOOL ← TRUE,
echoInput: BOOL ← FALSE,
saveAllData: BOOL ← FALSE,
stage: Stages ← idle,
simulation: PROCESS ← NIL,
height: NAT ← 0,
vars: REF Variables ← NIL];
Variables:
TYPE =
RECORD [
simTime: BasicTime.GMT ← BasicTime.nullGMT,
runState: NAT[0..4) ← 0,
forcedDump: BOOL ← FALSE,
lastTime: REAL ← 0.0,
ThymeGlobalsImpl
fileStack: REF fileStackSeq ← NIL,
fileNameStack: REF fileNameStackSeq ← NIL,
fileStackTop: NAT ← 0,
line: REF TEXT ← NIL,
value: REAL ← 0.0,
item: itemType ← nullItem,
newString: REF TEXT ← NIL,
char: CHAR ← Ascii.SP,
cptr: NAT ← 0, -- pointer to "char" in "line"
genSymCtr: LONG CARDINAL ← 10000,
ThymeInput
gndNodeName,
undefNode,
cktRoot,
currentCkt: namePtr ← NIL,
ThymeBomb
treeRoot: instTreePtr ← NIL,
unusedNodes: nodePtr ← NIL,
nodeCount, branchCount, modelCount, funcCount: LONG CARDINAL ← 0,
modelArgs: REF ModelArgHash ← NIL,
n: nodePtr ← NIL, -- Real ones!!!
b: branchPtr ← NIL,
p: REAL ← 0.0,
m: modFuncPtr ← NIL,
gndNode,
nodeList: nodePtr ← NIL,
capacitorList,
inductorList,
vSourceList,
iSourceList: branchPtr ← NIL,
functionList: modFuncPtr ← NIL,
ThymeErrors
errCount, warnCount: NAT ← 0,
triedOnce: BOOL ← FALSE,
inStream, thymeDotErrors: IO.STREAM ← NIL,
topOfMsgStream: INT ← 0,
ThymeExpressions
type: {real, name} ← real,
ThymeOutput
numPrints: NAT ← 0,
prints: REF PrintSeq ← NIL,
numPlots: NAT ← 0,
plots: REF PlotSeq ← NIL,
graphHandle: Graph.GraphHandle ← NIL,
ThymeSolve
intNodeList: nodePtr ← NIL,
intNodeModFunc,
otherModFunc: modFuncPtr ← NIL,
worstNode: nodePtr ← NIL,
curLog: NAT ← 0,
worstNodeLog: REF WorstNodeLog ← NIL,
lastRetreatCause: Rope.ROPE← NIL,
icsSet, checkPoint, canned: BOOL ← FALSE,
numGoodSteps: LONG CARDINAL ← 0,
modelsSkipped: NAT ← 0,
dvdtTrunc, t, dT: REAL ← 0.0,
AMcount, goodNodeCount, numberOfSteps, highStepCount, lowStepCount: INT ← 0,
countsPerStep: INT ← 100000000,
Vmin: REAL ← -100.0,
Vmax: REAL ← 100.0,
dvdtmax: REAL ← 1.0e15,
dfltInts: NAT ← 200,
ignorDvDtBelow: REAL ← 1.0e-9, -- if |dvdt| < this number then set it to 0.0. Temp fix to avoid being trapped into buggy floating point software too frequently.
retRatio: REAL ← 0.5,
RKfac: REAL ← 1.0,
minRatio: REAL ← 0.8,
floor: REAL ← 0.01,
AMerr: REAL ← 0.01,
RKerr: REAL ← 0.01,
tBreak: REAL ← 0.0,
dvdtFac: REAL ← 5.0,
squish: REAL ← 0.2,
initStep: REAL ← 0.1,
tol: REAL ← 0.001,
intTol: REAL ← 0.001,
AMup: REAL ← 1.25,
AMdown: REAL ← 0.8,
printdT: REAL ← 0.0,
tMin: REAL ← 0.0,
tMax: REAL ← 0.0,
maxIter: INT ← 20,
AMiter: NAT ← 2,
AMdelay: NAT ← 5,
post processor related vars:
title: Rope.ROPE ← NIL,
saveAllData: BOOL ← FALSE,
tUnit: REAL ← 1.0e-9, -- 1 ns
iUnit: REAL ← 1.0e-3, -- 1 mA
vUnit: REAL ← 1.0, -- 1 V
yMin: REAL ← -1.0, -- w.r.t. vUnit/iUnit
yMax: REAL ← 6.0, -- w.r.t. vUnit/iUnit
lastEntityId: INT ← 0,
printIter, printStep, doRungeKutta, printAll, showRetreat: BOOL ← FALSE
];
misc types and constants
argumentPtr:
TYPE =
REF argument;
argument:
TYPE =
RECORD [
visited: BOOL ← FALSE,
node: nodePtr ← NIL,
branch: branchPtr ← NIL,
getComVal,
dvdt,
current: BOOL ← FALSE];
fileStackSeq: TYPE = RECORD [f: SEQUENCE numFiles: NAT OF IO.STREAM];
fileNameStackSeq: TYPE = RECORD [f: SEQUENCE numFiles: NAT OF Rope.ROPE];
maxInclude: NAT = 10;
maxPlots: NAT = 10;
maxPrints: NAT = 10;
PlotSeq:
TYPE =
RECORD [
SEQUENCE size:
NAT
OF PlotRec];
PlotRec:
TYPE =
RECORD [
plotHandle: Graph.GraphHandle ← NIL,
title: Rope.ROPE ← NIL,
ymax, ymin, plotTimeRelTo: REAL ← 0.0,
plotList: plotBlkPtr ← NIL -- items to be plotted.
];
plotBlkPtr:
TYPE =
REF plotBlk;
plotBlk:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextBlk: plotBlkPtr ← NIL,
relativeTo: REAL ← 0,
arg: argumentPtr ← NIL];
PrintSeq:
TYPE =
RECORD [
SEQUENCE size:
NAT
OF PrintRec];
PrintRec:
TYPE =
RECORD [
printList: printBlkPtr ← NIL,
printTimeRelTo: REAL ← 0.0,
printStream: IO.STREAM ← NIL];
printBlkPtr:
TYPE =
REF printBlk;
printBlk:
TYPE =
RECORD [
visited: BOOL ← FALSE,
nextBlk: printBlkPtr ← NIL,
relativeTo: REAL ← 0,
arg: argumentPtr ← NIL];
ThymeSolve
maxLog: NAT = 16;
WorstNodeLog:
TYPE =
RECORD [
SEQUENCE size:
NAT
OF WorstNodeRec];
WorstNodeRec:
TYPE =
RECORD [
visited: BOOL ← FALSE,
node: nodePtr ← NIL,
t, v, dvdt: REAL ← 0];
maxCountsPerStep: INT = 1000000000;
signals:
ErrorSignal: SIGNAL[error: NAT, s: Rope.ROPE];
Retreat: SIGNAL[cause: Rope.ROPE];
Failure: SIGNAL[errorNum: NAT];
Aborted: SIGNAL; -- ThymeGlobalsImpl
global variables:
Initialized in ThymeViewers
version: Rope.ROPE;
refNodeRec: READONLY RefNodeRec;
refConRec: READONLY RefConRec;
refR: READONLY RefR;
refUnReal: READONLY RefUnReal;
modelTable: ModelTable;
functionTable: FuncTable;
procs:
Exported by ThymeGlobalsImpl:
OpenInputFile: PROC[handle: Handle];
EnsureExtension: PROC[old, ext: Rope.ROPE] RETURNS [Rope.ROPE];
OutputFileRoot: PROC[handle: Handle] RETURNS [Rope.ROPE];
WorkingDirectory: PROC[handle: Handle] RETURNS [Rope.ROPE];
FlushCloseNil: PROC[stream: IO.STREAM] RETURNS [IO.STREAM ← NIL];
MsgTextsWithLook: PROC[handle: Handle, text: Rope.ROPE, look: CHAR['a..'z]];
Next: PROC[handle: Handle];
SearchKey: PROC[handle: Handle] RETURNS [index: keys];
GetSignedNumber: PROC[handle: Handle] RETURNS [n: REAL ← 1.0];
GetLineAndCptr: PROC[handle: Handle] RETURNS [Rope.ROPE, NAT];
Exported by ThymeErrors:
Error: PROC[handle: Handle, err: NAT, skip, warning: BOOL ← FALSE];
Error2: PROC[handle: Handle, err: NAT, n: namePtr];
ErrorStrings: PROC[handle: Handle, err: NAT, s1, s2: Rope.ROPE];
ErrorAtNB: PROC[handle: Handle, err: NAT, n: nodePtr, b: branchPtr];
ErrWarnSummary: PROC[handle: Handle];
Exported by ThymeExpressions:
Expression: PROC[handle: Handle, context: namePtr] RETURNS [e: expressionPtr];
AssignExpr: PROC[handle: Handle, context, leftContext: namePtr] RETURNS [a: expressionPtr];
Eval: PROC[handle: Handle, exp: expressionPtr] RETURNS [v: REAL];
Exported by ThymeInput:
LevelType: TYPE ~ {oneLevel, allLevels};
Variable: PROC[handle: Handle, string: REF TEXT, context: namePtr, level: LevelType ← oneLevel] RETURNS [nPtr: namePtr ← NIL];
Output: PROC[handle: Handle, ckt: namePtr, level: NAT];
DefineCircuit: PROC[handle: Handle, cktRoot, gndNodeName: namePtr];
PutTopLevelCircuit: PROC [cellType: Core.CellType, handle: ThymeGlobals.Handle, cktRoot, gndNodeName: namePtr];
Exported by ThymeBomb:
Bomb: PROC[handle: Handle, cktRoot, gndNodeName: namePtr];
PrintHole: PROC[handle: Handle];
FindNodeOrBranch: PROC[handle: Handle] RETURNS [n: nodePtr, b: branchPtr];
MakeStringNB: PROC[handle: Handle, n: nodePtr, b: branchPtr, ok: BOOL ← TRUE] RETURNS [Rope.ROPE];
GetParmValue: PROC[handle: Handle, nPtr: namePtr] RETURNS [REAL];
PutParmValue: PROC[handle: Handle, nPtr: namePtr, val: REAL];
Exported by ThymeAnalysis:
TopoAnalysis: PROC[handle: Handle];
Exported by ThymeSolve:
RunIt: PROC[handle: Handle] RETURNS [REAL];
SetICs: PROC[handle: Handle];
Exported by ThymeOutput:
InitPP: PROC[handle: Handle, tMin, tMax: REAL];
UpdatePP: PROC[handle: Handle, t: REAL];
InitPlot: PROC[handle: Handle, tMin, tMax: REAL];
PlotFromList: PROC[handle: Handle, t: REAL];
MakePlotList: PROC[handle: Handle];
InitPrint: PROC[handle: Handle, time: BasicTime.GMT];
PrintFromList: PROC[handle: Handle, ni: INT, t: REAL, printStep: BOOL];
MakePrintList: PROC[handle: Handle];
PutMsgLine: PROC[handle: Handle, s: Rope.ROPE];
DumpAll: PROC[handle: Handle, t: REAL];
Exported by ThymeMain:
NormalRun: PROC[handle: Handle, background, fork: BOOL ← TRUE];
BatchRun: PROC[handle: Handle, wDir, inputFile: Rope.ROPE ← NIL, background, fork: BOOL ← TRUE];
Simulate: PROC[cell: Core.CellType, handle: Handle];
EnterModels: PROC[entry: ModelTableBlk];
EnterFunctions: PROC[entry: FuncTableBlk];
FindModel: PROC[name: Rope.ROPE] RETURNS [REF ModelTableBlk];
FindFunction: PROC[name: Rope.ROPE] RETURNS [REF FuncTableBlk];
ResetCheckPoint: PROC[handle: Handle];
Canned: PROC[handle: Handle] RETURNS [BOOL];
ForcedDump: PROC[handle: Handle] RETURNS [BOOL];
CheckPoint: PROC[handle: Handle] RETURNS [BOOL];
ShowDetails: PROC[handle: Handle] RETURNS [BOOL];
EchoInput: PROC[handle: Handle] RETURNS [BOOL];
SaveAll: PROC[handle: Handle] RETURNS [BOOL];
StopIt: PROC[handle: Handle];
DumpIt: PROC[handle: Handle];
ToggleShowDetails: PROC[handle: Handle];
ToggleEchoInput: PROC[handle: Handle];
ToggleSaveAll: PROC[handle: Handle];
NextStage: PROC[handle: Handle];
Exported by ThymeViewers:
MakeThymeViewers: PROC[wDir: Rope.ROPE ← NIL] RETURNS [handle: ThymeGlobals.Handle ← NIL];
SetWorkingDirectory: PROC[wDir: Rope.ROPE, handle: Handle];
Exported by ThymeCleanUp:
CleanUp: PROC[handle: Handle];
}.
Chen, 4/19/83:- modified itemType, operators, and expressionNode to support Max and Min operations.
Chen, 2/12/84:- modified to support oldArgVector.
1. "data" fields in ModelRec and FunctionRec, modFuncBlk, ModelTableBlk, and FuncTableBlk;
2. hashModulus, HashKey, and ModelArgHash;
3. the handle and modFunc fields in ValueSeq;
4. modelArgs.
added following on Variables (run parms): saveAllData, tUnit, iUnit, vUnit, yMin, yMax;
also added following on Variables: graphHandle, title, lastEntityId.
modified PlotRec and added entity field on node and branch for the Graph package;