We present an efficient term simplifier written in ACL2 and interfaced with ACL2 as an untrusted clause processor. We also demonstrate how an advanced user can extend this simplifier in a sound manner by proving rewrite rules with special annotations and programmed constraints on their application. For problems requiring extensive case analysis, the simplifier is more efficient than ACL2 built-in simplification and we demonstrate this on some relevant examples. In addition, we discuss the issue of user control over predictable simplification and conclude the paper with the proposed implementation of invariant discovery using the simplifier.
MOTIVATIONIn the course of proving theorems in ACL2, the vast majority of the computational resources are spent in the simplification stage of the prover. This is not too surprising when one considers that the majority of the ACL2 theorem proving code implementing the "waterfall" is dedicated to the simplification stage. It is, therefore, relevant to consider alternatives or extensions to ACL2 simplification -especially in cases in which it takes considerable human and computational resources to get the ACL2 simplifier to produce the desired result.In addition, for many problem domains tackled in ACL2 (e.g. proofs of concurrent program correctness), theorems are either proven directly by simplification or proven by a single induction followed by simplification. As an example, all of the proofs for the correctness of a concurrent deque in [13] in ACL2 were either proven by simplification or by a single induction followed by simplification. This highlights the importance of efficient simplification in the proofs of theorems about systems and program execution in ACL2.An alternative to using ACL2 for brute-force simplification is to use ACL2 to reduce the theorem to be proven to a problem that can be translated into a decidable logic that can be solved by an external tool (usually a propositional SAT checker) [4]. This approach is attractive because it separates the problem domains of the tools involved. The user may write high-level definitions in the more expressive language of ACL2 and use the theorem proving support in ACL2 to manually transform the problem to a tractable domain, which is handled by a decision procedure that can be written efficiently to handle problems in the more tractable domain. In cases where the manual effort required to transform the problem to the tractable domain is manageable, this process can certainly be effective, but in cases where this translation is difficult (i.e. when dealing with a concurrent system with an unbounded number of processes), then the translation may require considerable work on proofs and invariant definitions. A further issue arises when either the translation process or the decision procedure is ineffective in handling the problem efficiently -the user often only has coarse-grain control or guidance in the process.In other theorem provers, variations of Nelson-Oppen[7] or Shostak's [11,8,10] are often used as a method to int...