Opened 14 years ago

Last modified 14 years ago

#1299 closed defect (fixed)

instantiateDaeFunction() and infinite loops

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: blocker Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund, Martin Sjölund

Description

There is a problem with the way instantiateDaeFunction breaks loops - lookupClass needs to succeed in order for it to work!
We need to store the tuple (SOME(getEnvPath()),name) (NONE(),fqname) instead of only fqname (or create getEnvPath()+"$+$"+name, or similar name mangling if we want to keep the old hashtable). This so we can at least break the loop if we are in the same scope as the last time.

For examples, try checkModel(Modelica.Media) or (at least not working right now) {{{
loadFile("../../Compiler/Absyn.mo");
loadFile("../../Compiler/Dump.mo");
loadFile("../../Compiler/DumpGraphviz.mo");
loadFile("../../Compiler/Graphviz.mo");
loadFile("../../Compiler/Print.mo");
loadFile("../../Compiler/System.mo");
loadFile("../../Compiler/Util.mo");

prog:=Absyn.PROGRAM({},Absyn.TOP(),Absyn.TIMESTAMP(0.0,0.0));
DumpGraphviz.dump(prog);
}}}

Change History (3)

comment:1 by Martin Sjölund, 14 years ago

I think I found out where this crap happens... It's not because the cache is not used... It's that prefixToCref sends an empty cache!

comment:2 by Martin Sjölund, 14 years ago

Or I'm totally wrong... I just assumed the hashtable in the cache was mutable.
It is not!

comment:3 by Martin Sjölund, 14 years ago

This should be working now (the testsuite works fully in the branch, and the FunctionTree was made mutable). Needs a little bit more testing though.

Note: See TracTickets for help on using tickets.