SaffronExpressionCompileMethods.ThreeC4
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
James Rauen, June 22, 1988 10:37:34 am PDT
Last edited by: James Rauen August 23, 1988 1:51:42 pm PDT
Methods for evaluating and compiling expressions.
Include [ SaffronBaseDecls, SaffronTreeDecls, SaffronAG, SaffronProgramGraphDecls ];
SaffronValueCompile1: Module = Begin
the polymorphic operators must provide their own type checking; all others call CompileAndTypeCheckExpression.
for Exp.sum: AbstractProduction [ Exp.left, AddOp, Exp.right ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
CastIntegerValue[
if IsPlus[AddOp]
then Add[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]]
else Sub[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]],
GetIntrinsicIntegerTypes[cs]]
where lhs ← DemandNumber[uncheckedLhs]
where rhs ← DemandNumber[uncheckedRhs]
where uncheckedRhs ← EvaluateExpression[Exp.right, lc, fl, cs, targetType]
where uncheckedLhs ← EvaluateExpression[Exp.left, lc, fl, cs, targetType]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree2>
where result ←
if And[And[Static[lhs], Static[rhs]], And[ConformsToInteger[lhsType], ConformsToInteger[rhsType]]]
we're not going to try simulating REAL arithmetic just now.
then CastIntegerValue[
if IsPlus[AddOp]
then Add[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]]
else Sub[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]],
GetIntrinsicIntegerTypes[cs]]
else (MakeRuntimeValue[code, targetType] -- is targetType correct here?
where code ← ConcatProgramFragments[ConcatProgramFragments[pushLHS, pushRHS], op]
where pushLHS ← Code[lhs]
where pushRHS ← Code[rhs]
where op ← if IsPlus[AddOp]
then MakePGAdd[]
else MakePGSubtract[]
)
where lhsType ← Type[lhs]
where rhsType ← Type[rhs]
where lhs ← DemandNumber[uncheckedLhs]
where rhs ← DemandNumber[uncheckedRhs]
where <uncheckedRhs, contextTree2> ←
CompileExpression[Exp.right, contextTree1, cs, targetType]
where <uncheckedLhs, contextTree1> ←
CompileExpression[Exp.left, contextTree, cs, targetType]
the targetTypes in the calls should be fixed...
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Arithmetic expression used as l-value"]
;
for Exp.unarysum: AbstractProduction [ AddOp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
CastIntegerValue[
if IsPlus[AddOp]
then RetrieveIntegerValue[rhs]
else Neg[RetrieveIntegerValue[rhs]],
GetIntrinsicIntegerTypes[cs]]
where rhs ← DemandNumber[uncheckedRhs]
where uncheckedRhs ← EvaluateExpression[Exp, lc, fl, cs, targetType]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ←
if And[Static[rhs], ConformsToInteger[rhsType]]
then CastIntegerValue[
if IsPlus[AddOp]
then RetrieveIntegerValue[rhs]
else Neg[RetrieveIntegerValue[rhs]],
GetIntrinsicIntegerTypes[cs]]
else (MakeRuntimeValue[code, targetType] -- is targetType correct here?
where code ←
if IsPlus[AddOp]
then ConcatProgramFragments[pushRHS, MakePGNoOp[]]
else ConcatProgramFragments[pushRHS, MakePGNegate[]]
where pushRHS ← Code[rhs]
)
where rhsType ← Type[rhs]
where rhs ← DemandNumber[uncheckedRhs]
where <uncheckedRhs, contextTree1> ←
CompileExpression[Exp, contextTree, cs, targetType]
the targetTypes in the calls should be fixed...
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Arithmetic expression used as l-value"]
;
for Exp.product: AbstractProduction [ Exp.left, MultOp, Exp.right ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
CastIntegerValue[
if IsTimes[MultOp]
then Mul[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]]
else if IsDivide[MultOp]
then Div[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]]
else Mod[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]],
GetIntrinsicIntegerTypes[cs]]
where lhs ← DemandNumber[uncheckedLhs]
where rhs ← DemandNumber[uncheckedRhs]
where uncheckedRhs ← EvaluateExpression[Exp.right, lc, fl, cs, targetType]
where uncheckedLhs ← EvaluateExpression[Exp.left, lc, fl, cs, targetType]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree2>
where result ←
if And[And[Static[lhs], Static[rhs]], And[ConformsToInteger[lhsType], ConformsToInteger[rhsType]]]
then CastIntegerValue[
if IsTimes[MultOp]
then Mul[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]]
else if IsDivide[MultOp]
then Div[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]]
else Mod[RetrieveIntegerValue[lhs], RetrieveIntegerValue[rhs]],
GetIntrinsicIntegerTypes[cs]]
else (MakeRuntimeValue[code, targetType] -- is targetType correct here?
where code ← ConcatProgramFragments[ConcatProgramFragments[pushLHS, pushRHS], op]
where pushLHS ← Code[lhs]
where pushRHS ← Code[rhs]
where op ←
if IsTimes[MultOp]
then MakePGMultiply[]
else if IsDivide[MultOp]
then MakePGDivide[]
else MakePGMod[]
)
we're not going to try simulating REAL arithmetic just now.
where lhsType ← Type[lhs]
where rhsType ← Type[rhs]
where lhs ← DemandNumber[uncheckedLhs]
where rhs ← DemandNumber[uncheckedRhs]
where <uncheckedRhs, contextTree2> ←
CompileExpression[Exp.right, contextTree1, cs, targetType]
where <uncheckedLhs, contextTree1> ←
CompileExpression[Exp.left, contextTree, cs, targetType]
the targetTypes in the calls should be fixed...
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Arithmetic expression used as l-value"]
;
for Exp.or: AbstractProduction [ Exp.left, Exp.right ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
MakeStaticBoolean[Or[BooleanValue[lhs], BooleanValue[rhs]], boolean]
where rhs ← EvaluateAndTypeCheckExpression[Exp.right, lc, fl, cs, boolean]
where lhs ← EvaluateAndTypeCheckExpression[Exp.left, lc, fl, cs, boolean]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree2>
where result ←
if And[Static[lhs], Static[rhs]]
then MakeStaticBoolean[Or[BooleanValue[lhs], BooleanValue[rhs]], boolean]
else (MakeRuntimeValue[code, boolean]
where code ← ConcatProgramFragments[ConcatProgramFragments[pushLHS, pushRHS], op]
where pushLHS ← Code[lhs]
where pushRHS ← Code[rhs]
where op ← MakePGOr[]
)
where <rhs, contextTree2> ←
CompileAndTypeCheckExpression[Exp.right, contextTree1, cs, boolean]
where <lhs, contextTree1> ←
CompileAndTypeCheckExpression[Exp.left, contextTree, cs, boolean]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["OR expression used as l-value"]
;
for Exp.and: AbstractProduction [ Exp.left, Exp.right ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
MakeStaticBoolean[And[BooleanValue[lhs], BooleanValue[rhs]], boolean]
where rhs ← EvaluateAndTypeCheckExpression[Exp.right, lc, fl, cs, boolean]
where lhs ← EvaluateAndTypeCheckExpression[Exp.left, lc, fl, cs, boolean]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree2>
where result ←
if And[Static[lhs], Static[rhs]]
then MakeStaticBoolean[And[BooleanValue[lhs], BooleanValue[rhs]], boolean]
else (MakeRuntimeValue[code, boolean]
where code ← ConcatProgramFragments[ConcatProgramFragments[pushLHS, pushRHS], op]
where pushLHS ← Code[lhs]
where pushRHS ← Code[rhs]
where op ← MakePGAnd[]
)
where <rhs, contextTree2> ←
CompileAndTypeCheckExpression[Exp.right, contextTree1, cs, boolean]
where <lhs, contextTree1> ←
CompileAndTypeCheckExpression[Exp.left, contextTree, cs, boolean]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["AND expression used as l-value"]
;
for Exp.not: AbstractProduction [ Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
MakeStaticBoolean[Not[BooleanValue[rhs]], boolean]
where rhs ← EvaluateAndTypeCheckExpression[Exp, lc, fl, cs, boolean]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ←
if Static[rhs]
then MakeStaticBoolean[Not[BooleanValue[rhs]], boolean]
else (MakeRuntimeValue[code, boolean]
where code ← ConcatProgramFragments[Code[rhs], MakePGNot[]]
)
where <rhs, contextTree1> ←
CompileAndTypeCheckExpression[Exp, contextTree, cs, boolean]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["NOT expression used as l-value"]
;
for Exp.relation: AbstractProduction [ Exp, Relation ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["relation"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["relation"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Relation used as l-value"]
;
for Exp.ifthenelse: AbstractProduction [ Exp.cond, Exp.thenpart, Exp.elsepart ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
if BooleanValue[EvaluateAndTypeCheckExpression[Exp.cond, lc, fl, cs, boolean]]
then EvaluateAndTypeCheckExpression[Exp.thenpart, lc, fl, cs, targetType]
else EvaluateAndTypeCheckExpression[Exp.elsepart, lc, fl, cs, targetType]
where boolean ← GetIntrinsicBooleanType[cs]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree4>
where <result, contextTree4> ←
if Static[condition]
then if BooleanValue[condition]
then CompileAndTypeCheckExpression[Exp.thenpart, contextTree1, cs, targetType]
else CompileAndTypeCheckExpression[Exp.elsepart, contextTree1, cs, targetType]
else (<MakeRuntimeValue[code, targetType], contextTree3> -- is targetType correct here?
where code ← MakePGTest[Code[condition], Code[thenPart], Code[elsePart]]
where <elsePart, contextTree3> ← CompileAndTypeCheckExpression[Exp.elsepart, contextTree2, cs, targetType]
where <thenPart, contextTree2> ← CompileAndTypeCheckExpression[Exp.thenpart, contextTree1, cs, targetType]
)
where <condition, contextTree1> ← CompileAndTypeCheckExpression[Exp.cond, contextTree, cs, booleanType]
where booleanType ← GetIntrinsicBooleanType[cs]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["IF expression used as l-value"]
;
for Exp.select: AbstractProduction [ SelectHead, SelectExpList, Exp.default ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["select"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["select"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["SELECT expression used as l-value"]
;
for Exp.assign: AbstractProduction [ Exp.lhs, Exp.rhs ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeTrash[targetType]
where err ← Error["Exp.assign should never be evaluated!"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeRuntimeValue[code, tgn]
where code ← ConcatProgramFragments[Code[rhsValue], storeTOS]
where storeTOS ← if PFDIsLocal[lvalue]
then MakePGStoreLocal[lvalue]
else MakePGStoreIndirect[lvalue]
where <rhsValue, contextTree1> ←
CompileAndTypeCheckExpression[Exp.rhs, contextTree, cs, tgn]
where <lvalue, tgn> ← CompileLValue[Exp.lhs, contextTree, cs]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Assignment expression used as l-value"]
;
for Exp.multiassign: AbstractProduction [ ExpList, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeTrash[targetType]
where err ← Error["Exp.multiassign should never be evaluated!"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["multiassign"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Multiple assignment expression used as l-value"]
;
for Exp.id: AbstractProduction [ Id ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← result
where result ← if Static[value]
then value
else (MakeDummy[""]
where err ← Error["blat"])
do we need to do a type check here?
where <access, tgn, initialization, value> ← DemandConstantField[field2]
where field2 ← if FieldExists[field1]
then field1
else LookupNameInContextRib[Id, ParentRib[lc]]
where field1 ← LookupNameInFieldList[fl, Id]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where contextTree1 ← FakeDamageContextTree[contextTree]
where result ← CompileLValueIntoRValue[expAsLValue, contextTree]
where <expAsLValue, tgn> ← CompileLValue[tree, contextTree, cs]
let CompileLValue[tree, contextTree, cs] ← GetPathToName[contextTree, Id]
;
for Exp.num: AbstractProduction [ Num ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← result
where result ← CastIntegerValue[integerValue, GetIntrinsicIntegerTypes[cs]]
where integerValueIntegerValueFromLiteral[Num]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where resultCastIntegerValue[integerValue, GetIntrinsicIntegerTypes[cs]]
where integerValueIntegerValueFromLiteral[Num]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Number literal used as l-value"]
;
for Exp.string: AbstractProduction [ String ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["string"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["string"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["String literal used as l-value"]
;
for Exp.flnum: AbstractProduction [ Flnum ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["flnum"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["flnum"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["REAL literal used as l-value"]
;
for Exp.char: AbstractProduction [ Char ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["char"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["char"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Character literal used as l-value"]
;
for Exp.atom: AbstractProduction [ Atom ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["atom"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["atom"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Character literal used as l-value"]
;
for Exp.narrow: AbstractProduction [ Exp, OptType, Catch ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["narrow"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["narrow"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["NARROW expression used as l-value"]
;
for Exp.loophole: AbstractProduction [ Exp, OptType ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["loophole"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["loophole"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["LOOPHOLE expression used as l-value"]
;
for Exp.apply: AbstractProduction [ Exp.rator, Exp.rand, Catch ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["apply"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["apply"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Apply expression used as l-value"]
;
for Exp.qualifier: AbstractProduction [ Exp, Qualifier ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["qualifier"]
let CompileExpression[tree, contextTree, cs, targetType] ←
CompileQualifiedExpression[Qualifier, value, contextTree1, cs, targetType]
where <value, contextTree1> ← CompileAndTypeCheckExpression[Exp, contextTree, cs, top]
where top ← GetTop[cs]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Qualifier l-value not implemented yet!!!!!!!!!"]
;
for Exp.explist: AbstractProduction [ ExpList ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["explist"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["explist"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["ExpList l-value not implemented yet!!!!!!!!!"]
;
for Exp.prefixop: AbstractProduction [ PrefixOp, OrderList ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["prefixop"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["prefixop"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["PrefixOp expression used as l-value"]
;
for Exp.val: AbstractProduction [ OrderList ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["val"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["val"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Val expression used as l-value"]
;
for Exp.all: AbstractProduction [ OrderList ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["all"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["all"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["ALL expression used as l-value"]
;
for Exp.new: AbstractProduction [ New, TypeExp, Initialization, Catch ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeTrash[targetType]
where err ← Error["Should not be evaluating Exp.new!"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["new"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["NEW expression used as l-value"]
;
for Exp.cons: AbstractProduction [ Cons, ExpList, Catch ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeTrash[targetType]
where err ← Error["Should not be evaluating Exp.cons!"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["cons"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["CONS expression used as l-value"]
;
for Exp.listcons: AbstractProduction [ ListCons, ExpList ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeTrash[targetType]
where err ← Error["Should not be evaluating Exp.listcons!"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["listcons"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["ListCons expression used as l-value"]
;
for Exp.nil: AbstractProduction [ ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["nil"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["nil"]
where contextTree1 ← FakeDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["NIL expression used as l-value"]
;
End;
SaffronValueCompile2: Module = Begin
for Exp.typeop: AbstractProduction [ TypeOp, TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ←
if TypeOpIsCode[TypeOp] then ( MakeDummy[""]
where err ← Error["EvaluateExpression not implemented for code Exp.typeop"]
)
else if TypeOpIsFirst[TypeOp]
then EvaluateFirstOfTypeExpression[TypeExp, lc, fl, cs, targetType]
else if TypeOpIsLast[TypeOp]
then EvaluateLastOfTypeExpression[TypeExp, lc, fl, cs, targetType]
else if TypeOpIsNil[TypeOp] then ( MakeDummy[""]
where err ← Error["EvaluateExpression not implemented for nil Exp.typeop"]
)
else ( MakeDummy[""]
where err ← Error["in EvaluateExpression for Exp.typeop"]
)
let CompileExpression[tree, contextTree, cs, targetType] ←
if TypeOpIsCode[TypeOp] then ( <dummy, contextTree1>
where dummy ← MakeDummy[""]
where contextTree1 ← FakeDamageContextTree[contextTree]
where err ← Error["CompileExpression not implemented for code Exp.typeop"]
)
else if TypeOpIsFirst[TypeOp] then ( <first, contextTree1>
where contextTree1 ← FakeDamageContextTree[contextTree]
where first ← CompileFirstOfTypeExpression[TypeExp, contextTree, cs, targetType]
)
else if TypeOpIsLast[TypeOp] then ( <last, contextTree1>
where contextTree1 ← FakeDamageContextTree[contextTree]
where last ← CompileLastOfTypeExpression[TypeExp, contextTree, cs, targetType]
)
else if TypeOpIsNil[TypeOp] then ( <dummy, contextTree1>
where dummy ← MakeDummy[""]
where contextTree1 �keDamageContextTree[contextTree]
where err ← Error["CompileExpression not implemented for nil Exp.typeop"]
)
else ( <dummy, contextTree1>
where dummy ← MakeDummy[""]
where contextTree1 ← FakeDamageContextTree[contextTree]
where err ← Error["in CompileExpression for Exp.typeop"]
)
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["TypeOp expression used as l-value"]
;
for Exp.size: AbstractProduction [ TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["size"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["size"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["SIZE expression used as l-value"]
;
for Exp.size2: AbstractProduction [ TypeExp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["size2"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["size2"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["SIZE2 expression used as l-value"]
;
for Exp.bits: AbstractProduction [ TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["bits"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["bits"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["BITS expression used as l-value"]
;
for Exp.bits2: AbstractProduction [ TypeExp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["bits2"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["bits2"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["BITS2 expression used as l-value"]
;
for Exp.bytes: AbstractProduction [ TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["bytes"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["bytes"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["BYTES expression used as l-value"]
;
for Exp.bytes2: AbstractProduction [ TypeExp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["bytes2"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["bytes2"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["BYTES2 expression used as l-value"]
;
for Exp.units: AbstractProduction [ TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["units"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["units"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["UNITS expression used as l-value"]
;
for Exp.units2: AbstractProduction [ TypeExp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["units2"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["units2"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["UNITS2 expression used as l-value"]
;
for Exp.words: AbstractProduction [ TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["words"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["words"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["WORDS expression used as l-value"]
;
for Exp.words2: AbstractProduction [ TypeExp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["words2"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["words2"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["WORDS2 expression used as l-value"]
;
for Exp.istype: AbstractProduction [ Exp, TypeExp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["istype"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["istype"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["ISTYPE expression used as l-value"]
;
for Exp.address: AbstractProduction [ Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["address"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["address"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["@ expression used as l-value"]
;
for Exp.descriptor: AbstractProduction [ DescList ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["descriptor"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["descriptor"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Descriptor used as l-value"]
;
for Exp.error: AbstractProduction [ ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["error"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["error"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["ERROR used as l-value"]
;
for Exp.transfer: AbstractProduction [ TransferOp, Exp ]
let EvaluateExpression[tree, lc, fl, cs, targetType] ← MakeDummy["transfer"]
let CompileExpression[tree, contextTree, cs, targetType] ← <result, contextTree1>
where result ← MakeDummy["transfer"]
where contextTree1 �keDamageContextTree[contextTree]
let CompileLValue[tree, contextTree, cs] ← <pfd, tgn>
where pfd ← EmptyPFD[]
where tgn ← GetIntrinsicBooleanType[cs] -- any type will do...
where err ← Error["Transfer expression used as l-value"]
;
for Num.decimal: AbstractProduction [Decimalnum]
let IntegerValueFromLiteral[tree] ← ParseIntegerLiteral[digits, 10]
where digits ← RopeFromDecimalnum[Decimalnum];
for Num.octal: AbstractProduction [Octalnum]
let IntegerValueFromLiteral[tree] ← ParseIntegerLiteral[digits, 8]
where digits ← RopeFromOctalnum[Octalnum];
for Num.hex: AbstractProduction [Hexnum]
let IntegerValueFromLiteral[tree] ← ParseIntegerLiteral[digits, 16]
where digits ← RopeFromHexnum[Hexnum];
for AddOp.plus: AbstractProduction []
let IsPlus[tree] ← True[]
let IsMinus[tree] ← False[];
for AddOp.minus: AbstractProduction []
let IsPlus[tree] ← False[]
let IsMinus[tree] ← True[];
for MultOp.times: AbstractProduction []
let IsTimes[tree] ← True[]
let IsDivide[tree] ← False[]
let IsMod[tree] ← False[];
for MultOp.divide: AbstractProduction []
let IsTimes[tree] ← False[]
let IsDivide[tree] ← True[]
let IsMod[tree] ← False[];
for MultOp.mod: AbstractProduction []
let IsTimes[tree] ← False[]
let IsDivide[tree] ← False[]
let IsMod[tree] ← True[];
for Relop.eq: AbstractProduction []
let GetRelationOp[tree] ← RelationOp.eq;
for Relop.ne: AbstractProduction []
let GetRelationOp[tree] ← RelationOp.ne;
for Relop.lt: AbstractProduction []
let GetRelationOp[tree] ← RelationOp.lt;
for Relop.le: AbstractProduction []
let GetRelationOp[tree] ← RelationOp.le;
for Relop.gt: AbstractProduction []
let GetRelationOp[tree] ← RelationOp.gt;
for Relop.ge: AbstractProduction []
let GetRelationOp[tree] ← RelationOp.ge;
for Initialization.empty: AbstractProduction []
let InitializationIsEmpty[tree] ← True[]
let InitializationIsBinding[tree] ← False[]
let InitializationIsAssignment[tree] ← False[]
let Compile[tree, contextTree, cs] ← <contextTree1, trash>
where trash ←
let GetInitialValue[tree, tgn, contextTree, cs] ←
<MakeDefaultMeValue[],FakeDamageContextTree[contextTree]>;
;
for Initialization.binding: AbstractProduction [InitialValue]
let InitializationIsEmpty[tree] ← False[]
let InitializationIsBinding[tree] ← True[]
let InitializationIsAssignment[tree] ← False[]
let GetInitialValue[tree, tgn, contextTree, cs] ← GetInitialValue[InitialValue, tgn, contextTree, cs];
;
for Initialization.assignment: AbstractProduction [InitialValue]
let InitializationIsEmpty[tree] ← False[]
let InitializationIsBinding[tree] ← False[]
let InitializationIsAssignment[tree] ← True[]
let GetInitialValue[tree, tgn, contextTree, cs] ← GetInitialValue[InitialValue, tgn, contextTree, cs];
;
for InitialValue.trash: AbstractProduction []
let GetInitialValue[tree, tgn, contextTree, cs] ←
<MakeTrash[tgn],FakeDamageContextTree[contextTree]>;
for InitialValue.code: AbstractProduction []
let GetInitialValue[tree, tgn, contextTree, cs] ←
<MakeDummy["InitialValue.code"], FakeDamageContextTree[contextTree]>;
for InitialValue.exp: AbstractProduction [Exp]
let GetInitialValue[tree, tgn, contextTree, cs] ←
<MakeUnparsedValue[Exp], FakeDamageContextTree[contextTree]>;
for InitialValue.exp: AbstractProduction [Exp]
let GetInitialValue[tree, tgn, contextTree, cs] ←
CompileAndTypeCheckExpression[Exp, contextTree, cs, tgn];
is this correct (passing tgn)?
for InitialValue.block: AbstractProduction [Checked, Inline, Block]
let GetInitialValue[tree, tgn, contextTree, cs] ←
<MakeDummy["InitialValue.block"], FakeDamageContextTree[contextTree]>;
for InitialValue.machinecode: AbstractProduction [Checked, CodeList]
let GetInitialValue[tree, tgn, contextTree, cs] ←
<MakeDummy["InitialValue.machinecode"], FakeDamageContextTree[contextTree]>;
for TypeOp.code: AbstractProduction []
let TypeOpIsCode[tree] ← True[]
let TypeOpIsFirst[tree] ← False[]
let TypeOpIsLast[tree] ← False[]
let TypeOpIsNil[tree] ← False[];
for TypeOp.first: AbstractProduction []
let TypeOpIsCode[tree] ← False[]
let TypeOpIsFirst[tree] ← True[]
let TypeOpIsLast[tree] ← False[]
let TypeOpIsNil[tree] ← False[];
for TypeOp.last: AbstractProduction []
let TypeOpIsCode[tree] ← False[]
let TypeOpIsFirst[tree] ← False[]
let TypeOpIsLast[tree] ← True[]
let TypeOpIsNil[tree] ← False[];
for TypeOp.nil: AbstractProduction []
let TypeOpIsCode[tree] ← False[]
let TypeOpIsFirst[tree] ← False[]
let TypeOpIsLast[tree] ← False[]
let TypeOpIsNil[tree] ← True[];
for Qualifier.prefixop: AbstractProduction [PrefixOp]
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.typeop: AbstractProduction [TypeOp]
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.size: AbstractProduction []
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.bits: AbstractProduction []
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.bytes: AbstractProduction []
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.units: AbstractProduction []
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.words: AbstractProduction []
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.apply: AbstractProduction [ExpList, Catch]
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.apply"],
FakeDamageContextTree[contextTree]
>
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ←
if IsTransferTGN[expType]
then (<value, contextTree1>
where value ← MakeDummy["Qualifier.prefixop"]
where contextTree1 ← FakeDamageContextTree[contextTree]
)
else if IsArrayTGN[expType]
then (<value, contextTree1>
where value ← MakeDummy["Qualifier.prefixop"]
where contextTree1 ← FakeDamageContextTree[contextTree]
)
else (<value, contextTree1>
where value ← MakeDummy["Qualifier.prefixop"]
where contextTree1 ← FakeDamageContextTree[contextTree]
)
where expType ← Type[expValue]
;
for Qualifier.select: AbstractProduction [Id]
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
for Qualifier.indirect: AbstractProduction []
let CompileQualifiedExpression[tree, expValue, contextTree, cs, targetType] ← <
MakeDummy["Qualifier.prefixop"],
FakeDamageContextTree[contextTree]
>
;
End;
SaffronTypeCompile: Module = Begin
for TypeExp.record: AbstractProduction [ MachineDependent, Monitored, RecList ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of RECORD not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on RECORD types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on RECORD types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of RECORD not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on RECORD types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on RECORD types."]
;
for TypeExp.union: AbstractProduction [ Tag, VariantList ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of UNION not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on UNION types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on UNION types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of UNION not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on UNION types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on UNION types."]
;
for TypeExp.sequence: AbstractProduction [ Packed, Tag, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of SEQUENCE not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on SEQUENCE types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on SEQUENCE types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of SEQUENCE not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on SEQUENCE types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on SEQUENCE types."]
;
for TypeExp.enum: AbstractProduction [ MachineDependent, ElementList ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of Enumerated not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of Enumerated not implemented yet."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of Enumerated not implemented yet."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of Enumerated not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of Enumerated not implemented yet."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of Enumerated not implemented yet."]
;
for TypeExp.ref: AbstractProduction [ ReadOnly, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of REF not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on REF types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on REF types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of REF not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on REF types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on REF types."]
;
for TypeExp.refany: AbstractProduction [ ReadOnly ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of REF ANY not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on REF ANY types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on REF ANY types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of REF ANY not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on REF ANY types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on REF ANY types."]
;
for TypeExp.refunspecified: AbstractProduction [ ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of REF UNSPECIFIED not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on REF UNSPECIFIED types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on REF UNSPECIFIED types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of REF UNSPECIFIED not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on REF UNSPECIFIED types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on REF UNSPECIFIED types."]
;
for TypeExp.typeid: AbstractProduction [ TypeId ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateSizeOfTypeExpression[TypeId, lc, fl, cs, targetType]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateFirstOfTypeExpression[TypeId, lc, fl, cs, targetType]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateLastOfTypeExpression[TypeId, lc, fl, cs, targetType]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileSizeOfTypeExpression[TypeId, contextTree, cs, targetType]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileFirstOfTypeExpression[TypeId, contextTree, cs, targetType]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileLastOfTypeExpression[TypeId, contextTree, cs, targetType]
;
for TypeExp.subrange: AbstractProduction [ Subrange ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateSizeOfTypeExpression[Subrange, lc, fl, cs, targetType]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateFirstOfTypeExpression[Subrange, lc, fl, cs, targetType]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateLastOfTypeExpression[Subrange, lc, fl, cs, targetType]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileSizeOfTypeExpression[Subrange, contextTree, cs, targetType]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileFirstOfTypeExpression[Subrange, contextTree, cs, targetType]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileLastOfTypeExpression[Subrange, contextTree, cs, targetType]
;
for TypeExp.pointer: AbstractProduction [ Ordered, Base, PointerType ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of POINTER not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on POINTER types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on POINTER types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of POINTER not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on POINTER types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on POINTER types."]
;
for TypeExp.var: AbstractProduction [ TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of VAR not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on VAR types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on VAR types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of VAR not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on VAR types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on VAR types."]
;
for TypeExp.list: AbstractProduction [ ReadOnly, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of LIST not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on LIST types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on LIST types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of LIST not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on LIST types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on LIST types."]
;
for TypeExp.array: AbstractProduction [ Packed, OptType, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of ARRAY not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on ARRAY types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on ARRAY types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of ARRAY not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on ARRAY types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on ARRAY types."]
;
for TypeExp.descriptor: AbstractProduction [ ReadOnly, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of DESCRIPTOR not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on DESCRIPTOR types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on DESCRIPTOR types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of DESCRIPTOR not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on DESCRIPTOR types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on DESCRIPTOR types."]
;
for TypeExp.transfer: AbstractProduction [ Safe, TransferMode, Arguments ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of Transfer type not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on Transfer types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on Transfer types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of Transfer type not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on Transfer types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on Transfer types."]
;
for TypeExp.relative: AbstractProduction [ TypeId, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of RELATIVE not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on RELATIVE types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on RELATIVE types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of RELATIVE not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on RELATIVE types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on RELATIVE types."]
;
for TypeExp.zone: AbstractProduction [ Uncounted ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of ZONE not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on ZONE types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on ZONE types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of ZONE not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on ZONE types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on ZONE types."]
;
for TypeExp.long: AbstractProduction [ TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of LONG not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of LONG not implemented yet."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of LONG not implemented yet."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of LONG not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of LONG not implemented yet."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of LONG not implemented yet."]
;
for TypeExp.frame: AbstractProduction [ Id ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of FRAME not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on FRAME types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on FRAME types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of FRAME not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on FRAME types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on FRAME types."]
;
for TypeExp.painted: AbstractProduction [ TypeId, TypeExp ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of PAINTED not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on PAINTED types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on PAINTED types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of PAINTED not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on PAINTED types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on PAINTED types."]
;
for TypeExp.typeapply: AbstractProduction [ TypeApply ]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of TypeApply not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on TypeApply types."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on TypeApply types."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of TypeApply not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST is not a valid operation on TypeApply types."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST is not a valid operation on TypeApply types."]
;
for Subrange.named: AbstractProduction [TypeId, Interval]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of Named subrange not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of Named subrange not implemented yet."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of Named subrange not implemented yet."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of Named subrange not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of Named subrange not implemented yet."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of Named subrange not implemented yet."]
;
for Subrange.unnamed: AbstractProduction [Interval]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateSizeOfTypeExpression[Interval, lc, fl, cs, targetType]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateFirstOfTypeExpression[Interval, lc, fl, cs, targetType]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
EvaluateLastOfTypeExpression[Interval, lc, fl, cs, targetType]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileSizeOfTypeExpression[Interval, contextTree, cs, targetType]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileFirstOfTypeExpression[Interval, contextTree, cs, targetType]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
CompileLastOfTypeExpression[Interval, contextTree, cs, targetType]
;
for Interval.cc: AbstractProduction [Bounds]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
First[targetType]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
Last[targetType]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
First[targetType]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
Last[targetType]
;
for Interval.co: AbstractProduction [Bounds]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
First[targetType]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
Pred[Last[targetType]]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
First[targetType]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
Pred[Last[targetType]]
;
for Interval.oc: AbstractProduction [Bounds]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
Succ[First[targetType]]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
Last[targetType]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
Succ[First[targetType]]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
Last[targetType]
;
for Interval.oo: AbstractProduction [Bounds]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ←
Succ[First[targetType]]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ←
Pred[Last[targetType]]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of interval not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ←
Succ[First[targetType]]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ←
Pred[Last[targetType]]
;
for TypeId.id: AbstractProduction [Id]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of id not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← First[tgn]
where <access, tgn> ← DemandTypeDeclarationField[field2]
where field2 ← if FieldExists[field1]
then field1
else LookupNameInContextRib[Id, ParentRib[lc]]
where field1 ← LookupNameInFieldList[fl, Id]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← Last[tgn]
where <access, tgn> ← DemandTypeDeclarationField[field2]
where field2 ← if FieldExists[field1]
then field1
else LookupNameInContextRib[Id, ParentRib[lc]]
where field1 ← LookupNameInFieldList[fl, Id]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of id not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← First[tgn]
where <access, tgn> ← DemandTypeDeclarationField[field]
where field ← LookupNameInContextRib[Id, Rib[contextTree]]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← Last[tgn]
where <access, tgn> ← DemandTypeDeclarationField[field]
where field ← LookupNameInContextRib[Id, Rib[contextTree]]
;
for TypeId.qualifier: AbstractProduction [TypeId, Id]
let EvaluateSizeOfTypeExpression[tree, lc, fl, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of TypeId.qualifier not implemented yet."]
let EvaluateFirstOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of TypeId.qualifier not implemented yet."]
let EvaluateLastOfTypeExpression[tree, lc, fl, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of TypeId.qualifier not implemented yet."]
let CompileSizeOfTypeExpression[tree, contextTree, cs, targetType] ← DummyBigINT[]
where err ← Error["SIZE of TypeId.qualifier not implemented yet."]
let CompileFirstOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["FIRST of TypeId.qualifier not implemented yet."]
let CompileLastOfTypeExpression[tree, contextTree, cs, targetType] ← MakeDummy[""]
where err ← Error["LAST of TypeId.qualifier not implemented yet."]
;
End.