Change semantics of abbreviated form of field conditions #617
Labels
architectural decision
Discussion of design decision
model
Related to model package (e.g., model verification)
specification
Related to specification package (e.g., specification parsing)
Projects
Context and Problem Statement
The current semantics of conditions at message fields (without using a then-clause) seems to be confusing. A field definition of the form
F : T if C
adds the conditionC
to all incoming edges ofF
. Because of that semantic it is not possible to referenceF
in conditionC
, althoughF
is syntactically mentioned beforeC
. Here is a more complex example inspired by IPv4 packets:M1
shows the message specification in the regular form using then-clauses. In the current implementation,M2
is a semantically equivalent variant ofM1
using the abbreviated forms for conditions and size aspects.M3
is invalid, asTotal_Length
is referenced in the incoming edge toTotal_Length
, although it seems to be the more intuitive way of adding the condition.Considered Options
O1 Add field conditions to incoming edges of field (keep current implementation)
+ Consistent behavior of aspects and conditions in abbreviated form (i.e. for transforming the regular into the abbreviated form the
with ...
as well asif ...
has to be moved to the subsequent field):A : T then B if C with Size => 8; B : Opaque;
is equivalent toA : T; B : Opaque if C with Size => 8;
.− Being unable to reference field containing condition feels intuitive (cf. M2)
O2 Add field conditions to outgoing edges of field
+ More intuitive (cf. M3)
+ Allows adding conditions to last message field without
then null
(cf. TLS Alert)Decision Outcome
O2
The text was updated successfully, but these errors were encountered: