Opened 7 years ago

Closed 3 years ago

#4138 closed task (fixed)

New FrontEnd

Reported by: perost Owned by: perost
Priority: blocker Milestone: 1.17.0
Component: New Instantiation Version:
Keywords: Cc: mahge930, adrpo

Description (last modified by casella)

This ticket is tracking the progress on the the new frontend. Some documentation on the new frontend development is available on wiki:NewFrontEnd.

The new frontend development is almost complete. It is used by default by OMEdit (with the old frontend as fallback in case of problems) since version 1.14.0, and already delivers better performance than the old frontend in almost all cases. It will be the default one also for the command line compiler from version 1.17.0.

All 425 models of the MSL are handled successfully by the new front end, see report. There are a handful of models which are not handled correctly yet, but that is not due to the new frontend, see #5288.

The coverage with some other selected open-source library is reported in these diagrams. Note that until 14 Dec 2020 the libraries were tested with the old frontend:

https://libraries.openmodelica.org/branches/history/master/PlanarMechanics.svg

https://libraries.openmodelica.org/branches/history/master/PNlib.svg

https://libraries.openmodelica.org/branches/history/master/Buildings_latest.svg

https://libraries.openmodelica.org/branches/history/master/HanserModelica.svg

https://libraries.openmodelica.org/branches/history/master/PowerSystems.svg

https://libraries.openmodelica.org/branches/history/master/ThermoPower.svg

https://libraries.openmodelica.org/branches/history/master/ThermoSysPro.svg

This is a list of all tickets opened for the new frontend (New Instantiation module). Note that tickets with id > 4000 were opened specifically during the development of the new front end, while older ones refer to old issues with the old front end that are expected to be fixed by the new one.

Number of tickets: 57

Milestone: 1.19.0 (2 matches)

Ticket Summary Status Owner Type Priority Version
#2447 Let OM automatically load packages as specified in import statements reopened perost enhancement high trunk
#6126 Error while compiling wind turbine model from PowerSystems library assigned perost defect blocker

Milestone: 2.0.0 (22 matches)

Ticket Summary Status Owner Type Priority Version
#2385 Missing variable declarations in instantiated model when using expandable connectors reopened adrpo defect high trunk
#2387 Operator overloading fails for matrices assigned perost defect high trunk
#2484 Expandable connector resolution misses components assigned perost defect blocker trunk
#3186 Partial binding of record sub-components in functions are lost assigned perost defect critical trunk
#3221 Equation count of models containing expandable connectors assigned mahge930 defect normal trunk
#3977 Better diagnostics for non-balanced models new lochel enhancement blocker
#4120 Out-of-bounds array elements undetected by front-end assigned perost defect blocker
#4442 Incorrect evaluation of inner/outer and record dependencies assigned perost defect high v1.11.0
#4496 Complex 'sum' does not work assigned perost defect blocker
#4515 Automatic inference of nominal attributes for scaling new perost discussion high
#4960 Evaluate all parameters except some new perost enhancement high
#5061 [NF] Are public parameters allowed in functions by the Modelica spec? new perost defect high
#5240 NFEvalFunction.evaluateExternal is not yet implemented reopened perost defect blocker
#5597 Two examples of the new Modelica.Electrical.Batteries package do not work with the new frontend new perost defect blocker v1.14.0-dev-nightly
#5605 Parameter with only start value not accepted new perost defect blocker
#5837 Unit checking is not performed on operator record equations new perost defect blocker
#5847 Constant is used without having been given a value new perost defect blocker v1.16.0-dev
#5866 Update Save Total to NF new perost defect blocker
#6047 The NF incorrectly infers the variability of a function call in Modelica.Media new perost defect blocker
#6114 Unit checking scales with O(2^N) in case of large expressions involving +-*/ operators assigned perost defect normal v1.16.0-dev
#6149 The NF accepts illegal type declarations? new perost defect blocker
#6383 Omc doesn't check correctly the constraining-clause new perost defect blocker 1.18.0-dev

Milestone: 2.1.0 (14 matches)

