Module Types_unify


module Types_unify: sig .. end


type termGL =
| EAtm of string
| EVar of string
| Nonce of string
| Cuple of termGL list
| PubCypher of termGL * termGL
| SymCypher of termGL * termGL
| Prim of termGL
| EXor of termGL list
| EExp of termGL * termGL list
type givesIF = termGL 
type secretsIF = termGL * termGL 

type requestKind =
| Strong
| Weak
type requestIF = termGL * termGL * requestKind *
termGL
type witnessIF = termGL * termGL * termGL 
type mtermIF = termGL 
type wtermIF = string * termGL 

type containsIF =
| ContainsIF of termGL * termGL
| NotContainsIF of termGL * termGL

type conditionIF =
| EqualIF of termGL * termGL
| NotEqualIF of termGL * termGL

type generic_conditionIF =
| TrueCondition of conditionIF
| HiddenContains of containsIF
type termIF = wtermIF list * mtermIF list *
witnessIF list * requestIF list *
secretsIF list * containsIF list
type knowIF = termGL list 
type nameIF = string 
type stepIF = nameIF * wtermIF list * mtermIF list *
conditionIF list * containsIF list *
containsIF list * termIF
type types_section = (termGL * string) list 

type factIF =
| State of wtermIF
| Iknows of mtermIF
| Witness of witnessIF
| Request of requestIF
| Secret of secretsIF
| ContainFact of containsIF

type attack_state_elem =
| PositiveSt of factIF
| NegativeSt of factIF
| ConditionSt of conditionIF
type attack_state = attack_state_elem list 
type parseReturn = stepIF list *
(knowIF * wtermIF list * secretsIF list *
containsIF list)
list * types_section * attack_state list

type sign =
| Pos
| Neg

type term =
| Uplet of term list
| Xor of term list
| Exp of term * (term * sign) list
| PCrypt of term * term
| SCrypt of term * term
| PInv of term
| Atm of int
| Var of int
type t_equal = (int * term) list 
type t_unequal = (term * term) list 

type t_freevar =
| FreeVar of int
type t_subst = t_equal * t_freevar * t_unequal 
type t_split_subst = t_equal * term list list * t_equal *
t_freevar * t_unequal

type ctrTestResult =
| Equal
| NeverEqual
| Uncertain
type t_todec = (term * term) list 

type t_know_elem =
| H of int
| D of term
type t_know = t_know_elem list 
type t_request = (requestKind * term) list 
type t_witness = term list 

type t_secret =
| SecrecyOf of (term * term) list

type t_sets_elem =
| InSet of term
type t_sets = term list * t_sets_elem list 
type t_etat = t_todec * t_know * t_witness *
t_secret * t_sets * t_subst
type t_system = t_etat list 

type t_forw =
| Unify of term * term list
| Hypot of term list
type tabletype = (int * string) list 
type t_role_table = (string * string list) list 
type t_msg = term 

type t_TestSet =
| TestInSet of term
| TestNotInSet of term

type t_NewSet =
| AddToSet of term
| RemoveFromSet of term
type t_secrecygoal = t_secret 
type t_step = t_msg * t_msg * term * term *
t_secrecygoal * t_witness * t_request *
t_unequal * t_TestSet list *
t_NewSet list

type t_StepKind =
| Sooner
| Generic
| Maybe_Sooner
type t_trace = (string * nameIF * t_step * t_equal) list 

type t_role =
| Step of t_step * t_StepKind * t_role
* t_trace
| Choice of t_StepKind * t_role list
| EndRole
type t_specif = (string * t_role) list 
type t_state = (t_system * t_trace * t_specif) list 
type t_unforgeable = term list 
type t_partition = int list list 
type t_po = (int * int list) list 

type t_attack_state =
| Atk_Iknows of term
| Atk_NotIknows of term
| Atk_Set of t_TestSet
| Atk_Equal of term * term
| Atk_NotEqual of term * term
type t_attack_state_goal = t_attack_state list 

type atkKind =
| Secr of term
| Auth of term
| NRep of t_attack_state list
type t_unif_prestate = (term * term) list * term list list *
int list * t_subst
type t_unif_state = (term * term) list * term list list *
int list * int list * t_subst
type t_vi_ctrs = (int * int) list * t_partition list 
exception Invalid_Var_Identif
exception No_Solution