• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • 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
          • Circuits
          • Language
            • Grammar
            • Early-version
              • Abstract-syntax
                • Binary-op
                • Literal
                  • Literal-fix
                  • Literal-case
                  • Literalp
                  • Literal-equiv
                  • Literal-unsigned
                  • Literal-signed
                  • Literal-string
                  • Literal-scalar
                  • Literal-group
                  • Literal-field
                  • Literal-boolean
                  • Literal-address
                  • Literal-kind
                • Instruction
                • Hash-op
                • Literal-type
                • Operand
                • Unary-op
                • Identifier
                • Commit-op
                • Mapping
                • Function
                • Programdef
                • Finalize-type
                • Closure
                • Register-type
                • Finalizer
                • Value-type
                • Record-type
                • Command
                • Plaintext-type
                • Finalization-option
                • Visibility
                • Register
                • Reference
                • Programid
                • Locator
                • Finalization
                • Entry-type
                • Regaccess
                • Program
                • Interface-type
                • Ident+ptype
                • Ident+etype
                • Function-output
                • Finalize-output
                • Finalize-input
                • Closure-output
                • Closure-input
                • Assert-op
                • Function-input
                • Equal-op
                • Finalize-command
                • Ternary-op
                • Import
                • Ident+ptype-list
                • Operand-list
                • Ident+etype-list
                • Programdef-list
                • Instruction-list
                • Import-list
                • Identifier-list
                • Function-output-list
                • Function-input-list
                • Finalize-output-list
                • Finalize-input-list
                • Command-list
                • Closure-output-list
                • Closure-input-list
              • Parser
              • Concrete-syntax
            • Concrete-syntax
        • Leo
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Abstract-syntax

Literal

Fixtype of literals.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:boolean → literal-boolean
:unsigned → literal-unsigned
:signed → literal-signed
:field → literal-field
:group → literal-group
:scalar → literal-scalar
:address → literal-address
:string → literal-string

For arithmetic literals, we only capture the numeric value (an integer) and the type (which for signed and unsigned literals is captured by the size); we do not capture any leading zeros, any underscores, and whether 0 is written as -0.

For string literals, we do not capture the escapes, but only the actual sequence of characters that forms the string.

These abstractions are adequate to the abstract syntax. The information omitted is only relevant to the concrete syntax.

Subtopics

Literal-fix
Fixing function for literal structures.
Literal-case
Case macro for the different kinds of literal structures.
Literalp
Recognizer for literal structures.
Literal-equiv
Basic equivalence relation for literal structures.
Literal-unsigned
Literal-signed
Literal-string
Literal-scalar
Literal-group
Literal-field
Literal-boolean
Literal-address
Literal-kind
Get the kind (tag) of a literal structure.