Ticket Summary Status Owner Type Priority Version
#1080 Constraining type on redeclarations (from MathCore) new krsta defect normal trunk
#1842 Illegal redeclare should be rejected by the NF with appropriate error message assigned perost defect high
#2010 Prefix rules needs more work in new instantiation new perost defect high trunk
#2153 Better analysis for function completion new perost defect high trunk
#2276 detecting size mismatch for output arguments in functions reopened somebody defect normal trunk
#3121 Missing bindings in flattened operator overloading example assigned perost defect low trunk
#4843 NF doesn't evaluate size expression of function input parameters new perost defect normal v1.13.0-dev-nightly
#4901 The NF does not check if redeclared functions are legal new perost defect high
#4905 Restriction on input connection is not enforced by OMC assigned perost defect high
#5178 Incorrect Warning - not balanced connector reopened perost defect normal
#5334 Check for wrong annotations new perost enhancement high
#5545 Improve diagnostics for wrong connectors new perost enhancement high
#5667 Arrays of records insufficiently type checked new perost defect high v1.14.0-dev-nightly
#6163 Constrainedby clause not verified by the NF new perost defect high

Milestone: Future (6 matches)

Ticket Summary Status Owner Type Priority Version
#1747 Implement checks for all connection rules in chapter 9 new perost task low
#2367 Record with vectors, zeros(), size() accepted adrpo defect high trunk
#4648 Add support for annotation for turning off replaceable check new perost enhancement normal v1.13.0-dev-nightly
#4908 [NF] Issues with inner/outer with redeclare new perost defect high
#5579 New Frontend does not check for circular dependencies in parameter bindings new perost defect high
#5688 Use of removed conditional component not reported new perost defect normal

Milestone: None (13 matches)

Ticket Summary Status Owner Type Priority Version
#1939 Duplicate class detection not working when loading MSL reopened perost defect normal trunk
#4526 Propagate displayUnits on simple equations new mahge930 enhancement high
#4603 Provide support for start-value selection according to the Modelica Specification assigned Karim.Abdelhak defect high
#5474 [NF] Lookup of inner class fails new perost defect high
#5598 redeclaration of input as output with NF assigned perost discussion normal v1.14.0-dev-nightly
#5730 Issue with operator record constructors in NF new perost defect high
#5852 getCommandLineOptions fails with newInst new perost defect normal v1.16.0-dev
#6213 Lookup in wrong scope when redeclaring function field in a function accepted perost defect high v1.17.0-dev
#6293 Function non-inputs are initialized in the wrong order new perost defect low v1.17.0-dev
#6325 Support for ExternData assigned perost defect high 1.16.0
#6373 Electrical Quasistationary MutualInductor in standard library not working in OM assigned perost defect critical 1.16.2
#6390 Cannot extend from RealOutput new perost defect low 1.16.2
#6423 Optionally list all empty connection sets new perost enhancement high 1.16.2


Attachments (1)

P.mo (729 bytes) - added by casella 7 years ago.

Download all attachments as: .zip

Change History (91)

comment:1 Changed 7 years ago by perost

  • Cc mahge930 adrpo added

comment:2 Changed 7 years ago by perost

  • Description modified (diff)

comment:3 Changed 7 years ago by perost

  • Description modified (diff)

comment:4 follow-ups: Changed 7 years ago by casella

Still some problems with component modifiers. Running the following test script

