lambdapi

Proof assistant for the λΠ-calculus modulo rewriting
Library lambdapi.common
Module Common . Escape
val is_escaped : string -> bool

is_escaped s tells if s begins with "{|" and ends with "|}" without overlapping. For efficiency, we just test that it starts with '{'.

val unescape : string -> string

unescape s removes "{|" and "|}" if s is an escaped identifier.

val add_prefix : string -> string -> string

p is assumed to be a regular identifier. If n is a regular identifier too, then add_prefix p n is just p ^ n. Otherwise, it is "{|" ^ p ^ unescape n ^ "|}".

val add_suffix : string -> string -> string

s is assumed to be a regular identifier. If n is a regular identifier too, then add_suffix n s is just n ^ s. Otherwise, it is "{" ^ unescape n ^ s ^ "|}".