Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mcp/0031 extend road map with prototyping plan #3222

Closed
wants to merge 326 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
326 commits
Select commit Hold shift + click to select a range
81677b4
Put back 'class-definition' in 'normal-element' until we have a repla…
henrikt-ma Jan 7, 2020
84c271b
Don't allow array dimensions to be declared after component identifier
henrikt-ma Jan 7, 2020
4f01282
Swap the order of 'type-specifier' and 'array-subscripts'
henrikt-ma Jan 7, 2020
72ef6f7
Add PR links for roadmap item 'Decide on just one way to specify arra…
henrikt-ma Jan 7, 2020
965e7aa
Remove unused rule 'short-class-definition'
henrikt-ma Jan 7, 2020
cbef4d3
Fix more markdown syntax errors
henrikt-ma Jan 7, 2020
d357758
Remove uses of removed production rules 'element-redeclaration' and '…
henrikt-ma Jan 7, 2020
537d1b9
Fix typo
henrikt-ma Jan 7, 2020
c414610
Add roadmap links for 'Settle the top level structure'
henrikt-ma Jan 7, 2020
927e0e0
Merge pull request #2465 from modelica/MCP/0031+irrelevant-grammar
henrikt-ma Jan 9, 2020
adce150
Update ReadMe.md
olivleno Jan 9, 2020
de226e4
Minor cleanup
henrikt-ma Jan 9, 2020
cd2a92e
Initial commit of differences.md with some placeholder sections
henrikt-ma Jan 9, 2020
8187539
Try to fix markdown syntax for relative file links
henrikt-ma Jan 9, 2020
6281115
Fix markup of production rule name
henrikt-ma Jan 9, 2020
8f40533
More production rule name markup
henrikt-ma Jan 9, 2020
c96fc63
Remove the 'flat_model' class prefix
henrikt-ma Jan 9, 2020
355055e
Remove support for user-defined overloaded operators
henrikt-ma Jan 7, 2020
03d2e4d
Place functions and type definitions before the flat model definition
henrikt-ma Jan 7, 2020
93f3e63
Allow left side of alternative operator in grammar to be omitted
henrikt-ma Jan 9, 2020
40dce6b
Reorder and cleanup the 'class-prefixes' rule for improved readability
henrikt-ma Jan 9, 2020
094f5f8
Merge pull request #2469 from modelica/MCP/0031+top-level-structure
henrikt-ma Jan 9, 2020
8edc0a6
Update differences.md
HansOlsson Jan 13, 2020
1046c68
Adding roadmap item for more general array subscripting
henrikt-ma Jan 16, 2020
2af3a74
Update ReadMe.md
olivleno Jan 16, 2020
c0c4384
Update differences.md
HansOlsson Jan 16, 2020
c1c1659
Merge pull request #2470 from modelica/HansOlsson-patch-2
HansOlsson Jan 20, 2020
10a3499
Description of handling of unknown dimensions
gkurzbach Jan 28, 2020
8309d5b
array dimensions with `parameter` variability outside of functions ar…
gkurzbach Jan 29, 2020
6732af3
Adding roadmap item for more general array subscripting
henrikt-ma Jan 16, 2020
96ebe06
Change the Flat Modelica version number that we are currently working…
henrikt-ma Jan 30, 2020
08d8110
Restrict 'constant expression' to ensure possibility to evaluate at t…
henrikt-ma Feb 2, 2020
d02286d
Add roadmap item for restricted definition of 'constant expression'
henrikt-ma Feb 2, 2020
6896de9
Handle impure function calls in parameter binding equations by means …
henrikt-ma Feb 3, 2020
38d9c94
Fix markdown table syntax
henrikt-ma Feb 3, 2020
7dedd78
Change 'pure constant' to be an explicitly declared property
henrikt-ma Feb 13, 2020
f44cf86
Withdraw changes to definitions of discrete-time and continuous-time …
henrikt-ma Feb 13, 2020
09f7975
Merge pull request #2473 from modelica/MCP/0031+constant-expression
olivleno Mar 11, 2020
2f563cb
Update ReadMe.md
olivleno Mar 11, 2020
5c0fc36
Add road map item links for PR 2471
henrikt-ma Mar 11, 2020
da0cc88
Add roadmap links for PR 2513
henrikt-ma Mar 11, 2020
cb2b472
Remove trailing whitespace
henrikt-ma Mar 16, 2020
af31af2
More restrictions related to array sizes
henrikt-ma Mar 16, 2020
3bd45e7
Update ReadMe.md
olivleno Mar 27, 2020
72d227e
Modelica functions and operators in Flat Modelica (#2513)
sjoelund Mar 27, 2020
09969d4
Update ReadMe.md
olivleno Mar 27, 2020
9ba97ae
Relax restrictions on function signatures and introduce 'constsize'
henrikt-ma Mar 29, 2020
4855b2b
Merge remote-tracking branch 'origin/MCP/0031' into MCP/0031+dimensio…
henrikt-ma Apr 1, 2020
3807c51
Clarify current limitations of 'constsize'
henrikt-ma Apr 8, 2020
417d45b
Clarify that flexible size on left hand side of array assignment is n…
henrikt-ma Apr 8, 2020
11e716c
Clean up trailing whitespace and tabs
henrikt-ma Apr 8, 2020
ec939dd
Fix minor markdown confusion about underscore
henrikt-ma Apr 8, 2020
8c370c0
Update ReadMe.md
olivleno Apr 9, 2020
193f738
Update ReadMe.md
olivleno Apr 15, 2020
abb5312
Merge branch 'MCP/0031' into MCP/0031+unknown-dimension
henrikt-ma Apr 16, 2020
7a93dbe
Merge pull request #2471 from modelica/MCP/0031+unknown-dimension
henrikt-ma Apr 16, 2020
0015b6d
Break out and extend rationale document for 'constsize'
henrikt-ma Apr 16, 2020
8ca183e
Fix typos and extend 'constsize' example
henrikt-ma Apr 16, 2020
f8857b2
Change design document links for completed roadmap items
henrikt-ma Apr 16, 2020
1c6d981
Fix names of markdown anchors
henrikt-ma Apr 16, 2020
6b67e24
Fix markdown syntax
henrikt-ma Apr 16, 2020
eb1336a
Update grammar.md (#2540)
HansOlsson Apr 20, 2020
ba357c2
Minor cleanup of roadmap
henrikt-ma Apr 22, 2020
7ac5fd4
Replace broken PR link with textual reference
henrikt-ma Apr 22, 2020
d0cec65
Minor cleanup of roadmap
henrikt-ma Apr 22, 2020
442023c
First commit of design alternatives for type aliases
henrikt-ma Apr 27, 2020
8623396
Add links for roadmap item on type aliases
henrikt-ma Apr 27, 2020
c13cdf0
Update type-aliases.md
olivleno Apr 28, 2020
9b27856
Clarify purpose of record alias example
henrikt-ma Apr 29, 2020
004d7c1
Update differences.md
olivleno Apr 29, 2020
ee4de8a
Update ReadMe.md
olivleno Jun 16, 2020
5ff52d9
Get rid of 'each'
henrikt-ma Jun 16, 2020
9dcf82f
Slight clarification of why we would like to reintroduce 'each' in th…
henrikt-ma Jun 16, 2020
cd60296
Add roadmap link to PR #2583
henrikt-ma Jun 16, 2020
615039b
Explain input output preservation
HansOlsson Jun 17, 2020
3167b1d
Merge pull request #2586 from HansOlsson/InputOutputTop
HansOlsson Aug 4, 2020
ced3ebe
Merge branch 'MCP/0031' into 0031+get-rid-of-each
henrikt-ma Aug 4, 2020
21661f3
Merge pull request #2583 from henrikt-ma/0031+get-rid-of-each
henrikt-ma Aug 4, 2020
4a7aa3e
Tick off "Allowing array subscripting on general expressions" as done
henrikt-ma Aug 13, 2020
83a7ded
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+Modific…
henrikt-ma Sep 24, 2020
15c7acf
Write down decisions made so far regarding modifications
henrikt-ma Sep 24, 2020
7ec5005
Say "model component declaration"
henrikt-ma Oct 1, 2020
c1075d8
Break down sentence into item list
henrikt-ma Oct 1, 2020
3db3785
Reorder and expand items
henrikt-ma Oct 1, 2020
4622ec2
Clarify "model component declaration"
henrikt-ma Oct 1, 2020
53661fa
Fix typo
henrikt-ma Oct 1, 2020
fdeb565
Apply same restrictions to modifications in functions as in records
henrikt-ma Oct 1, 2020
b1875bd
Update ReadMe.md
olivleno Oct 9, 2020
240e354
Fix minor language mistake
henrikt-ma Oct 9, 2020
7dfe969
Fix another language mistake
henrikt-ma Oct 9, 2020
cb24233
Fix typo
henrikt-ma Oct 9, 2020
242a99e
Initial commit of section 'Variability in record member declaration'
henrikt-ma Oct 28, 2020
bae169d
Add roadmap item for variability in record member declaration
henrikt-ma Oct 28, 2020
f434288
Add links for roadmap item 'Simplify modifications'
henrikt-ma Oct 28, 2020
f1f5891
Rules and two examples of variability-constrained types
henrikt-ma Nov 5, 2020
76de62a
Fix GitHub markdown document links
henrikt-ma Nov 5, 2020
07c234e
Fix typo
henrikt-ma Nov 5, 2020
469fca5
Add subsection for another example to be completed later
henrikt-ma Nov 5, 2020
85d5f16
Minor cleanup
henrikt-ma Nov 13, 2020
3801498
Add missing semicolons
henrikt-ma Nov 13, 2020
46fca97
Clarify declaration of parameter having variability-free type
henrikt-ma Nov 13, 2020
d905098
Fix typo
henrikt-ma Nov 13, 2020
80e69d1
One more clarification that type of parameter is variability-free
henrikt-ma Nov 17, 2020
5503860
Merge pull request #2694 from modelica/MCP/0031+record-member-variabi…
henrikt-ma Nov 17, 2020
acad5e8
Describe current state of top level structure in differences.md
henrikt-ma Dec 3, 2020
e96b86e
Allow top level constants to initiate discussion
henrikt-ma Dec 3, 2020
8738da6
Add roadmap item 'Make constants available to types'
henrikt-ma Dec 3, 2020
03c6d3a
Fix swapped links in previous commit
henrikt-ma Dec 3, 2020
7d75b70
Merge remote-tracking branch 'central/MCP/0031+Modifications' into MC…
henrikt-ma Dec 3, 2020
d3a12ad
Adding empty section 'Value modification' to differences.md
henrikt-ma Dec 3, 2020
d340b16
Add roadmap item 'Simplify value modification'
henrikt-ma Dec 3, 2020
77ddbe3
Initiate section on 'Final modification'
henrikt-ma Dec 3, 2020
747856a
Add roadmap item 'Express final modification'
henrikt-ma Dec 3, 2020
3e6640d
Remaining parts of 'Simplify modifications' are covered by other items
henrikt-ma Dec 3, 2020
afa1a20
Mark 'Get rid of record member variability…' as done
henrikt-ma Dec 3, 2020
6f397bb
Use grammar to restrict global constants and add semicolons
henrikt-ma Dec 9, 2020
e7dd33f
Wrap all top level definitions in a package
henrikt-ma Dec 9, 2020
59dd168
Merge branch 'MCP/0031+top-level-structure' into MCP/0031
henrikt-ma Dec 10, 2020
32807c1
Mark 'Make constants available to types' as done
henrikt-ma Dec 10, 2020
1919df4
Add IP protection as use case
henrikt-ma Jan 21, 2021
1bbd1f0
Add roadmap item for getting rid of 'protected'
henrikt-ma Mar 24, 2021
e898d0e
Untick "Get rid of conditional components" in roadmap
henrikt-ma Apr 13, 2021
b415c1e
Try to write down design according to current state of discussion
henrikt-ma Apr 13, 2021
c473d9e
Some notes on arrays and records
henrikt-ma Apr 14, 2021
ee89be1
Merge remote-tracking branch 'central/master' into MCP/0031
henrikt-ma Apr 14, 2021
a51e7eb
Merge branch 'MCP/0031' into MCP/0031+final-modification
henrikt-ma Apr 14, 2021
d7a9fe3
Generalize use of 'each' to work for guess value parameters
henrikt-ma Apr 14, 2021
be01af5
Don't forget about 'nominal'
henrikt-ma Apr 14, 2021
fa53a88
Remove stray words from sentence
henrikt-ma Jun 7, 2021
88a3b80
Remove addressed "TODO"
henrikt-ma Jun 7, 2021
e4cc354
Describe handling of heterogeneous modification of 'fixed'
henrikt-ma Jun 7, 2021
9b03703
Describe handling of homogeneous modification of 'fixed'
henrikt-ma Jun 7, 2021
3af6da6
Fix minor copy/paste error
henrikt-ma Jun 7, 2021
d7760c1
Add discussion about ways to handle guess value prioritization
henrikt-ma Jun 7, 2021
756996c
Make variant with array subscript applied outside guess operator
henrikt-ma Jun 8, 2021
5d28fec
Note that record constructor names in second argument of 'guess' are …
henrikt-ma Jun 8, 2021
e982df4
Elaborate on arrays and records in two argument form of 'guess'
henrikt-ma Jun 8, 2021
2065539
Generalize previous commit to also cover 'guessPriority' in the same way
henrikt-ma Jun 8, 2021
509ccf3
No, record constructor names in second argument of 'guess' are not re…
henrikt-ma Jun 8, 2021
7000abd
Distinguish between continuous-time and discrete-time syntactic sugar
henrikt-ma Jun 8, 2021
a322438
Add roadmap item for 'realConnectorParameterEqual'
henrikt-ma Jun 9, 2021
3772bd6
Merge pull request #2748 from modelica/MCP/0031+final-modification
olivleno Sep 7, 2021
a76ce4e
Update ReadMe.md
olivleno Sep 7, 2021
e80420c
Tick off roadmap item "Investigate need for 'final'"
henrikt-ma Sep 7, 2021
a8363e1
Add link to PR for ticking off roadmap item
henrikt-ma Sep 7, 2021
d0367c5
Transfer grammar to grammar.md
henrikt-ma Sep 7, 2021
35d2b9a
Tick off roadmap item "Restricted rules for use of `start` attribute …
henrikt-ma Sep 7, 2021
9e99258
Tick off roadmap item "Get rid of 'false' as default for 'fixed'"
henrikt-ma Sep 8, 2021
d5c47b9
Tick off roadmap item for start value prioritization
henrikt-ma Sep 8, 2021
bc21d1e
Add roadmap links to three more PRs
henrikt-ma Sep 8, 2021
3be04e1
Add link to design in progress
henrikt-ma Sep 8, 2021
85e7fb6
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+elimina…
henrikt-ma Oct 2, 2021
a2fd60d
Merge pull request #2994 from modelica/MCP/0031+eliminate-final
henrikt-ma Oct 2, 2021
97fc6a6
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+fixed-d…
henrikt-ma Oct 2, 2021
050fac8
Merge pull request #2996 from modelica/MCP/0031+fixed-default-false
henrikt-ma Oct 2, 2021
0113fd9
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+paramet…
henrikt-ma Oct 2, 2021
95e5c23
Mention that 'guess' is a new keyword
henrikt-ma Oct 2, 2021
6685c91
Reformulate rule for illegal guess value dependency and add example
henrikt-ma Oct 2, 2021
9d2deb3
Update type-aliases.md
olivleno Oct 26, 2021
67b09e8
Update text to describe new syntax for prioritization
henrikt-ma Oct 26, 2021
dadfb7a
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+start-v…
henrikt-ma Oct 26, 2021
32e8d0b
Get rid of complicated priority expression concept
henrikt-ma Oct 27, 2021
788f5ef
Merge pull request #2995 from modelica/MCP/0031+parameter-equation
henrikt-ma Oct 28, 2021
81e1a14
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+start-v…
henrikt-ma Oct 28, 2021
7e521c8
Update grammar with prioritization constructs
henrikt-ma Oct 28, 2021
2898382
Replace 'start' -> 'unbounded'
henrikt-ma Nov 2, 2021
df469a3
Change examples used to illustrate 'No type aliases for records'
henrikt-ma Nov 2, 2021
e8a1b0e
Clean up trailing whitespace
henrikt-ma Nov 2, 2021
3c0ce73
State that lower value of 'priority' means higher priority
henrikt-ma Nov 2, 2021
fff766b
Implement Gerd's restriction of where priority may be specified
henrikt-ma Nov 2, 2021
eb10e09
Split into separate examples for multiple specification and records
henrikt-ma Nov 9, 2021
d8b17c9
Merge pull request #2997 from modelica/MCP/0031+start-value-prioritiz…
henrikt-ma Nov 10, 2021
7856165
Added background material from #2944.
HansOlsson Nov 17, 2021
70e95a7
Update ReadMe.md
olivleno Nov 18, 2021
b31ac83
Update ReadMe.md
olivleno Nov 18, 2021
146ae1c
AsSuggested
HansOlsson Nov 18, 2021
99a3020
Apply suggestions from code review
HansOlsson Nov 18, 2021
5b75263
Merge remote-tracking branch 'origin/ExtractedPart' into ExtractedPart
HansOlsson Nov 18, 2021
7d06d9d
AdditionalFixup
HansOlsson Nov 18, 2021
8d314c3
Fix incorrect level of heading
henrikt-ma Nov 19, 2021
f3a8fa1
Add empty sections to differences.md
henrikt-ma Nov 19, 2021
07fc523
Add links for roadmap item 'Simplify record construction…'
henrikt-ma Nov 19, 2021
85ed617
Merge pull request #3035 from HansOlsson/ExtractedPart
HansOlsson Jan 13, 2022
9b8cce2
Minor cleanup
henrikt-ma Jan 16, 2022
0b92407
Change 'fixed = false' -> 'fixed = true'
henrikt-ma Jan 16, 2022
5432392
Update example with proper use of guess value parameters
henrikt-ma Jan 16, 2022
fe37c76
Move example down to where guess value parameters have been introduced
henrikt-ma Jan 16, 2022
f24a466
Merge pull request #3088 from henrikt-ma/MCP/0031+update-example
olivleno Jan 20, 2022
18b996e
Set correct heading level for 'Pure Modelica functions'
henrikt-ma Feb 3, 2022
c7342e2
Describe that Flat Modelica function cannot have default arguments
henrikt-ma Feb 3, 2022
cb98b0e
Describe value modifications in records
henrikt-ma Feb 3, 2022
ced69b8
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
98175fe
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
b19d9e2
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
78c947c
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
ad020e9
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
2280d0f
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
4fc0056
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
afee38a
Update RationaleMCP/0031/differences.md
olivleno Feb 8, 2022
fefc797
Merge pull request #3038 from modelica/MCP/0031+record-construction
olivleno Feb 8, 2022
417b816
Update ReadMe.md
olivleno Feb 8, 2022
705e600
Describe restricted lookup inside record definitions
henrikt-ma Mar 24, 2022
3d3c101
Distinguish between attribute and value modifications in types and fu…
henrikt-ma Mar 24, 2022
ba7215b
Describe difference disallowing package constant access for records
henrikt-ma Mar 29, 2022
2abbc29
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+value-m…
henrikt-ma Mar 29, 2022
ef2f6f6
Update RationaleMCP/0031/differences.md
olivleno Apr 5, 2022
e1f6473
Merge pull request #2747 from modelica/MCP/0031+value-modification
olivleno Apr 5, 2022
ebbf8f2
Update ReadMe.md
olivleno Apr 5, 2022
4f8aa0c
Add road map link for "Get rid of conditional components"
henrikt-ma Apr 5, 2022
49cdbb4
Remove condition-attribute from grammar
henrikt-ma Apr 5, 2022
5e0cfb1
Describe change in differences.md
henrikt-ma Apr 5, 2022
b7259bb
Add roadmap link to design document
henrikt-ma Apr 5, 2022
45692c1
Mention related full Modelica PR
henrikt-ma Apr 5, 2022
d1eace7
Update RationaleMCP/0031/differences.md
olivleno Apr 5, 2022
d14fb48
Merge pull request #3149 from modelica/MCP/0031+conditional-component
olivleno Apr 5, 2022
debbaf1
Update ReadMe.md
olivleno Apr 5, 2022
4599463
Adding roadmap links for evaluated parameter item
henrikt-ma Apr 29, 2022
1f5d1e5
Only allow specification of array dimensions after component name
henrikt-ma Apr 29, 2022
7359720
Merge remote-tracking branch 'central/MCP/0031' into MCP/0031+type-al…
henrikt-ma May 2, 2022
5484072
Fill in conclusions in supplemental design document
henrikt-ma May 2, 2022
3430c21
Merge pull request #2468 from modelica/MCP/0031+dimension-declaration
olivleno May 3, 2022
ecdc3df
Merge pull request #2555 from modelica/MCP/0031+type-aliases
olivleno May 3, 2022
173ae96
Tick off roadmap items for type aliases and array declaration
henrikt-ma May 3, 2022
58b11c1
Move road map item for evaluate parameters
olivleno May 3, 2022
4055ad3
Tentatively remove 'protected' from grammar
henrikt-ma May 3, 2022
3e6eb44
Add roadmap links for "Get rid of 'protected'"
henrikt-ma May 3, 2022
2e083bf
Tentatively remove for-equations from grammar
henrikt-ma May 3, 2022
bc459f8
Add roadmap links for "Investigate need for for-equations"
henrikt-ma May 3, 2022
40edc6f
Fix copy/paste error
henrikt-ma May 3, 2022
86b2cbb
Cleanup of white-space and punctuation
henrikt-ma May 11, 2022
bc82fba
Minor cleanup in preparation of clean PR
henrikt-ma May 11, 2022
3d799ef
Merge branch 'MCP/0031' into MCP/0031-protected
henrikt-ma May 11, 2022
84f4be0
Also remove 'public' and introduce 'protected' annotation
henrikt-ma May 11, 2022
8404255
Add example for 'protected' annotation
henrikt-ma May 11, 2022
7bd9293
Don't speak of protected components in Flat Modelica
henrikt-ma May 11, 2022
dd974c8
Remove possibility of implicit 'for' range
henrikt-ma May 11, 2022
50df90a
Add roadmap links for realParameterEqual
henrikt-ma May 11, 2022
d1c03c2
Move roadmap item next to related item
henrikt-ma May 11, 2022
6601f56
Use upper case initial for annotation 'Protected'
henrikt-ma May 25, 2022
e56b90c
Fix wrong case in 'hideResult' annotation name
henrikt-ma May 25, 2022
6a52524
Add stub for new example
henrikt-ma May 25, 2022
59a9b5e
Add Flat Modelica listing for example
henrikt-ma May 25, 2022
ddbd5ca
Copy contents from Hans' comment
henrikt-ma May 25, 2022
b9119cf
Reformulation from web meeting suggestion
henrikt-ma May 25, 2022
6b33613
Merge pull request #3162 from modelica/MCP/0031-protected
olivleno May 25, 2022
317119d
Update ReadMe.md
olivleno May 25, 2022
cc1e8d3
Revert "Tentatively remove for-equations from grammar"
henrikt-ma May 25, 2022
6aa452a
Get rid of 'for-indices' in grammar, in favor of just keeping 'for-in…
henrikt-ma May 25, 2022
e96bc8d
Merge pull request #3163 from modelica/MCP/0031-for-equations
olivleno May 25, 2022
9ed4826
Web Meeting Tick off "Investigate need for `for`-equations"
olivleno May 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions RationaleMCP/0031/99thDesignMeetingNotes.md
@@ -0,0 +1,41 @@
# From the 99th Modelica Design Meeting minutes

Agreement to proceed, but details unclear and need rapid progression.
Tools should be able to handle both – either proper subset or major overlap.

A proper subset might possible – in particular the drawbacks of quoting seem acceptable.

Add the following to Modelica (seems possible in Dymola, OpenModelica, MapleSim, Wolfram SystemModeler)
```
foo()[i] (…)[i]
foo().r (…).r
```

Separate tasks:
* Name mapping (quoting etc)
- Separate name-space for automatically generated variables (perhaps not quoted).
* Subset of grammar
- No extends.
- No package structure – or have user-defined functions with “.” in their name.
- Have user-defined function at start; but tight time-constraint – maybe in 2nd implementation phase in Emphysis
* Annotating the source with source-location (hopefully a general solution for Modelica; also for Buildings-models generated by Python-script, CATIA kinematics, …). Not standardize too much since depends on tool-chain, but might suffice with container – saying that it is a source location, but leave details to the tool. The location should be usable by the producer of the flat Modelica (URI – or file name+line+column). LLVM have some smart variant. Unclear if we want locations on sub-expressions, and/or multiple source locations for one equation (e.g. for flow-equation based on connect-statements). Many structural parameters must be constant-folded away (e.g. conditions for unbalanced if-then-else).
* How similar is FlatModelica to Modelica:
- Shall parameter/constant be removed in this format – since they are evaluated in other places, or kept since part of the result?
- Can a FlatModelica model be used as base-class? Should it behave the same in that case? Easiest to first forbid.
- Alias-elimination etc: Allowed, but not required.
- Are we losing some information, e.g. start-value priority
- Have “Flat Modelica” as a separate “class”?
Reorganization of Modelica Specification – combined or separate step?

How to separate FlatModelica and Modelica:
* One possibility is a special annotation; and in that case un-mangle names etc.
* Another possibility is to say “flatmodel” instead of “model” – and thus have a different grammar.

Prioritize these steps with responsible:
1. Subset of grammar [M. Sjölund; working in Emphysis] (We already have algorithm part in Emphysis – but that is a different sub-set); might be best to have separate grammar in case it is not a full subset. Modelica grammar (current one is about LL(k)) with some removed productions – prefer to have in similar format. Also good to have proper Modelica-parser – based on exact grammar in specification.
2. Name mapping [H. Tidefelt]. Use quoted identifiers with standardized mangling scheme.
3. Subset of annotations [H. Olsson]. List sub-set of Modelica-annotations with specified semantics – especially the ones relevant for simulation. Others may be kept by tools. (Inline annotations for functions, vendor annotations? choices for values of components and Dialog? Experiment, HideResult, description-strings) – add source-location.
4. How to keep additional information, like start-value priority – that otherwise might be lost in FlatModelica format. What to preserve of Modelica_Services? How to handle ModelicaStandardTables reading from files when you don’t have files?
How to work on these in a transparent way?
* Different markdown files in MCP? Separate discussion from design in separate files (only summary)? Use labels for them? Have draft pull-request for branch with discussion? Have an official fork for each MCP? Comments on files
- Lennart to summarize what is possible for Github projects
141 changes: 141 additions & 0 deletions RationaleMCP/0031/Flat-Modelica-requirements.md
@@ -0,0 +1,141 @@
# Requirements on Flat Modelica
This document should contain a first draft of the requirements on what Flat Modelica should and shouldn't be, to be used as a starting point for discussions at the upcoming design meeting in Regensburg on March 7-8, 2019. It also contains a rough separation of things belonging to the three main parts of the Modelica Language Specification (MLS) that would come out of this MCP.

## Flat Modelica features

Things that the Flat Modelica format should support:
- Basic scalar types with the same attributes as in Modelica.
- Record and enumeration types.
- Arrays.
- Component declarations (with both public and protected visibility).
- Comment (@mtiller): It doesn't seem very flat if we preserve (potentially deeply nested) components instances
- Comment (@harmanpa): This should be changed to Component declarations of the scalar types, record and enumeration types, and arrays of each; not hierarchical. Component declarations have dot-notation names.
- Remove (that is, expand) records?
- Equations and algorithms, both scalar, array-valued, and record-valued.
- Optional source locations for use in error messages.
- Add this to the formal grammar? If so, this will require some thought in order to be flexible and precise enough without interfering with too much with the rest of the grammar.
- Comment (@mtiller): Add this as standard annotations? Already supported by current grammar.
- Comment (@harmanpa): Agreed as that also allows other meta-data. Unfortunately having `annotation(__something_LineNumber=12)` on every statement could become quite verbose.
- Documentation strings.
- Vendor-specific annotations.
- Comment (@mtiller): So annotations are present in the grammar but all annotations except vendor annotations are stripped. If the concern is bloat from annotations that are no longer relevant in the flattened form (*e.g.,* graphical annotations), why not identify what gets excluded vs. what gets included? (see comment about source locations above)
- Comment (@harmanpa): I agree, I'd like to be able to put arbitary meta-data in.
- All variabilities, but constant evaluation of parameters is not allowed. (For example, this guarantees that all parameters will remain parameters if a Flat Modelica model is exported to an FMU for Model Exchange.)
- Comment (@mtiller): The semantics of this are unclear. When you say constant evaluation, do you mean constant folding? What about `final` parameters? Should those be parameters in an FMU? I wouldn't think so. It seems like they should just be `output`s.
- List of all `parameter` variables that were treated as `constant` due to use in _parameter expressions_, the `Evaluate=true` annotation, or subject to constant evaluation during flattening for other reasons.
- `final` can probably be replaced by using normal equation instead of binding equation. meaning that binding eqations can always be treated as non-final.
- Comment (@mtiller): Why not just add an `Evaluate=true` annotation to indicate these.
- Values for all constants, even those that have been inlined everywhere, since the values should be part of the simulation result.
- Less restricted forms of record field access and array subscripting?
- Comment (@mtiller): Wouldn't we expect to restrict forms of record field access and array subscripting? If so, then I would suggest saying "Restrict some forms of record field access and array subscripting" or "A more restrictive subset of record field access and array subscripting".
- Comment (@mtiller): Factor out constant subexpressions to unique variables? Perhaps filter all literals (scalars and arrays) completely out of the flattened form and provide them in a separate file?
- Needs Standardized naming for introduced intermediate variables.
- Expressions for all variables that were treated as aliases during flattening, specifying the variable that it is an alias of and the sign of the relationship
- Comment (@mtiller): Doesn't the expression already tell us all that (*e.g.,* `b = -a`...`-a` is an expression and it tells us that `b` is an alias of `a` with the opposite sign? Or did you want something more explicit? Should there be a special form of equation (perhaps in the form of an assignment statement) that can be used to indicate solved equations in general, and alias relations in particular?
- Comment (@harmanpa): Yes syntactically it is just that expression, however that isn't necessarily the expression that the alias came from. e.g. the model might contain `a = c` and `a = -b` but we decide to keep `b`, so in our aliases section we store `b = -a` and `b = -c`.
- Function declarations that are utilised in the model.
- Comment (@mtiller): Do we flatten the functions? I say that because functions can use features like `extends` or `redeclare` in their definitions. Presumably we want all that removed in a flattened form, no? Functions should probably be allowed to have arguments of array and record type.
- Comment (@harmanpa): Yes. Additionally we might have multiple versions of functions, because we might call a function with different dimension inputs. We need a naming convention for this.

Examples of things that should be gone after flattening and shouldn't exist in Flat Modelica:
- Complex classes that may contain equations.
- Connectors.
- Conditional components.
- Un-balanced `if`-equations.
- Non-literal array dimensions (except in functions).
- Packages.
- Connect equations.
- Graphical and documentation annotations.
- All redeclarations
- Anything overloaded
- Imports
- Extends clauses?
- Hierarchical modifications?
- Package structure?
- If you keep components, restrict class definitions to a flat global namespace to avoid having to apply lookup rules.

## New organization of MLS
This MCP proposes separation of the MLS into the three parts outlined below.

### Shared features: Expressions and functions
Content of that should go into this section:
- Built-in functions.
- Expressions.
- External functions.
- User-defined functions.
- Restricted forms of record field access and array subscripting (some or all of the restrictions may be lifted for Flat Modelica).
- Unit expressions.
- Syntax for synchronous language elements and state machines.

### Flat Modelica
Content of that should go into this section:
- Overview of execution model for hybrid differential-algebraic equations.
- Simulation initialization and priority of non-fixed start attributes.
- Event generation, event iteration, and other discrete-time behavior.
- Semantics of synchronous language elements and state machines.
- Solving of mixed systems.
- Hints for inlining, state selection, etc.

### Modelica
Content of that should go into this section:
- All sorts of restricted classes and rules for how they may be used.
- Inheritance, modification, and redeclaration.
- Connectors, including stream connectors.
- Connect equations.
- Overloaded operators.
- Global and local balancing of equations and variables.
- Instantiation.
- Flattening.

## An alternative view of grouping Modelica semantics (@mtiller)

One advantage to this approach would be to organize the semantics of Modelica by when they apply. In this sense, I'd like to see a description of:

- Semantics needed in order to create a Modelica editor
- Package structure
- Name lookup
- Graphical appearance
- Connection semantics
- Inheritance
- Semantics needed to represent mathematical structure and behavior
- Variables
- Equations
- Functions

From this perspective, expressions can almost be treated as "pass through". The editor doesn't really need to
interpret them in any way. For the most part they just pass through to the flattened form (but with some
potential simplifications or restrictions, as described above).

## Comments from regensburg design meeting (added by @HansOlsson)

Need to support start-value priority (source location or special built-in operator,
either complete source location or just needed hiearachy level).
Do after Link�ping meeting?
Need to design grammar: Sub-set of current Modelica or some additions?

One major issue is variable declaration as we have e.g. `a[1].b` as a variable,
and also need record variables.
One possibility would be quoted identifiers - but can clash.
Can we always quote a quoted one without ambiguity? Just use anything - even base64.
Another possibility is extended grammar - but looks ambiguous.
E.g. `a[1].b` could be either a variable, or access to member of array of records.

For declarations we need to know if array dimensions are part of variable or not.

Might need accessing record elements using `.` and `[` for non record variables,
e.g., `f(x)[1]` and `f(x).x[1]`

Array of components. Repeated equations (using quoted identifiers to be clear here):
`'a[1].x'='a[1].y';`
`'a[2].x'='a[2].y';`
But should be possible to preserve as array equations in some way (see new frontend for OM)?

Need to test-implement? Current Flat-Modelica in e.g. Dymola is different:
e.g., records are not done like this (record values are missing), functions are missing.

Pull-requests:
- Variable naming
- Source location?
- Handling modifier level for start-attribute, e.g.: Real p(start=modifierLevel(3, 5)); or extension

Some minor comments.
@@ -0,0 +1,112 @@
# Session on Flat Modelica at the 100th Modelica Design Meeting

## Agenda
* Introduction of eFMI Equation Code
* Align goals of eFMI with Flat Modelica MCP of MAP_Lang
* Discuss the prepared simple example: PID controller
* Next steps


## Introduction of eFMI EqCode

See ppt slides (https://emphysis.org/svn/EMPHYSIS/trunk/30_Work_Documents/WP3_eFMI-Standardization/WP3_1_Working_group_Eq-Code/eFMI_EqCode-Summary.pptx).

## Align goals of eFMI with Flat Modelica MCP of MAP_Lang
Comments:
Francesco: functions are crucial
Martin: Could be realized as call to C-function or inline.
Gerd: Flattened Modelica might need few extension, e.g. annotations for index reduction and tearing.

* EqCode is not the same as Flat Modelica, but we're heading in the same direction.
* The scope of EqCode is more narrow, never-the-less it makes sense to work on this in a joint effort considering EqCode as a MVP (minimal viable product) towards Flat Modelica.

## Discuss the prepared simple EqCode example: PID controller
Below only the first lines of code discussed during the meeting are listed. The file will be made available once we have decided how to manage this work on github.

```
flat_model PID

type _Time Real (final quantity="Time", final unit="s");

parameter _Time 'period' = 0.1 "Period of clock (defined as Real number)";
constant Boolean 'enbDiscretize' = true "discretize system?";
input Real 'r' "Connector of Real input signal";
input Real 'y' "Connector of Real input signal";
parameter _Time 'periodicClock.period' = period "Period of clock (defined as Real number)";
```

### flat_model
* agreed to have a new kind of class

### type
enumerations require type declarations, but types could be limited to enumerations.
Having types requires handling of modifiers, but could be avoided by allowing modifications only for build-in attributes.

* Type declarations should be supported to avoid code repetition and improve readability.
* Support predefined scalar types: Real, Integer, Boolean.

### type names
* Should have leading underscore ("_ ") to avoid confusion with variable names and keywords, see name-mapping and related discussion pull 2389.

### parameter
How to treat a parameter without a value?
In this case the start value will be used, which is zero for Real.
Tools could restrict parameters having to have a value.
What is the meaning of a start value for parameters in the context of eFMI?

Side note (added after the meeting):
On ECU there are different kinds of initializations:
- After power on the device is launched (start_up) all memory is brought into a state that is always the same no matter which state other devices are in. This means all inputs must be ignored.
- After the launch the device can be initialized.
- Anytime during operation the device can be re-initialized, e.g. after a certain event.

If the semantics of Moldelica cannot be mapped in reasonable way parameters could be handled by applying a restriction that requires parameters to have values for EqCode to avoid deviation of Flat Modelica from Modelica.
* topic should be revisited.

### variable names
* Always use quoted names according to name-mapping
Example has been adopted accordingly.

## Requirements derived from the discussion
* Shall be a self-contained definition in a single file.
* Shall not be limited to scalars to enable efficient handling of multibody and similar.
* Flat Modelica shall be fully compatible with Modelica, no exceptions.
* EqCode can apply additional restrictions to Flat Modelica.

## Issues from github and emails

### [Michael Tiller] from github
Although I must say I disagree with the premise that Flat Modelica should be a subset of Modelica. It certainly doesn't need to be. You could reuse a huge amount of the grammar between them without having to prescribe this requirement.
* Having Flat Modelica as a separate language will sooner or later lead to compatibility problems. Therefore we see good reasons to consider Flat Modelica as a subset of Modelica.


### [Hans] from github
I would say that there are two alternatives - either we standardize such a mangling syntax for names, or we allow the declaration of variables with hierarchical names in Flat Modelica.
* see above variable names

### [Henrik] from email
1) Flat Modelica needs to fulfill the needs to process full Modelica. The Equation Code Language should then impose restrictions on what Flat Modelica it allows. As an obvious example of this, Flat Modelica needs to allow functions with algorithmic bodies and side effects. Other things that come to mind here include algorithms, looping constructs, if-equations, when-equations, when-statements, etc. 
* Agreed, see above Requirements.

2) There are many Modelica constructs that are not deeply involved in the complicated flattening process, and that need to be allowed also in Flat Modelica in order to preserve structure that is necessary for efficient handling of the equations. These include record and array types. 
* Agreed, see above Requirements.

3) The "Identifier" section should probably be merged into the thing I did here:
https://github.com/modelica/ModelicaSpecification/pull/2389
I think the main topic here is the relation to array and record types. Then, to avoid confusion, we need to make sure that example code isn't using any other form of identifier. (To me, the examples under "Identifier" and "Variable name" seem to contradict each other.)

Questions
a) What is an "explicit declaration"? What would a non-explicit ("reference") look like?
An explicit variable declaration is one that has the type declaration inline, vs. using referring to type name declared elsewhere.

b) Isn't "statically evaluatable" just the same as a constant expression? (No need to introduce new terms.)
Good point. Will be adopted.

c) Why would "declare before use" be needed in a declarative setting such as Flat Modelica?
To be discussed.

d) Why remove "each"? This would remove structural information that would just be tedious to recover for the tool processing Flat Modelica.
To be discussed.

e) Why restrict "der" to only operate on a "free variable"? 
To be discussed with Kai.