-
Notifications
You must be signed in to change notification settings - Fork 20
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
symbolic-syntax: Syntactic sugar #349
Comments
An alternative approach (which was adopted by the (defun @test ((x Int)) Int
(start start:
(return x))) And then mapping the argument and result values to the corresponding registers. Most of the time, this is far more convenient, and it makes the overrides more portable across architectures. It does have the downside of not giving the user fine-grained control over the register state, however. As a concrete example of where this would be important, ARM's |
#422 accomplishes this for x86_64, we should create similar packages for the other architectures. I've added a checklist to the OP. |
macaw-symbolic encodes functions as Crucible CFGs that take and return a struct of all the register values. This struct has a lot of fields. Here's a very simple no-op Macaw x86_64 CFG written in the
symbolic-syntax
:This is way too long to write in a bunch of test cases. Additionally, accessing individual registers involves loading fields from this struct at certain indices, but such statements don't really incidate which registers are being accessed.
We should introduce some syntactic sugar to make it easier to write macaw-symbolic CFGs. In particular, we should add:
X86_64Regs
which would be a synonym for the aboveget-reg
andset-reg
statements that take a human-readable register name likersi
and map it to an appropriate get/set field operation on the register structThis could be accomplished using the
ParserHooks
argument tomachineCodeParserHooks
.We will need separate packages for each architecture:
macaw-ppc-syntax
: Syntactic sugar for PowerPC CFGs #453The text was updated successfully, but these errors were encountered: