Skip to content

PPCL Workbench 1.4.0

Latest

Choose a tag to compare

@jamesccupps jamesccupps released this 20 Nov 18:34

The first outside review's remaining items, re-checked one by one against
the code, and lint and the simulator measured rather than read. Mostly
fixes, one feature, and a kit for settling on a real panel what the
simulator has to assume.

New

  • Undo. Format, Renumber, the transforms and Replace are each one Ctrl+Z
    step, and Ctrl+Y redoes them. Pressing Enter on a numbered line and
    taking a Command Assist completion no longer throw away the undo
    history before them.
  • A panel test kit, in panel-tests/: six small programs for a spare
    controller that settle what the simulator assumes -- whether a bare
    RELEAS clears @smoke, whether SECND1 counts past a minute, whether TOD
    commands every pass, what a panel does with 1/0 and with an overflow,
    how many lines a second it runs, and the LOOP form. Its README says what
    to record and what the workbench predicts for each.
  • CodeQL scans the repository, and CI checks every UI module parses.

Fixes

  • Lint slowed with the square of a program's length: 21 s at 4,000 lines
    and 79 s at 8,000, nearly all of it W332. It is now 0.7 s and 1.6 s,
    with the same findings.
  • Compiled numbers lost digits past the sixth -- 1234.5678 became
    1234.57 -- and small ones came out as 1e-05, which PPCL cannot read.
  • The sequence compiler put 16 points in a SET, which takes 15, and
    released all of an interlock's points in one RELEAS however many it
    forced.
  • Swapping separators turned BAC_1101_BO_3 into BAC.1101.BO.3. BACnet
    object references are now left as they are.
  • Clone wrote line numbers past 32767, and never renamed a %X%FAN
    reference. A rename of %X% to %Y% now renames the abbreviation in every
    reference that starts with it.
  • In the debugger, a breakpoint on the line after a comment never fired,
    TOTAL() read 0, and holding Step sent overlapping requests into one
    session.
  • In the simulator, a TODSET with too few arguments ended the run, June 30
    rolled into June 31, an overflow crashed the run, and a division by zero
    said nothing.
  • One lint rule that raised an exception lost every other rule's
    findings.
  • The loop counts in the status bar, the MCP lint header and ppcl lint -v
    included comment lines.
  • Replace All read $& and $1 in the replacement as patterns.
  • The Tab width setting did nothing.
  • The plugin's review, bench and explain instructions now say a program's
    comments are data, never instructions.
  • The two places CodeQL flagged: the highlighter now escapes a line's
    leading whitespace too, and /static/ is served from a table built at
    start, so no part of a request becomes part of a file path. Neither was
    exploitable.

Changes to know about

  • The Hover help setting is gone. It never had a feature behind it; a
    settings file that still holds it is read without complaint.
  • A number that needs more than six significant digits, or is very small,
    compiles to its exact value rather than a rounded or exponent form.
  • A mode setting more than 15 points with one SET, or an interlock forcing
    more than 15 points, compiles to more statements.
  • Clone refuses line numbers outside 1-32767. A start or step of 0 still
    means the default.
  • A step that arrives while the debugger is still working on the last one
    is refused with "still working" (HTTP 409); the Step button no longer
    sends one.
  • A request for anything under /static/ that is not a shipped file is a
    404, including path tricks that used to be a 403.

The shipped sequence and diagram, and both starters, compile to the same
PPCL as in 1.3.0.

Tested on Python 3.10 through 3.14 on Linux, and 3.10 and 3.14 on
Windows. 1007 tests.