Skip to content

Boole language extensions for dalek-lite benchmarks#1075

Merged
joscoh merged 73 commits into
strata-org:main2from
kondylidou:pr/benchmarks
May 19, 2026
Merged

Boole language extensions for dalek-lite benchmarks#1075
joscoh merged 73 commits into
strata-org:main2from
kondylidou:pr/benchmarks

Conversation

@kondylidou
Copy link
Copy Markdown
Contributor

@kondylidou kondylidou commented Apr 29, 2026

Summary

Extends the Boole language pipeline with new language features, curated benchmark
targets anchored to dalek-lite (Curve25519/Ed25519), and a testing infrastructure
upgrade across all Boole seeds.

Language features

Sequence T type and slicing ops

  • toCoreMonoType handles .Sequence _ elem → .tcons "Sequence" [elem]
  • All 8 Core inherited ops wired up in Verify.lean
  • Three Boole-specific wrappers: Sequence.skip, Sequence.dropFirst,
    Sequence.subrange
  • Typed empty-sequence constants: Sequence.empty_bv8/bv16/bv32/bv64/int — each
    needs a distinct token since 0-ary polymorphic Sequence.empty has no arguments
    to infer the type from

Bitvector loop variables (for i : bvN := init to limit)

  • for_to_by and for_downto_by dispatch guard/step/increment to
    Bv{N}.ULe/Add/Sub when the loop variable is a bitvector type

decreases annotations

  • for v := init to/downto limit accepts an optional decreases e clause;
    forwarded to the Core while-loop measure field and actively verified by cvc5
  • Functions and procedures accept an optional decreases e clause using Core's
    existing Measure category — no new grammar category introduced
  • All three forms reuse Core's single measure_mk op; no duplicate constructs
  • Function termination is verified by Add termination checking for recursive functions #1092; procedure-level decreases is
    silently dropped with a dbg_trace warning pending int-based termination support

Lambda abstraction and application

  • fun x : T => body lowers to nested Core .abs nodes
  • (f)(x) lowers to .app () f x

Inline let-block postconditions

  • let v := e in body in spec/ensures positions lowers via withBVarExprs

choose assignment

  • w := choose z : T :: pred(z) lowers to havoc w; assume pred[z/w]

Bitvector comparisons

  • Unsigned (<, <=, >, >=) default to Bv{N}.ULt/ULe/UGt/UGe via
    toBvCmpOp
  • Signed (<s, <=s, >s, >=s) lower to Bv{N}.SLt/SLe/SGt/SGe

New seeds

Fully implemented seeds graduated from FeatureRequests/ to the main Boole test
folder: early_return.lean, choose_operator.lean, bitvector_ops.lean,
embedded_postcondition.lean.

Seed test infrastructure

Replaced #guard_msgs (drop info) in with explicit /-- info: ... -/ +
#guard_msgs in across all Boole seeds. Added (options := .quiet) uniformly.

Documentation

  • New docs/BooleBenchmarks.md: five real-world benchmark targets from dalek-lite
  • Updated docs/BooleFeatureRequests.md: all new seeds in inventory table,
    implemented features extended

By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.

@kondylidou kondylidou changed the title Pr/benchmarks Boole language extensions for dalek-lite benchmarks Apr 30, 2026
@kondylidou kondylidou marked this pull request as ready for review May 3, 2026 11:10
@kondylidou kondylidou requested a review from a team May 3, 2026 11:10
Copy link
Copy Markdown
Contributor

@joscoh joscoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the PR to target main2 and remove the comments about things being upstreamed to main?

Comment thread docs/BooleFeatureRequests.md Outdated
@github-actions github-actions Bot added the Core label May 18, 2026
@kondylidou kondylidou changed the base branch from main to main2 May 18, 2026 17:19
@kondylidou
Copy link
Copy Markdown
Contributor Author

Can you change the PR to target main2 and remove the comments about things being upstreamed to main?

done:)

joscoh
joscoh previously approved these changes May 19, 2026
shigoel
shigoel previously approved these changes May 19, 2026
Copy link
Copy Markdown
Contributor

@shigoel shigoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo the partial functions -- won't block on that right now though

@shigoel shigoel enabled auto-merge May 19, 2026 14:59
Keep upstream/main2 version — drops registerCommandSymbols/initFVarIsOp
(the buggy fvarIsOp precomputation removed by fix/datatype-tester-freevar).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
auto-merge was automatically disabled May 19, 2026 15:57

Head branch was pushed to by a user without write access

@kondylidou kondylidou dismissed stale reviews from shigoel and joscoh via 652a897 May 19, 2026 15:57
@github-actions github-actions Bot removed the Core label May 19, 2026
@joscoh joscoh enabled auto-merge May 19, 2026 18:50
@joscoh joscoh added this pull request to the merge queue May 19, 2026
Merged via the queue into strata-org:main2 with commit c4dbccf May 19, 2026
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSLib PRs and issues marked with this label indicate contributions from/for the CSLib community. Waiting-For-Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants