You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SysMD (tukcps/SysMD 4.3.0): currency bug + toolchain build gap; patches on our fork, not yet sent upstream #92
settings.gradle.kts: add the foojay toolchain resolver. gradle.properties sets auto-download=true and build.gradle.kts requires jvmToolchain(25), but Gradle 9 needs an explicit toolchain repository, so a host with only a JRE (or an older JDK) fails: "Cannot find a Java installation ... Toolchain download repositories have not been configured."
BaseUnit.getBaseUnits() mapped every AmountOfMoney to Euro, so currencies were silently interchangeable. Each currency now canonicalises to itself; mixing currencies fails like any other unit mismatch. Adds quantitytests/CurrencyTests.
The bug (reproduced, not assumed)
Before the fix, via a characterization test on 4.3.0:
100 USD + 100 EUR -> 199.99999999999997 unit [EUR] (no error)
100 USD .valueIn("EUR") -> 100 (no rate)
1 GBP .valueIn("USD") -> 1.0
Quantity(100, "USD").unit -> "EUR"
There is no fixed exchange rate, so the solver can satisfy constraints that mix currencies.
Verification
Baseline on an unmodified checkout (with the toolchain patch only): 1,722 tests, 0 failures, 103 skipped.
With the currency fix: 1,727 tests, 0 failures. The pre-existing currency() and usdGbpCurrencies() tests still pass.
Both patches apply cleanly with git am onto upstream development.
Side effect to mention upstream: running the suite modifies the tracked fixture src/test/resources/saveAndLoadProjectData/project/.project.json.
Upstream status: NOT sent
CONTRIBUTING.md says the main project is the CPS chair's GitLab and contributions are made by emailing a diff to the maintainers; the address in the file is truncated (cgrimm|herzog@). Public commit metadata shows cgrimm@rptu.de and herzogm@rptu.de; unconfirmed. The GitHub repo appears to be a mirror (it has an open roadmap issue, tukcps/SysMD#2).
Confirm recipient, then email the two patches (format-patch files can be regenerated from the fork branches) or open a GitHub issue/PR on the mirror if the maintainers prefer it
Note upstream that the currency semantics (explicit FX vs. distinct units) is theirs to decide; our patch is the conservative option (distinct units, no implicit conversion)
Related, not part of the patches
Concepts we transferred (as data, no code) into ufo-types: interval quantities with explicit currency, range verdicts, hasA/isA edits. Views are unsupported in SysMD, so project views come from the SysML v2 standard library.
SysMD sidecar for numeric/unit constraint solving is designed but not built: headless (bootRun --args=headless, port 8081), contract POST /projects -> POST /session -> PUT /session/model (CodeRequest, runlevel SOLVED) -> GET /session/variables.
Activity