X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fasta.ml;h=965486aeb956f76ed600ef0bbfeefcc9b8bc135a;hb=refs%2Ftags%2FCore%2BFS%2BSelf_tested;hp=bbbba492cf6c6c01143a31b99e7f4ed2d4e5b2a6;hpb=c1b43e1dcdb3d0960dbc50db9f226d68ad30c16e;p=tatoo.git diff --git a/src/asta.ml b/src/asta.ml index bbbba49..965486a 100644 --- a/src/asta.ml +++ b/src/asta.ml @@ -88,6 +88,14 @@ let transitions_lab asta lab = (remove_lab (SetT.elements (SetT.filter filter asta.trans_q)), (remove_lab (SetT.elements (SetT.filter filter asta.trans_r)))) +let transitions_st_lab asta q lab = + let filter (s,l,f) = q = s && QNameSet.mem lab l in + let rec remove_st_lab = function + | [] -> [] + | (s,l,f) :: tl -> f :: (remove_st_lab tl) in + (remove_st_lab (SetT.elements (SetT.filter filter asta.trans_q)), + (remove_st_lab (SetT.elements (SetT.filter filter asta.trans_r)))) + let empty = { quer = StateSet.empty; reco = StateSet.empty; @@ -121,6 +129,12 @@ let init_top ast = ast.top <- (StateSet.empty) let top_states ast = StateSet.elements ast.top +let top_states_s ast = ast.top + +let bot_states_s ast = ast.bottom + +let selec_states ast = ast.selec + let print fmt asta = let print_box fmt flag = let pp = Format.fprintf fmt in @@ -145,6 +159,6 @@ let print fmt asta = print_box_list asta.trans_q; Format.fprintf fmt "@[# Recognizing transitions:@ %a@]" print_box_list asta.trans_r in - Format.fprintf fmt "@[##### ASTA #####@, %a@ @]@." print_box 0 + Format.fprintf fmt "@[##### ASTA #####@. %a@ @]@." print_box 0 let to_file out asta = ()