Skip to content

Clarify meaning of when-clause #3840

@casella

Description

@casella

Section 8.3.5 defines when-equations:

when expression then
  { some-equation ";" }
{ elsewhen expression then
  { some-equation ";" }
}
end when ";" 

and then adds

If expression is a clocked expression, the equation is referred to as a clocked when-clause (section 16.6) rather than a when-equation, and is handled differently

Unfortunately, the rest of the text of the language specification mostly refers to when-clause, rather than when-equation, e.g.:

  • Section 3.7.5, definition of Operator 3.24 pre(y): "If v and pre(v) are only used in when-clauses..."
  • Section 3.8.5 definition of discrete-time expressions: "Discrete-time expressions are ... Expressions in the body of a when-clause"
  • Section 4.5 definition of component variability: "A discrete-time variable vd is a variable that is discrete-valued (that is, not of Real type) or assigned in a when-clause".
  • etc. etc.

This is a bit confusing, because one may think that when-clause is synonymous with clocked when-clause, whereas I understand it is synonymous with when-equation.

I would suggest to say that explicitly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions