Export.HrsSourceThis module provides a function to translate a signature to the HRS format used in the confluence competition.
A : t -> t -> t // for application
L : t -> (t -> t) -> t // for λ
B : t -> t -> (t -> t) -> t // for let
P : t -> (t -> t) -> t // for Π
Function symbols and variables are translated as symbols of type t.
Pattern variables of arity n are translated as variables of type t -> ... -> t with n times ->.
"$"."." is replaced by "_" because "." cannot be used in identifiers ("." is used in lambda abstractions).TO DO:
syms maps every symbol to a name.
bvars is the set of abstracted variables.
sym_name s translates the symbol name of s.
add_sym declares a Lambdapi symbol.
sym ppf s translates the Lambdapi symbol s.
add_bvar v declares an abstracted Lambdapi variable.
bvar v translates the Lambdapi variable v.
pvar i translates the pattern variable index i.
add_pvar i k declares a pvar of index i and arity k.
term ppf t translates the term t.
rule ppf r translates the pair of terms r as a rule.
sym_rule ppf s r increases the number of rules and translates the sym_rule r.
Translate the rules of symbol s.
Translate the rules of a dependency except if it is a ghost signature.
sign ppf s translates the Lambdapi signature s.