Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formalize the use of bounded integers and error-on-overflow semantics #149

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

emina
Copy link
Contributor

@emina emina commented Nov 7, 2023

This PR changes the formalization of the Cedar semantics to reflect the fact that we're using signed 64-bit integers, along with error-on-overflow semantics for arithmetic operators.

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

@aaronjeline
Copy link
Contributor

This PR should either include or create a new issue to change the DRT to not ignore mismatches on integer overflow errors

@khieta
Copy link
Contributor

khieta commented Nov 7, 2023

This PR should either include or create a new issue to change the DRT to not ignore mismatches on integer overflow errors

Not needed, since the Lean formalization isn't plugged into DRT yet. We should make sure this is done in #30 though.

Copy link
Contributor

@khieta khieta left a comment

Choose a reason for hiding this comment

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

Lgtm.


----- Definitions -----

def mk (i : Int) (h : INT64_MIN ≤ i ∧ i ≤ INT64_MAX) : Int64 :=
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: is it possible to put INT64_MIN ≤ i ∧ i ≤ INT64_MAX in a predicate (function)?

@emina emina merged commit b7c637a into main Nov 7, 2023
3 checks passed
@emina emina deleted the emina/formalize-error-on-overflow branch November 7, 2023 20:35
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.

5 participants