Improve the UX of the Python API #1639
Labels
needs administrative review
Requires administrative review
subsystem: saw-python
Related to the Python bindings for the RPC SAW server
subsystem: saw-remote-api
Issues related to the SAW server and its RPC bindings
type: enhancement
Issues describing an improvement to an existing feature or capability
usability
An issue that impedes efficient understanding and use
Milestone
In order to make working with SAW more accessible, we would like the SAW Python API to be a viable alternative to SAWScript. The Python API is already near feature parity with the SAWScript interface for typical LLVM verification tasks. However, my impression is that there is still a gap in user experience between the two interfaces. The Python interface is not yet "first class" in the way that SAWScript is - we should strive to bridge this gap in usability.
In particular:
Term
s seamlessly. The ability to easily use Cryptol as a "glue" language in this way while writing specs informs the design of other parts of the SAWScript interface. There's some cool infrastructure on the Python side that makes this easier in some common cases (notably [RPC] Update with latest cryptol_client, fix types #1550), but there's space to do more - I think Python bindings: Make Cryptol quasiquotation easier #1188 has some good discussion on related topics. It's possible that the most ergonomic interface in Python looks significantly different compared to SAWScript, which raises other questions related to a potential automatic SAWScript -> Python translator.:env
, check the type of some command,eval_int
some Cryptol, or inspect aTerm
. Thesubshell
command introduced in Proof development primitives #1637 is a powerful tool that makes it much easier to enter the REPL within the context of a larger proof. In general I see a trend toward more interactive use of SAW during development. We should make sure that the interactive experience in Python is good, and that similar tools are available in that setting.@andreistefanescu and I have brainstormed a few ideas related to this in the past (better use of verbosity levels in error messages, maybe named breakpoints to identify particular places to enable printing, maybe ways to easily drop into GHCi or another interactive interface), and I'm sure that there's an endless amount of design that could be done in this space.
@m-yac @RyanGlScott I think you've worked with the Python interface more than I have, so I'd especially appreciate any thoughts you might have re: things we could do to make it better, or if any of the above is totally off-base.
The text was updated successfully, but these errors were encountered: