- let pp = Format.fprintf fmt in
- pp "Recognizing states: ";
- StateSet.print fmt asta.reco;
- pp "\nSelecting states: ";
- StateSet.print fmt asta.selec;
- pp "\nBottom states: ";
- StateSet.print fmt asta.bottom;
- pp "\nTop states: ";
- StateSet.print fmt asta.top;
- pp "\nTransitions: \n";
- Format.fprintf fmt "{@[<hov 2> %a @]}" (* todo: check boxes *)
- (Pretty.print_list ~sep:"@, " (Transition.print))
- (SetT.elements (asta.trans))
-
+ let print_box fmt flag =
+ let pp = Format.fprintf fmt in
+ pp "@[<v 0># Query states: %a@ @]"
+ StateSet.print asta.quer;
+ pp "@[<v 0># Recognizing states: %a@ @]"
+ StateSet.print asta.reco;
+ pp "@[<v 0># Selecting states: %a@ @]"
+ StateSet.print asta.selec;
+ pp "@[<v 0># Bottom states: %a@ @]"
+ StateSet.print asta.bottom;
+ pp "@[<v 0># Tom states: %a@ @]"
+ StateSet.print asta.top;
+ let print_list_tr fmt z=
+ if SetT.is_empty z
+ then Format.fprintf fmt "ΓΈ"
+ else
+ SetT.iter (fun x -> Format.fprintf fmt "| %a@ " Transition.print x) z in
+ let print_box_list fmt trans =
+ Format.fprintf fmt " @[<hov 0>%a @]" print_list_tr trans in
+ Format.fprintf fmt "@[<v 0># Queries transitions:@ %a@ @]"
+ print_box_list asta.trans_q;
+ Format.fprintf fmt "@[<v 0># Recognizing transitions:@ %a@ @]"
+ print_box_list asta.trans_r in
+ Format.fprintf fmt "@[<v 0> ##### ASTA #####@. %a@ @]" print_box 0