diff diag.pl @ 10:f2aa38ce0787

add state display.
author kono
date Fri, 19 Jan 2001 23:14:00 +0900
parents 1c57a78f1d98
children e1d3145cff7a
line wrap: on
line diff
--- a/diag.pl	Fri Jan 19 20:37:32 2001 +0900
+++ b/diag.pl	Fri Jan 19 23:14:00 2001 +0900
@@ -87,6 +87,10 @@
 	make_hist0(L,P,C).
 
 make_hist0([],_,[]):-!.
+make_hist0([D|L],*,[*|L1]):-!, 
+	make_hist0(L,D,L1).
+make_hist0([*|L],S,[*|L1]):-!, 
+	make_hist0(L,S,L1).
 make_hist0([D|L],S,[(D->Cond)|L1]):-!,  % step by step
 	state(S,Cond,D),
 	!,  				% 
@@ -95,6 +99,8 @@
 % trace 2variable renamings
 
 make_hist1([],_,_,R,R,[]):-!.
+make_hist1([*|L],S,P,R,R1,[*|L1]):-!,  
+	make_hist1(L,S,P,R,R1,L1).
 make_hist1([SN|L],S,P,R,R1,[(SN->Cond)|L1]):-!,  % step by step
 	state(S,Cond,SN,P,P1,R,R0),
 	!,
@@ -120,6 +126,9 @@
 write_diag(counter_example(Hist)) :-!,write_ce(Hist,0).
 write_diag(execution(Hist)) :-!,write_ce(Hist,0).
 	write_ce([],_):-!.
+	write_ce([(*)|T],I) :- !,
+	    write(*),nl,
+	    write_ce(T,I).
 	write_ce([(S->[E|L])|T],I) :- (E=more,L=L1;E=empty,L=L1;[E|L]=L1),!,
 		write(I),write(:),write_cond(L1),put(9),write(S),nl,
 		J is I+1,