GaloisInc / saw-script

The SAW scripting language.
BSD 3-Clause "New" or "Revised" License
442 stars 63 forks source link

Support `llvm_extract`, `llvm_compositional_extract`, `jvm_extract`, etc. in the Python bindings #2092

Open RyanGlScott opened 3 months ago

RyanGlScott commented 3 months ago

Currently, the llvm_extract family of SAWScript commands do not have counterparts in the SAW Python bindings. I would like to ensure feature parity between SAWScript and Python when adding support for MIR versions of these commands (see https://github.com/GaloisInc/saw-script/issues/2085), and this issue is a prerequisite for that.

In the spirit of the existing design of the Python bindings, I propose that we add extract and compositional_extract Python functions, which choose the appropriate language backend under the hood (e.g., llvm_extract for LLVM or jvm_extract for JVM). Not all language backends would be supported at this time—for instance, there is currently no jvm_compositional_extract function (see https://github.com/GaloisInc/saw-script/issues/1039), so calling the Python compositional_extract function with JVM verification would be an error.