ACL2 provides a systems programming capability that allows one to write code that uses and extends ACL2 inside of ACL2. However, for soundness reasons, ACL2 bars the unrestricted use of certain kinds of programming constructs, like destructive updates, higher-order functions, eval, and arbitrary macros. We devised a methodology for writing code in Common Lisp that allows one to access ACL2, ACL2s, and Common Lisp functionality in a unified way. We arrived at this methodology in the process of developing the ACL2 Sedan (ACL2s) and using it as a key component in formal-methods-enabled projects relating to gamified verification, education, proof checking, interfacing with external theorem provers and security. The methodology includes a library for performing ACL2 queries from Common Lisp, as well as guidelines and utilities that help address common needs. We call this methodology "ACL2s systems programming," to distinguish it from ACL2 systems programming. We show how our methodology makes it possible to easily develop tools that interface with ACL2 and ACL2s, and describe our experience using it in our research.
翻译:ACL2提供了一种系统编程能力,允许一个人在ACL2范围内写出使用和扩展ACL2的代码。 但是,出于合理的理由,ACL2禁止不受限制地使用某些类型的编程结构,例如破坏性更新、高命令功能、电子算盘和任意宏。我们在共同的Lisp中设计了一种编程代码的方法,允许一个人以统一的方式访问ACL2、ACL2和共同的Lisp功能。我们在开发ACL2 Sedan(ACL2s)的过程中就采用了这种方法,并将它作为正规方法驱动的项目中的一个关键组成部分,这些项目涉及合成核查、教育、校验、与外部理论验证和安全问题。该方法包括一个图书馆,用于进行CCL2查询,以及用于帮助满足共同需要的指南和公用事业。我们称之为“ACL2系统编程”,以便将其与ACL2系统编程区分开来。我们的方法表明我们如何能够轻易地开发与ACL2和ACL2系统接口的工具,并描述我们在研究中使用它的经验。