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 implementation | Exact first cent | Unchanged pairs | Unknown pairs |
|---|---|---|---|
| Python | 6/6 | 4/4 | 2/2 |
| Java | 6/6 | 4/4 | 2/2 |
| Public wording editor | 5/6 | 3/4 | 2/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.pyWhat 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.
| Implementation | Exact first cent | Unchanged pairs | Unknown pairs |
|---|---|---|---|
| Phaseline | 6/6 | 4/4 | 2/2 |
| Java | 6/6 | 4/4 | 2/2 |
| Python | 6/6 | 4/4 | 2/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.
| Trial | Phaseline returned |
|---|---|
| Waiver against threshold | different |
| Waiver already in force | retained |
| Omission from a partial edit | retained |
| Omission from a full replacement | omitted |
| Edit bound to a different version | rejected |
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 implementation | Dafny returned |
|---|---|
| Zeros alone | verified |
| Zeros with prior guarantee | rejected: postcondition |
| Copy with prior guarantee | verified |
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.