• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
        • Gentle-introduction-to-ACL2-programming
        • ACL2-tutorial
        • About-ACL2
          • Recursion-and-induction
          • Operational-semantics
          • Soundness
          • Release-notes
            • Note-2-8
            • Note-2-7
            • Note-8-6
            • Note-8-7
            • Note-8-2
            • Note-7-0
            • Note-8-5
            • Note-8-3
            • Note-8-1
            • Note-8-0
            • Note-7-1
            • Note-6-4
            • Note-2-9-3
            • Note-2-9-1
            • Note-8-4
              • Note-8-4-books
              • Note-7-2
              • Note-6-5
              • Note-4-0
              • Note-2-9-2
              • Note-3-6
              • Note-3-3
              • Note-3-2-1
              • Note-3-0-1
              • Note-2-9-5
              • Note-2-5
              • Note-1-5
              • Note-6-1
              • Note-4-3
              • Note-4-2
              • Note-4-1
              • Note-3-5
              • Note-3-4
              • Note-3-2
              • Note-3-0-2
              • Note-2-9-4
              • Note-2-9
              • Note-1-8
              • Note-1-7
              • Note-1-6
              • Note-1-4
              • Note-1-3
              • Note-7-4
              • Note-7-3
              • Note-6-3
              • Note-6-2
              • Note-6-0
              • Note-5-0
              • Note-1-9
              • Note-2-2
              • Note-1-8-update
              • Note-3-5(r)
              • Note-2-3
              • Release-notes-books
              • Note-3-6-1
              • Note-1-2
              • Note-2-4
              • Note-2-6
              • Note-2-0
              • Note-3-0
              • Note-3-2(r)
              • Note-2-7(r)
              • Note-1-1
              • Note-3-4(r)
              • Note-3-1
              • Note-2-8(r)
              • Note-2-1
              • Note-2-9(r)
              • Note-2-6(r)
              • Note-3-1(r)
              • Note-3-0(r)
              • Note-3-0-1(r)
              • Note-2-5(r)
              • Note-4-3(r)
              • Note-4-2(r)
              • Note-4-1(r)
              • Note-4-0(r)
              • Note-3-6(r)
              • Note-3-3(r)
              • Note-3-2-1(r)
            • Version
            • Acknowledgments
            • Pre-built-binary-distributions
            • How-to-contribute
            • Common-lisp
            • Git-quick-start
            • Copyright
            • Building-ACL2
            • ACL2-help
            • Bibliography
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Mailing-lists
        • Interfacing-tools
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Note-8-4
    • Release-notes-books

    Note-8-4-books

    Release notes for the ACL2 Community Books for ACL2 8.4

    The following is a brief summary of changes made to the community-books between the releases of ACL2 8.3 and 8.4.

    See also note-8-4 for the changes made to ACL2 itself. For additional details, you may also see the raw commit log.

    New Libraries

    ACL2 Arrays Library

    A library to support reasoning about programs that use ACL2 arrays (e.g., those satisfying array1p). Includes operations that make such arrays exapandable. Includes a tool for defining typed ACL2 arrays. See kestrel/acl2-arrays/.

    ACL2 Programming Language Library

    This is a library about the ACL2 programming language. It includes a formalization of its evaluation semantics. (This is just the work of this library's author, not an official semantics of the ACL2 programming language; see evaluation for an official description of the ACL2 evaluation semantics.)

    Algorithm Theories Library

    A library has been started to collect algorithm schemes, starting with a scheme for a generic tail recursive function. See kestrel/algorithm-theories/.

    Arrays-2D Library

    A formalization of two-dimensional arrays as lists of lists (both with arbitrary elements and with elements that are known to be bit- vectors). See kestrel/arrays-2d/.

    Bigmem

    A library that defines a 2^64-byte memory model that is logically a record but provides array-like performance during execution.

    C Library

    This is a library about the C language. It contains a formalization of (some aspects of) the C language and ATC (`ACL2 To C'), a C code generator for ACL2.

    ATC, the C Code Generator for ACL2

    This is a proof-generating C code generator for ACL2. Besides the C code, it also generates proofs (i.e. ACL2 theorems) asserting the correctness of the C code.

    This currently covers a relatively limited subset of ACL2 and C. The coverage is being extended.

    C Language Formalization

    This currently covers just character sets, bytes, and keywords. The coverage is being extended.

    A preliminary formalization of the static and dynamic semantics of a subset of C can be found as part of ATC. Some of that material may be moved here in the future.

    Isar Library

    This is a library to support proofs in the style of Isabelle's Isar (Intelligent Semi-Automated Reasoning) language. It is just a small step in that direction for now.

    JSON Library

    This is a library about JSON. It currently contains an initial abstract syntax of JSON, consisting of fixtypes; it also contains some initial operations on this abstract syntax, as well as a translator from the output of the parser at kestrel/json-parser/ to the abstract syntax.

    JSON Parser

    A JSON parser implemented in ACL2, including Unicode support. See kestrel/json-parser/.

    JVM Library

    Kestrel's model of the Java Virtual Machine, including support for code proofs and lifting. Works with Kestrel's Axe toolkit. Also includes a class file parser. See kestrel/jvm/.

    Number Theory Library

    A library about number theory, dealing with notions like primality, divisibility, quadratic residues, etc. Includes the defprime and defprime-alias tools to introduce standard reasoning machinery about primes. Includes a proof of the Tonelli-Shanks Modular Square Root Algorithm. See kestrel/number-theory/.

    Ordered Bags Library

    This is a library that represents bags (a.k.a. multisets) as non-strictly-ordered lists. Thus, they capture (up to isomorphism) the mathematical notion of bag; in particular, bag equality is equal.

    This is analogous to the library of ordered sets and to the library of ordered maps.

    MiMC Library

    This is a library that formally specifies and implements the Minimal Multiplicative Complexity (MiMC) hash function as used by Ethereum's Semaphore. This is currently under the cryptographic library.

    PFCS (Prime Field Constraint System) Library

    This is a library that introduces and formalizes the notion of PFCS (Prime Field Constraint Systems), which generalize R1CS and possibly other constraint systems for zero-knowledge proofs. This is currently under the cryptographic library.

    Random Library

    A lightweight library containing some simple random number generators. See kestrel/random/.

    Read and Parse ELF/Mach-O Binary Files

    This library can be used to read in sections of ELF/Mach-O files into ACL2. An older version of these books used to live in the x86isa library.

    Sequences Library

    A library for defining higher-order operations over lists (defforall, defexists, defmap, and deffilter). See kestrel/sequences/.

    Simple Programming Language Imp

    This is a library about a simple programming language, called Imp, found (with small variations) in a variety of didactic resources. This library formalizes syntax and semantics of this language, and provides a program-mode interpreter of Imp programs. This library may be extended with examples of formal verification of Imp programs in ACL2.

    Solidity Library

    This is a library about the Solidity language for Ethereum smart contracts. It includes a formalization of some aspects of the language. There are plans to extend this to cover more aspects.

    Strings-Light Library

    A lightweight library about strings, including changing case, splitting strings and character lists, etc. See kestrel/strings-light/.

    Terms-Light Library

    A lightweight library of operations on terms (e.g., finding free and bound vars and applying variable substitutions). See kestrel/terms-light/.

    Typed-Lists-Light Library

    A lightweight library dealing with lists of objects of particular types (rather than lists in general). For example, lists of integers, of symbols, of pseudo-terms, etc. See kestrel/typed-lists-light/.

    Unicode-Light Library

    A lightweight library about Unicode, dealing with UTF-8 encoding and UTF-16 surrogate code points. See kestrel/unicode-light/.

    Untranslated Term Library

    A new library for manipulating untranslated terms, which allows structure to be maintained that would be lost by translation. See kestrel/untranslated-terms/.

    X86 Library (Kestrel)

    This library contains Kestrel's x86 proof machinery, which complements the X86ISA model. This library focuses on readability of proof terms and supporting the lifting of x86 code into logic with the Axe toolkit. It also includes parsers for PE and Mach-O executables. See kestrel/x86/.

    Yul Library

    This is a library about the Yul intermediate language, currently used in the Ethereum Solidity compiler but designed for more general use. This library includes a formalization of some aspects of the language. There are plans to extend this to cover more aspects.

    Zcash Library

    This is a library about the Zcash blockchain, which is based on zero-knowledge proofs.

    Changes to Existing Libraries

    ABNF Library

    The proofs of correctness of the grammar parser have been moved to a separate file, so that including the parser does not necessarily also includes the proofs, and so that book certification can be faster.

    A new file and XDOC topic has been started to collect parsing primitives, i.e. parsing functions from the ABNF grammar parser that are more generally useful than that parser. These parsing primitives may be useful to write parsers for other languages specified by ABNF grammars (besides ABNF itself, which is what the grammar parser does).

    Alists-Light Library

    New rules and books have been added, including books on alistp, clear-key, and keep-pairs. See kestrel/alists-light/.

    APT Library

    An APT defaults table has been added, analogous to the ACL2 defaults table but specific to APT. Utilities to set and retrieve a number of defaults have also been added.

    Some XDOC constructors have been added, and others have been improved. See xdoc::apt-constructors.

    Some input processors have been added, and others have been improved. See apt::input-processors.

    A new transformation has been added: apt::schemalg, the `schematic algorithm transformation'. This transformation applies algorithm schemas to non-executable specifications: given a functional specification (e.g. consisting of an input/output relation, possibly as a precondition and postcondition), this transformation partially determines the solution and generates sub-specifications that, once recursively solve, provide a solution to the initial specification. In particular, divide-and-conquer algorithm schemas are supported: the schema is a recursive function that decompose the input, solve the sub-input(s), and composes the sub-output(s) to obtain an output. This schematic algorithm transformation is currently realized using SOFT to represent specifications and algorithm schemas, with specifications as second-order functions and refinement as backward implication, as described in the ACL2-2015 Workshop paper on SOFT. In the future, this transformation may be extended to represent specifications and algorithm schemas via the built-in apply$.

    A new transformation has been added: apt::solve, the `solving transformation'. This attempts to directly solve a program synthesis problem, expressed as a constraint problem, via inference methods like rewriting, SMT solving, SAT solving, etc. Currently two rewriting methods are supported, along with a manual method in which the solution is supplied (which still automates some event and proof generation); support for more methods will be added.

    A new transformation has been added: apt::expdata, the `expanded data transformation'. This can realize data type refinements where each instance of the old data may be represented by multiple instances of the new data, according to a surjective mapping from the new to the old data. These are more general data type refinements than apt::isodata, but the transformation is not inherently reversible (e.g. for raising the level of abstraction in program analysis).

    The apt::propagate-iso transformation has been added.

    A new transformation has been added: apt::simplify, the `simplification transformation'. It transforms a given definition or term using ACL2 reasoning, in particular by applying the currently (or specified) enabled rewrite rules. The result is generally simpler than the input but logically equivalent to it.

    The apt::isodata transformation has been improved as follows:

    • The :thm-name input has been replaced with a new :old-to-new-name input, which, when absent, is taken from the APT defaults table.
    • The :thm-enable input has been replaced with a new :old-to-new-enable input, which, when absent, is taken from the APT defaults table.
    • A new :new-to-old-name input has been added to specify the name of the theorem new-to-old that rewrites calls of the new functions to terms involving calls of the old function. This theorem is now generated along with the converse one. If the :new-to-old-name input is absent, it is taken from the APT defaults table.
    • A new :new-to-old-enable input has been added to specify whether the new-to-old theorem is enabled or not. If this input is absent, it is taken from the APT defaults table.
    • The newp-of-new theorem, which asserts that the new function maps arguments in the new representation to results in the new representation, is now generated not only locally to support some generated proofs, but also non-locally, so that it remains in the ACL2 history. This theorem is only generated if some result is being transformed.
    • A new :newp-of-new-name input has been added to specify the name of the newp-of-new theorem. This input is allowed only if some result is being transformed, because otherwise no newp-of-new theorems is generated.
    • A new :newp-of-new-enable input has been added to specify whether the newp-of-new theorem is enabled or not. This input is allowed only if some result is being transformed, because otherwise no newp-of-new theorems is generated.

    The apt::restrict transformation has been improved as follows:

    • The transformation has been simplified by removing the :non-executable option, which does not seem necessary or useful. The new function is marked non-executable if and only if the target function is.
    • The transformation has been made more widely or readily applicable by removing the applicability condition that required the restriction predicate to be boolean-valued. The new function now uses mbt$ instead of mbt, thus obviating the need for the removed applicability condition.
    • The :thm-name and :thm-enable inputs have been renamed to :old-to-new-name and :old-to-new-enable, in line with other transformations. Besides the name change, these two inputs now support the APT defaults table.
    • A new :new-to-old-name input has been added to specify the name of the theorem new-to-old that rewrites calls of the new functions to terms calls of the old function. This theorem is now generated along with the converse one. If the :new-to-old-name input is absent, it is taken from the APT defaults table.
    • A new :new-to-old-enable input has been added to specify whether the new-to-old theorem is enabled or not. If this input is absent, it is taken from the APT defaults table.

    The apt::tailrec transformation has been improved as follows:

    • The transformation has been extended with a new variant, :assoc-alt, which is an alternative associative variant.
    • The transformation has been simplified by removing the :non-executable option, which does not seem necessary or useful. The new function is marked non-executable if and only if the target function is; the wrapper is never marked non-executable.
    • The generated names for the new and wrapper functions, when :new-name is :auto and/or :wrapper-name is :auto, have been improved. If the target function is f{i} (where we view f as f{0}), now the new function is f{j} if no wrapper is generated; otherwise, the new function is f-aux{j} and the wrapper is f{j}. Here j is the smallest integer above i that results in fresh function names. Note that, in this way, these automatically generated names are always numbered names, which facilitates the application of further transformations.
    • The default of the :wrapper input has been changed from t to nil. The rationale is that not generating the wrapper is expected to be more frequent than generating it.
    • Now the :wrapper-enable input, if absent, is taken from the APT defaults table.
    • An :accumulator input has been added to optinally specify the name of the accumulator argument of the new function.
    • The theorem that rewrites the target function in terms of the new function is now always generated, regardless of the :wrapper input. If :wrapper is t, the theorem that rewrites the target function in terms of the wrapper function is also generated.
    • The :thm-name input has been replaced with two new inputs :old-to-new-name and :old-to-wrapper-name, which individually control the names of the theorems that rewrite the target function in terms of the new or wrapper function. These new inputs, if absent, take their values from the APT defaults table.
    • The :thm-enable input has been replaced with two new inputs :old-to-new-enable and :old-to-wrapper-enable, which individually control the enablement of the theorems that rewrites the target function in terms of the new or wrapper function. These new inputs, if absent, take their values from the APT defaults table.
    • Now the transformation also generates a theorem that rewrites the new function in terms of the old function. The name and enablement of this theorem are controlled by two new inputs :new-to-old-name and :new-to-old-enable. These new inputs, if absent, take their values from the APT defaults table.
    • Now the transformation also generates a theorem that rewrites the wrapper function in terms of the old function (when the :wrapper input is t). The name and enablement of this theorem are controlled by two new inputs :wrapper-to-old-name and :wrapper-to-old-enable. These new inputs, if absent, take their values from the APT defaults table.
    • The heuristics for inferring the domain of the binary operator (when the :domain input is, generally by default, :auto) have been extended to infer more cases automatically.
    • The target function's if body, after translation and let expansion, can now have a recursive `then' branch and a non-recursive `else' branch. Before, the `then' branch had to be the non-recursive one and the `else' branch had to be the recursive one. This makes the transformation more widely applicable.

    A file kestrel/apt/tailrec-examples.lisp has been added. It contains examples of uses of apt::tailrec, with explanatory comments. This could serve as a preliminary tutorial.

    New design notes about specifications and refinements have been added, along with a manual page that describes various forms of specifications.

    A variety of APT-related utilities have been added, including deftransformation, which can be used to generate transformations (taking care of much of the boilerplate code).

    Arithmetic-Light Library

    Many new rules and books have been added, including books on integer-length ceiling-of-lg, evenness and oddness, truncate, rem, ash, min, max, <=, abs, and natp. Commonly used rules about arithmetic types have been collected, and a utility has been added to prevent calls of expt on huge exponents. See kestrel/arithmetic-light/.

    Axe Toolkit

    Major additions have been made to the open-source Axe toolkit, which now includes most of Axe. The library now includes Axe's connection to the STP solver as well as machinery to make customized Axe rewriters and provers. A basic (general-purpose) prover and rewriter are included, as are a legacy prover and rewriter. Utilities to unroll specifications through rewriting are included, as is the Axe Tactic Prover. Many rules that have been useful in Axe proofs are also included. See kestrel/axe/.

    A toolkit for using Axe to reason about JVM code has been added. It includes utilities to lift JVM code into logic. A Formal Unit Tester tool is also included, to support small solver-backed proofs about bounded executions of programs. See kestrel/axe/jvm/.

    A toolkit for using Axe to reason about x86 code has been added. It includes utilities to lift x86 code into logic. See kestrel/axe/x86/.

    A toolkit for using Axe to reason about R1CSes has been added. It includes utilities to lift R1CSes into logic and verify them. See kestrel/crypto/r1cs/tools/.

    Booleans Library

    New rules and defcongs have been added. See kestrel/booleans/.

    BV Library

    Extensive additions have been made, including over 1000 new rules. Books have been added covering many more BV operations, including subtraction, arithmetic negation, multiplicaton, shifts, bitwise OR and AND, logical negation, signed and unsigned comparisons, signed and unsigned division and remainder, trimming, sign extension, various single-bit operations, bit-vector-valued conditionals, converting between bits and booleans, recognizing bits and (signed and unsigned) bytes, repeating a bit, and counting the number of 1 bits. Rules have been added to characterize signed addition overflow and underflow and to turn BV ops into more common or more idiomatic operations. A formalization of one's complement numbers and addition has been added. Various syntactic functions have been added for BV-valued terms. See kestrel/bv/.

    BV-Lists Library

    Many new rules and books have been added. New books include ones about bv-arrayp, bv-array-read, bv-array-write, all-all-unsigned-byte-p, width-of-widest-int, bvnot-list, getbit-list, map-slice, bvplus-list, logext-list, bv-nth, map-packbv, all-signed-byte-p, conversions between lists and bv-arrays, packbv-little, and byte-listp. Utilities have been added that deal with about patterns in the elements of BV lists. See kestrel/bv-lists/

    Cryptographic Library

    BLAKE Library

    Formal specifications of the BLAKE2s, BLAKE2s-extended, and BLAKE-256 hash functions have been added. See kestrel/crypto/blake/.

    Elliptic Curve Library

    The formalization of short Weierstrass curves has been extended and improved.

    A formalization of twisted Edwards curves has been added.

    A formalization of Montgomery curves has been added.

    A formalization of the birational equivalence between Montgomery and twisted Edwards curves has been added.

    The file kestrel/crypto/ecurve/bls12-377-domain-parameters.lisp has been added. It introduced some parameters of the BLS12-377 elliptic curve.

    A formalization of the Edwards BLS12 elliptic curve has been added.

    Rank-1 Constraint Systems (R1CS)

    A formal semantics for rank-1 constraint systems (R1CSes) has been added. These are often used by zero-knowledge proofs. Extensive reasoning support for reasoning about R1CSes has also been added, including verified R1CS gadgets and support for applying the Axe toolkit.

    Error Checking Library

    This library is being moved from kestrel/utilities/error-checking/ to kestrel/error-checking/. It is also being refactored and improved in the process.

    Ethereum Library

    Some theorems about hex-prefix encoding have been added.

    A sub-library for the Semaphore gadget has been added. This includes various specifications and proofs of Semaphore-related R1CSes, including a mixing function from BLAKE2s and 3 variants of the MiMC hash function. It also includes Semaphore-specialized Axe tools to lift R1CSes into logic and verify them.

    Event Macros Library

    The utilities cw-event, fail-event, make-event-terse, and try-event have been moved here from kestrel/utilities/user-interface.lisp.

    The XDOC constructor xdoc::evmac-section-form-auto has been removed. Not being able to use this XDOC constructor avoids additional inter-dependencies among books that do not seem worth the small savings in writing user documentation, whose general form section should be normally a small fraction.

    The XDOC constructor xdoc::evmac-topic-event-generation has been extended with an additional option.

    New XDOC constructors have been added and some XDOC constructors have been improve.

    A utility evmac-prepare-proofs has been added, to improve the robustness of proofs generated by event macros.

    Utilities have been added to generate various kinds of event forms from attributes of the event forms.

    Some general XDOC topics about event macros have been added, which can be referenced by the user documentation of event macros.

    Read and Parse ELF/Mach-O Binary Files

    ELF reader now gets the contents of all the sections listed in the headers of a given ELF binary. Also, the package name has been changed from EL to EXLD.

    File-Io-Light Library

    Various lightweight utilities have been added to read and write files (of bytes, characters, and objects). These include a utility to read the bytes of a file into a stobj array. Reasoning support has also been added for various built-in I/O functions. Related utilities have been added, such as to check whether a file exists or is newer than a given date. See kestrel/file-io-light/.

    Fixtype Definition Library

    A new macro fty::defbyte-ihs-theorems has been added to generate theorems about fixtypes introduced via fty::defbyte and functions in the IHS library. This macro has been used to generate, and make available, these theorems for some of the fty::defbyte standard instances.

    More fty::defbyte standard instances have been added.

    The macro fty::defset has been improved to generate additional theorems.

    The macro fty::defomap has been improved to generate additional theorems.

    A fixtype nat-set of osets of natural numbers has been added.

    fty::deflist has been extended to generate a theorem about the list fixer applied to repeat.

    A macro fty::defsubtype has been added.

    A macro fty::defunit has been added.

    Java Library

    AIJ, the Deep Embedding of ACL2 into Java

    More JUnit unit tests have been added, integrated with the IntelliJ IDEA project.

    The Java implementations of some natively implemented ACL2 functions have been optimized.

    Variant Java implementations of some natively implemented ACL2 functions have been added, in support of the automatic mapping, in the shallow embedding with guards, of ACL2 booleans and characters to Java booleans and characters.

    A native implementation has been added of the char ACL2 built-in function. As with other native implementations, this consists of a few variants for different input and output types. This native Java implementation is faster than the Java code obtained from the unnormalized body of char, which converts the string to a list of characters and then calls nth; the native Java implementation accesses the string directly.

    ATJ, the Java Code Generator for ACL2

    The model of Java primitive arrays has been extended with functions to convert between arrays and corresponding ACL2 lists. The model has been made much more compact by defining and using a macro that captures the structure common to the eight Java primitive array types.

    Support has been added to recognize ACL2 functions that convert between Java primitive arrays and ACL2 lists, and translate them to Java code that converts between arrays and lists. This applies to the shallow embedding with guards.

    In the shallow embedding with guards, now ACL2 booleans are mapped to Java booleans when possible. The generated Java code takes care of converting, as needed, between the Java booleans and the Acl2Symbol objects for t and nil. This new mapping happens automatically; it is separate from the explicit targeting of Java booleans via the ACL2 model of Java boolean values.

    In the shallow embedding with guards, now ACL2 characters are mapped to Java characters when possible. The generated Java code takes care of converting, as needed, between the Java characters and the Acl2Character objects. This new mapping happens automatically; it is separate from the explicit targeting of Java characters via the ACL2 model of Java character values.

    In the shallow embedding with guards, now ACL2 strings are mapped to Java strings when possible. The generated Java code takes care of converting, as needed, between the Java strings (i.e. java.lang.String objects) and the Acl2String objects.

    Some of the generated Java code in the shallow embedding with guards has been made more idiomatic. Calls of the Java method corresponding to not are now avoided in favor of using Java's ! operator or Java's == operator with the symbol nil. Calls of ACL2's and are translated to Java's && operator when possible. Calls of ACL2's or are translated to Java's || operator when possible.

    A new post-translation step has been added to ``inline'' (in a suitable sense) the calls of the array write methods that are generated by the translation step. This makes the generated Java code more idiomatic. This applies to the shallow embedding with guards.

    A new post-translation step has been added to simplify generated Java conditional expressions whose test is a boolean literal.

    The Java code to build the ACL2 environment is now generated in a separate Java class in a separate Java file. This class's name is obtained by adding Environment after the main class's name. This way, the main class is free of the extensive and boilerplate code to build the ACL2 environment, making it easier to find and see the ``interesting'' generated Java code.

    The Java abstract syntax used by the code generator is now more precise, in the sense that it captures more syntactic aspects of Java.

    ATJ function types have been verified and recorded for more built-in functions, thus avoiding certain type casts and other conversions in the generated Java code. ATJ function types have also been verified and recorded for certain library functions, for the same reason; these files can be included as needed.

    The macros java::atj-main-function-type and java::atj-other-function-type have been extended with an option to provide hints for the theorems they prove internally.

    An option :ignore-whitelist has been added to ignore the whitelist of ACL2 functions with raw Lisp code, i.e. to translate them to Java (so long as they have an unnormalized body). This must be used by caution: side effects in the raw Lisp code will not be replicated in Java, e.g. hard-error will just return nil. This could be useful when the functions in question are unreachable under guard verification, for instance. The default is nil, i.e. do not ignore the whitelist, so the user must explicitly write :ignore-whitelist t to ignore the whitelist.

    Java Language Formalization

    Some functions and theorems related to integer literals have been added. These are part of the formalized abstract syntax of Java.

    Some theorems about the Java primitive operations have been added.

    More aspects of the Java syntax have been formalized, including: the ISO 8851-1 subset of Unicode characters; type identifiers; unqualified method identifiers; package names; reference types; and all types.

    The formalization, including the ABNF grammar, have been updated to Java 14. In particular, this involved updating of the ABNF grammar with switch expressions and yield statements.

    Library Wrappers

    A library wrapper for sublistp has been added, as has a robust variant of make-flag.

    Lists-Light Library

    Many rules, congruences, and new books have been added. New books cover the functions subsequencep, subsequencep-equal, last-elem, subrange, update-subrange, finalcdr, all-equal$, all-eql$, all-same, all-same-eql, add-to-end, first-non-member, group/ungroup (for splitting and flattening), count-occs, prefixp, len-at-least, remove-equal, remove-duplicates-equal, find-index, and remove-nth. See kestrel/lists-light/.

    Ordered Maps (Omaps) Library

    Added an operation to create an omap from a list of keys and a corresponding list of values.

    Prime-Fields

    Many new rules have been added, and existing rules have been improved. These include many rules for recogizing R1CS gadgets. The library is more organized, and some proofs have been made faster. bind-free rules have been added for canceling addends and moving negations. Utilities have been added for naming and printing special constants. See kestrel/prime-fields/.

    Record-like Stobjs

    Add support for defining fields based off child stobjs.

    SOFT Library

    A new macro soft::defsoft has been added, to record a function as second-order after the function has been introduced via a non-SOFT event. The SOFT macros soft::defun2, soft::defchoose2, and soft::defun-sk2 have been simplified to be abbreviations of defun, defchoose, and defun-sk followed by soft::defsoft.

    New macros defund2, soft::define2, soft::defund-sk2, and soft::define-sk2 have been added. These abbreviate defund, define, defund-sk, and std::define-sk followed by soft::defsoft, analogously to other macros as described above.

    A new macro soft::defequal, to define second-order equalities between functions and provide some reasoning support for them.

    An option :enable has been added to soft::defun-inst, to control the enablement of the generated function (and, for quantifier functions, also of the associated rewrite rule).

    An option :enable has been added to soft::defthm-inst, to control the enablement of the generated theorem.

    Standard Basic Library

    A new utility good-valuep has been added, which checks whether a value is either a good atom or a cons pair whose components are recursively good values. That is, the value must not be a bad arom or contains (directly or indirectly) bad atoms.

    A new utility good-pseudo-termp has been added, which checks whether a pseudo-term only contains good values (see good-valuep) in its quoted constants.

    Standard IO Library

    Modified the raw-Lisp implementation of read-string to catch errors successfully, as intended. This could fail in SBCL 2.0.5 (implementation note: because the error message referenced a string stream that was already closed).

    Standard System Library

    A new utility check-if-call has been added, to check if a term is a call of if and to return its three arguments if that is the case.

    A new utility check-and-call has been added, to check if a term is a (translated) call of and and to return its two conjuncts if that is the case.

    A new utility check-or-call has been added, to check if a term is a (translated) call of or and to return its two disjuncts if that is the case.

    A new utility check-mbt-call has been added, to check if a term is a (translated) call of mbt and to return its argument if that is the case.

    A new utility check-mbt$-call has been added, to check if a term is a (translated) call of mbt$ and to return its argument if that is the case.

    A theorem about the built-in flatten-ands-in-lit has been added, in kestrel/std/system/flatten-ands-in-lit.

    A new utility fresh-name-listp-msg-weak has been added, which lifts fresh-namep-msg-weak to lists.

    The utility check-mv-let-call has been generalized to check for the presence of hide wrappers introduced when mv-let has ignore declarations, and to return information about their presence or absence.

    The utilities install-not-normalized-event and install-not-normalized-event-lst have been improved to return an additional result, namely the updated list of names to avoid. This helps making the calling code more concise and less error-prone.

    The utility install-not-normalized now uses the untranslated version of the original body in the generated definition.

    A new utility if-tree-leaf-terms has been added, to collect the leaf sub-terms of a term according to the if tree structure of the term.

    The utility acceptable-rewrite-rulep has been moved from kestrel/utilities/ to std/system/.

    New utilities irrelevant-formals-info and chk-irrelevant-formals-ok have been added, to perform an irrelevant-formals check on a given definition or list of definitions.

    New utilities have been added to find the sources of invariant-risk for given functions. See std/system/invariant-risk.lisp.

    Standard Testing Library

    The contents of the file misc/assert-tests.lisp have been moved to new separate files under Std/testing. That file has been removed.

    The relocation stub misc/assert.lisp for books that are now in Std/testing has been removed.

    The event macros assert! and assert!-stobj no longer invoke make-event, but rather, create direct calls of assert-event.

    Standard Typed Alists Library

    A type symbol-symbollist-alistp has been added for alists from symbols to true lists of symbols.

    Standard Utilities Library

    A new event macro defund-sk has been added, which is like defun-sk but it disables (1) the function definition (if :constrain is nil) or the definition rule (if :constrain is non-nil) and (2) the rewrite rule if the :thm-enable input is nil (which is the default).

    A new event macro defmacro+ has been added, with is like defmacro but with XDOCintegration.

    Like defun-nx, now define also disables the executable counterpart of a non-executable function.

    A new event macro defmapping has been added, to verify and record mappings that must be (based on supplied options) injective, surjective, or bijective.

    The defiso event macro is now a specialization of defmapping, implemented as a thin wrapper of defmapping.

    A new event macro definj has been added to verify and record injective mappings. It is a specialization of defmapping, implemented as a thin wrapper of defmapping.

    A new event macro defsurj has been added to verify and record surjective mappings. It is a specialization of defmapping, implemented as a thin wrapper of defmapping.

    A new event macro defthm-commutative has been added, to generate commutativity theorems for binary operations more concisely.

    Support for :prepwork has been added to std::deflist.

    Support for defun-sk's option :constrain has been added to std::define-sk.

    A macro std::tuple has been added, to mimic the mv return specifier notation for tuple (i.e. list) results, useful inside error triples.

    The macro std::define-sk has been moved from kestrel/utilities/ to std/util/.

    A new event macro add-io-pairs has been added, to speed up a function using verified input-output pairs. Related utilities include add-io-pair, remove-io-pairs, show-io-pairs, and get-io-pairs.

    A new event macro defmin-int has been added, to declarative define the minimum of a (possibly infinite) set of integers. This is similar to defmax-nat.

    Utilities Library (Kestrel)

    A large number of utilities have been added, covering a wide range of topics. These include dealing with event forms, making fresh names, manipulating hints, dealing with untranslated terms, building simple list structures, dealing with quoted entities, building strings, checking whether a symbol has properties, dealing with runes, parsing options, processing keyword args, and recognizing legal variable names. New utilities also deal with importing and legal variable names, format strings, printing, translation, manipulating terms, invariant risk, submitting events to ACL2, creating temp dirs, process IDs, usernames, calling scripts, macroexpansion and translation, asserts, untranslated-terms, redundant events, guard-holders, ruler-extenders, lets/lambdas, fake worlds, clause identifiers, progn, unification, dependencies, ensuring rules are known, quieting make-event, checking for closed lambdas, processing defun and defthm forms, processing declares, the ACL2 state, system-books-dir, fixing functions, acl2-count, make-ord, coerce, map-symbol-name, tuples, myif, and mv-nth.

    Various improvements have been made to defopeners and defopeners-mut-rec.

    New utilities support computing a constant using make-event, reading a value from a file into a defconst, and printing constants nicely.

    A new ACL2 Lint tool can detect common ACL2 errors.

    Reasoning about I/O channels has been improved.

    A new tool, bind-from-rules can bind free variables in rules by searching existing rules.

    A new data structure, string trees, can efficiently represent a sequence of strings (e.g., for writing to a file).

    A new tool supports polarity-based rewriting, whereby a term can be either strengthened or weakened depending on whether it is an assumption or a conclusion.

    Sorting utilities have been added, including split-list-fast, merge-sort-generic, and defmergesort.

    Various xdoc-related utilities have been added, including new xdoc constructors (such as one that creates paragraphs from blocks of text separated by blank lines). A new tool, gen-xdoc-for-file can generate xdoc topics for the events (defuns, defthms, etc.) in a file by extracting the actual relevant text (the definition and any immediately preceding or following comment lines) from the file. Helpful wrappers for xdoc archiving utilities have also been added; these can help speed up manual building.

    See kestrel/utilities/.

    Xdoc Library

    The web-based manual now includes a clickable link to GitHub at the top of each documentation topic from the Community Books. The link lets you view the contents of the source file that introduced that topic.

    The file doc/top-slow.lisp no longer actually builds a manual. Instead, it serves as a top-level book to detect name conflicts between community books. Manual building is now taken care of by doc/top.lisp.

    Licensing Changes

    Build System Updates

    By default, make commands for certifying ACL2 books take advantage of files *@useless-runes.lsp. See useless-runes.

    One line of file Makefile-generic has been tweaked to avoid the +make construct, which may help avoid errors in FreeBSD systems.

    Building of the combined ACL2+Books manual (by certifying doc/top.lisp) has been made more efficient (more than 20% reduction measured when such changes were made).

    Testing

    Miscellaneous

    The line containing #!/bin/bash at the top of various shell scripts has been replaced by a line containing #!/usr/bin/env bash, for increased portability.

    The book tools/defttag-muffled.lisp provides a way, using a trust tag, to turn off all subsequent ``TTAG NOTE'' messages. Use with care!!

    See rewrite$ for a flexible, convenient interface to the ACL2 rewriter that can be called programmatically. See rewrite$-hyps for a related utility that rewrites a list of hypotheses.

    See open-trace-file! for a variant of open-trace-file suitable for use within make-event.

    There are some changes in the utility make-flag (descibed in more detail in its documentation). (1) The value for keyword argument :flag-mapping is now expected to be a list of doublets, (old new). The use of a list of cons pairs (old . new) is still permitted for now, but is deprecated and will likely be unsupported with a future ACL2 release. (2) The keyword argument, :last-body, has been replaced by :body, where: value nil has the same meaning as before; the value t that was supplied to :last-body is supplied as :last to the new keyword, :body; and a new form, a list of doublets, is permitted for specifying which definition rules to use. (3) The tool is more robust when xargs declaration :normalize nil is involved.

    The utility install-not-normalized now takes an additional keyword argument, :enable, specifying whether the generated defthm event is enabled. In addition to Boolean values, it allows the default value, :auto, specifying that the new rule is enabled if and only if the original defintion is enabled. This is a change in default behavior, since before, the new rule was always enabled.