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

Specification Improvements #93

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Specification Improvements #93

merged 3 commits into from
Oct 13, 2023

Conversation

l-kent
Copy link
Contributor

@l-kent l-kent commented Oct 9, 2023

This covers the specification improvements requested in #91.

The DIRECT functions: field now works properly - as an example, the following will parse correctly:
DIRECT functions: gamma_load32, gamma_load8, bvule64, bvult64, bvuge64, bvsub64, memory_load128_le, zero_extend64_32, sign_extend64_32

It is not really feasible to create instantiate all possible helper functions due to the very large possible numbers of sizes for some operations, and this approach is ok for now as the DIRECT functions is just a temporary measure until we have a more sophisticated specifications system.

It is now possible to manually specify variables that should be in a procedure's modifies clause in a specification. You do not need to specify Gamma_ variables separately. For example, the following will add the global variables mem and R0 to the modifies clause of get_secret() and correctly propagate this through to any procedures that call get_secret():

Subroutine: get_secret
Modifies: mem, R0

You do not need to specify the entire modifies clause, just variables that you want to add to it.

Boogie global variables that were modified by a stubbed out PLT procedure are also now properly added to the modifies clause of those procedures (in practice this is usually just R16 and R17).

@l-kent l-kent requested a review from ailrst October 9, 2023 01:46
@ailrst
Copy link
Contributor

ailrst commented Oct 13, 2023

This looks good we tested it pretty thoroughly this week

# Conflicts:
#	src/main/scala/boogie/BProgram.scala
#	src/main/scala/ir/Program.scala
#	src/main/scala/specification/Specification.scala
#	src/main/scala/translating/SpecificationLoader.scala
#	src/main/scala/util/RunUtils.scala
@l-kent l-kent merged commit ada2dd4 into main Oct 13, 2023
1 check passed
@l-kent l-kent deleted the direct-spec-improvements branch October 16, 2023 04:38
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