• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
        • Semantics
        • Abstract-syntax
        • Interpreter
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Projects
  • Kestrel-books

Imp-language

An ACL2 library for the simple programming language Imp.

Imp is a simple programming language, used mainly for didactic purposes. It is found (with small variations) in textbooks and course materials, such as:

  • The `Automatic Program Verification and Testing' lecture slides.
  • The `Software Foundations' book series.
  • The `Concrete Semantics' book.

This library contains a formalization of Imp in ACL2, and is expected to be extended with additional material related to formal verification and synthesis of Imp programs. The package name of this library, "SIMPL-IMP", consists of `SIMPL' for `Simple Programming Language' (where the `P' can be in either word) and `IMP' for `Imp'. ACL2 libraries for other simple programming languages could use a similar package "SIMPL-..." package naming scheme.

Imp is informally defined by the following elements:

  • Arithmetic expressions, consisting of integer constants (of any size), variables (i.e. symbolic names), and a few arithmetic operators like addition and multiplication. These expressions are always integer-valued, without any size limitations; the arithmetic operators are exact, i.e. not modular.
  • Boolean expressions, consisting of boolean constants (one for truth and one for falsehood), equalities and inequalities of arithmetic expressions, boolean negation, and boolean conjunction. These expressions are always boolean-valued.
  • Commands (i.e. statements), consisting of assignments of arithmetic expressions to variables, sequencing (i.e. following a command with another command), conditionals (`if-then-else'), and loops. These commands operate on a state consisting of values stored in variables.

Imp does not have user-defined functions or procedures. An Imp program is a command, which operates on a variable store. Variables always contain integers (of any size); they do not contain booleans.

Subtopics

Semantics
Semantics of Imp.
Abstract-syntax
Abstract syntax of Imp.
Interpreter
An interpreter for Imp.