Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dabb86c
Switch Laurel AST to getIonSerializer% elaborator format
keyboardDrummer-bot May 1, 2026
b45280e
Bump Strata submodule to keyboardDrummer/Strata#7 (bot/ion-deserializer)
keyboardDrummer-bot May 1, 2026
96b4a00
Regenerate Laurel AST and update consumers for new IonSerializer format
keyboardDrummer-bot May 1, 2026
f9e2de5
Fix Long.MIN_VALUE overflow in longLiteral: use BigInteger.negate()
keyboardDrummer-bot May 1, 2026
b51cf37
Fix OpaqueSpec: only use for methods without a body
keyboardDrummer-bot May 1, 2026
3f57209
Fix OpaqueSpec: always wrap ensures clauses, even with a body
keyboardDrummer-bot May 1, 2026
e55bd9a
Log Strata errors to stderr for CI visibility
keyboardDrummer-bot May 1, 2026
030d642
Fix CI: use z3 solver explicitly for Strata backend
keyboardDrummer-bot May 1, 2026
e0e6a05
Update Strata submodule to bot/ion-deserializer branch (strata-org/St…
keyboardDrummer-bot Jun 25, 2026
d7bd699
Update Makefile to use laurelJavaGen and bump Strata submodule
keyboardDrummer-bot Jun 25, 2026
7ba5521
Regenerate Laurel AST from Lean types via getIonSerializer%
keyboardDrummer-bot Jun 25, 2026
4214463
Merge origin/main into bot/issue-404-ion-serializer
keyboardDrummer-bot Jun 25, 2026
9d5925b
Fix generator: handle type parameters and Bool defaults, regenerate AST
keyboardDrummer-bot Jun 25, 2026
cdb9798
Update JavaToLaurelCompiler and LaurelDriver for new AST types
keyboardDrummer-bot Jun 25, 2026
9a994bb
Generate AstNode<T> with Java generics instead of ToIon
keyboardDrummer-bot Jun 26, 2026
1d7cbf6
Update Strata submodule: fix Java Gen for Lean 4.29.1
keyboardDrummer-bot Jun 26, 2026
80c0845
Fix type errors: use AstNode<Variable> for Assign targets and IncrDecr
keyboardDrummer-bot Jun 26, 2026
f0cd9c1
Update Strata submodule: fix getIonDeserializer% for parametric types
keyboardDrummer-bot Jun 26, 2026
099d049
Merge remote-tracking branch 'origin/main' into bot/issue-404-ion-ser…
keyboardDrummer-bot Jun 26, 2026
476f080
Fix Ion serialization: send combined Program struct directly
keyboardDrummer-bot Jun 26, 2026
6917025
Restore soundness-net and handle invalid diagnostic paths
keyboardDrummer-bot Jun 26, 2026
2825eed
Add source positions to statement AstNodes for diagnostic reporting
keyboardDrummer-bot Jun 26, 2026
6afac5f
Fix diagnostic parsing and add source locations to Laurel AST
keyboardDrummer-bot Jun 26, 2026
55d8a96
Add source locations to postconditions and fix test expectation
keyboardDrummer-bot Jun 26, 2026
878e06d
Fix for-loop step, invariant sources, and uninterpreted function bodies
keyboardDrummer-bot Jun 26, 2026
db5e71c
Skip SwitchDesugaring test: Strata submodule resolution bug
keyboardDrummer-bot Jun 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ bin/

### Mac OS ###
.DS_Store
examples/.jqwik-database
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
generate-laurel-ast:
rm -rf verifier/src/main/java/org/strata/jverify/laurel
cd Strata/StrataCLI && lake exe strata javaGen Laurel org.strata.jverify.laurel ../../verifier/src/main/java
cd Strata && lake exe laurelJavaGen org.strata.jverify.laurel ../verifier/src/main/java
2 changes: 1 addition & 1 deletion Strata
Submodule Strata updated 131 files
50 changes: 0 additions & 50 deletions verifier/src/main/java/org/strata/jverify/laurel/AssignTarget.java

This file was deleted.

10 changes: 10 additions & 0 deletions verifier/src/main/java/org/strata/jverify/laurel/AstNode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.strata.jverify.laurel;

public record AstNode<T extends ToIon>(T val, FileRange source) implements ToIon {
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var s = ion.newEmptyStruct();
s.put("val", val().toIon(ion));
s.put("source", (source() != null ? source().toIon(ion) : ion.newNull()));
return s;
}
}
56 changes: 39 additions & 17 deletions verifier/src/main/java/org/strata/jverify/laurel/Body.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,53 @@
package org.strata.jverify.laurel;

public sealed interface Body extends Node permits Body.Body_, Body.ExternalBody {
public record Body_(
SourceRange sourceRange,
StmtExpr body
) implements Body {
public sealed interface Body extends ToIon permits Body.Transparent, Body.Opaque, Body.Abstract, Body.External {
com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion);

public record Transparent(AstNode<StmtExpr> body) implements Body {
@Override
public java.lang.String operationName() { return "Laurel.body"; }
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("Transparent"));
sexp.add(body().toIon(ion));
return sexp;
}
}