loadString("
package P
  model A
    parameter Real p;
  end A;
  model B
    parameter Real q = 2;
    A a1(p = q);
  end B;
  model C
    parameter Real q = 2;
    A a1(p = q);
    A a2(p = q);
  end C;
end P;
");
setCommandLineOptions("-d=newInst");
instantiateModel(P.B);
instantiateModel(P.C);

returns

true
true
"class B
  parameter Real q = 2;
  parameter Real a1.p = q;
end B;
"
""

so for some reason model C is not instantiated at all.

comment:5 in reply to: ↑ 4 ; follow-up: Changed 7 years ago by perost

Replying to casella:

Still some problems with component modifiers.

I am well aware of that, and have already fixed this particular issue locally a while ago. At the moment I'm not really interested in bug reports though, the new instantiation is not ready for public testing yet.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 7 years ago by casella

Replying to perost:

At the moment I'm not really interested in bug reports though, the new instantiation is not ready for public testing yet.

Q1: Can you give a reasonable estimate of when this will be possible?

Q2: Is the interface towards the other tasks of Phase 2 already stabilized? If not, when will it reasonably be?

comment:7 in reply to: ↑ 6 Changed 7 years ago by perost

Replying to casella:

Q1: Can you give a reasonable estimate of when this will be possible?

No

Q2: Is the interface towards the other tasks of Phase 2 already stabilized? If not, when will it reasonably be?

Maybe

comment:8 Changed 7 years ago by perost

Class modifiers have been implemented now, but needs more testing.

comment:9 in reply to: ↑ 4 Changed 7 years ago by casella

The test case reported in comment:4 now produces the expected result

comment:10 follow-up: Changed 7 years ago by casella

However, instantiating P.S in the attached test case still fails

Changed 7 years ago by casella

comment:11 in reply to: ↑ 10 ; follow-up: Changed 7 years ago by perost

Replying to casella:

However, instantiating P.S in the attached test case still fails

It works fine for me, are you using the latest nightly build?

comment:12 in reply to: ↑ 11 Changed 7 years ago by casella

Replying to perost:

Replying to casella:

However, instantiating P.S in the attached test case still fails

It works fine for me, are you using the latest nightly build?

I thought so, but I wasn't. With OpenModelica-v1.11.0-dev-288-g2ccad20-64bit, it works fine for me also :)

comment:13 Changed 7 years ago by perost

  • Description modified (diff)

comment:14 Changed 7 years ago by perost

  • Description modified (diff)

comment:15 Changed 7 years ago by adrpo

  • Component changed from *unknown* to NF - New FrontEnd
  • Description modified (diff)

comment:16 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:17 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:18 Changed 7 years ago by adrpo

  • Description modified (diff)
  • Summary changed from NF core to New FrontEnd

comment:19 Changed 7 years ago by adrpo

  • Milestone changed from Future to 2.0.0
  • Priority changed from high to blocker
  • Type changed from defect to task

comment:20 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:21 Changed 7 years ago by perost

  • Description modified (diff)

Initial support for enumerations is now implemented.

Last edited 7 years ago by perost (previous) (diff)

comment:22 Changed 7 years ago by casella

  • Description modified (diff)

Added link to wiki page

comment:23 Changed 7 years ago by adrpo

  • Description modified (diff)

Small status update.

comment:24 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:25 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:26 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:27 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:28 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:29 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:30 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:31 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:32 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:33 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:34 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:35 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:36 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:37 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:38 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:39 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:40 follow-ups: Changed 7 years ago by casella

I just tried out ScalableTestSuite.Elementary.SimpleODE.Models.CascadedFirstOrder:

model CascadedFirstOrder
  parameter Integer N = 10 "Order of the system";
  parameter Modelica.SIunits.Time T = 1 "System delay";
  final parameter Modelica.SIunits.Time tau = T/N "Individual time constant";
  Real x[N] (each start = 0, each fixed = true);
equation
  tau*der(x[1]) = 1 - x[1];
  for i in 2:N loop
    tau*der(x[i]) = x[i-1] - x[i];
  end for;
end CascadedFirstOrder;

but it still doesn't work, I get

Error: Type mismatch for positional argument 1 in der(x=x[1]).
The argument has type: Real[10]
expected type: Real

This is a very basic model, and it doesn't use arrays in any fancy way. This error looks to me more like a bug than a missing feature.

Would you mind fixing this issue so we can start getting some results from testing the ScalableTestSuite with the new front-end?

Thanks

Francesco

comment:41 in reply to: ↑ 40 Changed 7 years ago by perost

Replying to casella:

This is a very basic model, and it doesn't use arrays in any fancy way. This error looks to me more like a bug than a missing feature.

Subscripting is not implemented yet, so it is actually a missing feature. It's high up on my todo list, but other things currently has higher priority for me.

comment:42 Changed 7 years ago by casella

OK. I interpreted "Subscripting needs to be improved" as "there is already some subscripting implemented" :)

comment:43 Changed 7 years ago by mahge930

  • Description modified (diff)

comment:44 Changed 7 years ago by perost

  • Description modified (diff)

Updated description for redeclares (better in general, but class extends/element redeclares currently broken) and imports.

comment:45 in reply to: ↑ 40 Changed 7 years ago by perost

Replying to casella:

Would you mind fixing this issue so we can start getting some results from testing the ScalableTestSuite with the new front-end?

This model should start working in about five minutes, once Hudson pulls in my latest changes.

comment:46 Changed 7 years ago by casella

Very good!

comment:47 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:48 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:49 Changed 7 years ago by perost

  • Description modified (diff)

