fmt: formatting
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Recursive decode_term() overflows the default ~2MB test thread stack on deeply nested benchmark scripts. Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Extract parse_plutus_version() to deduplicate the version string parsing that was duplicated between main() and replay(). Replace the debug-specific summarize_top() function, which was hardcoded to Case/Constant patterns left over from investigating a specific divergence, with a generic term_variant_name() that returns the top-level variant name for any term. Import Outcome at the top of replay() to remove six fully-qualified path references. Change &PathBuf parameters to &Path for idiomatic Rust. Exit with code 1 when replay detects a divergence so scripts and CI can detect failures programmatically. Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Adds conformance tests for edge cases discovered during the Haskell-vs-Rust divergence audit. These guard against regressions in consByteString bounds-checking, expModInteger with negative exponents, and case-on-constants branch validation. Signed-off-by: Jonathan Lim <[email protected]>
The pretty-printer emits forms like ((B #..), (I 1)) inside maps, which the parser couldn't previously round-trip. Signed-off-by: Jonathan Lim <[email protected]>
Integers beyond i128 range caused a panic instead of falling through to the bounds check and returning an evaluation error, as Haskell does. Signed-off-by: Jonathan Lim <[email protected]>
These three divergences caused budget mismatches vs the Haskell reference. Haskell uses element count for lists, maxBound sentinel for pairs. Signed-off-by: Jonathan Lim <[email protected]>
The bytecode VM accepted branch counts that the CEK machine would reject, causing divergences on edge-case programs found by fuzzing. Signed-off-by: Jonathan Lim <[email protected]>
The previous code used with_env which didn't have access to bytecode-specific lambda/delay info tables, causing incorrect term reconstruction for bytecode closures. Signed-off-by: Jonathan Lim <[email protected]>
XorByteString was incorrectly charged using OrByteString's cost model, causing budget divergence from the Haskell reference implementation. Signed-off-by: Jonathan Lim <[email protected]>
Tests for case expressions on list constants: - case-list-empty-valid: empty list with 2 branches takes nil branch - case-list-nonempty-valid: non-empty list takes cons branch with head/tail - case-list-empty-too-many-branches: empty list with 4 branches errors These tests currently fail due to incorrect branch count validation in the case-on-constants implementation. Signed-off-by: Jonathan Lim <[email protected]>
Discharge was missing Case and Constr variants, causing incorrect results when these terms appeared inside closures that needed environment substitution. Also adds Arena::alloc_slice helper used by the discharge implementation, and fixes trailing newline in fuzz_0017 budget expectation. Signed-off-by: Jonathan Lim <[email protected]>
Implement proper flat serialization for BLS12-381 G1/G2 elements (using compressed point format) and Data constants (via CBOR). Previously these variants returned errors or were unimplemented. Signed-off-by: Jonathan Lim <[email protected]>
Boolean: False accepts 1 or 2 branches, True requires exactly 2. List: Cons accepts 1 or 2 branches, Nil requires exactly 2. Any other branch count is an error. Previously the code was too permissive, allowing arbitrary branch counts for lists. Signed-off-by: Jonathan Lim <[email protected]>
Fuzzer-generated test exercising Case and Constr term discharge. This test currently fails because discharge does not handle Case and Constr terms. Signed-off-by: Jonathan Lim <[email protected]>
Tests that dropList with a huge integer argument fails with an evaluation failure rather than silently overflowing the cost calculation. This test currently fails due to integer overflow in cost arithmetic. Signed-off-by: Jonathan Lim <[email protected]>
Adds a fuzzing harness that generates random UPLC programs and tests them for correctness against expected evaluation behavior. Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>