-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: better handling of unconditional branches (#143)
### Description: We now attempt to reflect the PC after each step, only falling back to blindly incrementing if reflection failed. With this change, `sym_n` is able to deal with unconditional branches, and I've fixed the `AddLoop` example accordingly. The `reflectBitVecValue` used here does involve a `whnfD`, which might be a expensive. However, this reduction only happens when the value of the PC is not a literal (i.e., for conditional branches), where reflection of the PC really is necessary. On non-branching instructions, or even unconditional branches, the call should be basically free, so there is little downside to this approach. ### Testing: `make all` ran locally ### License: By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Shilpi Goel <[email protected]>
- Loading branch information
1 parent
4e7e52c
commit cfabb12
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters