Repository navigation
Show the logic of changed ladder rungs - #5
Merged
Merged
Conversation
Decode rung text into the condition each output instruction runs under (series = AND, branch = OR, comparisons and one-shots as inputs) and, for a changed rung, list each output whose condition changed, before and after, in the text, Markdown and JSON reports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A changed rung now also says what changed in its logic. The rung text is decoded into the condition each output instruction runs under: instructions in series are AND, branch legs are OR, and contacts, comparisons,
LIM/CMP, one-shots andAFIare inputs. Every other instruction is an output.plcdiff/rll.py:rung_logic(text)andlogic_delta(old, new). Nested operands (Arr[i,j],Tank[Idx[1]]) stay whole.Change.logic_delta()feeds the text report, the Markdown report (# logic:lines) and the JSON report (alogiclist on rung changes).Verified
uv run pytest: 64 passed (16 new intests/test_rll.py)ruff check,ruff format --check,mypy: cleanGenerated by Claude Code