escet merge requestshttps://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests2024-02-19T06:07:32Zhttps://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/805#679 PLCgen: Introduce edge selection variables by automaton in event transit...2024-02-19T06:07:32ZAlbert Hofkamp#679 PLCgen: Introduce edge selection variables by automaton in event transition codeIn transition code, the selected edge is remembered between edge selection and taking the edge.
Currently, each event creates new variables to remember the selected edge. Besides using many variables, mapping selected edges back to an a...In transition code, the selected edge is remembered between edge selection and taking the edge.
Currently, each event creates new variables to remember the selected edge. Besides using many variables, mapping selected edges back to an automaton can be complicated.
This patch creates one edge variable for each automaton that need to have the edge remembered, and uses that variable for all events.
This reduces the number of created variables, and keeps a 1-1 mapping between edge variable and the associated automaton, simplifying mapping selected edges back to an automaton.
Addresses #679v3.0Albert HofkampAlbert Hofkamphttps://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/804#757 Test models produced by CIF to CIF integration tests are checked for bei...2024-02-13T15:12:47ZDennis Hendriks#757 Test models produced by CIF to CIF integration tests are checked for being valid* Best to review per commit.
* I started with only CIF to CIF tests. If we agree this is good, I'll do the other ones as well, in the same way.
* Changes are inspired by CIF data-based synthesis tests, which already are multi-step tests....* Best to review per commit.
* I started with only CIF to CIF tests. If we agree this is good, I'll do the other ones as well, in the same way.
* Changes are inspired by CIF data-based synthesis tests, which already are multi-step tests.
Addresses #757v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/802#364 Add 'mri_event' and 'mri_state' CIF benchmarks.2024-02-14T11:48:46ZDennis Hendriks#364 Add 'mri_event' and 'mri_state' CIF benchmarks.* I used two separate commits.
Addresses #364* I used two separate commits.
Addresses #364v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/799#768 CIF pretty printer produces comment if specification is empty.2024-02-07T11:02:54ZDennis Hendriks#768 CIF pretty printer produces comment if specification is empty.Closes #768Closes #768v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/798#681 PLCgen: Improve prechecking error reports.2024-03-11T10:25:57ZAlbert Hofkamp#681 PLCgen: Improve prechecking error reports.This patch has more precise error messages if possible, rather than the very generic "you didn't do one of the following 4 things".
Also, it's better at indicating the point of the error (at the operator rather than the non-continuous si...This patch has more precise error messages if possible, rather than the very generic "you didn't do one of the following 4 things".
Also, it's better at indicating the point of the error (at the operator rather than the non-continuous side of the binary expression).
Other changes:
- Only one 'tau' event violation.
- Have both `cont OP value` and `value OP cont` comparisons, since now the error message is matching the code pattern.
It looks much less confusing to me now.
Closes #681v3.0Albert HofkampAlbert Hofkamphttps://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/797#269 CIF BDD and data-based synthesis: Use collectEvents/collectAutomata from...2024-02-06T18:59:28ZDennis Hendriks#269 CIF BDD and data-based synthesis: Use collectEvents/collectAutomata from CifCollectUtils.* Best to review per commit.
* Additional change in `CifCollectUtils`: one implementation for `getComplexComponentsStream`.
Addresses #269* Best to review per commit.
* Additional change in `CifCollectUtils`: one implementation for `getComplexComponentsStream`.
Addresses #269v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/794#38 Website: generated JS file now has a license header2024-02-06T19:16:11ZDennis Hendriks#38 Website: generated JS file now has a license header* Best to review per commit.
* Also switched to a resource file for the JS file content, rather than a multiline Java string.
Addresses #38* Best to review per commit.
* Also switched to a resource file for the JS file content, rather than a multiline Java string.
Addresses #38v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/793#766 CIF website: made the 'learn more' statement complete.2024-02-05T18:41:40ZDennis Hendriks#766 CIF website: made the 'learn more' statement complete.Closes #766Closes #766v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/792#424 Migrate CIF code generator precondition checks to the CIF checker framework2024-02-05T18:45:04ZDennis Hendriks#424 Migrate CIF code generator precondition checks to the CIF checker framework* Best to review per commit. There are quite a few commits, as I tried to take very small steps, one check at a time.
* Changes to existing common CIF checks:
* `FuncNoSpecificStdLibCheck` re-implemented, to be more like the unary/bina...* Best to review per commit. There are quite a few commits, as I tried to take very small steps, one check at a time.
* Changes to existing common CIF checks:
* `FuncNoSpecificStdLibCheck` re-implemented, to be more like the unary/binary/expression checks, and to disallow standard library functions on specific arguments.
* `FuncNoSpecificStdLibCheck` extended with disallows for standard library functions on specific arguments.
* New CIF checks:
* `LocOnlyStaticEvalInitPredsCheck`. Turns out I didn't need it, but seems useful to have anyway. Is similar to `LocOnlyStaticEvalMarkerPredsCheck`.
* `PrintNoSpecificPrintDeclsCheck`.
* `VarInputOnlySimulinkCompatibleTypesCheck` (CIF code generator Simulink-specific check).
* Other changes:
* Some refactoring for functionality related to Simulink types. Also some small renaming, JavaDoc improvements, etc.
* A single precondition checker for all languages, with one Simulink-specific check that is target-language specific.
* Warnings are now checking the Simulink code generator, rather than in the Simulink precondition checker. This fixes a bug where warnings were shown for function arguments and local variables of functions, that should only be reported for discrete variables.
* Added tests for Simulink-specific preconditions and warnings.
* Some fixes for typos and other small issues in the Simulink code generation documentation.
* The CIF code generation documentation now states that targets may indicate additional preconditions. The Simulink code generation documentation already did so, but this was not explicitly stated with the list of general restrictions.
* Notes:
* Can't use constructor arguments for the checks as one of them is now conditionally added, so made a static method that returns the checks.
Addresses #424v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/785#679 PLCgen: Move timer variable + block instance creation to code storage2024-02-09T07:45:15ZAlbert Hofkamp#679 PLCgen: Move timer variable + block instance creation to code storageReadable by commit, except for the 2nd to last commit that fixes state prefix text of timer variables since timer block instances are not in state.
Split the generic PlcVariable, PlcFuncDescription and PlcFuncAppl classes into more spec...Readable by commit, except for the 2nd to last commit that fixes state prefix text of timer variables since timer block instances are not in state.
Split the generic PlcVariable, PlcFuncDescription and PlcFuncAppl classes into more specific classes, and added an abstract baseclass for each.
Function block instance variables are both variable and function, where the latter also needs the former so it has a cyclic connection. As you cannot instantiate 2 objects at the same time, PLC code storage knows about state variables prefixes.v3.0Albert HofkampAlbert Hofkamphttps://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/780#752 Event-based automata projection docs: add more output expectations.2024-01-28T16:01:20ZDennis Hendriks#752 Event-based automata projection docs: add more output expectations.Closes #752Closes #752v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/779#269 Small improvements in CIF/BDD plugin2024-01-28T14:13:49ZDennis Hendriks#269 Small improvements in CIF/BDD plugin* Best to review per commit.
* Changes:
* `BddOutputMode`: fixed typo in JavaDoc.
* Add test to keep `CifBddStatistics` and `SynthesisStatistics` in sync.
* Improved test order sorting in test-all launch config.
* Some test launc...* Best to review per commit.
* Changes:
* `BddOutputMode`: fixed typo in JavaDoc.
* Add test to keep `CifBddStatistics` and `SynthesisStatistics` in sync.
* Improved test order sorting in test-all launch config.
* Some test launch configs got automatically upgraded by Eclipse.
Addresses #269v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/774#740 Add syntax highlighting to the documentation (website / Eclipse help only)2024-01-26T09:08:09ZDennis Hendriks#740 Add syntax highlighting to the documentation (website / Eclipse help only)* Best to review per commit.
* Changes:
* Adds syntax highlighting with highlight.js to AsciiDoctor-generated documentation, for the website and Eclipse help. Does not add syntax highlighting to the PDF. For pros/cons, see issue #740.
...* Best to review per commit.
* Changes:
* Adds syntax highlighting with highlight.js to AsciiDoctor-generated documentation, for the website and Eclipse help. Does not add syntax highlighting to the PDF. For pros/cons, see issue #740.
* I opted to style the various syntax elements like we do for our ESCET languages in their text editors. The colors are slightly different due to a light-grey rather than white background.
* The highlight.js `bnf` language doesn't work for us. We use a different BNF syntax. I added a `bnf` language of our own.
* The `console` language supports errors and warnings, like the console in Eclipse.
* The `none` language is for when `source` block in AsciiDoc has no language specified. Defining this language prevents warnings in the browser for not finding the `none` language.
* AsciiDoctor by default includes highlight.js v9, which is no longer supported. I can't find the documentation for that version anymore. I therefore opted to include version 11 instead. There is some fixed JavaScript code generated by AsciiDoctor to invoke highlight.js. I change that slightly to be highlight.js version 11 compatible, preventing a warning in the browser.
* Copies images to 'website' directory, rather than only in the website ZIP that is built. Eases validation/debugging of a single docset.
* Several documentation fixes, for correct languages of source blocks, correct source block syntax, and some other changes that I stumbled upon.
* Updated legal pages of the docsets.
Closes #740v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/773#269 Improve CIF/BDD and synthesis settings classes2024-01-27T11:59:02ZDennis Hendriks#269 Improve CIF/BDD and synthesis settings classes* Best to review per commit. I did it in small steps. I did change a few things in later commits, so probably best to check also the ones after it before making comments.
* Changes:
* Naming consistency improved.
* More logical order...* Best to review per commit. I did it in small steps. I did change a few things in later commits, so probably best to check also the ones after it before making comments.
* Changes:
* Naming consistency improved.
* More logical order of the settings.
* All defaults in the defaults class, where relevant.
* Moved default of `SupervisorNameOption` into the option itself, rather than in the static method. This is backward incompatible for end users, as giving an empty value for the option no longer defaults to the default value. But that very likely should not affect end users, as they likely only set a different name, or don't provide the option at all. The change helps in the uniformity of handling the various settings.
* No more constructors with many arguments for the settings classes. Instead, use getters and setters now. Also added prevention of modification after settings are set.
* Some notes:
* Quite a bit of code in the settings classes now. But, it is all pretty simple and similar. And it is localized in those classes.
* The creation of settings in the synthesis application is much more readable now.
* The creation of settings in the tests is much simpler now, as only some settings need to be set that are relevant to the test, and setting them is more straightforward with the mutable settings classes.
Addresses #269v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/772#706 Move CIF/BDD-related classes from synthesis to a new CIF/BDD plugin.2024-01-23T07:32:52ZDennis Hendriks#706 Move CIF/BDD-related classes from synthesis to a new CIF/BDD plugin.* Best to review per commit.
* Introduced `org.eclipse.escet.cif.bdd` package. Moved the relevant classes to it. Improved the package structure a bit. Updated everything else as a result of the moves.
* Last change for #706. Work continu...* Best to review per commit.
* Introduced `org.eclipse.escet.cif.bdd` package. Moved the relevant classes to it. Improved the package structure a bit. Updated everything else as a result of the moves.
* Last change for #706. Work continues in higher-level issue #269.
Closes #706v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/771#706 CIF data-based synthesis: more renaming and splitting synthesis/non-synt...2024-01-22T08:12:55ZDennis Hendriks#706 CIF data-based synthesis: more renaming and splitting synthesis/non-synthesis parts* Best to review per commit.
* Most notable changes:
* Made more functionality reusable (preprocessing, BDD factory creation, BDD statistics configuration + printing/writing).
* Made precondition check for non-determinism more config...* Best to review per commit.
* Most notable changes:
* Made more functionality reusable (preprocessing, BDD factory creation, BDD statistics configuration + printing/writing).
* Made precondition check for non-determinism more configurable.
* Create settings earlier, and use settings rather than options.
* Split synthesis settings from CIF/BDD settings.
* Split synthesis statistics from CIF/BDD statistics, athough there is some overlap since Java enums don't inheritance.
* Removed synthesis-related terminology/references/etc in non-synthesis parts.
Addresses #706v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/770#679 PLCgen: Cleanup and fix variable handling2024-01-23T06:26:12ZAlbert Hofkamp#679 PLCgen: Cleanup and fix variable handlingSiemens targets need an additional prefix for persistent state variables which I ignored until now.
While figuring out what to do I noticed cif2plc uses the local and temp variables of the main program for state respectively temporary v...Siemens targets need an additional prefix for persistent state variables which I ignored until now.
While figuring out what to do I noticed cif2plc uses the local and temp variables of the main program for state respectively temporary variables. Assuming the writers are aligned to this use, I dropped the global state variable list, and moved those variables to the local variables of the main program POU. This caused large moves in variable declarations in the test output.
Also I cleaned up the writers a bit to use proper data values rather than to rely on magic name matching or completely ignore the input from the generator (in case of S7 timers). In addition some hard-coded additions were deleted. Adding local variables to a function now crashes rather than sneakily moving them to a semantically different variable group (since we don't have PLC functions, nothing crashed).
Finally added a prefix for variables generically, and used that for adding a non-empty prefix to state variables for S7 targets. While testing I found presets for continuous variables were in the wrong table, and moved those as well.
Introducing the prefix caused large code changes in the main programs of S7 targets.
Readable by commit.
Addresses #679v3.0Albert HofkampAlbert Hofkamphttps://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/769#706 More synthesis/BDD renaming and splitting synthesis/non-synthesis parts2024-01-16T09:20:31ZDennis Hendriks#706 More synthesis/BDD renaming and splitting synthesis/non-synthesis parts* Another batch of changes. Quite a few changes, but separately they are all small. Best to review per commit.
* Overview of the changes (see commit messages for the details):
* Renamed some classes/variables/fields to be non-synthesis...* Another batch of changes. Quite a few changes, but separately they are all small. Best to review per commit.
* Overview of the changes (see commit messages for the details):
* Renamed some classes/variables/fields to be non-synthesis specific.
* Avoid sythesis-specifics in JavaDocs and comments of non-synthesis-specific classes.
* Some other JavaDoc/comment improvements.
* Split synthesis and non-synthesis specific parts for certain classes. Especially introduced a `CifDataSynthesisResult` class.
* Does not affect end users.
Addresses #706v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/768#38 AsciiDocHtmlModifier: fix two typos in comments.2024-01-15T11:39:17ZDennis Hendriks#38 AsciiDocHtmlModifier: fix two typos in comments.Addresses #38Addresses #38v3.0https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/767#38 AsciiDoc HTML TOC now animates collapse/expand.2024-01-15T16:04:17ZDennis Hendriks#38 AsciiDoc HTML TOC now animates collapse/expand.* Solution uses only CSS, no JavaScript.
* The animation makes it more apparent to users what happens. And I personally think it looks really cool :smile:
Addresses #38* Solution uses only CSS, no JavaScript.
* The animation makes it more apparent to users what happens. And I personally think it looks really cool :smile:
Addresses #38v3.0