package dedukti
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha512=97171b48dd96043d84587581d72edb442f63e7b5ac1695771aa1c3c9074739e15bc7d17678fedb7062acbf403a0bf323d97485c31b92376b80c63b5c2300ee3c
    
    
  sha256=5e1b6a859dfa1eb2098947a99c7d11ee450f750d96da1720f4834e1505d1096c
    
    
  doc/dedukti.api/Api/Processor/MakeSignatureBuilder/argument-1-E/index.html
Parameter MakeSignatureBuilder.E
Error Datatype
An environment is a wrapper around the kernel of Dedukti
type t = Env.tAn environment is created from a Parser.input. Environment is the module which interacts with the kernel. An environment allows you to change at runtime the reduction engine and the printer. The current version of Dedukti offers you one reduction engine, but this feature is mainly aim to be used with the dkmeta tool. The printer of Env is different from Pp in a sense that the module of a constant is not printed if it is the same as the current module.
val dummy : ?md:Kernel.Basic.mident -> unit -> tdummy ?m () returns a dummy environment. If m is provided, the environment is built from module m, but without file.
exception Env_error of t * Kernel.Basic.loc * exnDebugging
Sets multiple debugging flags from a string: q : disables d_Warn n : enables d_Notice o : enables d_Module c : enables d_Confluence u : enables d_Rule t : enables d_TypeChecking r : enables d_Reduce m : enables d_Matching May raise DebugFlagNotRecognized.
Utilities
val check_arity : bool refFlag to check for variables arity. Default is true.
val check_ll : bool refFlag to check for rules left linearity. Default is false
The Global Environment
val init : Parsers.Parser.input -> tinit input initializes a new global environement from the input
val get_input : t -> Parsers.Parser.inputget_input env returns the input used to create env
val get_filename : t -> stringget_input env returns the filename associated to the input of env. We return a fake filename if the input was not create from a filename.
val get_signature : t -> Kernel.Signature.tget_signature env returns the signature used by this module.
val get_name : t -> Kernel.Basic.midentget_name env returns the name of the module.
val set_reduction_engine : t -> (module Kernel.Reduction.S) -> tset_reduction_egine env changes the reduction engine of env. The new environment shares the same signature than env.
val get_reduction_engine : t -> (module Kernel.Reduction.S)get_reduction_engine env returns the reduction engine of env
val get_printer : t -> (module Pp.Printer)get_print env returns a pretty printer associated to env
module HName : Hashtbl.S with type key = Kernel.Basic.nameval get_symbols : t -> Kernel.Signature.rw_infos HName.tget_symbols env returns the content of the signature sg. Each name in the current signature is associated to a rw_infos.
val get_type : t -> Kernel.Basic.loc -> Kernel.Basic.name -> Kernel.Term.termget_type env l md id returns the type of the constant md.id.
val is_injective : t -> Kernel.Basic.loc -> Kernel.Basic.name -> boolis_injective env l cst returns true if the symbol is declared as static or injective, false otherwise
val is_static : t -> Kernel.Basic.loc -> Kernel.Basic.name -> boolis_static env l cst returns true if the symbol is declared as static, false otherwise
val get_dtree : t -> Kernel.Basic.loc -> Kernel.Basic.name -> Kernel.Dtree.tget_dtree env l md id returns the decision/matching tree associated with md.id.
val export : t -> unitexport env saves the current environment in a *.dko file.
val import : t -> Kernel.Basic.loc -> Kernel.Basic.mident -> unitimport env lc md the module md in the current environment.
val declare : 
  t ->
  Kernel.Basic.loc ->
  Kernel.Basic.ident ->
  Kernel.Signature.scope ->
  Kernel.Signature.staticity ->
  Kernel.Term.term ->
  unitdeclare_constant env l id st ty declares the symbol id of type ty and staticity st.
val define : 
  t ->
  Kernel.Basic.loc ->
  Kernel.Basic.ident ->
  Kernel.Signature.scope ->
  bool ->
  Kernel.Term.term ->
  Kernel.Term.term option ->
  unitdefine env l id scope body ty defines the symbol id of type ty to be an alias of body.
val add_rules : 
  t ->
  Kernel.Rule.partially_typed_rule list ->
  (Kernel.Exsubst.ExSubst.t * Kernel.Rule.typed_rule) listadd_rules env rule_lst adds a list of rule to a symbol. All rules must be on the same symbol.
Type checking/inference
val infer : 
  t ->
  ?ctx:Kernel.Term.typed_context ->
  Kernel.Term.term ->
  Kernel.Term.terminfer env ctx term infers the type of term given the typed context ctx
val check : 
  t ->
  ?ctx:Kernel.Term.typed_context ->
  Kernel.Term.term ->
  Kernel.Term.term ->
  unitinfer env ctx te ty checks that te is of type ty given the typed context ctx
Safe Reduction/Conversion
terms are typechecked before the reduction/conversion
val reduction : 
  t ->
  ?ctx:Kernel.Term.typed_context ->
  ?red:Kernel.Reduction.red_cfg ->
  Kernel.Term.term ->
  Kernel.Term.termreduction env ctx red te checks first that te is well-typed then reduces it according to the reduction configuration red
val are_convertible : 
  t ->
  ?ctx:Kernel.Term.typed_context ->
  Kernel.Term.term ->
  Kernel.Term.term ->
  boolare_convertible env ctx tl tr checks first that tl tr have the same type, and then that they are convertible
val unsafe_reduction : 
  t ->
  ?red:Kernel.Reduction.red_cfg ->
  Kernel.Term.term ->
  Kernel.Term.termunsafe_reduction env red te reduces te according to the reduction configuration red. It is unsafe in the sense that te is not type checked first.
val errors_in_snf : bool refval fail_env_error : t -> Kernel.Basic.loc -> exn -> 'a