module Translator: sig endexception Translator_error of string * Location.location
translator to signal an error
in the input file.val symbollist_of_spec : Abstract.eva_spec -> Symbols.eva_symbol_listsymbollist_of_spec spAbstract.eva_spec.sp_declarations)
of the given specification spAbstract.eva_spec.sp_valuedcl)
of the given eva_spec.val convert_lterm : Symbols.eva_symbol_list -> Abstract.eva_lterm -> Abstract.eva_ltermconvert_lterm sl tTranslator_error if the given term t contains
an unexpected symbol or undeclared symbol i in a subterm
EVA_TERM_ID i.t,
which must be a term returned by the parser,
by conversion of the symbols at the leaves,
using the given symbol list sl.
The parser cannot distinguish between identifiers in terms
which are first order ids, values, alias or quantified variables.
Hence, after parsing, every identifier (string) i occurring in a term
is stored in a EVA_TERM_ID i (see Abstract.eva_term),
whatever its declaration.
This function restores the given located term t obtained from parser
by converting every leaf EVA_TERM_ID into
EVA_TERM_ID, EVA_TERM_VALUE or EVA_TERM_ALIAS or EVA_QUANTIFIED
according to the given symbol list sl, and returns the terms obtained.
val convert_ldcl : Symbols.eva_symbol_list -> Abstract.eva_ldcl -> Abstract.eva_ldclconvert_ldcl sl dTranslator_error if the types of left and right members of an axiom differ
or if d contains an undeclared symbol.d (returned by the parser)
and which conforms to the abstract syntax
according to the given symbol list sl.
Translator.convert_lterm)
with to the given symbol list overwritten by the quantified variables.
This function evaluates then and adds the type of the axiom members
(the type of the members of an axiom is not required in the
LAEVA concrete syntax but is required in the abstract syntax).Translator.convert_lterm is applied to every embedded term.val convert_lstatement : Symbols.eva_symbol_list -> Abstract.eva_lstatement -> Abstract.eva_lstatementconvert_lstatement sl stst (returned by the parser).
and which conforms to the abstract syntax
according to the given symbol list sl.
The function Translator.convert_lterm is applied to the terms of the statement,
with the symbol list sl overwritten by the quantified variables.
val convert_spec : Symbols.eva_symbol_list -> Abstract.eva_spec -> Abstract.eva_specconvert_spec sl sp
applies the convertion functions Translator.convert_lterm,
Translator.convert_ldcl,
Translator.convert_lstatement
to the elements of the given abstract specification sp,
with the given symbol list sl, and return the specification obtained.val term_VALUE : intval term_CST : intTranslator.check_lterm).val term_PARAM : intTranslator.check_lterm).val term_PRIV : intTranslator.check_lterm).val term_PCENT : intval term_AT : intval term_FO : intval term_FUN : intval term_KEY : intval term_ALIAS : intval term_QUANTIF : intval term_ALL : intval check_ltype : Symbols.eva_symbol_list -> Abstract.eva_ltype -> Abstract.eva_ltypecheck_ltype sl tTranslator_error otherwise.t if it is well formed w.r.t.
the given symbol list sl.val check_lterm : int list ->
Symbols.eva_symbol_list -> Abstract.eva_lterm -> Abstract.eva_ltermcheck_lterm rl sl ltermTranslator_error otherwise.lterm
if its leaves are correct w.r.t.
the given rights list rl and the given symbol list sl.
The right list is a list of flags
defining which symbols are allowed in terms.val check_spec : Symbols.eva_symbol_list -> Abstract.eva_spec -> Abstract.eva_speccheck_spec sl spTranslator.check_lterm to every term of the
given spec sp, with different rights.val check_linstr : Symbols.eva_symbol_list -> Abstract.eva_linstr -> Abstract.eva_linstrcheck_linstr sl iTranslator_error otherwisei if
the identifiers sender and receiver of messages or
roles of comp and assignment are declared as principal.val check_instrs_spec : Symbols.eva_symbol_list -> Abstract.eva_spec -> Abstract.eva_speccheck_instrs_spec sl spsp if
checking of all the instructions it contains,
applying Translator.check_linstr with the given symbol list sl,
is successful.val translate : Symbols.eva_symbol_list -> Abstract.eva_spec -> Abstract.eva_spectranslate sl spsl and a protocol specification sp,
where the messages are presented a la BAN.
The other fields of the specification are left untouched