Summary
Property value parser accepts only literals; arithmetic expressions fail. Workaround is to pre-compute the literal, which obscures intent.
Reproducer
package Test_Expr
public
processor P
properties
Clock_Period => 5 * 1000 ps;
end P;
end Test_Expr;
$ spar parse /tmp/test_expr.aadl
/tmp/test_expr.aadl:78: expected SEMICOLON
/tmp/test_expr.aadl:78: expected END_KW
...
Workaround
Clock_Period => 5000 ps; — numerically identical but loses the 5 MHz × 1ms = 5000 cycles-style expressiveness.
AADL reference
AS5506B §11.2.5 — property values permit numeric_term which includes signed_aadl_integer * identifier for units, and property values can include expressions in the constant definitions.
Real-world impact
In wohl_hardware.aadl I wrote Active_Current_uA => 6.0 * 1000.0; (6 mA expressed as µA), had to pre-compute to 6000.0. When a reader later wants to change "6 mA" to "8 mA" they now edit the literal 8000.0 without context about what unit it was.
Side note
Same wrong line-number pattern as the other parser-error reports — 78 on a 7-line file.
🤖 Generated with Claude Code
Summary
Property value parser accepts only literals; arithmetic expressions fail. Workaround is to pre-compute the literal, which obscures intent.
Reproducer
Workaround
Clock_Period => 5000 ps;— numerically identical but loses the5 MHz × 1ms = 5000 cycles-style expressiveness.AADL reference
AS5506B §11.2.5 — property values permit
numeric_termwhich includessigned_aadl_integer * identifierfor units, and property values can include expressions in the constant definitions.Real-world impact
In
wohl_hardware.aadlI wroteActive_Current_uA => 6.0 * 1000.0;(6 mA expressed as µA), had to pre-compute to6000.0. When a reader later wants to change "6 mA" to "8 mA" they now edit the literal8000.0without context about what unit it was.Side note
Same wrong line-number pattern as the other parser-error reports —
78on a 7-line file.🤖 Generated with Claude Code