public record Opaque(java.util.List<Condition> postconditions, AstNode<StmtExpr> implementation, java.util.List<AstNode<StmtExpr>> modifies) implements Body {
@Override
public com.amazon.ion.IonSexp toIon(IonSerializer $s) {
var sexp = $s.newOp("Laurel.body", sourceRange());
sexp.add($s.serialize(body()));
return sexp;
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("Opaque"));
var _l0 = ion.newEmptyList();
for (var e : postconditions()) _l0.add(e.toIon(ion));
sexp.add(_l0);
sexp.add((implementation() != null ? implementation().toIon(ion) : ion.newNull()));
var _l2 = ion.newEmptyList();
for (var e : modifies()) _l2.add(e.toIon(ion));
sexp.add(_l2);
return sexp;
}
}

public record ExternalBody(
SourceRange sourceRange
) implements Body {
public record Abstract(java.util.List<Condition> postconditions) implements Body {
@Override
public java.lang.String operationName() { return "Laurel.externalBody"; }
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("Abstract"));
var _l0 = ion.newEmptyList();
for (var e : postconditions()) _l0.add(e.toIon(ion));
sexp.add(_l0);
return sexp;
}
}

public record External() implements Body {
@Override
public com.amazon.ion.IonSexp toIon(IonSerializer $s) {
var sexp = $s.newOp("Laurel.externalBody", sourceRange());
return sexp;
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("External"));

return sexp;
}
}
}
63 changes: 0 additions & 63 deletions verifier/src/main/java/org/strata/jverify/laurel/Command.java

This file was deleted.

21 changes: 0 additions & 21 deletions verifier/src/main/java/org/strata/jverify/laurel/Composite.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.strata.jverify.laurel;

public record CompositeType(Identifier name, java.util.List<Identifier> extending, java.util.List<Field> fields, java.util.List<Procedure> instanceProcedures) implements ToIon {
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var s = ion.newEmptyStruct();
s.put("name", name().toIon(ion));
var _l_extending = ion.newEmptyList();
for (var e : extending()) _l_extending.add(e.toIon(ion));
s.put("extending", _l_extending);
var _l_fields = ion.newEmptyList();
for (var e : fields()) _l_fields.add(e.toIon(ion));
s.put("fields", _l_fields);
var _l_instanceProcedures = ion.newEmptyList();
for (var e : instanceProcedures()) _l_instanceProcedures.add(e.toIon(ion));
s.put("instanceProcedures", _l_instanceProcedures);
return s;
}
}
11 changes: 11 additions & 0 deletions verifier/src/main/java/org/strata/jverify/laurel/Condition.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.strata.jverify.laurel;

public record Condition(AstNode<StmtExpr> condition, java.lang.String summary, boolean free) implements ToIon {
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var s = ion.newEmptyStruct();
s.put("condition", condition().toIon(ion));
s.put("summary", (summary() != null ? ion.newString(summary()) : ion.newNull()));
s.put("free", ion.newBool(free()));
return s;
}
}
11 changes: 11 additions & 0 deletions verifier/src/main/java/org/strata/jverify/laurel/Constant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.strata.jverify.laurel;

public record Constant(Identifier name, AstNode<HighType> type, AstNode<StmtExpr> initializer) implements ToIon {
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var s = ion.newEmptyStruct();
s.put("name", name().toIon(ion));
s.put("type", type().toIon(ion));
s.put("initializer", (initializer() != null ? initializer().toIon(ion) : ion.newNull()));
return s;
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
package org.strata.jverify.laurel;

public sealed interface ConstrainedType extends Node permits ConstrainedType.Of {
public record Of(
SourceRange sourceRange,
java.lang.String name, java.lang.String valueName, LaurelType base, StmtExpr constraint, StmtExpr witness
) implements ConstrainedType {
@Override
public java.lang.String operationName() { return "Laurel.constrainedType"; }

@Override
public com.amazon.ion.IonSexp toIon(IonSerializer $s) {
var sexp = $s.newOp("Laurel.constrainedType", sourceRange());
sexp.add($s.serializeIdent(name()));
sexp.add($s.serializeIdent(valueName()));
sexp.add($s.serialize(base()));
sexp.add($s.serialize(constraint()));
sexp.add($s.serialize(witness()));
return sexp;
}
public record ConstrainedType(Identifier name, AstNode<HighType> base, Identifier valueName, AstNode<StmtExpr> constraint, AstNode<StmtExpr> witness) implements ToIon {
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var s = ion.newEmptyStruct();
s.put("name", name().toIon(ion));
s.put("base", base().toIon(ion));
s.put("valueName", valueName().toIon(ion));
s.put("constraint", constraint().toIon(ion));
s.put("witness", witness().toIon(ion));
return s;
}
}
45 changes: 45 additions & 0 deletions verifier/src/main/java/org/strata/jverify/laurel/ContractType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package org.strata.jverify.laurel;

public sealed interface ContractType extends ToIon permits ContractType.Reads, ContractType.Modifies, ContractType.Precondition, ContractType.PostCondition {
com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion);

public record Reads() implements ContractType {
@Override
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("Reads"));

return sexp;
}
}

public record Modifies() implements ContractType {
@Override
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("Modifies"));

return sexp;
}
}

public record Precondition() implements ContractType {
@Override
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("Precondition"));

return sexp;
}
}

public record PostCondition() implements ContractType {
@Override
public com.amazon.ion.IonValue toIon(com.amazon.ion.IonSystem ion) {
var sexp = ion.newEmptySexp();
sexp.add(ion.newSymbol("PostCondition"));

return sexp;
}
}
}
19 changes: 0 additions & 19 deletions verifier/src/main/java/org/strata/jverify/laurel/Datatype.java

This file was deleted.

Loading
Loading