
<<SMVal.mesa>>
<<Copyright © 1985 by Xerox Corporation.  All rights reserved.>>
<<last edit by Satterthwaite, May 12, 1986 11:56:34 am PDT>>

DIRECTORY
SMOps: TYPE USING [MS],
SMTree: TYPE Tree USING [Handle, Id, Link, Name, SonId],
SMTreeOps: TYPE TreeOps USING [TM];

SMVal: CEDAR DEFINITIONS~{
OPEN Tree~~SMTree, TreeOps~~SMTreeOps;

<<operations on model value trees (fully evaluated only)>>

Binding: PROC[t: Tree.Link] RETURNS[BOOL];
BtoD: PROC[binding: Tree.Link] RETURNS[decl: Tree.Handle];
BtoG: PROC[binding: Tree.Link] RETURNS[group: Tree.Handle];

IdName: PROC[id: Tree.Id] RETURNS[Tree.Name];
IdType: PROC[id: Tree.Id] RETURNS[Tree.Link];
IdValue: PROC[id: Tree.Id] RETURNS[Tree.Link];

Select: PROC[binding: Tree.Link, index: Tree.Name] RETURNS[Tree.Link];
ValOf: PROC[t: Tree.Link] RETURNS[Tree.Link];    -- iterates IdValue for Id's
ValOfNthSon: PROC[t: Tree.Link, n: Tree.SonId] RETURNS[Tree.Link];

<<enumeration of operator nodes (evaluates Id's, suppresses multiple visits)>>

VisitNodes: PROC[tm: TreeOps.TM, root: Tree.Link, proc: PROC[node, parent: Tree.Link]];
ResetVisits: PROC[ms: SMOps.MS];

<<lambda decomposition>>

OuterBody: PROC[t: Tree.Link] RETURNS[formals, body: Tree.Link];

<<indirection through value tree to get/set ext from parse tree>>

GetExtFromParse: PROC[link: Tree.Link] RETURNS[Tree.Link];
PutExtInParse: PROC[link: Tree.Link, ext: Tree.Link];

}.

