• 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
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                • Format-strings
                  • Format-string-containers
                  • Format-string
                  • Char/container
                  • Char/container-list-no-open/close-brace-p
                  • Parse-format-chars
                  • Format-string-containers-aux
                  • Char-list-to-format-string
                  • Char/container-list
                • Input-syntax-abstraction
                • Expressions
                • Output-files
                • Addresses
                • Literals
                • Characters
                • Expression-list
                • Statement-list
                • Output-syntax-abstraction
                • Struct-init-list
                • Branch-list
                • Annotations
                • Abstract-syntax-trees
                • Symbols
                • Keywords
                • Programs
                • Packages
                • Bit-sizes
              • Dynamic-semantics
              • Compilation
              • Static-semantics
              • Concrete-syntax
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Abstract-syntax

Format-strings

Leo format strings.

A format string in Leo is a sequence of characters where occurrences of {} are treated as containers.

In abstract syntax, we model a format string as a sequence of characters and containers. That is, we treat containers as separate entities, which are intermixed with regular characters in a format string. We also require the non-container characters to not include any subsequence {}, because that must be represented as a container.

Subtopics

Format-string-containers
Number of containers in a format string.
Format-string
Fixtype of Leo format strings.
Char/container
Fixtype of Leo characters and containers.
Char/container-list-no-open/close-brace-p
Check that a list of characters and containers does not include a non-container open brace immediately followed by a non-container close brace.
Parse-format-chars
Format-string-containers-aux
Char-list-to-format-string
Parse the given chars into a format-string.
Char/container-list
Fixtype of lists of Leo characters and containers.