Skip to content

v0.6.0 — Declare, Analyze, Commission

Choose a tag to compare

@ssweber ssweber released this 24 Apr 20:06
· 10 commits to main since this release
4a669e7

v0.6.0 — Declare, Analyze, Commission

Write ladder logic. Prove it correct. Ship it.

This release adds three layers on top of the core engine:

Declare what your devices do — physical=, link=, min=, max= on tags describe feedback behavior. Tag
flags (readonly, external, final, public) give static validators something to enforce. The autoharness
synthesizes feedback in tests so you don't have to.

Analyze your program — plc.cause() and plc.effect() trace causal chains through scan history. That led
us to rethink the history architecture entirely: per-scan SystemState snapshots were too expensive to
keep, so the engine now records a sparse scan log and reconstructs states on demand via a compiled
replay kernel (reusing the CircuitPython code generator to produce fast dict-based step functions).
prove() uses the same kernel to check properties over all reachable states, and lock files catch
behavioral regressions in PRs.

Commission from VS Code — record a debug session, mine invariants from it, and generate pytest files.
Hot-reload your program without losing PLC state. Attach from another terminal with pyrung live.

Also: plc.dataview for dependency queries, plc.query for coverage surveys, a pytest coverage plugin
with CI gating, program.simplified() for resolved Boolean forms, digital twin test harness, runtime
bounds checking, and a unified pyrung CLI.

~37k new lines, ~1,000 new tests. See the link for breaking changes and migration guide.