Changeset 09fafda9 in OpenModelica for Compiler/FrontEnd/DAEDump.mo


Ignore:
Timestamp:
2012-11-20T09:31:27+01:00 (11 years ago)
Author:
Adrian Pop <adrian.pop@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
2c58d767
Parents:
8929a65
Message:
  • print more info on +d=showEquationSource
  • add more info from where the unconnected flow comes (add Element info to added inside flow) to get nicer +d=showEquationSource display.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13980 f25d12d1-65f4-0310-ae8a-bbce733d8d8e

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/FrontEnd/DAEDump.mo

    r7ecfb70f r09fafda9  
    39413941      equation
    39423942        str = cmtListToString(cmt);
    3943         str = str +& " /* models: " +& stringDelimitList(List.map(po, withinString), ", ") +& " */";
     3943        str = str +& " /* models: {" +& stringDelimitList(List.map(po, withinString), ", ") +& "}" +&
     3944                     " connects: {" +& stringDelimitList(connectsStr(ceol), ", ") +& "} */";
    39443945      then
    39453946        str;
    39463947  end matchcontinue;
    39473948end getSourceInformationStr;
     3949
     3950protected function connectsStr
     3951  input list<Option<tuple<DAE.ComponentRef, DAE.ComponentRef>>> inLst;
     3952  output list<String> outStr;
     3953algorithm
     3954  outstr := matchcontinue(inLst)
     3955    local
     3956      list<Option<tuple<DAE.ComponentRef, DAE.ComponentRef>>> rest;
     3957      list<String> slst;
     3958      String str;
     3959      DAE.ComponentRef c1, c2;
     3960     
     3961    case ({}) then {};
     3962   
     3963    case ({NONE()}) then {};
     3964   
     3965    case ({SOME((c1,c2))})
     3966      equation
     3967        str = ComponentReference.printComponentRefStr(c1) +& "," +&
     3968              ComponentReference.printComponentRefStr(c2);
     3969        str =  "connect(" +& str +& ")";
     3970      then
     3971        {str};
     3972   
     3973    case (SOME((c1,c2))::rest)
     3974      equation
     3975        str = ComponentReference.printComponentRefStr(c1) +& "," +&
     3976              ComponentReference.printComponentRefStr(c2);
     3977        str =  "connect(" +& str +& ")";
     3978        slst = connectsStr(rest);   
     3979      then
     3980        str::slst;
     3981   
     3982    case (NONE()::rest)
     3983      equation
     3984        slst = connectsStr(rest);   
     3985      then
     3986        slst;
     3987 
     3988  end matchcontinue;
     3989end connectsStr;
    39483990
    39493991protected function withinString
Note: See TracChangeset for help on using the changeset viewer.