comment:50 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:51 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:52 Changed 7 years ago by perost

  • Description modified (diff)

comment:53 Changed 7 years ago by perost

  • Description modified (diff)

comment:54 Changed 7 years ago by perost

  • Component changed from NF - New FrontEnd to New Instantiation

Move all tickets from NF - New Frontend to New Instantiation so we don't have two different categories for the same thing.

comment:55 Changed 7 years ago by adrpo

  • Description modified (diff)

comment:56 Changed 7 years ago by casella

  • Description modified (diff)

comment:57 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:58 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:59 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:60 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:61 Changed 6 years ago by perost

  • Description modified (diff)

comment:62 Changed 6 years ago by perost

  • Description modified (diff)

comment:63 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:64 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:65 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:66 Changed 6 years ago by mahge930

  • Description modified (diff)

comment:67 Changed 6 years ago by perost

  • Description modified (diff)

comment:68 Changed 6 years ago by perost

  • Description modified (diff)

comment:69 Changed 6 years ago by perost

  • Description modified (diff)

comment:70 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:71 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:72 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:73 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:74 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:75 Changed 6 years ago by casella

  • Description modified (diff)

comment:76 Changed 6 years ago by casella

  • Description modified (diff)

comment:77 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:78 Changed 6 years ago by adrpo

  • Description modified (diff)

Overconstrained connection graph is now implemented via #4966.

comment:79 Changed 6 years ago by adrpo

  • Description modified (diff)

comment:80 Changed 5 years ago by casella

  • Description modified (diff)

comment:81 Changed 5 years ago by casella

  • Description modified (diff)

comment:82 Changed 5 years ago by casella

  • Description modified (diff)

comment:83 Changed 5 years ago by casella

  • Description modified (diff)

comment:84 Changed 4 years ago by casella

  • Description modified (diff)

comment:85 Changed 4 years ago by casella

Status update as of 24 Sep 2020.

The new front end development continues, the functionality of this module has now overcome the old front end, which is now starting to become obsolete.

The new front end is already the default choice in OMEdit since version 1.14.0, with automatic fallback to the old frontend in case of problems. The command line version of the compiler still uses the old frontend as default, and requires the --newInst flag to use the new one. The plan is to make the new front end the default choice also from the command line starting with version 1.17.0, due December 2020.

The fallback option will probably be removed from OMEdit at that point, because it will mostly be advising users to try the old front end in response to models which are in fact broken. Users that will still need to use the old frontend with their models will be able to do that by setting the option in the simulation settings window. However, please note that the old frontend has no longer been maintained since 2019.

Last edited 4 years ago by casella (previous) (diff)

comment:86 Changed 3 years ago by casella

Status update as of Dec 21 2020.

The new frontend was made the default on 14 Dec 2020. There are several regressions w.r.t. the old frontend on older libraries, because they contain invalid Modelica code. Those will not be addressed. Regressions in the latest versions of currently maintained libraries should be fixed in time for the 1.17.0 release.

comment:87 Changed 3 years ago by casella

  • Description modified (diff)

comment:88 Changed 3 years ago by casella

  • Description modified (diff)

comment:89 Changed 3 years ago by casella

This regression report shows the difference between the old and the new frontend.

There are 1000 improvements in the library testsuite, due to the better capability of the new frontend to handle complex Modelica models, and also 1432 performance improvements, due to the much faster operation of the new front end compared to the old one.

There are 673 regressions, mostly in older libraries that contain illegal Modelica code that the new front end rejects because of its stricter policy of conformance to the Modelica specification.

Last edited 3 years ago by casella (previous) (diff)

comment:90 Changed 3 years ago by casella

  • Milestone changed from 2.0.0 to 1.17.0
  • Resolution set to fixed
  • Status changed from new to closed

The new front end becomes the default one with release 1.17.0, -d=newInst is no longer necessary to use it. All test reports now use it, except the oldInst branch.

The development continues, but the transition phase from the old front-end to the new one is now complete, regarding the compilation of simulation models.

The old front end is still used for bootstrapping and for most API functions. Regarding the former, there is currently no urgent need to supersede it. Regarding the latter, the API functions should gradually be switched to use the old one, for much faster performance. This has already been done in some critical cases, the work will continue there.

With release 1.17.0, we can close this ticket for good.

Note: See TracTickets for help on using tickets.