Represents free and bound variables as well as constants.
Summary
Types
Type of a bound variable declaration.
The name of a constant is given as a string or a reference (indicating a generated fresh constant).
Type of a constant declaration.
Type of a free variable declaration.
The type of a declaration. A declaration represents either a free variable, a bound variable or a constant.
The name of a free variable is given as a string, a reference (indicating a generated fresh variable) or a positive integer representing its de Bruijn index.
Functions
Pretty-prints a declaration.
Generates a fresh constant of the given type using Erlang references to ensure uniqueness. Useful for skolemization.
Generates a fresh variable of the given type using Erlang references to ensure uniqueness. Useful for γ-instantiations in tableaux.
Returns a struct representing a constant of the given name and type.
Returns a struct representing a free variable of the given name and type.
Types
@type bound_var_t() :: %ShotDs.Data.Declaration{ kind: :bv, name: pos_integer(), type: ShotDs.Data.Type.t() }
Type of a bound variable declaration.
The name of a constant is given as a string or a reference (indicating a generated fresh constant).
@type const_t() :: %ShotDs.Data.Declaration{ kind: :co, name: const_name_t(), type: ShotDs.Data.Type.t() }
Type of a constant declaration.
@type free_var_t() :: %ShotDs.Data.Declaration{ kind: :fv, name: var_name_t(), type: ShotDs.Data.Type.t() }
Type of a free variable declaration.
@type t() :: free_var_t() | bound_var_t() | const_t()
The type of a declaration. A declaration represents either a free variable, a bound variable or a constant.
@type var_name_t() :: String.t() | reference() | pos_integer()
The name of a free variable is given as a string, a reference (indicating a generated fresh variable) or a positive integer representing its de Bruijn index.
Functions
Pretty-prints a declaration.
@spec fresh_const(ShotDs.Data.Type.t()) :: const_t()
Generates a fresh constant of the given type using Erlang references to ensure uniqueness. Useful for skolemization.
@spec fresh_var(ShotDs.Data.Type.t()) :: free_var_t()
Generates a fresh variable of the given type using Erlang references to ensure uniqueness. Useful for γ-instantiations in tableaux.
Note
Consider wrapping functions using this to create temporary free variables
with ShotDs.Stt.TermFactory.with_scratchpad/1 or
ShotDs.Stt.TermFactory.with_scratchpad!/1 for garbage collection.
@spec new_const(const_name_t(), ShotDs.Data.Type.t()) :: const_t()
Returns a struct representing a constant of the given name and type.
@spec new_free_var(var_name_t(), ShotDs.Data.Type.t()) :: free_var_t()
Returns a struct representing a free variable of the given name and type.