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

Fix global variable example in manual #1890

Merged
merged 5 commits into from
Jul 8, 2023
Merged

Conversation

bboston7
Copy link
Contributor

@bboston7 bboston7 commented Jul 6, 2023

This change makes the following modifications to the global variable example in the SAW manual to get it to verify:

  1. Adds an llvm_alloc_global call to init_global. Without this, the proof fails with "Global symbol not allocated".
  2. Adds a precondition: y < 2^^31 - 1. Without this, the proof fails due to a potential overflow from x + y when y is INT_MAX.

This change makes the following modifications to the global variable
example in the SAW manual to get it to verify:

1. Adds an `llvm_alloc_global` call to `init_global`. Without this, the
   proof fails with "Global symbol not allocated".
2. Adds a precondition: `y < 2^^31 - 1`. Without this, the proof
   fails due to a potential overflow from `x + y` when `y` is `INT_MAX`.
@bboston7 bboston7 added the documentation Issues involving documentation label Jul 6, 2023
@bboston7 bboston7 requested a review from RyanGlScott July 6, 2023 21:31
@bboston7 bboston7 self-assigned this Jul 6, 2023
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

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

LGTM, aside from two suggestions.

doc/manual/manual.md Show resolved Hide resolved
doc/manual/manual.md Outdated Show resolved Hide resolved
@bboston7 bboston7 added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Jul 7, 2023
@mergify mergify bot merged commit 0d6613f into master Jul 8, 2023
@mergify mergify bot deleted the bb/glob-manual-example branch July 8, 2023 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues involving documentation PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants