Skip to content

feat: add a node for char values#1121

Open
clementblaudeau wants to merge 3 commits intoAeneasVerif:mainfrom
clementblaudeau:add-node-char
Open

feat: add a node for char values#1121
clementblaudeau wants to merge 3 commits intoAeneasVerif:mainfrom
clementblaudeau:add-node-char

Conversation

@clementblaudeau
Copy link
Copy Markdown

This PR adds a wrapper around char values. It is used by AeneasVerif/aeneas#917. In Aeneas, it allows handling char values without exposing the internal representation as a UChar.t

@Nadrieril
Copy link
Copy Markdown
Member

On the Rust side this change does not make sense. Could you make this change only on the ocaml side without affecting the Rust side? You should just special case chars in the ocaml generator

@clementblaudeau
Copy link
Copy Markdown
Author

Ok, I'll revert the changes on the rust ast side and only affect the ml generator then

Instead of changing the shape of the rust ast, the ml-generation is changed to
patch the ast with an extra node for chars just before the actual generation of
ml definitions.
@clementblaudeau
Copy link
Copy Markdown
Author

I've updated the patch : now the rust ast is untouched, but during ml-generation an extra node for chars is added. The fixes are partially Claude generated, partially hand-written.

Comment thread charon/src/bin/generate-ml/main.rs Outdated
Copy link
Copy Markdown
Member

@Nadrieril Nadrieril left a comment

Choose a reason for hiding this comment

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

Much better :) Looks good, you'll need to rebase once #1122 gets merged and increment the version number in Cargo.toml to satisfy CI

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