@@ -6037,82 +6037,6 @@ algorithm
60376037 end matchcontinue;
60386038end generateDaeType;
60396039
6040- protected function transformDelayExpression
6041- "Insert a unique index into the arguments of a delay() expression.
6042- Repeat delay as maxDelay if not present."
6043- input tuple< DAE . Exp , Integer > inTuple;
6044- output tuple< DAE . Exp , Integer > outTuple;
6045- algorithm
6046- outTuple := matchcontinue(inTuple)
6047- local
6048- DAE . Exp e, e1, e2, e3;
6049- Integer i;
6050- list< DAE . Exp > l;
6051- Boolean t, b;
6052- DAE . ExpType ty;
6053- DAE . InlineType it;
6054- case ((DAE . CALL (Absyn . IDENT ("delay" ), {e1, e2}, t, b, ty, it), i))
6055- then ((DAE . CALL (Absyn . IDENT ("delay" ), {DAE . ICONST (i), e1, e2, e2}, t, b, ty, it), i + 1 ));
6056- case ((DAE . CALL (Absyn . IDENT ("delay" ), {e1, e2, e3}, t, b, ty, it), i))
6057- then ((DAE . CALL (Absyn . IDENT ("delay" ), {DAE . ICONST (i), e1, e2, e3}, t, b, ty, it), i + 1 ));
6058- case ((e, i)) then ((e, i));
6059- end matchcontinue;
6060- end transformDelayExpression;
6061-
6062- protected function transformDelayExpressions
6063- "Helper for processDelayExpressions()"
6064- input DAE . Exp inExp;
6065- input Integer inInteger;
6066- output DAE . Exp outExp;
6067- output Integer outInteger;
6068- algorithm
6069- ((outExp, outInteger)) := Expression . traverseExp(inExp, transformDelayExpression, inInteger);
6070- end transformDelayExpressions;
6071-
6072- public function processDelayExpressions
6073- "Assign each call to delay() with a unique id argument"
6074- input DAE . DAElist inDAE;
6075- input DAE . FunctionTree functionTree;
6076- output DAE . DAElist outDAE;
6077- output DAE . FunctionTree outTree;
6078- algorithm
6079- (outDAE,outTree) := matchcontinue(inDAE,functionTree)
6080- local
6081- DAE . DAElist dae, dae2;
6082- case (dae,functionTree)
6083- equation
6084- (dae,functionTree,_) = DAEUtil . traverseDAE(dae, functionTree, transformDelayExpressions, 0 );
6085- then
6086- (dae,functionTree);
6087- end matchcontinue;
6088- end processDelayExpressions;
6089-
6090- protected function collectDelayExpressions
6091- "Put expression into a list if it is a call to delay().
6092- Useable as a function parameter for Expression.traverseExpression."
6093- input tuple< DAE . Exp , list< DAE . Exp >> inTuple;
6094- output tuple< DAE . Exp , list< DAE . Exp >> outTuple;
6095- algorithm
6096- outTuple := matchcontinue(inTuple)
6097- local
6098- DAE . Exp e;
6099- list< DAE . Exp > l;
6100- case ((e as DAE . CALL (path = Absyn . IDENT ("delay" )), l))
6101- then ((e, e :: l));
6102- case ((e, l)) then ((e, l));
6103- end matchcontinue;
6104- end collectDelayExpressions;
6105-
6106- public function findDelaySubExpressions
6107- "Return all subexpressions of inExp that are calls to delay()"
6108- input DAE . Exp inExp;
6109- input list< Integer > inDummy "this is a dummy for traverseDAELowExps" ;
6110- output list< DAE . Exp > outExps;
6111- algorithm
6112- ((_, outExps)) := Expression . traverseExp(inExp, collectDelayExpressions, {});
6113- end findDelaySubExpressions;
6114-
6115-
61166040public function generateCrefsExpFromType "
61176041Author: Frenkel TUD 2010-05"
61186042 input DAE . ExpVar inVar;
0 commit comments