Skip to content

Stack machine2/missing - #100

Draft
acl-cqc wants to merge 63 commits into
mainfrom
stack_machine2/missing
Draft

Stack machine2/missing#100
acl-cqc wants to merge 63 commits into
mainfrom
stack_machine2/missing

Conversation

@acl-cqc

@acl-cqc acl-cqc commented Jan 2, 2026

Copy link
Copy Markdown
Collaborator

Some bits of #88 pulled out when making #99 (now less bits: a WIP PR and some tracing)

@acl-cqc
acl-cqc force-pushed the stack_machine2/missing branch from 6e8cd0a to 5d31870 Compare January 9, 2026 17:42
@acl-cqc
acl-cqc force-pushed the acl/stack_machine2 branch 2 times, most recently from 86b77ea to 3aea4e8 Compare April 17, 2026 14:13
acl-cqc added a commit that referenced this pull request Apr 24, 2026
…e tests (#99)

A few old commits moved out into #100.

* Rework the Hugr compiler to compile only Kernel boxes; `Compiler.hs`
(`brat -c`) calls this only for Kernel boxes that are inputs to the Id
nodes of top-level decls. "compile" produces a Hugr + list of splices,
where each splice is (the NodeId of a Hole op in the hugr, OutPort from
BratGraph) - not using the "index" of the Hole op here.

* Add `Machine.hs` with interpreter (commandline `--run <func>`). For
Hugrs, this also evaluates the outports and performs the splices using
routines from #98, and returns the final Hugr in JSON form.

* Includes reworking test framework to specify which tests are xfailed
for parsing/compilation, and allowing to specify expected outputs from
the interpreter (or that the output should be hugr-validated) *in the
test file* (`examples/*.brat`). We could do with a full audit of the
testsuite after this but not done here.

* Minor fixes: `solveVal` wiring, bad type in `adder.brat`
* Also add `CFull`; `Dummy` graph node; `hugrRotation`, Hugr float
extension, CR(x/y/z); HugrGraph root->getRoot+getNodes

---------

Co-authored-by: Craig Roy <craig.roy@quantinuum.com>
Co-authored-by: Conor McBride <conor.mcbride@quantinuum.com>
Base automatically changed from acl/stack_machine2 to main April 24, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants