Changes between Version 5 and Version 6 of NewFrontEnd


Ignore:
Timestamp:
2017-01-26T01:20:12+01:00 (8 years ago)
Author:
adrpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewFrontEnd

    v5 v6  
    1 == New FrontEnd ==
     1= New FrontEnd =
    22
    33This page gathers all the information about the new front-end. See also #4138.
    44
    5 === Debugging ===
     5== Debugging ==
    66Whether you use MDT (make sure you keep it updated) or OMEdit you need to compile the source code with CFLAGS=-g to be able to debug the compiler.
    77Delete OMCompiler/Compiler/boot/build and then rebuild with CFLAGS=-g
    88
    9 === Implementation details ===
     9== Implementation details ==
    1010
    1111The new frontend is divided into multiple (mostly) separate phases.
     
    3434Also, the class tree and the instance tree are not actually separate trees, but rather one combined tree made up of InstNodes (e.g. each component knows its parent component, each components type knows its parent class, and so on).
    3535
    36 === Known issues ===
     36== Implementation directions ==
     37
     38=== Conditional Components ===
     39This needs evaluation of structural parameters to work to evaluate the condition.
     40The components can stay in place and they can be filtered out together with the connects they are involved in.
     41
     42=== Inner/Outer ===
     43The current front-end is handling the inner/outer via lookup and that poses problems with prefixing and handling of hierarchical inner outer.
     44Bernhard has suggested to define alias equations for the inner outer pairs at the appropriate level which will also maintain a bit of the
     45hierarchical structure to be analysed by the back-end.
     46
     47=== Functions ===
     48Instantiation and typing of functions is partially implemented.
     49We should extend the NFExpression.CALL to include a link to a unique inst node of the function that is to be called.
     50Positional arguments and named arguments are supported.
     51Vectorization of functions needs to be implemented.
     52Prefixing is not yet handled correctly.
     53Support for reductions needs to be implemented.
     54Some way of storing functions during the instantiation is needed so that they
     55end up in the DAE (we can probably use the component tree directly for this).
     56The back-end needs the function tree to partially evaluate functions.
     57
     58=== Records (Lennart & Mahder) ===
     59The instantiation will instantiate the records as normal classes.
     60Support for record constructors needs to be implemented, and other record things.
     61We should (maybe) add a new expression type NFExpression.RECORD_CONSTRUCTOR
     62which should (as function calls) include a link to a unique inst node of the
     63records that is to be called/constructed.
     64
     65=== Builtin ===
     66As much as possible support for builtin functions should be implemented via ModelicaBuiltin.mo file.
     67
     68=== Typing ===
     69Typing is partially implemented, but it needs to be expanded to handle all kinds of expressions and so on.
     70Care is needed to handle bindings so that cycles can be detected during the evaluation of structural parameters such as dimensions.
     71The binding have a isProcessing flag that can be set to detect cycles. On error all the components / bindings can be queried for this
     72flag to produce at least the components / bindings involved in the cycles.
     73
     74=== Type Checking ===
     75NFTypeCheck handles most of the type checking. NFFunction and NFRecord handle the type checking for functions respective records.
     76Type checking is currently called from typing but it could be performed as a separate phase (remains to be seen if is possible) 
     77
     78=== Connection Handling ===
     79Handling of connect equations will be performed on the DAE and the instance tree can be use for additional information.
     80Care is needed to handle in a scalable way:
     81* connection sets
     82* overconstrained connections (equalityConstraint type) and breakable branches
     83* expandable connectors
     84* inner/outer in the connection sets
     85
     86
     87=== Operator Overloading ===
     88The support for operator overloading from the current front-end (which was reimplemented by Martin for high scalability)
     89could be partially reused for the new front-end.
     90
     91=== Constant Evaluation ===
     92Constant evaluation of structural parameters (minimal) or any other constant/parameter bindings (not by default) should be included.
     93Care should be taken to NOT evaluate anything that is not needed so that optimization of certain parameters can be done in the runtime.
     94A new type of expression for the component reference that contains a link to the instantiated component can be use to do evaluation of bindings.
     95
     96=== Function Evaluation ===
     97This works in connection to Constant Evaluation.
     98To evaluate structural parameters one needs to (sometimes) evaluate functions.
     99The current front-end is using an environment to interpret functions. This might
     100not be needed for the new front-end as constant evaluation and substitution could
     101be used instead.
     102
     103=== Local balance checking ===
     104This has a connection to typing / type checking / constant evaluation.
     105This will check the balance checking for each model so that errors can be detected sooner.
     106We had no such support in the current front-end.
     107It is highly desired that the balance checking is done symbolically using expressions for
     108the number of equations and components. For the final check one could use constant evaluation
     109of these size expressions.
     110
     111== Known issues ==
    37112
    38113[[TicketQuery(status=accepted&status=assigned&status=new&status=reopened&component=~NF&group=priority&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority,format=table)]]