let match_state (name : string) (m1 : string) (name2 : string) (m2 : string) : bool =
let (exist_match,sub) = get_match_message_story name m1 m1 name2 m2 m2 (!untyped_variable) in
if(exist_match<>(-1))
then (
if(sub=[]) then false
else true
)
else (
let trans m = "pair("^m^")"
in
let d1 = trans m1 in
let d2 = trans m2 in
let res = match_message name m1 d1 name2 m2 d2 in
let (exist_match,sub) = get_match_message_story name m1 d1 name2 m2 d2 (!untyped_variable) in
if (exist_match<>(-1))
then add_in_match_message_story name m1 m1 name2 m2 m2 (!untyped_variable) sub;
res
)