Build provably correct software using formal methods like Hoare Logic, Weakest Preconditions, and Design-by-Contract.
99
Quality
100%
Does it follow best practices?
Impact
99%
1.45xAverage score across 5 eval scenarios
wp calculus for sequential code
Backward construction logic
0%
100%
Assignment rule usage
0%
100%
Correct precondition
0%
85%
Sequential composition
0%
100%
Assertion presence
0%
100%
Without context: $0.1816 · 54s · 11 turns · 15 in / 2,271 out tokens
With context: $0.3857 · 1m 52s · 20 turns · 276 in / 4,900 out tokens
Loop invariants and variants
Loop Invariant defined
100%
100%
Loop Variant defined
20%
100%
Initialization proof
100%
100%
Preservation proof
100%
100%
Termination proof
70%
100%
Postcondition proof
100%
100%
Native assertions
100%
100%
Runtime Invariant Check
100%
100%
Without context: $0.2287 · 1m 33s · 12 turns · 19 in / 3,839 out tokens
With context: $0.3852 · 2m 4s · 18 turns · 271 in / 5,822 out tokens
Design-by-Contract in a Class
Precondition defined
100%
100%
Postcondition defined
100%
100%
Class Invariant
100%
100%
No Defensive Programming
100%
100%
Native Assertions
100%
100%
Without context: $0.1994 · 1m 3s · 11 turns · 15 in / 3,144 out tokens
With context: $0.4513 · 1m 59s · 26 turns · 2,312 in / 4,919 out tokens
Invariant restoration in exception handling
Exception identification
100%
100%
Invariant restoration
100%
100%
Validation after restoration
0%
100%
Organized Panic
100%
100%
Class Invariant check
66%
100%
Native Assertions
0%
100%
Without context: $0.1954 · 1m 10s · 10 turns · 15 in / 3,424 out tokens
With context: $0.7833 · 3m 20s · 36 turns · 2,543 in / 9,683 out tokens
Hoare Logic and algorithm verification
Hoare Triples {P}C{Q}
33%
100%
Precondition P defined
100%
100%
Postcondition Q defined
100%
100%
Loop Invariant I
100%
100%
Loop Variant v
100%
100%
Total Correctness proof
100%
100%
Without context: $0.1972 · 1m 16s · 12 turns · 58 in / 3,975 out tokens
With context: $0.4599 · 2m 12s · 21 turns · 3,240 in / 7,673 out tokens
Install with Tessl CLI
npx tessl i jpc0/provably-correct-software@0.1.0