Skip to content

Python -> Laurel#435

Merged
shigoel merged 12 commits intomainfrom
andrewmwells/py_laurel_cp
Feb 18, 2026
Merged

Python -> Laurel#435
shigoel merged 12 commits intomainfrom
andrewmwells/py_laurel_cp

Conversation

@andrewmwells-amazon
Copy link
Copy Markdown
Contributor

@andrewmwells-amazon andrewmwells-amazon commented Feb 17, 2026

Python -> Laurel translation.

This includes a new TCore type in Laurel to directly refer to Core types. For now the benchmarks don't work with CVC5.

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

@andrewmwells-amazon andrewmwells-amazon changed the title py laurel cherrypick Python -> Laurel Feb 17, 2026
@andrewmwells-amazon andrewmwells-amazon marked this pull request as ready for review February 17, 2026 19:53
@andrewmwells-amazon andrewmwells-amazon requested a review from a team as a code owner February 17, 2026 19:53
Copy link
Copy Markdown
Contributor

@aqjune-aws aqjune-aws left a comment

Choose a reason for hiding this comment

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

The directory name 'old_expected' doesn't seem to convey much information other than it is old. What about expected-nonlaurel and expected-laurel?

Comment thread StrataTest/Languages/Python/run_py_analyze_laurel.sh Outdated
Comment thread StrataTest/Languages/Python/expected_laurel/test_function_def_calls.expected Outdated
Comment thread Strata/Languages/Laurel/Laurel.lean
Comment thread Strata/Languages/Laurel/LaurelToCoreTranslator.lean
Comment thread Strata/Languages/Python/CorePrelude.lean
Comment thread StrataTest/Languages/Python/expected/test_function_def_calls.expected Outdated
Comment thread StrataTest/Languages/Python/expected_laurel/test_missing_models.expected Outdated
Comment thread Strata/Languages/Python/PythonToLaurel.lean
Comment thread Strata/Languages/Python/PythonToLaurel.lean Outdated
Comment thread Strata/Languages/Python/PythonToLaurel.lean
Comment thread Strata/Languages/Python/PythonToLaurel.lean
@shigoel shigoel enabled auto-merge February 18, 2026 16:46
Merged via the queue into main with commit 93bd01d Feb 18, 2026
15 checks passed
@shigoel shigoel deleted the andrewmwells/py_laurel_cp branch February 18, 2026 18:51
github-merge-queue Bot pushed a commit that referenced this pull request Mar 12, 2026
Change the `LocalVariable none` case to emit Core `init` without RHS
(havoc) instead of `defaultExprForType`. Source language translators
that need default values should add explicit initializers at the Laurel
level.

This is the correct semantics for Laurel as a verification IR: an
uninitialized variable has no known value until assigned. The previous
behavior (defaulting to 0/false/"") was introduced in #435 for
Python→Laurel but doesn't generalize to other source languages (e.g.,
JS/TS where uninitialized means `undefined`, not 0).

Enables a follow-up in #505 to switch constrained type uninitialized
variables from witness injection + assert to assume.

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

Co-authored-by: Shilpi Goel <shigoel@gmail.com>
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.

4 participants