Phaseline by VERIFYGet the checker
Tutorial Measured comparisons

What the checks found

We tested refund decisions in Phaseline, Java and Python, then checked what an earlier agreement adds to a revision. A separate Dafny exercise tests a list replacement.

Run the public comparison

All three public tools received the original twelve cases. Java and Python used the original hand-written predicates. The public refund editor received the sentences as written. A changed pair earns credit only for the first differing cent.

Public implementationExact first centUnchanged pairsUnknown pairs
Python6/64/42/2
Java6/64/42/2
Public wording editor5/63/42/2

The public editor returned unknown for “above $500 need manager sign-off” and “Refunds require manager approval.” One pair was equivalent and the other changed at one cent. These are limits of the wording editor. The language lesson accepts written Phaseline declarations.

Extract the public replay bundle and run the following with Python 3.11+, Java 17+ and Node.js 22+. The output includes every answer and mismatch.

python3 public_replay.py

What did the original private interpreter score?

We wrote the expected answers first, then ran 12 pairs of approved and proposed rules. The common scoring range was one cent through $1,000. For a change, an implementation earns credit only if it returns the first differing cent. “Unknown” is the expected answer when the wording gives no usable threshold.

ImplementationExact first centUnchanged pairsUnknown pairs
Phaseline6/64/42/2
Java6/64/42/2
Python6/64/42/2

Java and Python received hand-written predicates and an explicit unknown case. Each scanned cents in order. Phaseline received the rule sentences, interpreted them with its supported USD grammar, and compared their boundaries. All three received the predecessor. These scores measure agreement with the expected answers. They do not measure parser parity, execution speed or integration effort.

For example, “over $499.99” and “at least $500” agreed throughout the range. “Over $500” and “at least $500” first disagreed at $500.00. A change from “over $500” to a full waiver first affected $500.01.

What the earlier decision adds

In a separate exercise we passed synthetic approved records to Phaseline’s versioned comparison. The proposal was identical in the first two trials. Its effect depended on the selected agreement. The final trial submitted an edit tied to the wrong version.

TrialPhaseline returned
Waiver against thresholddifferent
Waiver already in forceretained
Omission from a partial editretained
Omission from a full replacementomitted
Edit bound to a different versionrejected

Every completed comparison left approval with the owner. Java and Python applications can implement these checks too. This exercise ran Phaseline’s existing behavior with a supplied record. Finding that record in an unfamiliar workspace is a separate task.

Can a proof language catch it?

Yes. With Dafny 4.11.0 we checked three specifications for integer lists. For this exercise the older guarantee was that every input element survives with its original count. The implementation that emits zeros can meet its own specification and fail the stronger one.

Specification and implementationDafny returned
Zeros aloneverified
Zeros with prior guaranteerejected: postcondition
Copy with prior guaranteeverified

Copying the input preserves its elements. Sorting is a separate guarantee. Dafny verifies the stated condition symbolically. Its results are separate from the finite refund comparison above.

The follow-up trial withheld the earlier rule from the new chat.

Repeat the experiments

The download contains the input sentences, hand-written expectations, comparator sources, instructions and recorded outputs. Java, Python and Dafny can be rerun independently. The historical Phaseline wording and selected-history runs require VERIFY’s private implementation at revision 5a77fdb.

Download the benchmark · Read the raw results