DIRECTORY
	ThreeC4RecFcnImplAbGramDef,
	ThreeC4Support,
	ThreeC4BaseDecl2Def;

ThreeC4RecFcnImplImpl3Impl: CEDAR PROGRAM IMPORTS ThreeC4RecFcnImplAbGramDef, ThreeC4Support EXPORTS ThreeC4RecFcnImplAbGramDef= 
BEGIN
OPEN ThreeC4RecFcnImplAbGramDef, ThreeC4Support, ThreeC4BaseDecl2Def;
RecExpressionwithWhereListProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionwithWhereListProdData ← NARROW[tree.data];
BEGIN
newGraph: FcnImplGraphNode;
graph4: FcnImplGraphNode;
cgNode: CallGraphNodeNode;
graph3: FcnImplGraphNode;
slots: SlotListNode;
expNode: CallGraphNodeNode;
graph2: FcnImplGraphNode;
whereNode: CallGraphNodeNode;
graph1: FcnImplGraphNode;
graph1 ← OpenWithWhereList[graph];
[graph2, whereNode] ← treeData.WhereExpSeq.procs.FormFcnImplWhereGraph[treeData.WhereExpSeq, lookup, graph1];
[graph3, slots, expNode] ← treeData.RecExpression.procs.FormFcnImplGraph[treeData.RecExpression, lookup, graph2];
[graph4, cgNode] ← RecordSequential[graph3, whereNode, expNode];
newGraph ← CloseWithWhereList[graph4];
temp2 ← cgNode;
temp1 ← slots;
temp0 ← newGraph;
END;
END
END;

RecExpressioncondProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressioncondProdData ← NARROW[tree.data];
BEGIN
graph3: FcnImplGraphNode;
slotsIf: SlotListNode;
cgNodeIf: CallGraphNodeNode;
graph2: FcnImplGraphNode;
slotsThen: SlotListNode;
cgNodeThen: CallGraphNodeNode;
graph1: FcnImplGraphNode;
slotsElse: SlotListNode;
cgNodeElse: CallGraphNodeNode;
[graph1, slotsElse, cgNodeElse] ← treeData.RecExpressionelseClause.procs.FormFcnImplGraph[treeData.RecExpressionelseClause, lookup, graph];
[graph2, slotsThen, cgNodeThen] ← treeData.RecExpressionthenClause.procs.FormFcnImplGraph[treeData.RecExpressionthenClause, lookup, graph1];
[graph3, slotsIf, cgNodeIf] ← treeData.RecExpressionifClause.procs.FormFcnImplGraph[treeData.RecExpressionifClause, lookup, graph2];
[temp0, temp1, temp2] ← RecordCondition[graph3, slotsIf, cgNodeIf, slotsThen, cgNodeThen, slotsElse, cgNodeElse];
END;
END
END;

RecExpressioncallProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressioncallProdData ← NARROW[tree.data];
BEGIN
graph1: FcnImplGraphNode;
slots: SlotListNode;
cgn: CallGraphNodeNode;
[graph1, slots, cgn] ← treeData.RecExpSeq.procs.FormFcnImplGraph[treeData.RecExpSeq, lookup, graph];
[temp0, temp1, temp2] ← RecordCall[graph1, lookup, treeData.Identifier, slots, cgn];
END;
END
END;

RecExpressionseqProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionseqProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← treeData.RecExpSeq.procs.FormFcnImplGraph[treeData.RecExpSeq, lookup, graph];
END
END;

RecExpressionidProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionidProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← RecordSimpleVarUse[graph, lookup, treeData.Identifier];
END
END;

RecExpressionmodIdProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionmodIdProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← RecordModIdUse[graph, lookup, treeData.Identifiera, treeData.Identifierb];
END
END;

RecExpressionropeProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionropeProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← RecordLiteralUse[graph, tree.position];
END
END;

RecExpressionnumbProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionnumbProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← RecordLiteralUse[graph, tree.position];
END
END;

RecExpressionsourcePositionProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionsourcePositionProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← RecordLiteralUse[graph, tree.position];
END
END;

RecExpressionsourceLengthProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpressionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpressionsourceLengthProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← RecordLiteralUse[graph, tree.position];
END
END;

RecExpSeqemptyProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpSeqNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
temp2 ← BuildEmptyCallGraphNode[];
temp1 ← BuildEmptySlotList[];
temp0 ← FakeCopyFcnImplGraph[graph];
END
END;

RecExpSeqoneProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpSeqNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpSeqoneProdData ← NARROW[tree.data];
[temp0, temp1, temp2] ← treeData.RecExpression.procs.FormFcnImplGraph[treeData.RecExpression, lookup, graph];
END
END;

RecExpSeqmanyProdFormFcnImplGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: SlotListNode, temp2: CallGraphNodeNode] =
BEGIN
tree: RecExpSeqNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: RecExpSeqmanyProdData ← NARROW[tree.data];
BEGIN
newGraph: FcnImplGraphNode;
cgn: CallGraphNodeNode;
slots: SlotListNode;
graph2: FcnImplGraphNode;
slotsb: SlotListNode;
cgnb: CallGraphNodeNode;
graph1: FcnImplGraphNode;
slotsa: SlotListNode;
cgna: CallGraphNodeNode;
[graph1, slotsa, cgna] ← treeData.RecExpSeqa.procs.FormFcnImplGraph[treeData.RecExpSeqa, lookup, graph];
[graph2, slotsb, cgnb] ← treeData.RecExpSeqb.procs.FormFcnImplGraph[treeData.RecExpSeqb, lookup, graph1];
slots ← ConcatSlotList[slotsa, slotsb];
[newGraph, cgn] ← RecordParallel[graph2, cgna, cgnb];
temp2 ← cgn;
temp1 ← slots;
temp0 ← newGraph;
END;
END
END;

WhereExpSeqoneProdFormFcnImplWhereGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: CallGraphNodeNode] =
BEGIN
tree: WhereExpSeqNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: WhereExpSeqoneProdData ← NARROW[tree.data];
BEGIN
graph1: FcnImplGraphNode;
slots: SlotListNode;
cgn1: CallGraphNodeNode;
[graph1, slots, cgn1] ← treeData.RecExpression.procs.FormFcnImplGraph[treeData.RecExpression, lookup, graph];
[temp0, temp1] ← RecordAssignment[graph1, treeData.IdList.procs.FormNameList[treeData.IdList], slots, cgn1];
END;
END
END;

WhereExpSeqmanyProdFormFcnImplWhereGraph: PUBLIC PROC[ref: REF ANY, lookup: LookupContextNode, graph: FcnImplGraphNode] RETURNS[temp0: FcnImplGraphNode, temp1: CallGraphNodeNode] =
BEGIN
tree: WhereExpSeqNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: WhereExpSeqmanyProdData ← NARROW[tree.data];
BEGIN
graph2: FcnImplGraphNode;
cgna: CallGraphNodeNode;
graph1: FcnImplGraphNode;
cgnb: CallGraphNodeNode;
[graph1, cgnb] ← treeData.WhereExpSeqb.procs.FormFcnImplWhereGraph[treeData.WhereExpSeqb, lookup, graph];
[graph2, cgna] ← treeData.WhereExpSeqa.procs.FormFcnImplWhereGraph[treeData.WhereExpSeqa, lookup, graph1];
[temp0, temp1] ← RecordSequential[graph2, cgnb, cgna];
END;
END
END;

END..