Repository navigation
Add a stateful circuit driver interface - #206
Open
hydrolarus wants to merge 1 commit into
Open
hydrolarus wants to merge 1 commit into
hydrolarus wants to merge 1 commit into
Conversation
hydrolarus
force-pushed
the
lara/circuit-driver
branch
from
October 26, 2026 14:17
239aea7 to
6164061
Compare
Member
|
Not entirely sure what you're currently looking at, but maybe this is interesting: https://github.com/clash-lang/clash-protocols/compare/martijn/revamp-test-infrastructure. It's been a year or two in the making, with Claude recently adding monitors and test benches (which I haven't looked at). The basic idea is that we define "drivers", "sinks", and "monitors" for each protocol that produce a protocol-agnostic way for a test driver to step through the simulation. The core data structure is here: |
hydrolarus
force-pushed
the
lara/circuit-driver
branch
3 times, most recently
from
November 9, 2026 13:09
9744275 to
09ba5fd
Compare
This interface is still marked as experimental. Testing `Circuit`s currently either involves writing a pure model and using `idWithModel` or more complex ad-hoc ways. This change adds a stateful simulation primitive that allows to monadically step through the execution of a circuit. This interface is very generic and thus also very limited and unopinionated for now. Protocol-specific "stepper" functions can be defined later.
hydrolarus
force-pushed
the
lara/circuit-driver
branch
from
November 9, 2026 13:55
09ba5fd to
2b3665c
Compare
hydrolarus
marked this pull request as ready for review
November 9, 2026 13:57
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.
This adds a new module,
Protocols.Experimental.Hedgehog.Driver, which allows stateful simulation of circuits of the shapeCircuit a ().This interface is still marked as experimental.
Testing
Circuits currently either involves writing a pure modeland using
idWithModelor more complex ad-hoc ways.This change adds a stateful simulation primitive that allows
to monadically step through the execution of a circuit.
This interface is very generic and thus also very limited and
unopinionated for now. Protocol-specific "stepper" functions
can be defined later.