36 | | === Known issues === |
| 36 | == Implementation directions == |
| 37 | |
| 38 | === Conditional Components === |
| 39 | This needs evaluation of structural parameters to work to evaluate the condition. |
| 40 | The components can stay in place and they can be filtered out together with the connects they are involved in. |
| 41 | |
| 42 | === Inner/Outer === |
| 43 | The current front-end is handling the inner/outer via lookup and that poses problems with prefixing and handling of hierarchical inner outer. |
| 44 | Bernhard has suggested to define alias equations for the inner outer pairs at the appropriate level which will also maintain a bit of the |
| 45 | hierarchical structure to be analysed by the back-end. |
| 46 | |
| 47 | === Functions === |
| 48 | Instantiation and typing of functions is partially implemented. |
| 49 | We should extend the NFExpression.CALL to include a link to a unique inst node of the function that is to be called. |
| 50 | Positional arguments and named arguments are supported. |
| 51 | Vectorization of functions needs to be implemented. |
| 52 | Prefixing is not yet handled correctly. |
| 53 | Support for reductions needs to be implemented. |
| 54 | Some way of storing functions during the instantiation is needed so that they |
| 55 | end up in the DAE (we can probably use the component tree directly for this). |
| 56 | The back-end needs the function tree to partially evaluate functions. |
| 57 | |
| 58 | === Records (Lennart & Mahder) === |
| 59 | The instantiation will instantiate the records as normal classes. |
| 60 | Support for record constructors needs to be implemented, and other record things. |
| 61 | We should (maybe) add a new expression type NFExpression.RECORD_CONSTRUCTOR |
| 62 | which should (as function calls) include a link to a unique inst node of the |
| 63 | records that is to be called/constructed. |
| 64 | |
| 65 | === Builtin === |
| 66 | As much as possible support for builtin functions should be implemented via ModelicaBuiltin.mo file. |
| 67 | |
| 68 | === Typing === |
| 69 | Typing is partially implemented, but it needs to be expanded to handle all kinds of expressions and so on. |
| 70 | Care is needed to handle bindings so that cycles can be detected during the evaluation of structural parameters such as dimensions. |
| 71 | The binding have a isProcessing flag that can be set to detect cycles. On error all the components / bindings can be queried for this |
| 72 | flag to produce at least the components / bindings involved in the cycles. |
| 73 | |
| 74 | === Type Checking === |
| 75 | NFTypeCheck handles most of the type checking. NFFunction and NFRecord handle the type checking for functions respective records. |
| 76 | Type 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 === |
| 79 | Handling of connect equations will be performed on the DAE and the instance tree can be use for additional information. |
| 80 | Care 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 === |
| 88 | The support for operator overloading from the current front-end (which was reimplemented by Martin for high scalability) |
| 89 | could be partially reused for the new front-end. |
| 90 | |
| 91 | === Constant Evaluation === |
| 92 | Constant evaluation of structural parameters (minimal) or any other constant/parameter bindings (not by default) should be included. |
| 93 | Care should be taken to NOT evaluate anything that is not needed so that optimization of certain parameters can be done in the runtime. |
| 94 | A 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 === |
| 97 | This works in connection to Constant Evaluation. |
| 98 | To evaluate structural parameters one needs to (sometimes) evaluate functions. |
| 99 | The current front-end is using an environment to interpret functions. This might |
| 100 | not be needed for the new front-end as constant evaluation and substitution could |
| 101 | be used instead. |
| 102 | |
| 103 | === Local balance checking === |
| 104 | This has a connection to typing / type checking / constant evaluation. |
| 105 | This will check the balance checking for each model so that errors can be detected sooner. |
| 106 | We had no such support in the current front-end. |
| 107 | It is highly desired that the balance checking is done symbolically using expressions for |
| 108 | the number of equations and components. For the final check one could use constant evaluation |
| 109 | of these size expressions. |
| 110 | |
| 111 | == Known issues == |