Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

[NF] Improve error checking of when-clauses. #3001

Closed
wants to merge 1 commit into from

Conversation

perost
Copy link
Member

@perost perost commented Mar 26, 2019

  • Moved the check of equations inside when-equations from Inst to
    Typing, to allow skipping the check if the when is clocked.
  • Mark lhs subscripts in when-equations as structural.
  • Added check that clocked when doesn't have an elsewhen.
  • Added check that non-clocked when doesn't have a clocked elsewhen.
  • Made clocked when illegal in algorithm.
  • Added new phase VerifyModel that checks for errors that can't be
    detected until after flattening and constant evaluation.
    It currently checks that each branch of a when-equation contains
    the same set of crefs.
  • Implemented BaseAvlSet.isEqual.
  • Renamed Expression.ClockKind.toString to toDebugString, and
    implemented new toString that doesn't leak implementation details.

- Moved the check of equations inside when-equations from Inst to
  Typing, to allow skipping the check if the when is clocked.
- Mark lhs subscripts in when-equations as structural.
- Added check that clocked when doesn't have an elsewhen.
- Added check that non-clocked when doesn't have a clocked elsewhen.
- Made clocked when illegal in algorithm.
- Added new phase VerifyModel that checks for errors that can't be
  detected until after flattening and constant evaluation.
  It currently checks that each branch of a when-equation contains
  the same set of crefs.
- Implemented BaseAvlSet.isEqual.
- Renamed Expression.ClockKind.toString to toDebugString, and
  implemented new toString that doesn't leak implementation details.
@OpenModelica-Hudson
Copy link
Member

The tests run correctly according to OpenModelica_TEST_PULL_REQUEST 2019-03-26_16-01-18.

OpenModelica-Hudson pushed a commit that referenced this pull request Mar 26, 2019
- Moved the check of equations inside when-equations from Inst to
  Typing, to allow skipping the check if the when is clocked.
- Mark lhs subscripts in when-equations as structural.
- Added check that clocked when doesn't have an elsewhen.
- Added check that non-clocked when doesn't have a clocked elsewhen.
- Made clocked when illegal in algorithm.
- Added new phase VerifyModel that checks for errors that can't be
  detected until after flattening and constant evaluation.
  It currently checks that each branch of a when-equation contains
  the same set of crefs.
- Implemented BaseAvlSet.isEqual.
- Renamed Expression.ClockKind.toString to toDebugString, and
  implemented new toString that doesn't leak implementation details.

Belonging to [master]:
  - #3001
  - OpenModelica/OpenModelica-testsuite#1148
OpenModelica-Hudson pushed a commit to OpenModelica/OpenModelica-testsuite that referenced this pull request Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants