package dedukti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=97171b48dd96043d84587581d72edb442f63e7b5ac1695771aa1c3c9074739e15bc7d17678fedb7062acbf403a0bf323d97485c31b92376b80c63b5c2300ee3c
sha256=5e1b6a859dfa1eb2098947a99c7d11ee450f750d96da1720f4834e1505d1096c
doc/dedukti.kernel/Kernel/Rule/index.html
Module Kernel.RuleSource
Rewrite rules
Patterns
type pattern = | Var of Basic.loc * Basic.ident * int * pattern list(*Applied DB variable
*)| Pattern of Basic.loc * Basic.name * pattern list(*Applied constant
*)| Lambda of Basic.loc * Basic.ident * pattern(*Lambda abstraction
*)| Brackets of Term.term(*Bracket of a term
*)
Basic representation of pattern
type wf_pattern = | LJoker| LVar of Basic.ident * int * int list(*Applied Miller variable
*)| LLambda of Basic.ident * wf_pattern(*Lambda abstraction
*)| LPattern of Basic.name * wf_pattern array(*Applied constant
*)| LBoundVar of Basic.ident * int * wf_pattern array(*Locally bound variable
*)| LACSet of Basic.name * wf_pattern list
Efficient representation for well-formed linear Miller pattern
Brackets
constr is the type of brackets (aka "dot") pattern constraints. They are generated by the function check_patterns. (i,te) means meta variable of DB index i should be convertible with te
Rewrite Rules
type rule_name = | Beta| Delta of Basic.name(*Rules associated to the definition of a constant
*)| Gamma of bool * Basic.name(*Rules of lambda pi modulo. The first parameter indicates whether the name of the rule has been given by the user.
*)
A rule is formed with
- a name
- an annotated context
- a left-hand side pattern
- a right-hand side term
Rule where context is partially annotated with types
Errors
type rule_error = | BoundVariableExpected of Basic.loc * pattern| DistinctBoundVariablesExpected of Basic.loc * Basic.ident| VariableBoundOutsideTheGuard of Basic.loc * Term.term| UnboundVariable of Basic.loc * Basic.ident * pattern| AVariableIsNotAPattern of Basic.loc * Basic.ident| NonLinearNonEqArguments of Basic.loc * Basic.ident| NotEnoughArguments of Basic.loc * Basic.ident * int * int * int| NonLinearRule of Basic.loc * rule_name
Rule infos
type rule_infos = {l : Basic.loc;(*location of the rule
*)name : rule_name;(*name of the rule
*)nonlinear : int list;(*DB indices of non linear variables. Empty if the rule is linear ?
*)cst : Basic.name;(*name of the pattern constant
*)args : pattern list;(*arguments list of the pattern constant
*)rhs : Term.term;(*right hand side of the rule
*)ctx_size : int;(*size of the context of the non-linear version of the rule
*)esize : int;(*size of the context of the linearized, bracket free version of the rule
*)pats : wf_pattern array;(*free patterns without constraint
*)arity : int array;(*arities of context variables
*)constraints : constr list;(*constraints generated from the pattern to the free pattern
*)
}Extracts arity context from a rule info
Extracts LHS pattern from a rule info
Converts any rule (typed or untyped) to rule_infos
Converts rule_infos representation to a rule where the context is annotated with the variables' arity