Skip to content

Core models option#2

Merged
abentkamp merged 7 commits into
devfrom
core-models-option
Jun 3, 2026
Merged

Core models option#2
abentkamp merged 7 commits into
devfrom
core-models-option

Conversation

@maximebuyse

@maximebuyse maximebuyse commented May 13, 2026

Copy link
Copy Markdown

Adds a -core-models-option flag to the aeneas binary. Under this option, names and more will be produced to be compatible with the lean library provided in rust-core-models.

@maximebuyse maximebuyse force-pushed the core-models-option branch from c34ab33 to 90d17d5 Compare May 18, 2026 09:32
@abentkamp abentkamp force-pushed the core-models-option branch from 97df742 to 210ed8c Compare May 18, 2026 12:20
karthikbhargavan added a commit that referenced this pull request May 19, 2026
CertObserver registers with the [Observer.current] slot from commit #1
when [-emit-cert] is set. Its [event_to_cert] dispatch is empty —
commits 3-9 grow it one Event variant at a time. Until then, no
inline emit site calls [Observer.notify], so cert output stays
byte-equal (the existing [ctx_emit_event] -> [eval_ctx.cert_event_buffer]
path is untouched).

* src/cert/CertObserver.{ml,mli} — install / event_to_cert /
  on_event. on_event respects ctx.cert_events_suppressed so the
  migration in commit #6 (which moves the InterpLoops suppression
  call to Observer.with_suppressed) can swap atomically without
  intermediate drift.
* src/Main.ml — call Aeneas.CertObserver.install () before
  CertGen.emit under -emit-cert.
* src/dune — wire CertObserver, Event, Observer into the library's
  explicit (modules ...) list. (Event/Observer landed in commit #1
  but had no consumer, so dune silently dropped them; CertObserver
  surfaces the dependency.)

Gates: G_cert 89/89, G_build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maximebuyse maximebuyse force-pushed the core-models-option branch from 210ed8c to 01a4ba3 Compare May 19, 2026 08:59
@abentkamp abentkamp changed the base branch from main to dev May 28, 2026 12:23
@maximebuyse maximebuyse force-pushed the core-models-option branch from 2c0bf87 to 6bfa72b Compare June 2, 2026 11:47
@maximebuyse maximebuyse marked this pull request as ready for review June 2, 2026 12:11
@maximebuyse maximebuyse requested a review from abentkamp June 2, 2026 12:11
Comment thread src/extract/Extract.ml
Comment on lines +3130 to +3135
match
compute_allocator_filter
~extra_trait_decl_refs:[ trait_impl.impl_trait ]
~extra_trait_refs:trait_impl.parent_trait_refs trait_impl.generics
assoc_tys None trait_impl.preds
with

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trait_impl has a couple of other fields such as consts and methods that are not looked into here. Maybe the type param could be used only in there?

@abentkamp

abentkamp commented Jun 2, 2026

Copy link
Copy Markdown

I'd like to merge this now, although many of the changes will probably not be upstreamed in this form, right?

  • For the overrides in ExtractBuiltin/ExtractBuiltinCore, we'll probably end up using a .toml file specifying precisely which items should get special treatment, as discussed in https://aeneas-verif.zulipchat.com/#narrow/channel/574774-Cryspen/topic/ExtractBuiltinLean/with/575769002
  • For the dangling type params from Charon's hide_allocator pass, I am wondering if it wouldn't be better to either have an option to deactivate hide_allocator in Charon or to modify Charon to remove the dangling type params. (In rust-core-models, the hide_allocator pass is also causing issues because it selectively removes the allocator argument for some types but not for others. So maybe we should deactivate it.)
  • For impl names, we might want to have special Lean syntax that allows us to write simpler names that resolve correctly, as discussed here: #Cryspen > PRs @ 💬

@abentkamp abentkamp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@maximebuyse Please have a look at my comments above, but I am going to merge this anyway, so that we can make some progress in dependent repos.

@abentkamp abentkamp added this pull request to the merge queue Jun 3, 2026
Merged via the queue into dev with commit 8d2077c Jun 3, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants