Skip to content

DieHardest: compare jug configurations via self-composition#199

Draft
lemmy wants to merge 1 commit intomasterfrom
mku-DieHardest
Draft

DieHardest: compare jug configurations via self-composition#199
lemmy wants to merge 1 commit intomasterfrom
mku-DieHardest

Conversation

@lemmy
Copy link
Member

@lemmy lemmy commented Feb 13, 2026

Add DieHardest.tla, which composes two instances of DieHarder in parallel (synchronous composition) so that TLC can check a 2-hyperproperty as an ordinary invariant. The invariant NotSolved holds as long as both configurations have not yet reached the Goal; a counterexample is a behavior in which both solve the problem, revealing which configuration is slower.

The module also defines HasSolution, a GCD-based predicate (via Bézout's identity) used in ASSUME to reject unsolvable configurations before model checking begins.

MCDieHardest instantiates the spec with Goal = 4, comparing a 2-jug (5, 3) setup against a 3-jug (5, 3, 4) setup.

Add DieHardest.tla, which composes two instances of DieHarder in
parallel (synchronous composition) so that TLC can check a
2-hyperproperty as an ordinary invariant.  The invariant NotSolved
holds as long as both configurations have not yet reached the Goal;
a counterexample is a behavior in which both solve the problem,
revealing which configuration is slower.

The module also defines HasSolution, a GCD-based predicate (via
Bézout's identity) used in ASSUME to reject unsolvable
configurations before model checking begins.

MCDieHardest instantiates the spec with Goal = 4, comparing a 2-jug
(5, 3) setup against a 3-jug (5, 3, 4) setup.

Co-authored-by: Dmitry Kulagin <craft095@users.noreply.github.com>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
@lemmy lemmy self-assigned this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant