Documentation

Complexity.Computability.WordRAM.Notation

Notation for structured word-RAM programs #

ram[ s₁; s₂; … ] writes a structured program (Cslib.WordRAM.Code) as a sequence of statements, one per data instruction, in the style of word-RAM pseudocode. Registers are named by identifiers, for instance local abbreviations of elements of Fin r. The statements are:

The notation unfolds to the constructors of Cslib.WordRAM.Code, so it adds nothing to the semantics. The binary operations and width% are instructions of the standard basis (Cslib.WordRAM.Op.bin, Cslib.WordRAM.Op.width); the other statements work over every basis. It is scoped: open Cslib.WordRAM enables it. Its statement forms follow the word-RAM notation of Algolean. Its only new tokens are ram[, width% and the internal ram_stmt% and ram_block%, so it reserves no identifiers: ram and width remain ordinary names.

Main definitions #

Tactics #

References #

A statement of a structured word-RAM program.

Instances For

    A block of statements, separated by semicolons.

    Instances For

      A structured word-RAM program, written as a block of statements.

      Instances For

        Internal: a nested block of statements, as a structured program.

        Instances For

          Internal: a single statement, as a structured program.

          Instances For

            Set a register to a constant.

            Instances For

              Truncated subtraction.

              Instances For

                Bitwise exclusive or.

                Instances For

                  Load from the memory cell whose address is in a register.

                  Instances For

                    Store to the memory cell whose address is in a register.

                    Instances For

                      A conditional on the equality of two registers.

                      Instances For

                        A conditional on the comparison of two registers.

                        Instances For

                          A loop while two registers are equal.

                          Instances For

                            A loop while one register is smaller than another.

                            Instances For

                              A structured program given as a term.

                              Instances For

                                Symbolically execute structured code on a goal ExecWithin w c x y T or Exec w c x y T, allowing each loop the given number of iterations (default 0), and deciding with the given simp lemmas which written numbers fit a word.

                                Instances For