#2567 closed defect (invalid)
new rewrites don't seem to be working
Reported by: | Bill Janssen | Owned by: | probably noone |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: |
Description
I imagine I'm doing something wrong, but I can't seem to get the rewrites to work with dumpXMLDAE. Omc seems to be seeing them, but they don't show up in the XML.
% cat test.mo package test model rewrites Real x; equation x = abs(sin(time)); end rewrites; end test; % cat rewrites.txt rewrite(abs(x), if (x < 0) then -x else x); % cat test.mos loadLibrary(Modelica); loadFile("test.mo"); dumpXMLDAE(test.rewrites, "backEnd", addMathMLCode=true, fileNamePrefix="test.rewrites", rewriteRulesFile="rewrites.txt"); % omc test.mos true AST rule: abs(x) -> if x < 0 then -x else x (true,"/private/tmp/test/test.rewrites.xml") % grep abs test.rewrites.xml <equation id="1">x = abs(sin(time)) <abs/> %
Change History (2)
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Note:
See TracTickets
for help on using tickets.
My mistake. Bad syntax in the rewrite rule.