• 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
              • Dynamic-semantics
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                  • Var/const-sinfo
                  • Ident-sinfo
                  • Function-sinfo
                  • Var/const-sinfo-option
                  • Struct-sinfo-option
                  • Struct-sinfo
                  • Ident-sinfo-option
                  • Function-sinfo-option
                  • Senv-option
                  • Add-var/const-sinfo
                  • Add-ident-sinfo
                  • Senv
                  • Add-struct-sinfo
                  • Add-function-sinfo
                  • Get-var/const-sinfo
                  • Get-struct-sinfo
                  • Get-function-sinfo
                  • Ident-senv
                  • Get-ident-sinfo
                  • Senv-result
                  • Var/const-sinfo-list
                  • Init-senv
                • Curve-parameterization
                • Function-recursion
                • Struct-recursion
                • Input-checking
                • Program-checking
                • Type-maps-for-struct-components
                • Program-and-input-checking
                • Output-checking
              • 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
  • Static-semantics

Static-environments

Static environments of Leo.

The static semantic requirements on Leo constructs (expressions, statements, etc.) are checked in the context of information (e.g. types) about entities in scope that can be referenced in the constructs being checked. This information is captured by the notion of static environment, which is formalized here.

In compiler terminology, these are symbol tables.

Fixtype names defined here include parts sinfo and senv, which stand for `static information' and `static environment'.

Subtopics

Var/const-sinfo
Fixtype of static information for variables and constants.
Ident-sinfo
Fixtype of static information for identifiers.
Function-sinfo
Fixtype of static information for functions.
Var/const-sinfo-option
Fixtype of optional static information for variables and constants.
Struct-sinfo-option
Fixtype of optional static information for struct types.
Struct-sinfo
Fixtype of static information about struct types.
Ident-sinfo-option
Fixtype of optional static information for identifiers.
Function-sinfo-option
Fixtype of optional static information about functions.
Senv-option
Fixtype of optional static environments.
Add-var/const-sinfo
Add information about a variable or constant to a static environment.
Add-ident-sinfo
Add information about an identifier to a static environment.
Senv
Fixtype of static environments.
Add-struct-sinfo
Add information about a struct type to a static environment.
Add-function-sinfo
Add information about a function to a static environment.
Get-var/const-sinfo
Retrieve information about a variable or constant from a static environment.
Get-struct-sinfo
Retrieve information about a struct type from a static environment.
Get-function-sinfo
Retrieve information about a function from a static environment.
Ident-senv
Fixtype of static environments for identifiers.
Get-ident-sinfo
Retrieve information about an identifier from a static environment.
Senv-result
Fixtype of errors and static environments.
Var/const-sinfo-list
Fixtype of lists of static information for variables and constants.
Init-senv
Initialize a static environment.