Skip to content

Update SMT-based ISLE verifier#13550

Open
avanhatt wants to merge 73 commits into
bytecodealliance:mainfrom
avanhatt:upstream-06-02
Open

Update SMT-based ISLE verifier#13550
avanhatt wants to merge 73 commits into
bytecodealliance:mainfrom
avanhatt:upstream-06-02

Conversation

@avanhatt

@avanhatt avanhatt commented Jun 3, 2026

Copy link
Copy Markdown
Member

Update the core ISLE verifier for formal, SMT-based checking of instruction lowering rules. This brings the implementation up-to-date with our work described at OOPSLA 2025, rather than the prior ASPLOS 2024 implementation.

The core improvements are:

  1. Automatic rule chaining. Rather than requiring specifications on every ISLE term, terms can be marked veri chain to be automatically composed/inlined. This reduces the specification burden substantially. See the paper for details.
  2. For the aarch64 backend, most machine inst Minst specifications are automatically derived from the authoritative ARM ASL reference, with our work building on the ASLp project to derive more targeted specifications for this domain.
  3. Our state modeling now handles traps and other side effects more explicitly, see the paper for details.
  4. The specification language is more expressive, including structs and macros. See the language reference updates for details.

avanhatt and others added 6 commits June 3, 2026 15:04
Co-authored-by: Michael McLoughlin <mmcloughlin@gmail.com>
Co-authored-by: Michael McLoughlin <mmcloughlin@gmail.com>
Co-authored-by: Michael McLoughlin <mmcloughlin@gmail.com>
Co-authored-by: Michael McLoughlin <mmcloughlin@gmail.com>
Co-authored-by: Michael McLoughlin <mmcloughlin@gmail.com>
Comment thread cranelift/isle/veri/veri/log.txt Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Accidental commit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah yes, thanks for spotting!

@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:meta Everything related to the meta-language. labels Jun 3, 2026

@cfallin cfallin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This largely looks good! I skimmed over any spec/model/attr forms in the diffs of ISLE, and the cranelift/isle/veri tree in general; reviewed more carefully the bits that were touched in Cranelift and the ISLE compiler proper. Some logistical comments but nothing really substantial. Thanks for all the work in getting this in shape for upstreaming!

Comment thread cranelift/codegen/meta/src/gen_isle.rs
Comment thread cranelift/codegen/src/isa/aarch64/inst/imms.rs
Comment thread cranelift/codegen/src/isa/aarch64/inst/regs.rs Outdated
Comment thread cranelift/codegen/src/isa/aarch64/inst.isle
Comment thread cranelift/codegen/src/spec/state.isle
Comment thread cranelift/isle/veri/aslp/Cargo.toml Outdated
Comment thread cranelift/isle/veri/test-macros/Cargo.toml Outdated
Comment thread cranelift/isle/veri/veri/src/veri.rs Outdated
}

fn add_binding(&mut self, id: BindingId, binding: &Binding) -> Result<()> {
dbg_depth!("add_binding");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this debug code need to stay in-tree? (It looks like it's trying to help find very deeply nested invocations? In any case I'd rather not have the ad-hoc thread-local magic here if we don't need this check permanently)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, did not mean to include, removed!

alexcrichton and others added 8 commits June 12, 2026 10:07
@avanhatt avanhatt marked this pull request as ready for review June 12, 2026 22:56
@avanhatt avanhatt requested review from a team as code owners June 12, 2026 22:56
@avanhatt avanhatt requested review from alexcrichton and removed request for a team June 12, 2026 22:56
@github-actions github-actions Bot added the isle Related to the ISLE domain-specific language label Jun 13, 2026
@github-actions

Copy link
Copy Markdown

Subscribe to Label Action

cc @cfallin, @fitzgen

Details This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:meta", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@avanhatt avanhatt changed the title [Draft] Update SMT-based ISLE verifier Update SMT-based ISLE verifier Jun 15, 2026
@avanhatt avanhatt requested a review from cfallin June 15, 2026 16:02
@cfallin

cfallin commented Jun 15, 2026

Copy link
Copy Markdown
Member

@avanhatt I'm taking a look at the cargo-vets now and it looks like this PR bumps a bunch of dep versions in ways that I hope are not necessary -- the vet backlog is now

  • 144 crate bumps (each of which takes a manual step from me, so this is ~a day of work)
  • an audit backlog of 425,163 lines of code

Which is unfortunately probably infeasible for me to do. Could you (i) revert Cargo.lock to its state from your latest merge-from-main, and (ii) run a build again, to see if we can minimize the diff? I suspect that maybe this branch ran a cargo update at some point and did a bunch of incidental upgrades.

@cfallin

cfallin commented Jun 15, 2026

Copy link
Copy Markdown
Member

Thanks for your last commit -- looks like the dep bumps and vet burden are real; still 425163 LoC.

Digging into one particular bump (tracing 0.1.41 -> 0.1.44, which alone is 61kLoC of diff), it looks like the aslp crate depends on tracing too, and probably pulled in a newer version somehow?

Would you mind doing a little dep gardening to see if we can get the diff to our deps a bit smaller? cargo vet should work locally for anyone to check the audit backlog size, too. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants