Summary
Property set parser rejects the standard AADL inline units (...) form on a numeric property type.
Reproducer
property set Test_Units is
Power: aadlreal units (uA, mA => uA * 1000, A => mA * 1000) applies to (device);
end Test_Units;
$ spar parse /tmp/test_units.aadl
/tmp/test_units.aadl:51: expected APPLIES_KW
/tmp/test_units.aadl:51: expected TO_KW
/tmp/test_units.aadl:59: expected R_PAREN
...
AADL reference
AS5506B §11.3 defines the unit type designator:
numeric_type ::= aadlreal [ units_designator ]
units_designator ::= units ( unit_name { , unit_name => aadlinteger_or_constant * unit_name }* )
Expected
Parses cleanly and the Power property carries the unit set {uA, mA, A} so downstream tools can check/convert.
Workaround in use
Encoding the unit in the property name (Sleep_Current_uA, Battery_Capacity_mAh) — works but loses units-aware analysis.
Impact
Cannot express physical quantities with their units in a way analyses can reason about. Every numeric property now has a name-embedded unit convention, which is fragile.
🤖 Generated with Claude Code
Summary
Property set parser rejects the standard AADL inline
units (...)form on a numeric property type.Reproducer
AADL reference
AS5506B §11.3 defines the unit type designator:
Expected
Parses cleanly and the
Powerproperty carries the unit set{uA, mA, A}so downstream tools can check/convert.Workaround in use
Encoding the unit in the property name (
Sleep_Current_uA,Battery_Capacity_mAh) — works but loses units-aware analysis.Impact
Cannot express physical quantities with their units in a way analyses can reason about. Every numeric property now has a name-embedded unit convention, which is fragile.
🤖 Generated with Claude Code