Repository navigation
feat(webapp): add local analysis workbench and demo - #62
Merged
Merged
Conversation
Add a zero-dependency local web UI for PTPN: - Python 3.9 stdlib HTTP server wrapping build/ptpn with structured JSON - RTSL/TDG editor, diagnostics, and pending measurement filling - interactive TDG/PTPN/SCG graphs, WCRT/WCET and utilization views - precomputed demo mode and a single-file offline demo builder Document the commands in README, webapp/README, and CLAUDE.md; ignore the generated demo payloads. Add a webapp syntax check to CI. Co-Authored-By: Claude Code <[email protected]>
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.
Summary
Adds a local, zero-dependency web workbench for PTPN plus a precomputed
single-file demo.
webapp/server.py— Python 3.9 stdlib HTTP server wrappingbuild/ptpn(
/api/status,/api/examples,/api/analyze), with temporary-directoryexecution, request limits, timeouts, and TDG/PTPN/SCG graph conversion.
webapp/static/— plain HTML/CSS/JS workbench: RTSL/TDG editor with linediagnostics and pending
measured by llmfilling; interactive TDG/PTPN/SCGgraphs; WCRT/WCET envelopes; core utilization; response-ratio dial; full
metrics tables; run log with
[STATS]timings; mobile model drawer.webapp/make_demo.py— generateswebapp/demo/demo-data.jsfrom sevenbundled examples.
webapp/build_standalone.py— bundles the page, CSS, JS, and demo data intoone shareable HTML file.
webapp/README.md/CLAUDE.mddocumentation, plus a webappsyntax check in CI.
Graph layouts
PTPN uses Graphviz
dot; SCG usesneatofor a compact spring layout, with afallback to
dot. Large PTPN nets open focused on the first execution chainand expose
FITfor the whole net.Testing
ctest --test-dir build --output-on-failure: 331/331 passed.python3 -m py_compile webapp/server.py webapp/make_demo.py webapp/build_standalone.py.node --check webapp/static/app.jsandnode --check webapp/demo/demo-data.js.intro-demo→ 26 states, PTPN 32 nodes (dot),SCG 26 nodes (
neato); pending check → 1 entry,expected_segments=3.webapp/demo/ptpn-chronograph-demo.htmlverified fromfile://.error, deadlock, symmetry, and mobile layouts.
Notes
webapp/demo/demo-data.jsand the standalone HTML are generated andgitignored; run
python3 webapp/make_demo.pyandpython3 webapp/build_standalone.py.🤖 Generated with Claude Code