Repository navigation
PPCL Workbench 1.3.0
Two outside reviews of the whole repository went into this release. Every
finding was reproduced before it was fixed, each fix comes with the test
that failed before it, and checking the findings turned up more beside
them. It is mostly fixes; what behaves differently is listed at the end.
New
- Renumber and Format read their own output back and refuse to write it
if it would run differently from the input: lines in run order, every
line reference resolved to the line it reaches. A writer that produced
a file that looked right and ran something else was the defect these
reviews kept finding; this catches the next one. - The MCP lint tool takes min_severity, workstation_only and disabled, as
the command line does, explains each rule code once, and stops at 60
findings, worst first, counting the rest by code. The largest real
program's report went from 34,000 characters to 8,500. - SECURITY.md: report a vulnerability privately through the Security tab.
Fixes to compiled programs
- The block compiler emitted wrong logic. NOT of (A OR B) compiled as
A OR (B = 0), Z - (X + Y) as Z - X + Y, and a three-input NAND was true
with all three inputs on. - Sequence interlocks lost their priority (the last force line's won, and
"at emergency" wrote @Emergency, which is not a priority), two
interlocks could share one latch flag, and a reset held true released a
trip every pass. - The Latch block's default let a held reset beat the trip.
- A rule with several actions re-tested its condition after each one, so
"when DMPR < 50: DMPR 100, FAN on" never turned the fan on. - More than sixteen locals went into one LOCAL statement, which the
panel refuses. - "throttling 1e999" compiled to a LOOP with every gain zero; numbers
that are not finite are now refused, with the line.
Fixes to the writers
- fmt -i and renumber -i damaged the files they rewrote: a degree sign
became junk, a byte-order mark hid line 1, unnumbered lines vanished,
and fmt on a folder rewrote a README to one empty line. Files are now
written back in the encoding and line endings they came in, atomically,
with byte-for-byte backups. - Renumber numbered lines in file order rather than run order, gave block
numbers twice under --preserve-blocks, left a GOTO to a missing line
pointing at whatever was renumbered nearest, missed references in
disabled and run-together lines, and accepted a start of 0 or a
negative step. - fmt --normalize switched disabled lines back on. Clone rewrote numbers
that only happened to equal a line number. A comment ending in & took
the next line with it.
Simulator and linter
- DEFINE abbreviations are substituted at load, as the panel does; they
were ignored. - SECND1-SECND7 are resettable counters. They read the second of the
minute, so a delay like IF(SECND3.GT.300) never ended. - A bare RELEAS no longer clears an operator's @Oper command. EMSLOW
writes SLOW's value. .ROOT. of a negative number no longer crashes. - W332 warned on mode blocks reached by GOTO, where only one runs per
pass -- all 62 of its warnings across 42 real programs -- and missed
real fights: one command twice, ON then OFF, assignments. It now warns
when two writes both run on every pass and the first is replaced
before anything reads it. - W322 called the outputs of ADAPTM, ADAPTS, LSQ2, LSTSQR and GETVAL
"never assigned". - One unusual line -- an accented letter, deep nesting -- crashed the
parse of a whole program, and a comparison after a colon or @ name was
read as part of the name.
Web editor and server
- Save could write a tab's text over a different file, closing the
browser tab dropped unsaved work, and saving a CRLF file wrote LF. - The workspace could be made to write into .git or .claude -- directly,
through a Windows short name like CLAUDE~1, or through a link -- and on
Windows /static/ could read other drives. - An infinite time hung a request thread, or the MCP server, for good;
the debugger's step had no ceiling; a negative Content-Length was read
without limit. - A mistake in a request -- a word where a number belongs, an unknown
bench preset, a line the lexer cannot read, a save Windows refuses --
gets a plain message instead of an internal error and a traceback. - One unknown key made Settings impossible to save, the point database
named in Settings was not loaded at start, and settings were written in
place.
Redaction, MCP and the plugin
- Redaction left names after a dot or an @, kept the site's file names,
and let two inputs with the same file name overwrite each other. - The plugin's MCP server imported from the project folder Claude Code
was opened in: a ppcl folder or a json.py there ran instead of the
real one. - A successful renumber's warnings reached neither the editor nor MCP,
and MCP simulate and bench said a program did not parse but not where.
Changes to know about
- Diagrams that use NOT over a compound input, subtraction of a sum, or
NAND with three or more inputs compile differently -- and correctly.
XOR takes two inputs, as its help always said. - Every compiled interlock writes its reset line before its trip line,
so with both true the trip holds. - A Latch block that never chose compiles as set-wins; one that chose
keeps its choice. - W332 on GOTO-separated mode blocks is now info, and new warnings
appear where two writes really do fight. - Renumber points a GOTO to a missing line at the line control actually
reaches, and says so. - ppcl redact names its outputs program01.pcl, program02.pcl and so on;
the mapping file records which is which. - The workspace refuses files with no extension and anything in a
hidden folder. - .mcp.json starts the server with python -E -s. On macOS and Linux with
no "python", see PLUGIN.md.
The shipped diagram and the starter diagram compile to the same PPCL as
in 1.2.0. The shipped sequence and both starter sequences differ only in
their interlock's reset line now coming before its trip line; their
conditions, MAT < 38 and MAT > 45, cannot both hold, so what they do is
unchanged.
Tested on Python 3.10 through 3.14 on Linux, and 3.10 and 3.14 on
Windows. 866 tests.