changeset 2:1c57a78f1d98

Initial revision
author kono
date Thu, 18 Jan 2001 23:27:24 +0900
parents 683efd6f9a81
children c1e5614545ff 029b5a5ac494
files Makefile bddcomp.pl bddi bdditl.pl bdtstd.pl cad.pl call chop.pl cp.pl cppl.c demo.pl demoi demoim diag.pl disp.pl ex.pl example/cad.pl example/elevator.pl example/gi_ex.pl example/keyb.kiss2 example/s1a.kiss2 example/s208.kiss2 example/s298.kiss2 example/s420.kiss2 example/tbk.kiss2 exdev.pl gm/demoi gm/demoim gm/display.pl init initgm initm initr initv itl.pl itlstd.pl kiss.pl kiss_ex.pl lite.pl ndcomp.pl op.pl problems read.me test tk/basic tk/bou.lite tk/bou.tcl tk/bou.tokio tk/demo.pl tk/disp.pl tk/disp.pl.pro tk/disp.ql tk/disp.tcl tk/dummy_tcl.pl tk/elevator.pl tk/exdev.tokio tk/gi.lite tk/gi.tokio tk/gi0.lite tk/gi1.lite tk/gi10.lite tk/gi2.lite tk/gi3.lite tk/gi4.lite tk/protcl.tgz tk/tmp tk/tmp.out tk/tmp.tokio tk/xf-disp tk/xf-disp.pro tmp.pl xf-disp
diffstat 72 files changed, 18380 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,110 @@
+#
+# Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+#                                  The University, Newcastle upton Tyne
+#
+# Everyone is permitted to copy and distribute verbatim copies
+# of this license, but changing it is not allowed.  You can also
+# use this wording to make the terms for other programs.
+#
+# send your comments to kono@csl.sony.co.jp
+
+PROLOG = sicstus
+PROLOG_TYPE = SICSTUS
+
+# PROLOG = sbprolog
+# PROLOG_TYPE = SBPROLOG
+
+# PROLOG = cprolog
+# PROLOG_TYPE = CPROLOG
+
+# PROLOG = xsb
+# PROLOG_TYPE = XSB
+
+# last resort
+# PROLOG = prolog
+# PROLOG_TYPE = PROLOG
+
+
+#  SICSTUS                      for SICStus Prolog
+#    SICSTUS218                     patch for v2.1 #8
+#  SBPROLOG                     for SB Prolog
+#  QUINTUS                      for Quintus Prolog
+#  CPROLOG                      for CPROLOG ver 1.2
+#    CPROLOG15                  for CPROLOG15 ver 1.5
+#  see cp.pl.c
+
+all:    $(PROLOG_TYPE)
+
+SICSTUS: cp.pl
+	echo '[initm],save(lite).' | $(PROLOG)
+CPROLOG: cp.pl
+	echo '[init],save(lite).' | $(PROLOG)
+
+PROLOG: cp.pl
+	echo 'start ' $(PROLOG) ' and run [init]'
+
+SB_START_FILE = /usr/local/lib/sbprolog/modlib/\$$readloop 
+SBPROLOG:  cp.pl
+	echo "['op.pl']." > .tmpb
+	make M=$(M) $(OBJ)
+	cat .tmpb | $(PROLOG)
+	cat $(SB_START_FILE) $(OBJ) > lite
+
+XSB:  cp.pl
+	echo '[init].' | $(PROLOG)
+	echo 'start ' $(PROLOG) ' and run [init]'
+	
+
+cp.pl : cppl.c
+	cc -E -D$(PROLOG_TYPE) cppl.c | sed -e '/^#/d' > cp.pl
+
+.SUFFIXES: .pl .ql
+.SILENT:
+OBJ = op.ql ndcomp.ql dvcomp.ql bdtstd.ql rstd.ql chop.ql diag.ql kiss.ql ex.ql cp.ql
+# kiss_ex.ql
+WORK = .tmpl .tmpc .tmpa .tmpb
+# M = lite:
+
+tmpa:
+	rm -f $(WORK)
+	touch $(WORK)
+	make  M=$(M) $(OBJ)
+	echo '?-load($(M)['$(OBJ)']).' | \
+		sed -e 's/\.ql//g' -e 's/ *$$//' -e 's/ /,/g' > .tmpa
+
+.pl.ql:
+	echo '?-fcompile('$(M)$*').' >> .tmpc
+	echo '?-load('$(M)$*').' >> .tmpl
+	echo "compile('$<','$@')." >> .tmpb
+
+cp.ql : cp.pl
+
+clean:
+	rm -f lite *.ql $(WORK) cp.pl *.O *.P
+
+pack:
+	tar cvf -  read.me \
+	`echo $(OBJ) $(BDD) display.pl | sed -e 's/\.ql/\.pl/g' ` \
+	Makefile init* bddi | compress |\
+	uuencode itlve.tar.Z > itlve.tar.Z.uu
+
+lharc:
+	lharc u itl.lhz  read.me \
+	`echo $(OBJ) display.pl | sed -e 's/\.ql/\.pl/g' ` \
+	Makefile init demoi 
+
+BDD = chop.ql diag.ql bdditl.ql bddcomp.ql ex.ql cp.ql
+bdd:	
+	rm -f $(WORK)
+	touch $(WORK)
+	make M=$(M) $(BDD)
+	echo '?-load($(M)['$(BDD)']).' | \
+	sed -e 's/\.ql//g' -e 's/ *$$//' -e 's/ /,/g' > .tmpa
+
+DISPLAY = display.ql
+display:	
+	rm -f $(WORK)
+	touch $(WORK)
+	make M=$(M) $(DISPLAY)
+	echo '?-load($(M)['$(DISPLAY)']).' | \
+	sed -e 's/\.ql//g' -e 's/ *$$//' -e 's/ /,/g' > .tmpa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bddcomp.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,319 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+
+% itl decomposition for DST
+
+:- use_module('~/ITL/bdd/sicstus/bdd').
+
+% requires [chop]
+% itl(Predicate,Next,Empty,ConditionLists)
+
+itl(P) :- expand(P,P0),
+	moref(Ev),itl(P0,Next,Ev,[],C),
+	write(([Ev|C]->Next)),nl,fail.
+itl(_).
+itl(P,Next,[Ev|C]) :- moref(Ev),itl(P,Next,Ev,[],C).
+
+moref(empty).
+moref(more).
+
+itl(N,F,E,C,C1):-integer(N),!,
+	bdd2itl1(N,Term),!,itl(Term,F,E,C,C1).
+itl(true,true,_,C,C):-!.
+itl(false,false,_,C,C):-!.
+itl(more,false,empty,C,C).
+itl(more,true,E,C,C):-!,E = more.
+% next two rule determines descrete time
+itl(empty,true,empty,C,C).      
+itl(empty,false,E,C,C):-!,E = more.  % no succeeding more interval
+itl(P,FF,_,C,C1) :- atomic(P),!, local(FF,P,C,C1).
+    local(true,P,C,C1):- true(C,P,C,C1).
+       true([],P,C,[P|C]):-!.
+       true([P|_],P,C,C):-!.
+       true([not(P)|_],P,_,_):-!,fail.
+       true([_|T],P,C,C1):-true(T,P,C,C1).
+    local(false,P,C,C1):- false(C,P,C,C1).
+       false([],P,C,[not(P)|C]):-!.
+       false([P|_],P,_,_):-!,fail.
+       false([not(P)|_],P,C,C):-!.
+       false([_|T],P,C,C1):-false(T,P,C,C1).
+itl(@(P),P,more,C,C).		   % strong next
+itl(@(_),false,E,C,C):-!,E=empty.
+
+itl(?(Cond,T,F),N,E,C,C1):-!,
+	itl(Cond,CN,E,C,C0),itl_cond(CN,T,F,N,E,C0,C1).
+itl_cond(true,T,_,N,E,C,C1) :-!,
+	itl(T,N,E,C,C1).
+itl_cond(false,_,F,N,E,C,C1) :-!,
+	itl(F,N,E,C,C1).
+itl_cond(CN,T,F,N,E,C,C1) :-!,
+	itl(T,TN,E,C,C0),
+	itl(F,FN,E,C0,C1), negate(CN,NCN),
+	and(TN,CN,N1),and(FN,NCN,N2), or(N1,N2,N).
+
+% Quantifier
+itl(exists(P,Q),F,E,C,C0) :-!,
+	itl(Q,QT,E,[P|C],C1),itl_ex(QT,Q,E,P,F,C1,C0).
+    itl_ex(true,_,_,P,true,C,C1):-!,remove_p(C,P,C1).
+    itl_ex(false,Q,E,P,F,C,C0):-  !,remove_p(C,P,C1),
+    	itl(Q,QF,E,[not(P)|C1],C2),remove_p(C2,P,C0), exists(QF,P,F).
+    itl_ex(QT,Q,E,P,F,C,C0):- remove_p(C,P,C1),
+    	itl(Q,QF,E,[not(P)|C1],C2), remove_p(C2,P,C0),
+        or(QT,QF,TF),exists(TF,P,F).
+    % constant order optimzation for quantifier
+    exists(P,P,true):-!.
+    exists(P,_,P):-atomic(P),!.
+    exists(Q,P,exists(P,Q)).
+    remove_p([],_,[]):-!.
+    remove_p([not(P)|T],P,T):-!.
+    remove_p([P|T],P,T):-!.
+    remove_p([H|T],P,[H|T1]):-!,remove_p(T,P,T1).
+itl(*(P),F,empty,C,C1):-!,itl(P,F,empty,C,C1).
+itl(*(P),F,E,C,C1):-!,E=more,
+	itl(P,PX,more,C,C1),
+	closure(PX,P,F).
+    closure(false,_,false):-!.
+    closure(PX,P,(PX & *(P))).              %% infinite clousre (strong)
+%%    closure(PX,P,(PX & (*(P);empty))).    %% finite closure (weak)
+%% external state diagram
+itl(st(N),F,E,C,C1):-!,
+        setof((Cond=>X),st(N,Cond,X),L),itl_transition(L,F,E,C,C1).
+    itl_transition([],false,_,C,C):-!.
+    itl_transition([(Cond=>empty)|T],F,E,C,C1):-!,
+        itl((empty,Cond),F0,E,C,C0),
+        itl_transition(T,F1,E,C0,C1),or(F0,F1,F).
+    itl_transition([(Cond=>X)|T],F,E,C,C1):-
+        itl((more,Cond),F0,E,C,C0),
+        itl_transition1(F0,X,T,F,E,C0,C1).
+    itl_transition1(false,_,T,F,E,C,C1):-
+        itl_transition(T,F,E,C,C1).
+    itl_transition1(true,X,T,(st(X);F),E,C,C1):-
+        itl_transition(T,F,E,C,C1).
+%% shared resources or state
+itl(share(L),F,empty,C,C1):-!,
+	exclusive(L,C,C1,true,F).
+itl(share(L),F,more,C,C1):-!,
+	exclusive(L,C,C1,share(L),F).
+    exclusive([],C,C,F,F):-!.
+    exclusive([A|L],C,C1,F,F1):-
+	true(C,A,C,C0),exclusive1(L,C0,C1,F,F1).
+    exclusive([N|L],C,C1,F,F1):-
+	false(C,N,C,C0), !,exclusive(L,C0,C1,F,F1).
+%    exclusive(_,C,C,_,false).   % eliminate this brach
+    exclusive1([],C,C,F,F):-!.
+    exclusive1([H|L],C,C1,F,F1):-
+	false(C,H,C,C0), !,exclusive1(L,C0,C1,F,F1).
+%    exclusive1(_,C,C,_,false).
+%%
+itl((P,Q),N,E,C,C1) :-!,
+	itl(P,PN,E,C,C0),itland(PN,Q,N,E,C0,C1).
+itland(false,_,false,_,C0,C0):-!.
+itland(true,Q,QN,E,C0,C1):-!,itl(Q,QN,E,C0,C1).
+itland(PN,Q,N,E,C0,C1):-
+	itl(Q,QN,E,C0,C1),and(PN,QN,N).		%% and/3 in chop.pl
+itl((P;Q),N,E,C,C1) :-!,
+	itl(P,PN,E,C,C0),itlor(PN,Q,N,E,C0,C1).
+itlor(true,_,true,_,C0,C0):-!.
+itlor(false,Q,QN,E,C0,C1):-!,itl(Q,QN,E,C0,C1).
+itlor(PN,Q,N,E,C0,C1):-
+	itl(Q,QN,E,C0,C1),or(PN,QN,N).		%% or/3 in chop.pl
+itl(not(P),NN,E,X,X1) :- !,
+	itl(P,N,E,X,X1),
+	negate(N,NN).				%% negate/2 in chop.pl
+% F = empty?(P,Q):(empty(P)*more(Q)+more(PM)&Q)
+itl((P&Q),F,empty,C,C1) :-!,
+	itl((P,Q),F,empty,C,C1).
+itl((P&Q),F,more,C,C2) :-!,
+	itl(P,PE,empty,C,C0),
+	itl(P,PM,more,C0,C1),
+	chop(PM,PE,F,Q,C1,C2).
+
+chop(false,false,false,_,C,C):-!.
+chop(PM,false,(PM & Q),Q,C,C):-!.
+chop(PM,true,F,Q,C,C1):-!,
+    itl(Q,QF,more,C,C1),
+    chop1(PM,QF,Q,F).
+chop(PM,PE,F,Q,C,C):-!,
+	write('next empty conflict:'),write((PM,PE,F,Q,C)),nl,!,
+	fail.
+
+chop1(false,QF,_,QF):-!.
+chop1(false,false,_,false):-!.
+chop1(PM,false,Q,(PM&Q)):-!.
+chop1(_,true,_,true):-!.
+chop1(PM,QF,Q,(QF;(PM&Q))):-!.
+
+itl(proj(_,Q),F,empty,C,C1) :-!,
+	itl(Q,F,empty,C,C1).
+itl(proj(P,Q),F,more,C,C1) :-!,
+	itl(P,PM,more,C,C0),
+	itl(Q,QM,more,C0,C1),
+	prj(PM,QM,P,F).
+prj(false,_,_,false):-!.
+prj(_,false,_,false):-!.
+prj(PM,QM,P,(PM&proj(P,QM))).
+
+itl(prefix(P),F,empty,C,C1) :-!,
+	itl(P,PE,empty,C,C0),
+	itl(P,PM,more,C0,C1),
+	prefix(PM,PE,F).
+itl(prefix(P),F,more,C,C1) :-!,
+	itl(P,PM,more,C,C1),
+	prefix(PM,F).
+
+prefix(true,true):-!.
+prefix(false,false):-!.
+prefix(PM,prefix(PM)):-!.
+
+prefix(true,_,true):-!.
+prefix(_,true,true):-!.
+prefix(false,false,false):-!.
+prefix(_,false,true):-!.
+
+itl(Def,_,_,_,_) :-
+    write('error: '),write(Def),nl,!,fail.
+
+% develop Local ITL formula into state diagram
+%
+% Mon May 20 17:24:23 BST 1991
+% require([chop]).
+
+:-dynamic verbose/0,state/2,links/2.
+:-dynamic stay/3,lazy/0.
+
+:-assert(verbose).
+verbose(off) :- retract(verbose),fail;true.
+verbose(on) :- asserta(verbose).
+
+lazy(off) :- retract(lazy),fail;true.
+lazy(on) :- asserta(lazy).
+
+% A \= A :-!,fail.
+% _ \= _.
+
+deve(ITL) :-
+	init,!,
+	expand(ITL,ITL0),		% chop standard form
+	itl2bdd(ITL0,StdNOW),		% BDD
+	assert(itl_state(StdNOW,1)),!,  % Initial State
+	deve0((1,StdNOW)).
+
+deve0((S,ITL)) :-
+        show_state(S,ITL),
+	setof(Next,itldecomp(ITL,Next,S),
+	    Nexts),!,
+	deve1(Nexts).
+deve0(_).
+
+deve1([]).
+deve1([H|T]) :- deve0(H),deve1(T).
+
+itldecomp(ITL,(NextS,StdNext),From) :-
+	init_var(current,From),
+	itl(ITL,Next,Cond),
+	%% showing
+	itlshow(Next,NextS,Cond,From,StdNext).
+
+itlshow(Next,S,Cond,From,StdNext):-
+	itl2bdd(Next,StdNext),
+	check_state(StdNext,Cond,New,S),
+	(lazy,!;assertz(state(From,Cond,S))),
+	(links(S,From),!;assertz(links(S,From))),
+	!,
+	itlshow0(S,Cond,StdNext,New).
+
+itlshow0(S,Cond,Next,New) :- verbose,!,
+	itlshow1(S,Cond,Next,New),nl,!,New=1.
+itlshow0(0,_,_,0):- !,put("e"),!,fail.
+itlshow0(false,_,_,0):- !,put("f"),!,fail.
+itlshow0(true,_,_,0):- !,put("t"),!,fail.
+itlshow0(_,_,_,0):- !,put("."),!,fail.
+itlshow0(S,_,_,1):- !,write(S),put("."),ttyflush,!.
+
+itlshow1(0,Cond,_,_):-!,
+	write(Cond),write('->'),write(empty).
+itlshow1(true,Cond,_,_):-!,
+	write(Cond),write('->'),write(true).
+itlshow1(false,Cond,_,_):-!,
+	write(Cond),write('->'),write(false).
+itlshow1(S,Cond,_,0):-!,
+	write(Cond),write('->'),write(S).
+itlshow1(S,Cond,Org,1):-
+	write(Cond),write('->'),write(S),
+	bdd2itl(Org,S1),put(9),write(S1),!.
+
+lazy_state(From,Cond,S) :-
+	links(S,From),
+	itl_state(ITL,From),
+	itl(ITL,Next,Cond),
+	itl2bdd(Next,StdNext),
+	check_state(StdNext,Cond,_,S).
+
+init :-
+	subterm_init,
+	abolish(state,3),
+	asserta((state(true,[more],true):-!)),
+	asserta((state(true,[empty],0):-!)),
+	(lazy,assertz((state(A,B,C) :- lazy_state(A,B,C))),!;true),
+        abolish(itl_state,2),
+        abolish(stay,3),asserta(stay(0,0,0)),
+	bdd:zero(F), bdd:one(T),
+        asserta(itl_state(F,false)),
+        asserta(itl_state(empty,0)),
+        asserta(itl_state(T,true)),
+	abolish(links,2),asserta(links(true,true)),
+	init_var(itl_state_number,1),!.
+
+show_state(S,ITL) :-
+	bdd2itl(ITL,ITL0),
+	nl,write('state('),write(S),  % (
+	(verbose,write(' , '), write(ITL0),write(')'),nl;write(')')),!.
+
+check_state(true,[more |_],0,true):-!.
+check_state(true,[empty|_],0,0):-!.
+check_state(false,_,0,-2):-!.
+check_state(STD,_,0,S):-
+	itl_state(STD,S),!.
+check_state(STD,_,1,S):-
+	inc_var(itl_state_number,S),
+	assert(itl_state(STD,S)),!.
+
+init_var(X,_) :- functor(F,X,1),assert(F),fail.
+init_var(X,_) :- functor(F,X,1),retract(F),fail.
+init_var(X,V) :- functor(F,X,1),arg(1,F,V),assert(F),!.
+inc_var(Name,X1) :- 
+	functor(F,Name,1),retract(F),arg(1,F,X),
+	X1 is X+1,functor(F1,Name,1),arg(1,F1,X1),
+	asserta(F1),!.
+
+increment_state(stay(P,now),stay(P,S),S) :- !,
+      (stay(P,F,S);assertz(stay(P,F,S))),!.
+increment_state(N,N,_) :- atomic(N),!.
+increment_state(P,R,S) :- functor(P,H,N),functor(R,H,N),
+      increment_state_arg(N,P,R,S).
+increment_state_arg(0,_P,_R,_):-!.
+increment_state_arg(N,P,R,S):-arg(N,P,PA),arg(N,R,RA),
+      N1 is N-1,increment_state(PA,RA,S),
+      increment_state_arg(N1,P,R,S).
+
+itl_statistics :- nl,
+	itl_state_number(X),write(X),write(' states'),nl,fail.
+itl_statistics :- 
+        sbn(X),write(X),write(' subterms'),nl,fail.
+itl_statistics :- 
+        init_var(tmp,0),
+        ((links(_,_),inc_var(tmp,_),fail);true),
+        tmp(N),
+        write(N),write(' state transitions'),nl,fail.
+itl_statistics.
+
+%% end %%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bddi	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,47 @@
+% Sat May 22 11:43:11 JST 1993
+
+:- use_module('~/ITL/bdd/sicstus/bdd').
+
+:-  module(lite,[
+	ex/1,  			% ex(ITL)   verification predicate
+	ex/2,			% ex(No,Example)
+	diag/1,diag/0, 		% find counter example
+	exe/1, exe/0,		% find sample execution
+	verbose/1, 		% verbose mode
+	lazy/1,			% lazy mode (dvcomp only)
+	kiss/0, 		% kiss format geneartion
+	read_kiss/1,		% read KISS2 format
+	read_kiss/4,		% read KISS2 format
+	read_kiss/3,		% read KISS2 format
+	tgen/0, 		% tokio clause geneartion
+	itl/1,			% one step tableau expansion
+	itl/3,			%     " in detail
+	itl_statistics/0,  	% show number of state etc. 
+	st/3,			% external state machine
+	st_variables/2,		%     its variables
+	sbterm/0,		% show sub term/ state database
+	display/0, large/0, small/0, 	% show state database
+	start/0, display_diag/1, display_exe/1,
+	state/0 		% show state database
+]).
+
+:- [op].
+
+:-
+  unix(system('make tmpa M=lite:')),
+  ['.tmpc'],
+  unix(system('make bdd M=lite:')),
+  ['.tmpc'].
+
+make :- unix(system('make M=lite: bdd')),consult(lite:['.tmpc','.tmpl']).
+
+:- ensure_loaded([chop,diag,kiss,ex,cp]).
+:- ensure_loaded([bdditl,bddcomp]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bdditl.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,143 @@
+%
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+% ITL subterm standarization with BDT
+%
+% a standard form of ITL, based on subterm classification
+%
+%
+
+% :- use_module('~/ITL/tableau/lite').
+:- use_module('~/ITL/bdd/sicstus/bdd').
+% :-op(900,xfy,(&)).
+
+eitl2bdd(X,Y) :-
+	lite:expand(X,X1),itl2bdd(X1,Y).
+eb(X,Y) :- ex(X,X1),eitl2bdd(X1,Y).
+
+subterm_init :- 
+	(bdd:manager(0);bdd:quit),!,bdd:init,
+	abolish(sb,2),
+	abolish(sbn,1),assertz(sbn(2)),
+	bdd:zero(F),assertz(sb(false,F)), % this is wrong...
+	bdd:one(T),assertz(sb(true,T)).
+
+subterm_check(I,J) :-
+	sb(I,Jid),bdd:var_with_id(Jid,J),!.
+subterm_check(I,N1) :-
+	bdd:new_var_first(N1),bdd:if_id(N1,N1id),
+	retract(sbn(M)),M1 is M+1,asserta(sbn(M1)),
+	assertz(sb(I,N1id)),!.
+
+% BDD classification of subterm
+
+itl2bdd(true,T):-!,bdd:one(T).
+itl2bdd(false,F):-!,bdd:zero(F).
+itl2bdd(P,F) :- integer(P),!,bdd:unfree(P),P=F.  % bdd
+itl2bdd(P,F) :- atom(P),!,subterm_check(P,F).
+itl2bdd(?(C,T,F),N) :- !,
+	itl2bdd(C,C1),itl2bdd(T,T1),itl2bdd(F,F1),
+	bdd:ite(C1,T1,F1,N),bdd:free(C1),bdd:free(T1),bdd:free(F1).
+itl2bdd(not(P),F) :- !,itl2bdd(P,F0),bdd:not(F0,F),bdd:free(F0).
+itl2bdd((P,Q),F) :- !,
+	itl2bdd(P,P0),itl2bdd(Q,Q0),
+	bdd:and(P0,Q0,F),bdd:free(P0),bdd:free(Q0),!.
+itl2bdd((P;Q),F) :- !,
+	itl2bdd(P,P0),itl2bdd(Q,Q0),
+	bdd:or(P0,Q0,F),bdd:free(P0),bdd:free(Q0),!.
+itl2bdd((P&Q), N) :-!,
+	itl2bdd(P,P1),itl2bdd(Q,Q1),
+	subterm_check((P1&Q1),N).
+itl2bdd(exists(P,Q), N) :-!,
+	itl2bdd(Q,QF), itl2bdd(P,PF),
+	subterm_check(exists(PF,QF),N).
+itl2bdd(proj(P,Q), N) :-!,
+	itl2bdd(Q,QF),itl2bdd(P,PF),
+	subterm_check(proj(PF,QF),N).
+itl2bdd(prefix(P), N) :-!,
+	itl2bdd(P,PF),
+	subterm_check(prefix(PF),N).
+% Simple Functor including Regular variable and state
+itl2bdd(Func,N) :- functor(Func,H,1),!,functor(F0,H,1),
+	arg(1,Func,A),itl2bdd(A,A0),arg(1,F0,A0),
+	subterm_check(F0,N).
+itl2bdd(Func,N) :- functor(Func,H,2),!,functor(F0,H,2),
+	arg(1,Func,A),itl2bdd(A,A0),arg(1,F0,A0),
+	arg(2,Func,B),itl2bdd(B,B0),arg(2,F0,B0),
+	subterm_check(F0,N).
+itl2bdd(Def,true) :-
+    write('bdditl error: '),write(Def),nl.
+
+subterm :-
+	listing(sb/2).
+
+bdd2itl(B,F) :- integer(B),!,
+	bdd:type(B,I),bdd2itl(I,B,F).
+bdd2itl(B,F) :- atom(B),!,F=B.
+bdd2itl(B,F) :- 
+	functor(B,H,N),functor(F,H,N),bdd2itl_subterm(N,N,B,F).
+
+bdd2itl_subterm(F,B) :- bdd:if_id(B,Bid),sb(F0,Bid),
+	functor(F0,H,N),functor(F,H,N),
+	bdd2itl_subterm(N,N,F0,F).
+bdd2itl_subterm(0,_,_,_) :- !.
+bdd2itl_subterm(N,N1,F,F0) :-
+	N0 is N-1,
+	arg(N,F,A),arg(N,F0,A0),
+	bdd2itl(A,A0),bdd2itl_subterm(N0,N1,F,F0).
+
+% BDD Type analysis 
+bdd2itl(0,B,OPT) :- !, % nonterminal
+	bdd:if(B,IF0),bdd2itl_subterm(IF,IF0),
+	bdd:then(B,THEN0),bdd2itl(THEN0,THEN),
+	bdd:else(B,ELSE0),bdd2itl(ELSE0,ELSE),
+	bdd2itl_opt(IF,THEN,ELSE,OPT).
+% little more readable representation
+    bdd2itl_opt(IF,true,false,IF) :- !.
+    bdd2itl_opt(IF,false,true,not(IF)) :- !.
+    bdd2itl_opt(IF,true,ELSE,(IF;ELSE)) :- !.
+    bdd2itl_opt(IF,THEN,false,(IF,THEN)) :- !.
+    bdd2itl_opt(IF,false,ELSE,(not(IF);ELSE)) :- !.
+    bdd2itl_opt(IF,THEN,true,(not(IF),THEN)) :- !.
+    bdd2itl_opt(IF,THEN,ELSE,?(IF,THEN,ELSE)) :- !.
+bdd2itl(1,_,false) :- !. % zero
+bdd2itl(2,_,true) :- !. % one
+bdd2itl(3,B,F) :- !, % posvar
+	bdd2itl_subterm(F,B).
+bdd2itl(4,B,not(F)) :- !, % negvar
+	bdd:not(B,B1),bdd2itl_subterm(F,B1).
+bdd2itl(5,_,overflow) :- !. % overflow
+bdd2itl(6,_,constant) :- !. % constant (mtbdd)
+
+% Depth One Expansion
+
+bdd2itl1(B,F) :- integer(B),!,
+	bdd:type(B,I),bdd2itl1(I,B,F).
+bdd2itl1(B,F) :- atom(B),!,F=B.
+bdd2itl1(B,B).
+
+% BDD Type analysis 
+bdd2itl1(0,B,?(IF,THEN,ELSE)) :- !, 	% nonterminal
+	bdd:if_id(B,IF0id),sb(IF,IF0id),
+	bdd:then(B,THEN),
+	bdd:else(B,ELSE).    		% no use of opt
+bdd2itl1(1,_,false) :- !. 		% zero
+bdd2itl1(2,_,true) :- !. 		% one
+bdd2itl1(3,B,F) :- !, 			% posvar
+	bdd:if_id(B,Bid),sb(F,Bid).
+bdd2itl1(4,B,not(F)) :- !, % negvar
+	bdd:not(B,B1),bdd:if_id(B1,B1id),sb(F,B1id).
+bdd2itl1(5,_,overflow) :- !. % overflow
+bdd2itl1(6,_,constant) :- !. % constant (mtbdd)
+
+	
+% BDD end %
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bdtstd.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,142 @@
+%
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+% ITL subterm standarization with BDT
+%
+% Fri Jun 21 10:32:58 BST 1991
+%
+% a standard form of ITL, based on subterm classification
+%
+%
+subterm_init :- 
+	abolish(sb,2),
+	asserta((sb([],-1))),
+	abolish(sbn,1),
+	asserta(sbn(0)).
+
+std_check(I,J) :-
+	sb(I,J),!.
+std_check(I,N1) :-
+	retract(sbn(N)),N1 is N+1,asserta(sbn(N1)),
+	assertz(sb(I,N1)),!.
+
+itlstd(P,List) :- 
+	sbdt(P,List).
+
+% BDT classification of subterm
+
+sbdt(true,true):-!.
+sbdt(false,false):-!.
+sbdt(P,F) :- atomic(P),!,F= ?(P,true,false).
+sbdt(?(C,T,F),?(C,T,F)) :- !.
+sbdt(not(P),F) :- !,sbdt(P,F0),sbdt_not(F0,F),!.
+   sbdt_not(true,false).
+   sbdt_not(false,true).
+   sbdt_not(F,?(H,A1,B1)):-
+   	arg(1,F,H),arg(2,F,A),arg(3,F,B),
+   	sbdt_not(A,A1),sbdt_not(B,B1).
+sbdt((P,Q),F) :- !,
+	sbdt(P,P0),sbdt(Q,Q0),
+	sbdt_and(P0,Q0,F),!.
+   sbdt_and(false,_,false):-!.
+   sbdt_and(_,false,false):-!.
+   sbdt_and(true,T,T):-!.
+   sbdt_and(T,true,T):-!.
+   sbdt_and(P,Q,R) :-!,
+   	arg(1,P,PF),arg(1,Q,QF),
+   	sbdt_and(PF,QF,P,Q,R).
+   sbdt_and(PF,QF,P,Q,R):-PF @< QF,!,
+   	sbdt_and(QF,PF,Q,P,R).
+   sbdt_and(PF,QF,P,Q,?(QF,R0,R1)):-PF @> QF,!,
+   	arg(2,Q,Q0),arg(3,Q,Q1),
+   	sbdt_and(Q0,P,R0),
+   	sbdt_and(Q1,P,R1).
+   sbdt_and(PF,PF,P,Q,?(PF,R0,R1)):-
+   	arg(2,P,P0),arg(3,P,P1),
+   	arg(2,Q,Q0),arg(3,Q,Q1),
+   	sbdt_and(P0,Q0,R0),
+   	sbdt_and(P1,Q1,R1).
+sbdt((P;Q),F) :- !,
+	sbdt(P,P0),sbdt(Q,Q0),
+	sbdt_or(P0,Q0,F),!.
+   sbdt_or(true,_,true):-!.
+   sbdt_or(_,true,true):-!.
+   sbdt_or(false,T,T):-!.
+   sbdt_or(T,false,T):-!.
+   sbdt_or(P,Q,R) :-!,
+   	arg(1,P,PF),arg(1,Q,QF),
+   	sbdt_or(PF,QF,P,Q,R).
+   sbdt_or(PF,QF,P,Q,R):-PF @< QF,!,
+   	sbdt_or(QF,PF,Q,P,R).
+   sbdt_or(PF,QF,P,Q,?(QF,R0,R1)):-PF @> QF,!,
+   	arg(2,Q,Q0),arg(3,Q,Q1),
+   	sbdt_or(Q0,P,R0),
+   	sbdt_or(Q1,P,R1).
+   sbdt_or(PF,PF,P,Q,?(PF,R0,R1)):-
+   	arg(2,P,P0),arg(3,P,P1),
+   	arg(2,Q,Q0),arg(3,Q,Q1),
+   	sbdt_or(P0,Q0,R0),
+   	sbdt_or(P1,Q1,R1).
+sbdt((P&Q), ?(N,true,false)) :-!,
+	sbdt(P,P1),sbdt(Q,Q1), % projection touch later part of chop
+	std_check((P1&Q1),N).
+%sbdt(@(Q), ?(N,true,false)) :-!,   % Don't check next part now
+%	std_check(@(Q),N).          %   this makes everything very slow
+%sbdt(*(Q), ?(N,true,false)) :-!,   % Don't check next part now
+%	std_check(*(Q),N).          %   this makes everything very slow
+%sbdt(free_fin(Q), ?(N,true,false)) :-!,
+%	std_check(free_fin(Q),N).
+% bottom up development is effective for quantifier
+sbdt(exists(P,Q), ?(N,true,false)) :-!,
+	sbdt(Q,QF),
+	std_check(exists(P,QF),N).
+sbdt(proj(P,Q), ?(N,true,false)) :-!,
+	sbdt(Q,QF),     % P part is fixed
+	std_check(proj(P,QF),N).
+sbdt(prefix(P), ?(N,true,false)) :-!,
+	sbdt(P,PF),     % P part is fixed
+	std_check(prefix(PF),N).
+% Simple Functor including Regular variable and state
+sbdt(Func,F) :- functor(Func,_,1),!,F= ?(N,true,false),
+	std_check(Func,N).
+sbdt(Func,F) :- functor(Func,_,2),!,F= ?(N,true,false),
+	std_check(Func,N).
+sbdt(Def,true) :-
+    write('bdtstd error: '),write(Def),nl.
+
+sbterm :-
+	listing(sb/2),listing(itl_state/2).
+
+
+bdt2itl(B,F) :- number(B),!,sb(F0,B),
+	bdt2itl(F0,F).
+bdt2itl(?(IF,THEN,ELSE),F) :-
+	bdt2itl(IF,IF0),bdt2itl(THEN,THEN0),bdt2itl(ELSE,ELSE0),
+	bdt2itl_opt(IF0,THEN0,ELSE0,F).
+% little more readable representation
+    bdt2itl_opt(IF,true,false,IF) :- !.
+    bdt2itl_opt(IF,false,true,not(IF)) :- !.
+    bdt2itl_opt(IF,true,ELSE,(IF;ELSE)) :- !.
+    bdt2itl_opt(IF,THEN,false,(IF,THEN)) :- !.
+    bdt2itl_opt(IF,false,ELSE,(not(IF);ELSE)) :- !.
+    bdt2itl_opt(IF,THEN,true,(not(IF),THEN)) :- !.
+    bdt2itl_opt(IF,THEN,ELSE,?(IF,THEN,ELSE)) :- !.
+bdt2itl(B,F) :- atom(B),!,F=B.
+bdt2itl(B,F) :- 
+	functor(B,H,N),functor(F,H,N),bdt2itl_subterm(N,N,B,F).
+    bdt2itl_subterm(0,_,_,_) :- !.
+    bdt2itl_subterm(N,N1,F,F0) :-
+	N0 is N-1,
+	arg(N,F,A),arg(N,F0,A0),
+	bdt2itl(A,A0),bdt2itl_subterm(N0,N1,F,F0).
+
+% BDT end %
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cad.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,31 @@
+specification(Z=f(X),
+   while(more,((
+     Z=X,
+     (
+	 (X->(
+	     repeat((skip&(Z=X,empty)),until,not(X)) &
+	     repeat((skip&(Z=not(X),empty)),until,not(X))))
+         ,
+         (not(X)->(
+	     repeat((skip&(Z=not(X),empty)),until,not(X))))
+     )
+    & skip
+    )))
+).
+
+implementation(Z=f(X),
+    exists(y,(
+    not(y),
+    [](
+           (
+	   next(y) = ((not(X),not(y));(X,y)),
+	   Z = ((X,not(y);(not(X),y)))
+           )
+      )
+    ))
+).
+
+?- specification(z=f(x),Y),ex((trace(x,[1,1,0,1,1,1,0,0,1,0,1]),Y)).
+
+?- speficication(z=f(x),S),implementation(z=f(x),I),
+   ex(I->fin_free(S)).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/call	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,13 @@
+:-[lite:op].
+:-fcompile(lite:'bdtstd.pl').
+:-fcompile(lite:'chop.pl').
+:-fcompile(lite:'cp.pl').
+:-fcompile(lite:'diag.pl').
+:-fcompile(lite:'dvcomp.pl').
+:-fcompile(lite:'ex.pl').
+:-fcompile(lite:'exdev.pl').
+:-fcompile(lite:'gi_ex.pl').
+:-fcompile(lite:'kiss.pl').
+:-fcompile(lite:'kiss_ex.pl').
+:-fcompile(lite:'op.pl').
+:-fcompile(lite:'rstd.pl').
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/chop.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,172 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Header$
+*/
+:-dynamic define/2.
+% ITL chop standard form
+% requires ndcomp
+
+def(~(P),not(P)).				% not
+def((P->Q),(not(P);Q)).				% imply
+def(P<->Q,((not(P);Q),(P; not(Q)))).		% equiv
+def(P=Q,((not(P);Q),(P; not(Q)))).		% equiv 
+def((P && Q),((not(empty),P) & Q)).		% strong chop
+def('<>'(Q),(true & Q)).			% sometime
+def('#'(Q), not(true & not(Q))).		% always
+def('[]'(Q), not(true & not(Q))).		% always
+def('[a]'(Q), not(true & not(Q) & true)).	% always with arbitary fin
+def('<a>'(Q), (true & Q & true)).	% sometime with arbitary fin
+def(fin(Q),(true & (empty,Q))).			% final state in the interval
+def(keep(Q), not(true & not((empty ; Q)))).	% except final state
+def(halt(Q), '[]'(empty=Q)).	
+def(more, not(empty)).				% non empty interval
+% discrete stuff
+def(skip, @(empty)).				% 1 length interval
+def(infinite, (true & false)).			% 
+def(finite, ~((true & false))).			% 
+def(length(I), X):- I>=0 ,def_length(I,X).	% length operator
+    def_length(I,empty):-I=<0,!.
+    def_length(I,@ X):-I1 is I-1,def_length(I1,X).
+def(less(I), X):- I>=0 ,def_less(I,X).		% less than N length
+    def_less(I,false):-I=<0,!.
+    def_less(I,next(X)):-I1 is I-1,def_less(I1,X).
+def(next(P),(empty; @(P))).
+% temporal assignments
+def(gets(A,B),keep(@A<->B)).
+def(stable(A),keep(@A<->A)).
+def(state(A),(share(A),'[]'(L))):- def_state(A,L).
+    def_state([H],H):-!.
+    def_state([H|L],(H;L1)):-def_state(L,L1).
+% def(Q=>P,exists(R,(Q = R,stable(R),fin(P = R)))).
+%   easier one
+% def(Q=>P,(Q & (empty,P); ~Q & (empty, ~P))).
+% def(P<=Q,Q=>P).
+% loop stuff and quantifiers
+def(+A ,(A & *((empty;A)))).  % weak closure
+def(while(Cond,Do), *(((Cond->Do) , (~Cond->empty)))).
+def(repeat(Do,until,Cond), (*((Do;empty)) ,@ halt(Cond))).
+def(all(P,Q),not(exists(P,not(Q)))):-!,
+	atomic(P).  % more check is necessary
+def(local(P), (P = (P&true))):- !.
+% test predicates
+def(trace(X,List),L) :- !,make_trace(List,X,L).
+    make_trace([],_,true):-!.
+    make_trace([1|T],X,(X,@L)):-!, make_trace(T,X,L).
+    make_trace([true|T],X,(X,@L)):-!, make_trace(T,X,L).
+    make_trace([0|T],X,(not(X),@L)):-!, make_trace(T,X,L).
+    make_trace([_|T],X,(not(X),@L)):-!, make_trace(T,X,L).
+def(even(P),
+	exists(Q,(Q, keep( @Q = ~Q),'[]'((Q->P))))).
+def(evenp(P),(
+	*(((P,skip) & skip;empty,P)) & (empty;skip)
+)). 
+def(phil(L,R),
+       +('[]'((~L, ~R)) & @ (L, ~R,@ (L,R, @ (R,'[]'( ~L)))) )).
+def(X,Y) :- define(X,Y).
+
+:-dynamic variable/1.
+
+expand(X,Y) :- init_variable,expand1(X,Y).
+
+expand1(V,V) :- var(V),!.
+expand1((P,Q),R) :- !,expand1(P,P1),expand1(Q,Q1),and(P1,Q1,R).
+expand1(st(R),st(R)) :- !,
+	st_variables(In,Out),add_variable(In),add_variable(Out).
+% expand1([P|Q],R) :- !,expand1(P,P1),expand1(Q,Q1),and(P1,Q1,R).
+expand1((P;Q),R) :- !,expand1(P,P1),expand1(Q,Q1),or(P1,Q1,R).
+expand1((P&Q),R) :- !,expand1(P,P1),expand1(Q,Q1),chop_expand1(P1,Q1,R).
+   chop_expand1(false,_,false):-!.
+%   chop_expand1(_,false,false):-!.
+   chop_expand1(true,true,true):-!.
+   chop_expand1(P,Q,(P&Q)):-!.
+expand1(not(Q),NQ):-!,expand1(Q,Q1),negate(Q1,NQ).
+expand1(exists(P,Q),exists(P,Q1)):-
+	nonvar(P),name(P,[X|_]),X = 95,!, % "_"  % reuse it...
+	expand1(Q,Q1).
+expand1(exists(P,Q),exists(P,Q1)):-var(P),!,
+	new_var(P), 
+	expand1(Q,Q1).
+expand1(exists(P,Q),exists(P,Q1)):-!,
+	expand1(Q,Q1).
+expand1([],[]):-!.
+expand1([H|L],?(And,true,?(NAnd,false,true_false))):-!, 
+        % non-deterministic selection
+	expand_list([H|L],L1),
+	all_and(L1,And),
+	all_not(L1,NAnd).
+    expand_list([],[]) :-!.
+    expand_list([H|L],[H1|L1]) :-
+	expand1(H,H1), expand_list(L,L1).
+    all_and([],true):-!.
+    all_and([H|L],F):- all_and(L,F1),and(H,F1,F).
+    all_not([],true):-!.
+    all_not([H|L],F):- all_not(L,F1),negate(H,H1),and(H1,F1,F).
+expand1(^(R),^(R)):-!,           % 2nd order variable
+	add_2var(R).
+expand1(P,R) :- def(P,Q),!,expand1(Q,R).
+expand1(P,P) :- atomic(P),!,     % for empty or skip
+	check_atomic(P).
+  check_atomic(empty):-!.
+  check_atomic(more):-!.
+  check_atomic(true):-!.
+  check_atomic(false):-!.
+  check_atomic(true_false):-!.
+  check_atomic(P) :- name(P,PL),PL=[95|_],!.
+  check_atomic(P) :- add_variable(P). % "_"
+expand1(P,R) :- functor(P,H,N),functor(R,H,N),
+	expand_arg(N,P,R).
+expand_arg(0,_P,_R):-!.
+expand_arg(N,P,R):-arg(N,P,PA),arg(N,R,RA),
+	N1 is N-1,expand1(PA,RA),expand_arg(N1,P,R).
+
+% do not use abolish here to avoid erase dynamic property of variable/1
+init_variable :- retract(variable(_)),fail;true.
+add_variable([]):-!.
+add_variable([X|T]) :- !,add_variable(X),add_variable(T).
+add_variable(X) :- variable(X),!.
+add_variable(X) :- assertz(variable(X)),!.
+variable_list(L) :- setof(X,variable(X),L).
+
+new_var(P) :-
+	(retract(sbn(N));N=1),N1 is N+1,asserta(sbn(N1)),!,
+	name(N1,X),S = 95,name(P,[S|X]). % "_"
+
+add_2var(R) :- length_limit(N),!,
+	add_variable(over(R,N)),
+	add_2var(N,R).
+add_2var(R) :-
+	add_variable(^(R)).
+add_2var(0,R):-!,
+	add_variable(^(R,0)).
+add_2var(N,R):- N1 is N-1,
+	add_variable(^(R,N)),
+	add_2var(N1,R).
+
+and(false,_,false):-!.
+and(_,false,false):-!.
+and(true,T,T):-!.
+and(T,true,T):-!.
+and(T,T,T):-!.
+and(A,B,(A,B)):-!.
+
+or(true,_,true):-!.
+or(_,true,true):-!.
+or(false,T,T):-!.
+or(T,false,T):-!.
+or(T,T,T):-!.
+or(A,B,(A;B)):-!. 
+
+negate(true,false):-!.
+negate(false,true):-!.
+negate(true_false,true_false):-!.
+negate(not(N),N):-!.
+negate(N,not(N)):-!.
+
+/* */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cp.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,52 @@
+ 
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+% A '\=' A :-!,fail.
+% _ '\=' _.
+
+
+
+
+
+
+
+
+
+
+
+
+
+r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
+
+
+
+
+
+
+
+
+
+append([],X,X).
+append([H|X],Y,[H|Z]) :- append(X,Y,Z).
+
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cppl.c	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 1988, Shinji Kono 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+*/
+/* 
+   support routine for compatibilities
+   */
+
+#if defined(SBPROLOG) || defined(XSB)
+lite_start :- ['op.pl'],
+	assert((define(_,_):-fail)),
+	assert((verbose:-fail)),
+	assert((variable(_):-fail)).
+
+start :- lite_start,
+	load('../Tokio/tokio'),
+	['../Tokio/ts.pl'],
+	com('../Tokio/tm.pl',user),
+	r_header.
+
+
+r_cputime(X) :- cputime(X0),X is X0/1000.
+ttyflush.
+#endif
+
+#if defined(SBPROLOG)
+
+'\+'(X) :- call(X),!,fail.
+'\+'(_).
+
+#endif
+
+#if ! defined(XSB)
+A '\=' A :-!,fail.
+_ '\=' _.
+#endif
+
+#if defined (XSB)
+':-'(X) :- call(X),!;true.
+
+#endif
+
+#if defined(CPROLOG) 
+:-abolish(r_cputime,1).
+r_cputime(X) :- X is cputime.
+#endif
+
+#if defined(SICSTUS) 
+r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
+#if defined(SICSTUSV3) 
+A '\=' A :-!,fail.
+_ '\=' _.
+#endif
+
+#endif
+
+#if defined(CPROLOG) 
+
+
+#if CPROLOG15
+term_expansion(X,X).
+:-unknown(X,trace).
+#endif
+
+:- (ttyflush;assert((ttyflush))).
+#endif
+
+append([],X,X).
+append([H|X],Y,[H|Z]) :- append(X,Y,Z).
+
+
+/* end  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demo.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,18 @@
+:-ensure_loaded('../tableau/liter').
+% :-ensure_loaded('../Tokio/initm').
+% :-fcompile(lite:disp).
+:-ensure_loaded(lite:disp).
+
+% :-com([bou,gi],'tmp.out').
+% :-prolog_flag(single_var_warnings, _, off).
+
+% :-com([bou],'tmp.out').
+
+:-write('To do demonstration,
+Start Lite verifier
+     ?- display.
+Load file gi?.lite.
+Verify it.
+Generate it.
+Run Tokio command toy0.
+').
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demoi	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,7 @@
+:- use_module(library(gmlib)).
+
+:-[init],compile(display).
+% :-start.
+% :-display.
+
+display(Host) :- start(Host),display.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demoim	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,25 @@
+% Sat May 22 11:43:11 JST 1993
+
+:- use_module(library(gmlib)).
+
+?-op(900,xfy,[(&),('&&')]).
+?-op(700,xfy,['<->','\=',proj]).
+?-op(60,fy,['~','#','<>', '@',^]).
+?-op(60,fy,[*]).
+
+:-
+  unix(system('make tmpa M=lite:')),
+  ['.tmpc'],
+  unix(system('make display M=lite:')),
+  ['.tmpc'].
+
+make :- unix(system('make M=lite:')),consult(lite:['.tmpc','.tmpl']).
+
+:- use_module(lite).
+:- load(lite:[ex,kiss_ex,display]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/diag.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,207 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+
+% develop Local ITL formula into state diagram
+%
+% Mon May 20 17:24:23 BST 1991
+% require([chop]).
+
+ex :- ex1(_).
+
+ex(N) :- number(N),!,ex1(N).
+ex(demo(N)) :- number(N),!,ex1(N).
+ex(X) :- verbose,!,time(deve(X)),itl_statistics,diag,!.
+ex(X) :- time(deve(X)),itl_statistics.
+
+ex1(N) :- ex(N,P),nl,write(P),write('.'),nl,ex(P),fail.
+ex1(_) :- told.
+
+exex :- verbose(off),tell(ex),(
+	ex(_,P),nl,write(P),write('.'),nl,ex(P),itl_statistics,fail;
+	told
+	).
+
+% cputime(X):-statistics(runtime,[X1,_]),!,X is X1/1000.
+% cputime(X):-X is cputime. % for cprolog
+time(X):- r_cputime(T0),call(X),r_cputime(T1),
+	T is T1-T0,
+	nl,write(T),write(' sec.').
+
+state :- listing(state/3),lising(state/4).
+
+% diagnosis
+diag :- diag(X),
+	(X = counter_example(_), write('counter example:'),nl; true),!,
+	write_diag(X).
+
+diag(X) :- number(X),   % at most X length solution
+	links(false,_),    % search false
+	diag_l(false,[],H,X),
+	make_hist(H,Hist),
+	write_diag(counter_example(Hist)).
+diag(valid) :- \+(links(false,_)),!.
+diag(counter_example(Hist)) :-
+	diag_l(false,[],H,0),
+	make_hist(H,Hist).
+
+% execution exapmle.
+exe :- exe(Z),
+	(Z=unsatisfiable, nl,write('unsatisfiable'),nl,!,fail; 
+	nl,write('execution:'),nl,write_diag(Z)).
+
+exe(X) :- number(X),   % at most X length solution
+	possible_root(R),
+	diag_l(R,[],H,X),
+	make_hist(H,Hist),
+	write_diag(execution(Hist)).
+exe(unsatisfiable) :- \+(possible_root(_)),!.
+exe(execution(Hist)) :-
+	possible_root(R),
+	diag_l(R,[],H,0),
+	make_hist(H,Hist).
+
+% possible root is non looping true or 0 node.
+possible_root(true) :-
+	possible_root1(true).
+possible_root(0) :-
+	possible_root1(0).
+
+possible_root1(R) :- links(R,N),\+(N = true),!.
+
+% Log order search
+
+make_hist(S,C) :- detailed,!,
+	S = [P|L],itl_state(P1,P),
+	make_hist1(L,P,P1,[],_,C).
+make_hist(S,C) :- 
+	S = [P|L],
+	make_hist0(L,P,C).
+
+make_hist0([],_,[]):-!.
+make_hist0([D|L],S,[(D->Cond)|L1]):-!,  % step by step
+	state(S,Cond,D),
+	!,  				% 
+	make_hist0(L,D,L1).
+
+% trace 2variable renamings
+
+make_hist1([],_,_,R,R,[]):-!.
+make_hist1([SN|L],S,P,R,R1,[(SN->Cond)|L1]):-!,  % step by step
+	state(S,Cond,SN,P,P1,R,R0),
+	!,
+	make_hist1(L,SN,P1,R0,R1,L1).
+
+
+diag(Hist,P) :-
+	diag_l(P,[],Hist,0).
+
+% try to find interesting example
+% reverse order back track
+diag_ls(Ps,L,L1,D):-member(P,Ps),diag_l(P,L,L1,D).
+
+% one minimum solution
+diag_l(1,L,[1|L],D):-!,D=<0.    % Initial State? Enough depth?
+diag_l(E,L,L1,D) :-
+	setof(P,links(E,P),P1),  % must be minimum first order
+	D1 is D-1,
+	member(P0,P1),
+	diag_l(P0,[E|L],L1,D1).
+
+
+write_diag(counter_example(Hist)) :-!,write_ce(Hist,0).
+write_diag(execution(Hist)) :-!,write_ce(Hist,0).
+	write_ce([],_):-!.
+	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,
+		write_ce(T,J).
+write_diag(R):-!,write(R),nl.
+
+% condition print
+
+write_cond(X) :- sortC(X,Y),write_cond1(Y).
+write_cond1([]):-!.
+write_cond1([H|T]):-!,write_cond1(H),write_cond1(T).
+write_cond1(not(P)):-!,put(45),  % "-"
+	write(P).
+write_cond1(P):-     !,put(43),  % "+"
+	write(P).
+
+% bubble sort
+sortC([],[]).
+sortC([H|T],[Min|Y]):-
+    min(T,H,Min,Rest),
+    sortC(Rest,Y).
+
+min([],X,X,[]).
+min([H|T],X,Y,[H|S]) :- ord(H,X),!,min(T,X,Y,S).
+min([H|T],X,Y,[X|S]) :- min(T,H,Y,S).
+
+ord(not(X),not(Y)) :- !,X @> Y.
+ord(X,not(Y))  :- !,X @> Y.
+ord(not(X),Y)  :- !,X @> Y.
+ord(X,Y)   :- !,X @> Y.
+
+rev([],X,X).
+rev([H|T],X,Y) :- rev(T,[H|X],Y).
+
+member(H,[H|_]).
+member(H,[_|T]):-member(H,T).
+
+not_member(_,[]):-!.
+not_member(H,[H|_]):-!,fail.
+not_member(H,[_|T]):-not_member(H,T).
+
+count(A) :- count(A,X),write(X),nl.
+count(A, _) :-
+        init_var(tmp, 0),
+        call(A),
+        inc_var(tmp, _),
+        fail.
+count(_, A) :-
+	retract(tmp(A)).
+
+user_help :- write('?-ex(2).'),nl,
+write('?-ex( [](p) -> <> p ).'),nl,
+write('    Verify numbered examples or ITL formula.'),nl,
+write('?-diag.'),nl,
+write('    shows a counter example.'),nl,
+write('?-exe.'),nl,
+write('    This shows an execution of ITL formula.'),nl,
+write('?-diag(N) or ?-exe(N) '),nl,
+write('    shows at least N length examples.  '),nl,
+write('         1: +p-q   means "at clock 1, p is true and q is false". '),nl,
+write('?-verbose(off). '),nl,
+write('    generates one character per state transition condition.'),nl,
+write('     e   empty / t   true / f   false'),nl,
+write('     123. newly genrated state number'),nl,
+write('     .   transition to a registerd state'),nl,
+write('?-verbose(on).'),nl,
+write('    show ITL formula for each state. (Can be Very large)'),nl,
+write('?-start, display.'),nl,
+write('    starts X-Window Interface.'),nl,
+write('?-ex. runs all examples in diag.pl. But it takes several hours.'),nl,
+write('      Some of the examples are quite large.'),nl,
+write('?-kiss.'),nl,
+write('    generates KISS2 format for SIS.'),nl,
+write('?-tgen.'),nl,
+write('    generates Tokio language.'),nl,
+write('?-read_kiss(File,In,Out,Empty).'),nl,
+write('    reads KISS2 format. In and Out are list of variables in the order'),nl,
+write('    of the KISS2 file. '),nl,
+write('?-read_kiss(File).'),nl,
+write('    =>  read_kiss(File,_,_,empty)'),nl,
+write('?-read_kiss(File,Empty).'),nl,
+write('    =>  read_kiss(File,_,_,Empty) '),nl,
+true.
+
+/* end */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/disp.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,427 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% LITE Tcl/Tk interface
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% :- ensure_loaded('../tableau/lite').
+:- module(lite).
+:- use_module(library(tcltk)).
+:- verbose(off).
+
+:- dynamic r_event/2.
+
+:- abolish(show_state,2).
+% Next command keep check event during verification
+show_state(S,ITL) :-!,
+        (tcl_eval(update);true),!,
+	bdt2itl(ITL,ITL1),
+        nl,write('state('),write(S),  % (
+        (verbose,write(' , '), write(ITL1),write(')'),nl;write(')')),!.
+
+event(verbose,'1') :- verbose(on).
+event(verbose,'0') :- verbose(off).
+event(X,Y) :- assertz(r_event(X,Y)).   % ,write((X,Y)),nl.
+event(X) :-   assertz(r_event(X,[])).  % ,write((X)),nl.
+
+next(X,Y) :- r_event(_,_),retract(r_event(X,Y)),!.
+next(X,Y) :- tk_do_one_event(0),!,
+	next(X,Y).
+
+display :-
+	init_display,!,
+	event_loop(run).
+
+init_display :-
+	(retract(r_event(_,_)),fail;true),
+	tk_init('lite',[]),
+%	tcl_eval('source disp.tcl'),
+	tcl_eval('source xf-disp'),
+        all_disable.
+canvas_origin(20,20).
+
+event_loop(quit):-!.
+event_loop(_) :-
+	next(X,Y),execute(X,Y),!,event_loop(X).
+
+execute(verify,X) :- !,
+	verify(X).
+
+% !,X=1 -> verbose(on); verbose(off). causes error
+execute(verbose,X) :- X='1' -> verbose(on); verbose(off).
+execute(map,X) :- !,name(X,L),name(X1,L),view_state(a,X1).
+execute(execute,_) :- !,do_execute,!.
+execute(generate,_) :- !,
+	generate.
+execute(counter,_) :- !,do_diagnosis,!.
+execute(quit,_) :- !. % ,tcl_eval('destroy .').
+execute(prolog_call,X) :- !,prolog_call(X).
+execute(tokio_call,X) :- !,tokio_call(X).
+execute(X,_) :- !,write(event(X)),nl,ttyflush.
+
+generate :-
+	TOKIO = 'tmp.tokio',
+	tell(TOKIO),tgen,told,
+        user:com(TOKIO,'tmp.out').
+gen(X) :- consult(X),specification(Y),ex(Y),generate.
+gen(X) :- 
+	name(X,XL),append(XL,".lite",YL),name(X1,YL),
+	consult(X1),specification(Y),ex(Y),generate.
+
+verify(X) :-
+        all_disable,
+	abolish(st,3),abolish(specification,1),abolish(st_variables,2),
+	t2string(X,X0),s2terms(X0,X1),command(X1,X2,X3),
+	display_contents(X3),
+	ex(X2),!,
+	ttyflush, display_statistics,
+        all_enable.
+verify(_) :-
+        all_disable.
+display_contents(X) :-
+	ttyflush,t2strings(X,XS0),easy_pp(XS0,XS),
+	tcl_eval('$symbolicName(entry) delete 0.0 end'),
+	tcl_eval(['$symbolicName(entry) insert 0.0 {',XS,'}']),
+        display_update.
+
+all_disable :-
+	tcl_eval('$symbolicName(map) configure -state disabled'),
+	tcl_eval('$symbolicName(execute) configure -state disabled'),
+	tcl_eval('$symbolicName(diag) configure -state disabled'),
+	display_update.
+all_enable :-
+	tcl_eval('$symbolicName(map) configure -state normal'),
+	tcl_eval('$symbolicName(execute) configure -state normal'),
+	tcl_eval('$symbolicName(diag) configure -state normal'),
+	display_update.
+
+% Backtrack Control of example/counter example
+
+do_execute :- display_exe('.'),next(X,Y),do_execute(X,Y),!.
+do_execute.
+
+do_execute(execute,_) :-!,
+	fail.
+do_execute(X,Y) :- execute(X,Y),!.
+
+do_diagnosis :- display_diag(','),next(X,Y),do_diagnosis(X,Y),!.
+do_diagnosis.
+
+do_diagnosis(diag,_) :-!,
+	fail.
+do_diagnosis(X,Y) :- execute(X,Y),!.
+
+% :- dynamic specification/1.
+
+% Text Based Commnad
+
+command([st(X,Y,Z)|T],Term,[st(X,Y,Z)|T1]):-!,
+	assertz(st(X,Y,Z)),!,
+	command(T,Term,T1).
+command([specification(X)|T],X,[specification(X)|T1]):-!,
+	command(T,X,T1).
+command([st_variables(X,Y)|T],Term,[st_variables(X,Y)|T1]):-!,
+	assertz(st_variables(X,Y)),
+	command(T,Term,T1).
+command([],true,[]) :-!.
+command([],_,[]) :-!.
+command([H],Term,[Term1]) :-!,
+	command(H,Term),!,Term=Term1.
+command([H|T],(Term1,Terms),[Term1|T1]) :-
+	command(H,Term1),!,command(T,Terms,T1).
+
+command(demo(X),Term):-!,lite:demo(X,Term).   % predefined examples
+command(ex(X),Term):-!,ex(X,Term).
+command(prolog(X,P),X):-!,safe_call(P).
+command(prolog(P),true):-!,safe_call(P).
+command(tokio(P),true):-!,safe_call(tokio(P)).
+command(consult(P),Term):-!,
+	command(file(P),Term).
+command(file(P),Term):-
+	on_exception(Er,(consult(P),specification(Term)),
+           read_error(Term,Er,user,user)).
+command(A,A) :- atomic(A),!.
+command(P,R) :- functor(P,H,N),functor(R,H,N),
+        command_arg(N,P,R).
+command_arg(0,_P,_R):-!.
+command_arg(N,P,R):-arg(N,P,PA),arg(N,R,RA),
+        N1 is N-1,command(PA,RA),command_arg(N1,P,R).
+
+prolog_call(X) :- 
+	t2string(X,X0),s2terms(X0,[X1|_]),safe_call(X1).
+tokio_call(X) :- 
+	t2string(X,X0),s2terms(X0,[X1|_]),safe_call(tokio(X1)).
+
+safe_call(X) :-
+	on_exception(Er,user:call(X),
+           read_error(X,Er,user,user)),!.
+safe_call(_).
+
+:-dynamic font/2.
+
+small :- (retract(font(_,_));true),assert(font("7x14",14)).
+large :- (retract(font(_,_));true),assert(font("12x24",24)).
+
+:-small.
+% font("7x14",14).
+
+width(W,H):-
+   font(_,Fs),
+   W is integer(1000/24*Fs), H is integer(500/24*Fs).
+
+display_statistics :-
+        itl_state_number(S), % number of state
+        itl_transition(L),   % number of transition
+        name(S,Ss),name(L,Ls),
+        append("State: ",Ss,S0),append(S0," Edge:",S1),append(S1,Ls,S2),
+        tcl_eval(["$symbolicName(states) configure -text {",S2,"}"]),!.
+
+%%---------------------------------------------------------------------
+% display_diagnosis
+display_diag(View) :- diag(X),
+	write_display_diag(X,View).
+
+% display_execution exapmle.
+display_exe(View) :- exe(Z),
+	write_display_diag(Z,View).
+
+write_display_diag(counter_example(Hist),View) :-!,display_ce(Hist,View).
+write_display_diag(execution(Hist),View) :-!,display_ce(Hist,View).
+write_display_diag(R,_View):-!,
+	atomic(R),name(R,Text),
+	clear_display,
+	tcl_eval(['$symbolicName(canvas) create text 0 0 -text "',Text,'"']).
+
+% append([],X,X):-!.
+% append([H|X],Y,[H|Z]) :- append(X,Y,Z).
+
+clear_display :-
+	tcl_eval('$symbolicName(canvas) delete all').
+display_ce(Hist,View) :-
+	canvas_origin(OX,OY),
+	font(_,Fs),
+	clear_display,
+	X is OX+Fs/2,Y=OY,W is integer(60/24*Fs),H is integer(60/24*Fs),
+	(variable_list(L);L=[]),append(L,['Time'],L1),!,
+	display_var(['State'|L1],View,X,Y,H,X,X1),
+	X2 is X1+X,
+	display_ce(Hist,L,View,X2,Y,W,H,0). % ,View=>batchmodeoff.
+display_var([],_,_,_,_,X,X):-!.
+display_var([Var|L],View,X,Y,H,X1,X2):- atomic(Var),!,
+	Y1 is Y+H, font(_Fn,Fs),
+	name(Var,VarText),length(VarText,Len0),Len is Len0*Fs,
+	% View=>stringlength(VarText,Len),
+	(X1>X+Len,X3=X1;X3 is X+Len),!,
+	display_string(X,Y,VarText),
+	display_var(L,View,X,Y1,H,X3,X2).
+display_var([Var|L],View,X,Y,H,X1,X2):- 
+	functor(Var,VarH,2),member(VarH,[(^)]),!,
+	arg(1,Var,VarA),arg(2,Var,VarB),
+	% infix operator
+	Y1 is Y+H, font(_Fn,Fs),
+	name(VarH,VarTextH),name(VarA,VarTextA),name(VarB,VarTextB),
+	append(VarTextA,VarTextH,VarText0),
+	append(VarText0,VarTextB,VarText),
+	length(VarText,Len0),Len is Len0*Fs,
+	% View=>stringlength(VarText,Len),
+	(X1>X+Len,X3=X1;X3 is X+Len),!,
+	display_string(X,Y,VarText),
+	display_var(L,View,X,Y1,H,X3,X2).
+display_var([Var|L],View,X,Y,H,X1,X2):- 
+	functor(Var,VarH,2),
+	arg(1,Var,VarA),arg(2,Var,VarB),
+	Y1 is Y+H, font(_Fn,Fs),
+	name(VarH,VarTextH),name(VarA,VarTextA),name(VarB,VarTextB),
+	CB is "(",CE is ")",CC is ",",
+	append(VarTextH,[CB|VarTextA],VarText0),
+	append(VarText0,[CC|VarTextB],VarText1),
+	append(VarText1,[CE],VarText),
+	length(VarText,Len0),Len is Len0*Fs,
+	% View=>stringlength(VarText,Len),
+	(X1>X+Len,X3=X1;X3 is X+Len),!,
+	display_string(X,Y,VarText),
+	display_var(L,View,X,Y1,H,X3,X2).
+
+display_string(X,Y,Text) :-
+	font(Fn,_),
+        name(X,XL),name(Y,YL),
+        tcl_eval(['$symbolicName(canvas) create text ',XL,' ',YL,' -font ',Fn,
+                  ' -text "', Text,'"'
+        ]).
+display_ce([],_,_,_,_,_,_,_):-!.
+display_ce([(S->[_|Cond])|Hist],L,View,X,Y,W,H,T) :-
+	X1 is X+W,Y1 is Y+H,T1 is T+1,
+	name(S,SText),display_string(X1,Y,SText),
+	display_now(L,Cond,View,X1,Y1,W,H,T),
+	display_ce(Hist,L,View,X1,Y,W,H,T1).
+
+display_now([],_,_View,X,Y,_,_,T):-!,
+	name(T,SText),display_string(X,Y,SText).
+display_now([V|Vr],Cond,View,X,Y,W,H,T):-
+	XS is X-H/2,YS is Y-H/2,
+	display_state(Cond,V,View,XS,YS,W,H),
+	Y1 is Y+H,
+	display_now(Vr,Cond,View,X,Y1,W,H,T).
+
+rectangle(1,X,Y,X2,Y2) :-!,
+        name(X,XL),name(Y,YL), name(X2,XL2),name(Y2,YL2),
+        tcl_eval(['$symbolicName(canvas) create rectangle ',
+                  XL,' ',YL,' ', XL2,' ',YL2,' ',
+                 '-stipple gray50 -fill black'
+        ]).
+rectangle(0,X,Y,X2,Y2) :-
+        name(X,XL),name(Y,YL), name(X2,XL2),name(Y2,YL2),
+        tcl_eval(['$symbolicName(canvas) create rectangle ',
+                  XL,' ',YL,' ', XL2,' ',YL2
+        ]).
+display_state([V|_],V,_View,X,Y,W,H) :-!, % true
+	X2 is X+W,Y2 is Y+H,
+	rectangle(1,X,Y,X2,Y2).
+display_state([not(V)|_],V,_View,X,Y,W,H) :-!, % false
+	X2 is X+W,Y2 is Y+H,
+	rectangle(0,X,Y,X2,Y2).
+display_state([_|T],V,View,X,Y,W,H) :-!,
+	display_state(T,V,View,X,Y,W,H).
+display_state([],_,_View,X,Y,W,H) :-!,    % unknown
+	X2 is X+W,Y2 is Y+H/2,Y3 is Y2+3,
+	rectangle(0,X,Y2,X2,Y3).
+
+display_update :- tcl_eval('update').
+
+view_state(View,W) :-
+   itl_state_number(S),
+   clear_display,
+   canvas_origin(OX,OY),
+   calc_view_size(W,S,D,W0),
+%   write(calc_view_size(W,S,D,W0)),nl,
+   W1 is OX + W0 + D, H1 is OY + W0 + D,
+   rectangle(0,OX,OY,W1,H1),
+   view_state_write(View,W0,S,D).
+
+calc_view_size(W,S,D,W1) :-
+   D0 is integer(W/(S+1)),(D0<2,D=2;D=D0),!,
+   W0 is D*(S+1),(W0=<W,!,W1 = W0; W1 is integer(W)),!.
+
+view_state_write(_View,W,S,D) :- 
+   canvas_origin(OX,OY),
+   links(X,Y), link_translate(X,Y,X1,Y1,W,S),
+   X2 is OX+X1+D,Y2 is OY+Y1+D,
+   X11 is OX+X1,Y11 is OY+Y1,
+   rectangle(1,X11,Y11,X2,Y2),
+   display_update,
+   fail.
+view_state_write(_View,_,_,_):-true. 
+
+link_translate(false,Y,X1,Y1,W,S) :- !,
+    link_translate(S,Y,X1,Y1,W,S).
+link_translate(X,false,X1,Y1,W,S) :- !,
+    link_translate(X,S,X1,Y1,W,S).
+link_translate(X,Y,X1,Y1,W,S) :- number(X),number(Y),!,
+    X1 is integer(X*W/(S+1))+1, Y1 is integer(Y*W/(S+1)).
+link_translate(X,_,X1,0,W,S) :- number(X),!,
+    X1 is integer(X*W/(S+1)).
+link_translate(_,Y,0,Y1,W,S) :- number(Y),!,
+    Y1 is integer(Y*W/(S+1)).
+link_translate(_,_,0,0,_,_).
+
+%%
+
+s2term("",true):-!.
+s2term(Text,Term) :-
+	telling(O),
+	tell(tmp),format("~s.~n",[Text]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,read(Term),read_error(Term,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2term(_,true):-tell(tmp),told,see(tmp),seen.
+
+s2terms("",true):-!.
+s2terms(Text,Terms) :-
+	check_period(Text,0,Text1),
+	telling(O),
+	tell(tmp),format("~s~n",[Text1]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,s2terms0(Terms),read_error(Terms,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2terms(_,true):-tell(tmp),told,see(tmp),seen.
+
+s2terms0(Terms) :-read(X),s2terms0(X,Terms).
+s2terms0(end_of_file,[]):-!.
+s2terms0(H,[H|T]):-read(X),s2terms0(X,T).
+
+read_error(true,Er,I,O) :- 
+	tell(tmp),told,see(tmp),seen,
+	see(I),tell(O),    %   unix(system('rm tmp')),
+	write('read error:'),write(Er),nl.
+
+t2string(Term,Text) :-
+	telling(O),
+	tell(tmp),write(Term),told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2string(_,true):-tell(tmp),told,see(tmp),seen.
+
+t2strings(Terms,Text):-!,
+	telling(O),
+        t2strings(Terms),
+        told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2strings(_,true):-tell(tmp),told,see(tmp),seen.
+
+t2strings([]):-!.
+t2strings([Term|T]):-!,
+	tell(tmp),write(Term),put("."),put(10),t2strings(T).
+
+read_string(-1,[]) :- !.
+read_string(C,[C|T]) :- 
+	get0(C1),read_string(C1,T).
+
+check_period([],0,[32,46]):-!.
+check_period([],1,[]):-!.
+check_period([46],_,[46]):-!.
+check_period([46,X|T],_,[46,X|T1]):-(X=32;X=10;X=37),!,
+	check_period(T,1,T1).
+check_period([37|T],X,[37|T1]):-
+	skip_line(T,X,T1).
+check_period([X|T],P,[X|T1]):-(X=32;X=10),!,
+	check_period(T,P,T1).
+check_period([X|T],_,[X|T1]):-
+	check_period(T,0,T1).
+
+skip_line([],X,[]):-!,
+	check_period([],X,_).
+skip_line([10|T],X,[10|T1]):-!,
+	check_period(T,X,T1).
+skip_line([_|T],X,T1):-skip_line(T,X,T1).
+
+% sicstus dependent 
+easy_pp(X,X1) :- easy_pp(X,X1,0).
+easy_pp([],[10],_) :- !.
+easy_pp([C|T],[C1,10|T0],_) :- C is ".",!,C1 = C,
+	easy_pp(T,T0,0).
+easy_pp([C|T],[C1,10|T0],N) :- C is ",",!,C1 = C,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C|T],[C1,10|T0],N) :- C is ";",!,C1 = C,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C,C|T],[C1,C1,10|T0],N) :- C is "&",!,C1 = C, % &&
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C|T],[C1,10|T0],N) :- C is "&",!,C1 = C,      % &
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C,C1,C2,CB|T],C3,N) :- [C,_,C2,CB]="[a](",!,  % quote '[a]'
+	CQ is "'", C3 = [CQ,C,C1,C2,CQ,CB|T1],
+	easy_pp(T,T1,N).
+easy_pp([10|T],[10|T0],N) :- !,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([Par|T],[Par1|T0],N) :- Par is "(",!,Par1 = Par,
+	N1 is N+1,easy_pp(T,T0,N1).
+easy_pp([Par|T],[Par1|T0],N) :- Par is ")",!,Par1 = Par,
+	N1 is N-1,easy_pp(T,T0,N1).
+easy_pp([H|T],[H|T0],N) :- 
+	easy_pp(T,T0,N).
+
+easy_tab(N,T,T1):-N =< 0,!,T=T1.
+easy_tab(N,[32,32|T],T1) :-
+	N1 is N-1,easy_tab(N1,T,T1).
+
+% end %
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ex.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,256 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+
+ Examples
+*/
+
+ex(0,(p)).
+ex(1,((p&q))).
+ex(2,( (fin(p)&true) <-> '<>'p)).
+ex(3,( fin(p) <-> '[]'( '<>' p) )).
+ex(4,(~(true&q))).
+ex(5,(~(true& ~q))).
+ex(6,(((true& p),(true& q)))).
+ex(7,('[]'((p -> '<>' q)))).
+ex(8,( '<>' '[]'(p))).
+ex(9,( '[]'( '<>'(p)))).
+ex(10,((p && p && p && p && p && ~p && p)-> '[]'('<>'(p)))).
+% weak closure (or finite closure)
+ex(11,+ (a,@ (b,@ (c,@empty)))).
+% quantifier
+ex(12,exists(R,(R,keep(@R = ~R),'[]'((R->p))))).
+% temporal assignment
+ex(13,exists(R,(R = p,keep(@R = R),fin(R = p)))).
+%
+ex(14,
+	exists(Q,(Q, 
+	  '[]'((Q -> 
+	          (((((a,skip) & (b,skip)), @ keep(~Q)) & Q)
+	          ;empty))
+	  )))
+   <->  *(((a,skip) & (b,skip) ; empty))
+).
+ex(15,
+        while(q,((a,skip) & (b,skip)))
+   <->  exists(C,(C, 
+          '[]'(
+             (C -> 
+                  (((q -> ((a,skip) & (b,skip)), @ keep(~C)) & C),
+                    (~q -> empty))
+             ))))
+).
+ex(16,even(p)<->evenp(p)).
+% wrong example, but hard to solve
+% ex(17,(p=>(q=>r)) <-> ((p=>q)=>r)).
+% ex(18,exists(Q,(p=>Q & Q=>r)) <-> (p=>r)).
+% dining philosopher
+%   note: unspecified resource increase states
+%   ex ((true & al,skip & al,ar,skip & ar,~al,skip) ;empty) * 
+ex(19,(more,
+% three philosophers 
+        *( ('[]'((~al, ~ar)) & @ (al, ~ar,@ (al,ar, @ (ar,'[]'( ~al)))) ;empty) ) ,
+        *( ('[]'((~bl, ~br)) & @ (bl, ~br,@ (bl,br, @ (br,'[]'( ~bl)))) ;empty) ) ,
+        *( ('[]'((~cl, ~cr)) & @ (cl, ~cr,@ (cl,cr, @ (cr,'[]'( ~cl)))) ;empty) ) ,
+% shared resources
+	'[]'( ~ ( ar, bl)),
+	'[]'( ~ ( br, cl)),
+	'[]'( ~ ( cr, al))
+)).
+ex(20,(more,
+% five philosophers 
+        *( ('[]'((~al, ~ar)) & @ (al, ~ar,@ (al,ar, @ (ar,'[]'( ~al)))) ;empty) ) ,
+        *( ('[]'((~bl, ~br)) & @ (bl, ~br,@ (bl,br, @ (br,'[]'( ~bl)))) ;empty) ) ,
+        *( ('[]'((~cl, ~cr)) & @ (cl, ~cr,@ (cl,cr, @ (cr,'[]'( ~cl)))) ;empty) ) ,
+        *( ('[]'((~dl, ~dr)) & @ (dl, ~dr,@ (dl,dr, @ (dr,'[]'( ~dl)))) ;empty) ) ,
+        *( ('[]'((~el, ~er)) & @ (el, ~er,@ (el,er, @ (er,'[]'( ~el)))) ;empty) ) ,
+% shared resources
+	'[]'( ~ ( ar, bl)), '[]'( ~ ( br, cl)), '[]'( ~ ( cr, dl)),
+	'[]'( ~ ( dr, el)), '[]'( ~ ( er, al))
+)):-fail.  % too big to verify (sigh...)
+
+ex(21,(more,
+	share([ar,bl]),share([br,cl]),share([cr,dl]),
+	share([dr,el]),share([er,al]),
+        *( ((true && '[]'(al) && '[]'((al,ar)) && '[]'(ar));empty) ) ,
+        *( ((true && '[]'(bl) && '[]'((bl,br)) && '[]'(br));empty) ) ,
+        *( ((true && '[]'(cl) && '[]'((cl,cr)) && '[]'(cr));empty) ) ,
+        *( ((true && '[]'(dl) && '[]'((dl,dr)) && '[]'(dr));empty) ) ,
+        *( ((true && '[]'(el) && '[]'((el,er)) && '[]'(er));empty) ) ,
+true)):-fail.  % too big to verify (sigh...)
+
+ex(22,(more,
+% three philosophers  with no iteration
+        ( ('[]'((~al, ~ar)) & @ (al, ~ar,@ (al,ar, @ (ar,'[]'( ~al)))) ;empty) ) ,
+        ( ('[]'((~bl, ~br)) & @ (bl, ~br,@ (bl,br, @ (br,'[]'( ~bl)))) ;empty) ) ,
+        ( ('[]'((~cl, ~cr)) & @ (cl, ~cr,@ (cl,cr, @ (cr,'[]'( ~cl)))) ;empty) ) ,
+% shared resources
+	'[]'( ~ ( ar, bl)),
+	'[]'( ~ ( br, cl)),
+	'[]'( ~ ( cr, al))
+)).
+% These are not schema. Just check
+% Linear Time Axioms, valid in ITL
+ex(100,('[]'((a->b)) -> ('[]'(a) -> '[]'(b)))).  		%   K
+ex(101,('[]'(((a , '[]'(a))->b));'[]'(((b , '[]'(b))->a)))).    %   4
+ex(102,('[]'(a)-> '<>'(a))).                           	%   D
+ex(103,('[]'(a)-> '[]'('[]'(a)))).                      	%   L
+ex(104,(('[]'(a)) -> a)).                              	%   T
+ex(105,('[]'('[]'((((a-> '[]'(a)))->a))) -> ((('<>'('[]'(a)))-> '[]'(a))))). %   Diodorean discreteness
+% Linear Time Axioms, not valid in ITL
+ex(106,('[]'(('[]'(a)->a))-> ((('<>'('[]'(a)))-> '[]'(a))))).   	%   Z discreteness
+ex(107,('[]'(('[]'(a)->a))-> ('[]'(a)))).                	%   W weak density
+% Other Axioms, not valid in ITL
+ex(108,(a-> '[]'('<>'(a)))).                          	%   B
+ex(109,(('<>'a)-> '[]'('<>'(a)))).                    	%   5
+
+ex(110,(more-> (more&more))).                   	%   our dense time
+
+ex(demo(X),Y) :- demo(X,Y).
+demo(X) :- number(X),demo(X,ITL),nl,ex(ITL),nl,write(ITL).
+
+% length 5 interval
+demo(1, length(5)).
+
+% p is trun at the top of a interval
+demo(2, (length(5),p)).
+
+% @ meas next time.
+demo(3, (length(5),@p,@ @q,@ @ @r)).
+
+% &(chop) devides an interval into to parts
+demo(4, ((length(2),p)) & (length(3),q)).
+
+%  there are several ways of division.
+demo(5, (length(5),(p&q))).
+
+% sometime usinng chop
+demo(6, (length(5),(true & p))).
+
+% always: dual of sometime
+demo(7, (length(5),not(true & not(p)))).
+
+% counter intutive theorem
+demo(8, '<>' '[]'(p) = '[]'('<>'(p))).
+
+% shared resource / exclusive condition
+demo(9, (length(5),
+        '[]'(((    ac ,not(bc),not(cc),not(dc));
+            (not(ac),    bc ,not(cc),not(dc));
+            (not(ac),not(bc),    cc ,not(dc));
+            (not(ac),not(bc),not(cc),    dc ))))).
+
+% periodical task by Projection
+demo(10, (more,
+	proj((@ '<>'(q),length(2)),true))).
+
+% time sharing taks by Projection
+demo(11, (more,length(7),
+	proj(true,('[]'(p),length(4))))).
+
+% combination of periodical task
+demo(12, (more,
+	proj(length(2),'[]'(ac)),
+	proj(length(3),'[]'(bc)),
+	proj(length(5),'[]'(cc)))).
+
+% periodical task with shared resources
+demo(13, (more,
+	proj((length(3),@ '<>'(ac)),true),
+	proj((length(5),@ '<>'(bc)),true),
+	proj((length(5),@ '<>'(cc)),true),
+	'[]'((not((ac,bc)),not((bc,cc)),not((cc,ac)))),
+	true)).
+
+% combination of periodical taks and aperiodical task with shared resource
+demo(14, (
+	((proj(true,(length(5),'[]'(dc))),length(15) )&true),
+	proj((length(3),@ '<>'(ac)),true),
+	proj((length(5),@ '<>'(bc)),true),
+	proj((length(5),@ '<>'(cc)),true),
+	'[]'(((    ac ,not(bc),not(cc),not(dc));
+	    (not(ac),    bc ,not(cc),not(dc));
+	    (not(ac),not(bc),    cc ,not(dc));
+	    (not(ac),not(bc),not(cc),    dc ))),
+	true)).
+% combination of periodical taks and aperiodical task with shared resource
+%  schedulable case
+demo(15, (
+	((proj(true,(length(4),'[]'(dc))),length(15) )&true),
+	proj((length(3),@ '<>'(ac)),true),
+	proj((length(5),@ '<>'(bc)),true),
+	proj((length(5),@ '<>'(cc)),true),
+	'[]'(((    ac ,not(bc),not(cc),not(dc));
+	    (not(ac),    bc ,not(cc),not(dc));
+	    (not(ac),not(bc),    cc ,not(dc));
+	    (not(ac),not(bc),not(cc),    dc ))),
+	true)).
+
+
+% model restriction by share predicate ( a little smaller.... :-)
+demo(16, (
+	share([ac,bc,cc,dc]),
+	((proj(true,(length(4),'[]'(dc))),length(15) )&true),
+	proj((length(3),@ '<>'(ac)),true),
+	proj((length(5),@ '<>'(bc)),true),
+	proj((length(5),@ '<>'(cc)),true),
+	true)).
+demo(17, (
+((proj(true,(length(5),'[]'(c))),length(15))&true),
+(proj((length(3),@ '<>'(a)),true)&less(3)),
+(proj((length(5),@ '<>'(b)),true)&less(5)),
+'[]'(not((a,b))),
+'[]'(not((b,c))),
+'[]'(not((c,a)))
+)).
+
+% Regular variable examples ( doesnot work now....)
+
+ex(200,^r).
+ex(201,true & ^r).   		% will terminate?
+ex(202,((^r & ^r),not(^r))).	% is non-local?
+ex(203,(^r,length(4))).		% distinguish different state?
+ex(204,('[a]'(^r))).		% non-deterministic?
+ex(205,('[a]'(^r = length(2)))). 		% imitate length?
+ex(206,('[a]'(^r = length(4)),(^r& ^r))).
+ex(207,('[a]'(^r = (length(4);empty)),* ^r)).
+ex(208,('[]'(^r = (
+         a,@ ^r;
+         not(a),c,@ @ ^r;
+         not(a),not(c),b,empty)),^r)).        % RE
+ex(209,('[a]'(^r = (
+         a,@((^r & @((b,empty)))) ;
+         not(a),b,empty)),
+      ^r)).                                   % CFG
+
+% Linear Time Axioms, valid in ITL
+ex(210,('[]'((^a-> ^b)) -> ('[]'(^a) -> '[]'(^b)))).            	%   K
+ex(211,('[]'(((^a , '[]'(^a))-> ^b));'[]'(((^b , '[]'(^b))-> ^a)))).   	%   4
+ex(212,('[]'(^a)-> '<>'(^a))).                             		%   D
+ex(213,('[]'(^a)-> '[]'('[]'(^a)))).                         		%   L
+ex(214,(('[]'(^a))-> ^a)).                                	%   T
+%   Diodorean discreteness
+ex(215,('[]'('[]'((((^a-> '[]'(^a)))-> ^a))) -> ((('<>'('[]'(^a)))-> '[]'(^a))))). 
+% Linear Time Axioms, not valid in ITL
+%   Z discreteness
+ex(216,('[]'(('[]'(^a)-> ^a))-> ((('<>'('[]'(^a)))-> '[]'(^a))))).
+%   W weak density
+ex(217,('[]'(('[]'(^a)-> ^a))-> ('[]'(^a)))).
+% Other Axioms, not v^alid in ITL
+ex(218,(^a-> '[]'('<>'(^a)))).                              %   B
+ex(219,(('<>' ^a)-> '[]'('<>'(^a)))).                         %   5
+
+% State Diagram Support
+
+ex(300,(((length(2), @ '<>'(q)) proj true),
+      st(ns0)
+      )) :- ensure_loaded(kiss_ex).
+
+/* end */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/cad.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,31 @@
+specification(Z=f(X),
+   while(more,((
+     Z=X,
+     (
+	 (X->(
+	     repeat((skip&(Z=X,empty)),until,not(X)) &
+	     repeat((skip&(Z=not(X),empty)),until,not(X))))
+         ,
+         (not(X)->(
+	     repeat((skip&(Z=not(X),empty)),until,not(X))))
+     )
+    & skip
+    )))
+).
+
+implementation(Z=f(X),
+    exists(y,(
+    not(y),
+    [](
+           (
+	   next(y) = ((not(X),not(y));(X,y)),
+	   Z = ((X,not(y);(not(X),y)))
+           )
+      )
+    ))
+).
+
+?- specification(z=f(x),Y),ex((trace(x,[1,1,0,1,1,1,0,0,1,0,1]),Y)).
+
+?- speficication(z=f(x),S),implementation(z=f(x),I),
+   ex(I->fin_free(S).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/elevator.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,30 @@
+
+
+elevator((
+
+[]((upButton1 -> <>location1)),
+[]((upButton2 -> <>location2)),
+[]((downButton2 -> <>location2)),
+[]((downButton3 -> <>location3)),
+[]((destButton1 -> <>location1)),
+[]((destButton2 -> <>location2)),
+[]((destButton3 -> <>location3)),
+[](((location1,<>location3) -> ( [](location2) & @ location3))),
+[](((location3,<>location1) -> ( [](location2) & @ location1))),
+[](( 
+	(location1,~ location2,~ location3);
+	(~ location1,location2,~ location3);
+	(~ location1,~ location2,location3))),
+[](((upButton1,location1) -> (~ move , open))),
+[](((upButton2,location2) -> (~ move , open))),
+[](((downButton1,location1) -> (~ move , open))),
+[](((downButton2,location2) -> (~ move , open))),
+[](((destButton1,location1) -> (~ move , open))),
+[](((destButton2,location2) -> (~ move , open))),
+[](((destButton3,location3) -> (~ move , open))),
+[]((move -> ~ open)),
+[](((openButton, ~ move) ->  open)),
+[](((closeButton, ~ openButton) ->  ~ open))
+
+)).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/gi_ex.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,16 @@
+%
+% specification for simple graphics interaction
+%
+
+gi_ex((
++(((stop,keep((red,not(start)));start,keep((green,not(stop)))))),
+[]((red,not(green);not(red),green)),
+[]((green->move)),
+[]((red->not(move))),
+halt(quit)
+)) :-
+      asserta(lite:st_variables([stop,start,quit],[red,gree,move])).
+
+gi:-gi_ex(X),write(X),nl,lite:ex(X),nl,lite:tgen.
+
+giout :- gi_ex(X),lite:ex(X),tell('gi.tokio'),lite:tgen,told.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/keyb.kiss2	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,175 @@
+
+.i 7 
+.o 8 
+.p 170 
+.s 19
+---0000 st0 st1 1-000000
+---0100 st0 st2 1-000001
+---0010 st0 st2 1-000001
+---0001 st0 st2 1-000001
+---1100 st0 st3 1-000001
+---1000 st0 st3 1-000001
+---011- st0 st0 -0000001
+---01-1 st0 st0 -0000001
+---101- st0 st0 -0000001
+---10-1 st0 st0 -0000001
+---111- st0 st0 -0000001
+---11-1 st0 st0 -0000001
+-----11 st0 st0 -0000001
+0000000 st1 st4 1-000010
+1000000 st1 st5 0-000010
+0100000 st1 st5 0-000010
+0010000 st1 st5 0-000010
+0001000 st1 st5 0-000010
+0000100 st1 st5 0-000010
+0000010 st1 st5 0-000010
+0000001 st1 st5 0-000010
+11----- st1 st0 -0000010
+1-1---- st1 st0 -0000010
+1--1--- st1 st0 -0000010
+1---1-- st1 st0 -0000010
+1----1- st1 st0 -0000010
+1-----1 st1 st0 -0000010
+-11---- st1 st0 -0000010
+-1-1--- st1 st0 -0000010
+-1--1-- st1 st0 -0000010
+-1---1- st1 st0 -0000010
+-1----1 st1 st0 -0000010
+--11--- st1 st0 -0000010
+--1-1-- st1 st0 -0000010
+--1--1- st1 st0 -0000010
+--1---1 st1 st0 -0000010
+---11-- st1 st0 -0000010
+---1-1- st1 st0 -0000010
+---1--1 st1 st0 -0000010
+----11- st1 st0 -0000010
+----1-1 st1 st0 -0000010
+-----11 st1 st0 -0000010
+0000000 st2 st5 --000011
+1------ st2 st0 -0000011
+-1----- st2 st0 -0000011
+--1---- st2 st0 -0000011
+---1--- st2 st0 -0000011
+----1-- st2 st0 -0000011
+-----1- st2 st0 -0000011
+------1 st2 st0 -0000011
+0000000 st3 st6 1-000100
+0011000 st3 st5 0-000100
+0000100 st3 st5 0-000100
+0000010 st3 st5 0-000100
+0000001 st3 st5 0-000100
+1------ st3 st0 -0000100
+-1----- st3 st0 -0000100
+--01--- st3 st0 -0000100
+--10--- st3 st0 -0000100
+--111-- st3 st0 -0000100
+--11-1- st3 st0 -0000100
+--11--1 st3 st0 -0000100
+----11- st3 st0 -0000100
+----1-1 st3 st0 -0000100
+-----11 st3 st0 -0000100
+-000000 st4 st7 1-000101
+-100000 st4 st8 0-000101
+-010000 st4 st8 0-000101
+-001000 st4 st8 0-000101
+-000100 st4 st8 0-000101
+-000010 st4 st8 0-000101
+-000001 st4 st8 0-000101
+-11---- st4 st0 -0000101
+-1-1--- st4 st0 -0000101
+-1--1-- st4 st0 -0000101
+-1---1- st4 st0 -0000101
+-1----1 st4 st0 -0000101
+--11--- st4 st0 -0000101
+--1-1-- st4 st0 -0000101
+--1--1- st4 st0 -0000101
+--1---1 st4 st0 -0000101
+---11-- st4 st0 -0000101
+---1-1- st4 st0 -0000101
+---1--1 st4 st0 -0000101
+----11- st4 st0 -0000101
+----1-1 st4 st0 -0000101
+-----11 st4 st0 -0000101
+-000000 st5 st8 0-000110
+-1----- st5 st0 -0000110
+--1---- st5 st0 -0000110
+---1--- st5 st0 -0000110
+----1-- st5 st0 -0000110
+-----1- st5 st0 -0000110
+------1 st5 st0 -0000110
+-011000 st6 st8 0-000111
+-000100 st6 st8 0-000111
+-000010 st6 st8 0-000111
+-000001 st6 st8 0-000111
+-000000 st6 st9 1-000111
+-1----- st6 st0 -0000111
+--01--- st6 st0 -0000111
+--10--- st6 st0 -0000111
+--111-- st6 st0 -0000111
+--11-1- st6 st0 -0000111
+--11--1 st6 st0 -0000111
+----11- st6 st0 -0000111
+----1-1 st6 st0 -0000111
+-----11 st6 st0 -0000111
+--00000 st7 st10 1-001000
+--10000 st7 st11 0-001000
+--01000 st7 st11 0-001000
+--00100 st7 st11 0-001000
+--00010 st7 st11 0-001000
+--00001 st7 st11 0-001000
+--11--- st7 st0 -0001000
+--1-1-- st7 st0 -0001000
+--1--1- st7 st0 -0001000
+--1---1 st7 st0 -0001000
+---11-- st7 st0 -0001000
+---1-1- st7 st0 -0001000
+---1--1 st7 st0 -0001000
+----11- st7 st0 -0001000
+----1-1 st7 st0 -0001000
+-----11 st7 st0 -0001000
+--00000 st8 st11 0-001001
+--1---- st8 st0 -0001001
+---1--- st8 st0 -0001001
+----1-- st8 st0 -0001001
+-----1- st8 st0 -0001001
+------1 st8 st0 -0001001
+--00000 st9 st12 --001010
+--11000 st9 st11 0-001010
+--00100 st9 st11 0-001010
+--00010 st9 st11 0-001010
+--00001 st9 st11 0-001010
+--01--- st9 st0 -0001010
+--10--- st9 st0 -0001010
+--111-- st9 st0 -0001010
+--11-1- st9 st0 -0001010
+--11--1 st9 st0 -0001010
+----11- st9 st0 -0001010
+----1-1 st9 st0 -0001010
+-----11 st9 st0 -0001010
+----000 st10 st13 1-001011
+----100 st10 st14 0-001011
+----010 st10 st14 0-001011
+----001 st10 st14 0-001011
+----11- st10 st0 -0001011
+----1-1 st10 st0 -0001011
+-----11 st10 st0 -0001011
+----000 st11 st14 0-001100
+----1-- st11 st0 -0001100
+-----1- st11 st0 -0001100
+------1 st11 st0 -0001100
+-----00 st12 st14 --001101
+-----1- st12 st0 -0001101
+------1 st12 st0 -0001101
+-----00 st13 st15 1-001110
+-----10 st13 st16 0-001110
+-----01 st13 st16 0-001110
+-----11 st13 st0 -0001110
+-----00 st14 st16 0-001111
+-----1- st14 st0 -0001111
+------1 st14 st0 -0001111
+------0 st15 st17 --010000
+------1 st15 st18 0-010000
+------0 st16 st18 0-010001
+------1 st16 st0 -0010001
+------- st17 st0 -0010010
+------- st18 st0 -1010011
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/s1a.kiss2	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,112 @@
+
+.i 8 
+.o 12 
+.p 107 
+.s 20
+-1-00--- st0 st0 000000000000
+00--0--- st0 st0 000000000001
+-0--1--- st0 st1 000000000001
+-1-01--- st0 st1 000000000001
+01-10--- st0 st2 000000000001
+11-10--- st0 st5 000000000001
+-1-11--- st0 st3 000000000001
+10--0--- st0 st4 000000000001
+-0------ st1 st6 000000000010
+-1-0---- st1 st6 000000000010
+-1-1---- st1 st7 000000000010
+0---0--- st2 st2 000000000011
+----1--- st2 st3 000000000011
+1---0--- st2 st5 000000000011
+-------- st3 st7 000000000100
+--0----- st4 st12 000000000101
+--1----- st4 st13 000000000101
+-------- st5 st13 000000000110
+-0--1--- st6 st6 000000000111
+-1-01--- st6 st6 000000000111
+-1-11--- st6 st7 000000000111
+00--0--- st6 st8 000000000111
+-1-00--- st6 st8 000000000111
+11-10--- st6 st11 000000000111
+10--0--- st6 st15 000000000111
+01-10--- st6 st9 000000000111
+----1--- st7 st7 000000001000
+0---0--- st7 st9 000000001000
+1---0--- st7 st11 000000001000
+00--00-- st8 st8 000000001001
+00---1-0 st8 st8 000000001001
+-1-000-- st8 st8 000000001001
+-1-0-1-0 st8 st8 000000001001
+00--01-1 st8 st0 000000001001
+-1-001-1 st8 st0 000000001001
+-0--11-1 st8 st1 000000001001
+-1-011-1 st8 st1 000000001001
+10--01-1 st8 st4 000000001001
+01-100-- st8 st9 000000001001
+01-1-1-- st8 st9 000000001001
+01-110-- st8 st10 000000001001
+11-1---- st8 st11 000000001001
+100-10-- st8 st14 000000001001
+-1-010-- st8 st14 000000001001
+101-101- st8 st14 000000001001
+00--10-- st8 st14 000000001001
+10--00-- st8 st15 000000001001
+10---1-0 st8 st15 000000001001
+101-100- st8 st15 000000001001
+0---00-- st9 st9 000000001010
+0----1-0 st9 st9 000000001010
+0---01-1 st9 st2 000000001010
+0---10-- st9 st10 000000001010
+0---11-1 st9 st3 000000001010
+1----0-- st9 st11 000000001010
+1----1-0 st9 st11 000000001010
+1----1-1 st9 st5 000000001010
+------0- st10 st16 000000001011
+------1- st10 st7 000000001011
+-----1-1 st11 st13 000000001100
+-----0-- st11 st17 000000001100
+-----1-0 st11 st17 000000001100
+1-0----- st12 st12 000000001101
+1-1----- st12 st13 000000001101
+0---1--- st12 st1 000000001101
+0---0--- st12 st0 000000001101
+1------- st13 st13 000000001110
+0---0--- st13 st0 000000001110
+0---1--- st13 st1 000000001110
+---0--1- st14 st6 000000001111
+---0--0- st14 st18 000000001111
+-0-1---- st14 st18 000000001111
+-1-1---- st14 st16 000000001111
+--0--0-- st15 st19 000000010000
+--0--1-0 st15 st19 000000010000
+--0--1-1 st15 st12 000000010000
+--1----- st15 st17 000000010000
+----1-0- st16 st16 000000010001
+----1-1- st16 st7 000000010001
+1---0--- st16 st11 000000010001
+0---0--- st16 st9 000000010001
+1----0-- st17 st17 000000010010
+1----1-0 st17 st17 000000010010
+0---00-- st17 st8 000000010010
+0----1-0 st17 st8 000000010010
+0---01-1 st17 st0 000000010010
+0---11-1 st17 st1 000000010010
+1----1-1 st17 st13 000000010010
+0---10-- st17 st14 000000010010
+----1-1- st18 st6 000000010011
+00--0--- st18 st8 000000010011
+-1-00--- st18 st8 000000010011
+01-10--- st18 st9 000000010011
+11-10--- st18 st11 000000010011
+10--0--- st18 st15 000000010011
+-1-11-0- st18 st16 000000010011
+-0--1-0- st18 st18 000000010011
+-1-01-0- st18 st18 000000010011
+1-0--0-- st19 st19 000000010100
+1-0--1-0 st19 st19 000000010100
+0---00-- st19 st8 000000010100
+0----1-0 st19 st8 000000010100
+0---01-1 st19 st0 000000010100
+0---10-- st19 st14 000000010100
+0---11-1 st19 st1 000000010100
+1-0--1-1 st19 st12 000000010100
+1-1----- st19 st17 000000010100
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/s208.kiss2	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,158 @@
+.i 11
+.o 8
+.p 153
+.s 18
+.r 11111111
+0--------01 11111111 00000000 10000000
+1--------01 11111111 00000000 11000001
+0--------11 11111111 00000000 10000001
+1--------11 11111111 00000000 11000001
+1--------10 11111111 00000000 11000001
+1--------00 11111111 00000000 10000001
+0---------0 11111111 00000000 10000001
+0---------- 00000000 00000000 00000010
+11--------0 00000000 00000000 00000010
+11--------1 00000000 00000000 01000010
+10--------1 00000000 00010000 01000010
+10--------0 00000000 00010000 00000010
+10-------00 00010000 00100000 00000011
+10-------01 00010000 00100000 01000011
+10-------1- 00010000 00100000 01000011
+00--------- 00010000 00000000 00000011
+01-------0- 00010000 00000000 00000011
+11-------00 00010000 00000000 00000011
+11-------01 00010000 00000000 01000011
+11-------11 00010000 00000000 01000011
+01-------11 00010000 00000000 00000011
+01-------10 00010000 00000000 00000011
+11-------10 00010000 00000000 01000011
+00--------- 00100000 00000000 00000100
+10------1-- 00100000 00110000 01000100
+10------0-0 00100000 00110000 00000100
+10------0-1 00100000 00110000 01000100
+01--------- 00100000 00000000 00000100
+11------1-0 00100000 00000000 01000100
+11------0-0 00100000 00000000 00000100
+11--------1 00100000 00000000 01000100
+00--------- 00110000 00000000 00000101
+10-------01 00110000 01000000 01000101
+10-------00 00110000 01000000 00000101
+10-------1- 00110000 01000000 01000101
+01-------01 00110000 00000000 00000101
+11-------01 00110000 00000000 01000101
+11-------11 00110000 00000000 01000101
+01-------11 00110000 00000000 00000101
+-1-------00 00110000 00000000 00000101
+11-------10 00110000 00000000 01000101
+01-------10 00110000 00000000 00000101
+0---------- 01000000 00000000 00000110
+11-----1--0 01000000 00000000 01000110
+11-----0--0 01000000 00000000 00000110
+11--------1 01000000 00000000 01000110
+10-----1--0 01000000 01010000 01000110
+10-----0--0 01000000 01010000 00000110
+10--------1 01000000 01010000 01000110
+0---------- 01010000 00000000 00000111
+11-------01 01010000 00000000 01000111
+11-------00 01010000 00000000 00000111
+11-------1- 01010000 00000000 01000111
+10-------01 01010000 01100000 01000111
+10-------00 01010000 01100000 00000111
+10-------1- 01010000 01100000 01000111
+0---------- 01100000 00000000 00001000
+10------1-0 01100000 01110000 01001000
+10------0-0 01100000 01110000 00001000
+10--------1 01100000 01110000 01001000
+11------0-0 01100000 00000000 00001000
+11------1-0 01100000 00000000 01001000
+11--------1 01100000 00000000 01001000
+00--------- 01110000 00000000 00001001
+10--------1 01110000 10000000 01001001
+10-------10 01110000 10000000 01001001
+10-------00 01110000 10000000 00001001
+01-------0- 01110000 00000000 00001001
+11-------01 01110000 00000000 01001001
+11-------00 01110000 00000000 00001001
+01-------1- 01110000 00000000 00001001
+11-------1- 01110000 00000000 01001001
+0---------- 10000000 00000000 00001010
+10----0---0 10000000 10010000 00001010
+10----1---0 10000000 10010000 01001010
+10--------1 10000000 10010000 01001010
+11----1---0 10000000 00000000 01001010
+11----0---0 10000000 00000000 00001010
+11--------1 10000000 00000000 01001010
+10--------1 10010000 10100000 01001011
+10-------10 10010000 10100000 01001011
+10-------00 10010000 10100000 00001011
+00--------- 10010000 00000000 00001011
+11-------01 10010000 00000000 01001011
+01-------01 10010000 00000000 00001011
+01-------11 10010000 00000000 00001011
+11-------11 10010000 00000000 01001011
+-1-------00 10010000 00000000 00001011
+11-------10 10010000 00000000 01001011
+01-------10 10010000 00000000 00001011
+00--------- 10100000 00000000 00001100
+10------1-- 10100000 10110000 01001100
+10------0-0 10100000 10110000 00001100
+10------0-1 10100000 10110000 01001100
+11------1-0 10100000 00000000 01001100
+11------0-0 10100000 00000000 00001100
+11--------1 10100000 00000000 01001100
+01--------- 10100000 00000000 00001100
+10--------1 10110000 11000000 01001101
+10-------00 10110000 11000000 00001101
+10-------10 10110000 11000000 01001101
+00--------- 10110000 00000000 00001101
+01-------0- 10110000 00000000 00001101
+11-------01 10110000 00000000 01001101
+11-------00 10110000 00000000 00001101
+01-------1- 10110000 00000000 00001101
+11-------1- 10110000 00000000 01001101
+10-----0--0 11000000 11010000 00001110
+10-----1--0 11000000 11010000 01001110
+10--------1 11000000 11010000 01001110
+00--------- 11000000 00000000 00001110
+01--------- 11000000 00000000 00001110
+11-----1--0 11000000 00000000 01001110
+11-----0--0 11000000 00000000 00001110
+11--------1 11000000 00000000 01001110
+00--------- 11010000 00000000 00001111
+10-------01 11010000 11100000 01001111
+10-------00 11010000 11100000 00001111
+10-------1- 11010000 11100000 01001111
+11--------1 11010000 00000000 01001111
+01--------1 11010000 00000000 00001111
+-1-------00 11010000 00000000 00001111
+11-------10 11010000 00000000 01001111
+01-------10 11010000 00000000 00001111
+0---------- 11100000 00000000 00010000
+11------0-0 11100000 00000000 00010000
+11------1-0 11100000 00000000 01010000
+11--------1 11100000 00000000 01010000
+10------1-- 11100000 11110000 01010000
+10------0-1 11100000 11110000 01010000
+10------0-0 11100000 11110000 00010000
+01-------01 11110000 00000000 00010001
+11-------01 11110000 00000000 01010001
+01-------11 11110000 00000000 00010001
+11-------11 11110000 00000000 01010001
+-1-------00 11110000 00000000 00010001
+01-------10 11110000 00000000 00010001
+11-------10 11110000 00000000 01010001
+10-------01 11110000 00000001 01010001
+00-------01 11110000 00000001 00010001
+-0-------00 11110000 00000001 00010001
+10-------11 11110000 00000001 01010001
+00-------11 11110000 00000001 00010001
+00-------10 11110000 00000001 00010001
+10-------10 11110000 00000001 01010001
+00--------- 00000001 00000000 00010010
+10---1----0 00000001 00010000 01010010
+10---0----0 00000001 00010000 00010010
+10--------1 00000001 00010000 01010010
+11---0----0 00000001 00000000 00010010
+11---1----0 00000001 00000000 01010010
+11--------1 00000001 00000000 01010010
+01--------- 00000001 00000000 00010010
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/s298.kiss2	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,1101 @@
+.i 3
+.o 14
+.p 1096
+.s 218
+.r 00000000000000
+1-- 00000000000000 00000001100000 00000000000000
+001 00000000000000 10000001100010 00000000000001
+011 00000000000000 10000001100011 00000000000001
+010 00000000000000 10000001100001 00000000000001
+000 00000000000000 10000001100000 00000000000001
+000 00000001100000 10000001100000 10000100000010
+010 00000001100000 10000001100001 10000100000010
+001 00000001100000 10000001100010 10000100000010
+011 00000001100000 10000001100011 10000100000010
+1-- 00000001100000 00000001100000 10000100000010
+010 10000001100000 01000001100001 10000100000011
+000 10000001100000 01000001100000 10000100000011
+011 10000001100000 01000001100011 10000100000011
+001 10000001100000 01000001100010 10000100000011
+1-- 10000001100000 00000001100000 10000100000011
+001 01000001100001 11001001100011 10000100000100
+011 01000001100001 11001001100010 10000100000100
+010 01000001100001 11001001100000 10000100000100
+000 01000001100001 11001001100001 10000100000100
+1-- 01000001100001 00000001100000 10000100000100
+000 11001001100011 00100001100011 10000100000101
+010 11001001100011 00100001100010 10000100000101
+001 11001001100011 00100001100001 10000100000101
+011 11001001100011 00100001100000 10000100000101
+1-- 11001001100011 00000001100000 10000100000101
+010 00100001100011 10101001100010 10000100000110
+000 00100001100011 10101001100011 10000100000110
+011 00100001100011 10101001100000 10000100000110
+001 00100001100011 10101001100001 10000100000110
+1-- 00100001100011 00000001100000 10000100000110
+000 10101001100010 01101001100010 10000100000111
+010 10101001100010 01101001100011 10000100000111
+011 10101001100010 01101001100001 10000100000111
+001 10101001100010 01101001100000 10000100000111
+1-- 10101001100010 00000001100000 10000100000111
+1-- 01101001100010 00000001100000 10000100001000
+010 01101001100010 11101001100011 10000100001000
+000 01101001100010 11101001100010 10000100001000
+001 01101001100010 11101001100000 10000100001000
+011 01101001100010 11101001100001 10000100001000
+1-- 11101001100011 00000001100000 10000100001001
+010 11101001100011 00010001100010 10000100001001
+000 11101001100011 00010001100011 10000100001001
+011 11101001100011 00010001100000 10000100001001
+001 11101001100011 00010001100001 10000100001001
+000 00010001100010 10010100011010 10000100001010
+010 00010001100010 10010100011011 10000100001010
+001 00010001100010 10010100011000 10000100001010
+011 00010001100010 10010100011001 10000100001010
+1-- 00010001100010 00000000011000 10000100001010
+011 10010100011010 00001100000001 01010000001011
+001 10010100011010 00001100000000 01010000001011
+000 10010100011010 00001100000010 01010000001011
+010 10010100011010 00001100000011 01010000001011
+1-- 10010100011010 00000000000000 01010000001011
+1-- 00001100000001 00000000011000 00000000001100
+000 00001100000001 10000100011001 00000000001100
+010 00001100000001 10000100011000 00000000001100
+011 00001100000001 10000100011010 00000000001100
+001 00001100000001 10000100011011 00000000001100
+1-- 00000000011000 00000001100000 01010000001101
+001 00000000011000 10000001100010 01010000001101
+011 00000000011000 10000001100011 01010000001101
+000 00000000011000 10000001100000 01010000001101
+010 00000000011000 10000001100001 01010000001101
+010 10000001100010 01000001100011 10000100001110
+000 10000001100010 01000001100010 10000100001110
+011 10000001100010 01000001100001 10000100001110
+001 10000001100010 01000001100000 10000100001110
+1-- 10000001100010 00000001100000 10000100001110
+1-- 01000001100011 00000001100000 10000100001111
+001 01000001100011 11001001100001 10000100001111
+011 01000001100011 11001001100000 10000100001111
+000 01000001100011 11001001100011 10000100001111
+010 01000001100011 11001001100010 10000100001111
+1-- 11001001100001 00000001100000 10000100010000
+010 11001001100001 00100001100000 10000100010000
+000 11001001100001 00100001100001 10000100010000
+001 11001001100001 00100001100011 10000100010000
+011 11001001100001 00100001100010 10000100010000
+001 00100001100000 10100001100010 10000100010001
+011 00100001100000 10100001100011 10000100010001
+010 00100001100000 10100001100001 10000100010001
+000 00100001100000 10100001100000 10000100010001
+1-- 00100001100000 00000001100000 10000100010001
+011 10100001100010 01100001100001 10000100010010
+001 10100001100010 01100001100000 10000100010010
+010 10100001100010 01100001100011 10000100010010
+000 10100001100010 01100001100010 10000100010010
+1-- 10100001100010 00000001100000 10000100010010
+011 01100001100001 11101000100110 10000100010011
+001 01100001100001 11101000100111 10000100010011
+000 01100001100001 11101000100101 10000100010011
+010 01100001100001 11101000100100 10000100010011
+1-- 01100001100001 00000000100100 10000100010011
+000 11101000100110 00011000100110 10001000010100
+010 11101000100110 00011000100111 10001000010100
+011 11101000100110 00011000100101 10001000010100
+001 11101000100110 00011000100100 10001000010100
+1-- 11101000100110 00000000100100 10001000010100
+001 00011000100110 10011000100100 10001000010101
+011 00011000100110 10011000100101 10001000010101
+010 00011000100110 10011000100111 10001000010101
+000 00011000100110 10011000100110 10001000010101
+1-- 00011000100110 00000000100100 10001000010101
+1-- 10011000100100 00000000100100 10001000010110
+011 10011000100100 00000000100111 10001000010110
+001 10011000100100 00000000100110 10001000010110
+010 10011000100100 00000000100101 10001000010110
+000 10011000100100 00000000100100 10001000010110
+1-- 00000000100100 00000001100000 10001000010111
+001 00000000100100 10000001100010 10001000010111
+011 00000000100100 10000001100011 10001000010111
+000 00000000100100 10000001100000 10001000010111
+010 00000000100100 10000001100001 10001000010111
+1-- 10000001100011 00000001100000 10000100011000
+000 10000001100011 01001001100011 10000100011000
+010 10000001100011 01001001100010 10000100011000
+011 10000001100011 01001001100000 10000100011000
+001 10000001100011 01001001100001 10000100011000
+011 01001001100011 11000001100000 10000100011001
+001 01001001100011 11000001100001 10000100011001
+000 01001001100011 11000001100011 10000100011001
+010 01001001100011 11000001100010 10000100011001
+1-- 01001001100011 00000001100000 10000100011001
+1-- 11000001100000 00000001100000 10000100011010
+011 11000001100000 00100001100011 10000100011010
+001 11000001100000 00100001100010 10000100011010
+010 11000001100000 00100001100001 10000100011010
+000 11000001100000 00100001100000 10000100011010
+1-- 00100001100010 00000001100000 10000100011011
+010 00100001100010 10100001100011 10000100011011
+000 00100001100010 10100001100010 10000100011011
+001 00100001100010 10100001100000 10000100011011
+011 00100001100010 10100001100001 10000100011011
+011 10100001100011 01101001100000 10000100011100
+001 10100001100011 01101001100001 10000100011100
+000 10100001100011 01101001100011 10000100011100
+010 10100001100011 01101001100010 10000100011100
+1-- 10100001100011 00000001100000 10000100011100
+1-- 01101001100000 00000001100000 10000100011101
+011 01101001100000 11101001100011 10000100011101
+001 01101001100000 11101001100010 10000100011101
+010 01101001100000 11101001100001 10000100011101
+000 01101001100000 11101001100000 10000100011101
+011 11101001100010 00011001100001 10000100011110
+001 11101001100010 00011001100000 10000100011110
+010 11101001100010 00011001100011 10000100011110
+000 11101001100010 00011001100010 10000100011110
+1-- 11101001100010 00000001100000 10000100011110
+011 00011001100001 10010001100010 10000100011111
+001 00011001100001 10010001100011 10000100011111
+000 00011001100001 10010001100001 10000100011111
+010 00011001100001 10010001100000 10000100011111
+1-- 00011001100001 00000001100000 10000100011111
+1-- 10010001100010 00000000000000 10000100100000
+000 10010001100010 00001100000010 10000100100000
+010 10010001100010 00001100000011 10000100100000
+011 10010001100010 00001100000001 10000100100000
+001 10010001100010 00001100000000 10000100100000
+1-- 00001100000010 00000000011000 00000000100001
+001 00001100000010 10001100011000 00000000100001
+011 00001100000010 10001100011001 00000000100001
+010 00001100000010 10001100011011 00000000100001
+000 00001100000010 10001100011010 00000000100001
+010 10001100011000 01001100000001 01010000100010
+000 10001100011000 01001100000000 01010000100010
+001 10001100011000 01001100000010 01010000100010
+011 10001100011000 01001100000011 01010000100010
+1-- 10001100011000 00000000000000 01010000100010
+1-- 01001100000001 00000000011000 00000000100011
+000 01001100000001 11000100011001 00000000100011
+010 01001100000001 11000100011000 00000000100011
+011 01001100000001 11000100011010 00000000100011
+001 01001100000001 11000100011011 00000000100011
+1-- 11000100011001 00000000000000 01010000100100
+010 11000100011001 00101100000000 01010000100100
+000 11000100011001 00101100000001 01010000100100
+011 11000100011001 00101100000010 01010000100100
+001 11000100011001 00101100000011 01010000100100
+1-- 00101100000000 00000000011000 00000000100101
+010 00101100000000 10101100011001 00000000100101
+000 00101100000000 10101100011000 00000000100101
+001 00101100000000 10101100011010 00000000100101
+011 00101100000000 10101100011011 00000000100101
+001 00101100000001 10100100011011 00000000100110
+011 00101100000001 10100100011010 00000000100110
+000 00101100000001 10100100011001 00000000100110
+010 00101100000001 10100100011000 00000000100110
+1-- 00101100000001 00000000011000 00000000100110
+1-- 00101100000010 00000000011000 00000000100111
+011 00101100000010 10101100011001 00000000100111
+001 00101100000010 10101100011000 00000000100111
+000 00101100000010 10101100011010 00000000100111
+010 00101100000010 10101100011011 00000000100111
+1-- 00101100000011 00000000011000 00000000101000
+011 00101100000011 10100100011000 00000000101000
+001 00101100000011 10100100011001 00000000101000
+000 00101100000011 10100100011011 00000000101000
+010 00101100000011 10100100011010 00000000101000
+1-- 11000100011000 00000000000000 01010000101001
+011 11000100011000 00100100000011 01010000101001
+001 11000100011000 00100100000010 01010000101001
+010 11000100011000 00100100000001 01010000101001
+000 11000100011000 00100100000000 01010000101001
+011 00100100000011 10101100011000 00000000101010
+001 00100100000011 10101100011001 00000000101010
+010 00100100000011 10101100011010 00000000101010
+000 00100100000011 10101100011011 00000000101010
+1-- 00100100000011 00000000011000 00000000101010
+1-- 00100100000010 00000000011000 00000000101011
+001 00100100000010 10100100011000 00000000101011
+011 00100100000010 10100100011001 00000000101011
+010 00100100000010 10100100011011 00000000101011
+000 00100100000010 10100100011010 00000000101011
+1-- 00100100000001 00000000011000 00000000101100
+010 00100100000001 10101100011000 00000000101100
+000 00100100000001 10101100011001 00000000101100
+011 00100100000001 10101100011010 00000000101100
+001 00100100000001 10101100011011 00000000101100
+000 00100100000000 10100100011000 00000000101101
+010 00100100000000 10100100011001 00000000101101
+011 00100100000000 10100100011011 00000000101101
+001 00100100000000 10100100011010 00000000101101
+1-- 00100100000000 00000000011000 00000000101101
+011 11000100011010 00100100000001 01010000101110
+001 11000100011010 00100100000000 01010000101110
+000 11000100011010 00100100000010 01010000101110
+010 11000100011010 00100100000011 01010000101110
+1-- 11000100011010 00000000000000 01010000101110
+010 11000100011011 00101100000010 01010000101111
+000 11000100011011 00101100000011 01010000101111
+011 11000100011011 00101100000000 01010000101111
+001 11000100011011 00101100000001 01010000101111
+1-- 11000100011011 00000000000000 01010000101111
+000 01001100000000 11001100011000 00000000110000
+010 01001100000000 11001100011001 00000000110000
+001 01001100000000 11001100011010 00000000110000
+011 01001100000000 11001100011011 00000000110000
+1-- 01001100000000 00000000011000 00000000110000
+1-- 11001100011000 00000000000000 01010000110001
+010 11001100011000 00101100000001 01010000110001
+000 11001100011000 00101100000000 01010000110001
+001 11001100011000 00101100000010 01010000110001
+011 11001100011000 00101100000011 01010000110001
+1-- 11001100011001 00000000000000 01010000110010
+000 11001100011001 00100100000001 01010000110010
+010 11001100011001 00100100000000 01010000110010
+001 11001100011001 00100100000011 01010000110010
+011 11001100011001 00100100000010 01010000110010
+000 11001100011010 00101100000010 01010000110011
+010 11001100011010 00101100000011 01010000110011
+011 11001100011010 00101100000001 01010000110011
+001 11001100011010 00101100000000 01010000110011
+1-- 11001100011010 00000000000000 01010000110011
+001 11001100011011 00100100000001 01010000110100
+011 11001100011011 00100100000000 01010000110100
+000 11001100011011 00100100000011 01010000110100
+010 11001100011011 00100100000010 01010000110100
+1-- 11001100011011 00000000000000 01010000110100
+1-- 01001100000010 00000000011000 00000000110101
+010 01001100000010 11001100011011 00000000110101
+000 01001100000010 11001100011010 00000000110101
+001 01001100000010 11001100011000 00000000110101
+011 01001100000010 11001100011001 00000000110101
+1-- 01001100000011 00000000011000 00000000110110
+011 01001100000011 11000100011000 00000000110110
+001 01001100000011 11000100011001 00000000110110
+000 01001100000011 11000100011011 00000000110110
+010 01001100000011 11000100011010 00000000110110
+1-- 10001100011001 00000000000000 01010000110111
+010 10001100011001 01000100000000 01010000110111
+000 10001100011001 01000100000001 01010000110111
+011 10001100011001 01000100000010 01010000110111
+001 10001100011001 01000100000011 01010000110111
+1-- 01000100000000 00000000011000 00000000111000
+011 01000100000000 11000100011011 00000000111000
+001 01000100000000 11000100011010 00000000111000
+000 01000100000000 11000100011000 00000000111000
+010 01000100000000 11000100011001 00000000111000
+1-- 01000100000001 00000000011000 00000000111001
+001 01000100000001 11001100011011 00000000111001
+011 01000100000001 11001100011010 00000000111001
+010 01000100000001 11001100011000 00000000111001
+000 01000100000001 11001100011001 00000000111001
+1-- 01000100000010 00000000011000 00000000111010
+011 01000100000010 11000100011001 00000000111010
+001 01000100000010 11000100011000 00000000111010
+010 01000100000010 11000100011011 00000000111010
+000 01000100000010 11000100011010 00000000111010
+1-- 01000100000011 00000000011000 00000000111011
+001 01000100000011 11001100011001 00000000111011
+011 01000100000011 11001100011000 00000000111011
+000 01000100000011 11001100011011 00000000111011
+010 01000100000011 11001100011010 00000000111011
+1-- 10001100011011 00000000000000 01010000111100
+010 10001100011011 01000100000010 01010000111100
+000 10001100011011 01000100000011 01010000111100
+001 10001100011011 01000100000001 01010000111100
+011 10001100011011 01000100000000 01010000111100
+1-- 10001100011010 00000000000000 01010000111101
+011 10001100011010 01001100000001 01010000111101
+001 10001100011010 01001100000000 01010000111101
+000 10001100011010 01001100000010 01010000111101
+010 10001100011010 01001100000011 01010000111101
+1-- 00001100000011 00000000011000 00000000111110
+011 00001100000011 10000100011000 00000000111110
+001 00001100000011 10000100011001 00000000111110
+010 00001100000011 10000100011010 00000000111110
+000 00001100000011 10000100011011 00000000111110
+001 10000100011000 01000100000010 01010000111111
+011 10000100011000 01000100000011 01010000111111
+000 10000100011000 01000100000000 01010000111111
+010 10000100011000 01000100000001 01010000111111
+1-- 10000100011000 00000000000000 01010000111111
+1-- 10000100011001 00000000000000 01010001000000
+011 10000100011001 01001100000010 01010001000000
+001 10000100011001 01001100000011 01010001000000
+000 10000100011001 01001100000001 01010001000000
+010 10000100011001 01001100000000 01010001000000
+1-- 10000100011010 00000000000000 01010001000001
+001 10000100011010 01000100000000 01010001000001
+011 10000100011010 01000100000001 01010001000001
+000 10000100011010 01000100000010 01010001000001
+010 10000100011010 01000100000011 01010001000001
+011 10000100011011 01001100000000 01010001000010
+001 10000100011011 01001100000001 01010001000010
+010 10000100011011 01001100000010 01010001000010
+000 10000100011011 01001100000011 01010001000010
+1-- 10000100011011 00000000000000 01010001000010
+011 00001100000000 10001100011011 00000001000011
+001 00001100000000 10001100011010 00000001000011
+000 00001100000000 10001100011000 00000001000011
+010 00001100000000 10001100011001 00000001000011
+1-- 00001100000000 00000000011000 00000001000011
+001 10010001100011 00001100000001 10000101000100
+011 10010001100011 00001100000000 10000101000100
+010 10010001100011 00001100000010 10000101000100
+000 10010001100011 00001100000011 10000101000100
+1-- 10010001100011 00000000000000 10000101000100
+000 10010001100001 00001010010001 10000101000101
+010 10010001100001 00001010010000 10000101000101
+001 10010001100001 00001010010011 10000101000101
+011 10010001100001 00001010010010 10000101000101
+1-- 10010001100001 00000010010000 10000101000101
+1-- 00001010010001 00000000011000 00110001000110
+011 00001010010001 10000000011010 00110001000110
+001 00001010010001 10000000011011 00110001000110
+000 00001010010001 10000000011001 00110001000110
+010 00001010010001 10000000011000 00110001000110
+1-- 10000000011010 00000001100000 01010001000111
+000 10000000011010 01000001100010 01010001000111
+010 10000000011010 01000001100011 01010001000111
+001 10000000011010 01000001100000 01010001000111
+011 10000000011010 01000001100001 01010001000111
+000 01000001100010 11000001100010 10000101001000
+010 01000001100010 11000001100011 10000101001000
+011 01000001100010 11000001100001 10000101001000
+001 01000001100010 11000001100000 10000101001000
+1-- 01000001100010 00000001100000 10000101001000
+000 11000001100010 00100001100010 10000101001001
+010 11000001100010 00100001100011 10000101001001
+001 11000001100010 00100001100000 10000101001001
+011 11000001100010 00100001100001 10000101001001
+1-- 11000001100010 00000001100000 10000101001001
+1-- 00100001100001 00000001100000 10000101001010
+011 00100001100001 10101001100010 10000101001010
+001 00100001100001 10101001100011 10000101001010
+000 00100001100001 10101001100001 10000101001010
+010 00100001100001 10101001100000 10000101001010
+010 11000001100011 00101001100010 10000101001011
+000 11000001100011 00101001100011 10000101001011
+011 11000001100011 00101001100000 10000101001011
+001 11000001100011 00101001100001 10000101001011
+1-- 11000001100011 00000001100000 10000101001011
+001 00101001100010 10101001100000 10000101001100
+011 00101001100010 10101001100001 10000101001100
+010 00101001100010 10101001100011 10000101001100
+000 00101001100010 10101001100010 10000101001100
+1-- 00101001100010 00000001100000 10000101001100
+011 00101001100011 10100001100000 10000101001101
+001 00101001100011 10100001100001 10000101001101
+000 00101001100011 10100001100011 10000101001101
+010 00101001100011 10100001100010 10000101001101
+1-- 00101001100011 00000001100000 10000101001101
+001 00101001100000 10101001100010 10000101001110
+011 00101001100000 10101001100011 10000101001110
+010 00101001100000 10101001100001 10000101001110
+000 00101001100000 10101001100000 10000101001110
+1-- 00101001100000 00000001100000 10000101001110
+1-- 00101001100001 00000001100000 10000101001111
+001 00101001100001 10100001100011 10000101001111
+011 00101001100001 10100001100010 10000101001111
+010 00101001100001 10100001100000 10000101001111
+000 00101001100001 10100001100001 10000101001111
+001 11000001100001 00101001100011 10000101010000
+011 11000001100001 00101001100010 10000101010000
+010 11000001100001 00101001100000 10000101010000
+000 11000001100001 00101001100001 10000101010000
+1-- 11000001100001 00000001100000 10000101010000
+1-- 01000001100000 00000001100000 10000101010001
+010 01000001100000 11000001100001 10000101010001
+000 01000001100000 11000001100000 10000101010001
+001 01000001100000 11000001100010 10000101010001
+011 01000001100000 11000001100011 10000101010001
+001 10000000011011 01001001100001 01010001010010
+011 10000000011011 01001001100000 01010001010010
+010 10000000011011 01001001100010 01010001010010
+000 10000000011011 01001001100011 01010001010010
+1-- 10000000011011 00000001100000 01010001010010
+1-- 01001001100001 00000001100000 10000101010011
+010 01001001100001 11000001100000 10000101010011
+000 01001001100001 11000001100001 10000101010011
+001 01001001100001 11000001100011 10000101010011
+011 01001001100001 11000001100010 10000101010011
+010 01001001100000 11001001100001 10000101010100
+000 01001001100000 11001001100000 10000101010100
+011 01001001100000 11001001100011 10000101010100
+001 01001001100000 11001001100010 10000101010100
+1-- 01001001100000 00000001100000 10000101010100
+1-- 11001001100000 00000001100000 10000101010101
+011 11001001100000 00101001100011 10000101010101
+001 11001001100000 00101001100010 10000101010101
+000 11001001100000 00101001100000 10000101010101
+010 11001001100000 00101001100001 10000101010101
+001 11001001100010 00101001100000 10000101010110
+011 11001001100010 00101001100001 10000101010110
+010 11001001100010 00101001100011 10000101010110
+000 11001001100010 00101001100010 10000101010110
+1-- 11001001100010 00000001100000 10000101010110
+1-- 01001001100010 00000001100000 10000101010111
+011 01001001100010 11001001100001 10000101010111
+001 01001001100010 11001001100000 10000101010111
+000 01001001100010 11001001100010 10000101010111
+010 01001001100010 11001001100011 10000101010111
+010 10000000011001 01001001100000 01010001011000
+000 10000000011001 01001001100001 01010001011000
+001 10000000011001 01001001100011 01010001011000
+011 10000000011001 01001001100010 01010001011000
+1-- 10000000011001 00000001100000 01010001011000
+000 10000000011000 01000001100000 01010001011001
+010 10000000011000 01000001100001 01010001011001
+011 10000000011000 01000001100011 01010001011001
+001 10000000011000 01000001100010 01010001011001
+1-- 10000000011000 00000001100000 01010001011001
+000 00001010010000 10001000011000 00110001011010
+010 00001010010000 10001000011001 00110001011010
+011 00001010010000 10001000011011 00110001011010
+001 00001010010000 10001000011010 00110001011010
+1-- 00001010010000 00000000011000 00110001011010
+1-- 10001000011000 00000000011000 01010001011011
+011 10001000011000 01001000011011 01010001011011
+001 10001000011000 01001000011010 01010001011011
+010 10001000011000 01001000011001 01010001011011
+000 10001000011000 01001000011000 01010001011011
+1-- 01001000011011 00000001100000 01010001011100
+000 01001000011011 11000001100011 01010001011100
+010 01001000011011 11000001100010 01010001011100
+001 01001000011011 11000001100001 01010001011100
+011 01001000011011 11000001100000 01010001011100
+1-- 01001000011010 00000001100000 01010001011101
+000 01001000011010 11001001100010 01010001011101
+010 01001000011010 11001001100011 01010001011101
+001 01001000011010 11001001100000 01010001011101
+011 01001000011010 11001001100001 01010001011101
+001 01001000011001 11000001100011 01010001011110
+011 01001000011001 11000001100010 01010001011110
+000 01001000011001 11000001100001 01010001011110
+010 01001000011001 11000001100000 01010001011110
+1-- 01001000011001 00000001100000 01010001011110
+010 01001000011000 11001001100001 01010001011111
+000 01001000011000 11001001100000 01010001011111
+011 01001000011000 11001001100011 01010001011111
+001 01001000011000 11001001100010 01010001011111
+1-- 01001000011000 00000001100000 01010001011111
+001 10001000011001 01000000011011 01010001100000
+011 10001000011001 01000000011010 01010001100000
+000 10001000011001 01000000011001 01010001100000
+010 10001000011001 01000000011000 01010001100000
+1-- 10001000011001 00000000011000 01010001100000
+1-- 01000000011011 00000001100000 01010001100001
+001 01000000011011 11001001100001 01010001100001
+011 01000000011011 11001001100000 01010001100001
+010 01000000011011 11001001100010 01010001100001
+000 01000000011011 11001001100011 01010001100001
+1-- 01000000011010 00000001100000 01010001100010
+010 01000000011010 11000001100011 01010001100010
+000 01000000011010 11000001100010 01010001100010
+001 01000000011010 11000001100000 01010001100010
+011 01000000011010 11000001100001 01010001100010
+1-- 01000000011001 00000001100000 01010001100011
+001 01000000011001 11001001100011 01010001100011
+011 01000000011001 11001001100010 01010001100011
+000 01000000011001 11001001100001 01010001100011
+010 01000000011001 11001001100000 01010001100011
+1-- 01000000011000 00000001100000 01010001100100
+000 01000000011000 11000001100000 01010001100100
+010 01000000011000 11000001100001 01010001100100
+001 01000000011000 11000001100010 01010001100100
+011 01000000011000 11000001100011 01010001100100
+1-- 10001000011011 00000000011000 01010001100101
+010 10001000011011 01000000011010 01010001100101
+000 10001000011011 01000000011011 01010001100101
+001 10001000011011 01000000011001 01010001100101
+011 10001000011011 01000000011000 01010001100101
+000 10001000011010 01001000011010 01010001100110
+010 10001000011010 01001000011011 01010001100110
+011 10001000011010 01001000011001 01010001100110
+001 10001000011010 01001000011000 01010001100110
+1-- 10001000011010 00000000011000 01010001100110
+010 00001010010011 10000000011010 00110001100111
+000 00001010010011 10000000011011 00110001100111
+011 00001010010011 10000000011000 00110001100111
+001 00001010010011 10000000011001 00110001100111
+1-- 00001010010011 00000000011000 00110001100111
+000 00001010010010 10001000011010 00110001101000
+010 00001010010010 10001000011011 00110001101000
+001 00001010010010 10001000011000 00110001101000
+011 00001010010010 10001000011001 00110001101000
+1-- 00001010010010 00000000011000 00110001101000
+011 00000010010000 10000001100011 00110001101001
+001 00000010010000 10000001100010 00110001101001
+010 00000010010000 10000001100001 00110001101001
+000 00000010010000 10000001100000 00110001101001
+1-- 00000010010000 00000001100000 00110001101001
+1-- 10000001100001 00000001100000 10000101101010
+011 10000001100001 01001001100010 10000101101010
+001 10000001100001 01001001100011 10000101101010
+000 10000001100001 01001001100001 10000101101010
+010 10000001100001 01001001100000 10000101101010
+010 10010001100000 00001010010001 10000101101011
+000 10010001100000 00001010010000 10000101101011
+011 10010001100000 00001010010011 10000101101011
+001 10010001100000 00001010010010 10000101101011
+1-- 10010001100000 00000010010000 10000101101011
+1-- 00011001100000 00000001100000 10000101101100
+010 00011001100000 10011001100001 10000101101100
+000 00011001100000 10011001100000 10000101101100
+011 00011001100000 10011001100011 10000101101100
+001 00011001100000 10011001100010 10000101101100
+1-- 10011001100001 00000001100000 10000101101101
+010 10011001100001 00000001100000 10000101101101
+000 10011001100001 00000001100001 10000101101101
+011 10011001100001 00000001100010 10000101101101
+001 10011001100001 00000001100011 10000101101101
+010 00000001100001 10001001100000 10000101101110
+000 00000001100001 10001001100001 10000101101110
+011 00000001100001 10001001100010 10000101101110
+001 00000001100001 10001001100011 10000101101110
+1-- 00000001100001 00000001100000 10000101101110
+1-- 10001001100000 00000000011000 10000101101111
+001 10001001100000 01001000011010 10000101101111
+011 10001001100000 01001000011011 10000101101111
+010 10001001100000 01001000011001 10000101101111
+000 10001001100000 01001000011000 10000101101111
+000 10001001100001 01000000011001 10000101110000
+010 10001001100001 01000000011000 10000101110000
+011 10001001100001 01000000011010 10000101110000
+001 10001001100001 01000000011011 10000101110000
+1-- 10001001100001 00000000011000 10000101110000
+010 10001001100010 01001000011011 10000101110001
+000 10001001100010 01001000011010 10000101110001
+001 10001001100010 01001000011000 10000101110001
+011 10001001100010 01001000011001 10000101110001
+1-- 10001001100010 00000000011000 10000101110001
+1-- 10001001100011 00000000011000 10000101110010
+000 10001001100011 01000000011011 10000101110010
+010 10001001100011 01000000011010 10000101110010
+011 10001001100011 01000000011000 10000101110010
+001 10001001100011 01000000011001 10000101110010
+1-- 00000001100010 00000001100000 10000101110011
+000 00000001100010 10000001100010 10000101110011
+010 00000001100010 10000001100011 10000101110011
+011 00000001100010 10000001100001 10000101110011
+001 00000001100010 10000001100000 10000101110011
+011 00000001100011 10001001100000 10000101110100
+001 00000001100011 10001001100001 10000101110100
+000 00000001100011 10001001100011 10000101110100
+010 00000001100011 10001001100010 10000101110100
+1-- 00000001100011 00000001100000 10000101110100
+1-1 10011001100000 00000001100000 10000101110101
+001 10011001100000 00000001100010 10000101110101
+011 10011001100000 00000001100011 10000101110101
+010 10011001100000 00000001100001 10000101110101
+110 10011001100000 00000001100000 10000101110101
+-00 10011001100000 00000001100000 10000101110101
+1-- 10011001100011 00000001100000 10000101110110
+010 10011001100011 00000001100010 10000101110110
+000 10011001100011 00000001100011 10000101110110
+001 10011001100011 00000001100001 10000101110110
+011 10011001100011 00000001100000 10000101110110
+000 10011001100010 00000001100010 10000101110111
+010 10011001100010 00000001100011 10000101110111
+1-0 10011001100010 00000001100000 10000101110111
+1-1 10011001100010 00000001100000 10000101110111
+001 10011001100010 00000001100000 10000101110111
+011 10011001100010 00000001100001 10000101110111
+011 00011001100011 10010001100000 10000101111000
+001 00011001100011 10010001100001 10000101111000
+000 00011001100011 10010001100011 10000101111000
+010 00011001100011 10010001100010 10000101111000
+1-- 00011001100011 00000001100000 10000101111000
+1-- 00011001100010 00000001100000 10000101111001
+011 00011001100010 10011001100001 10000101111001
+001 00011001100010 10011001100000 10000101111001
+000 00011001100010 10011001100010 10000101111001
+010 00011001100010 10011001100011 10000101111001
+000 11101001100001 00010001100001 10000101111010
+010 11101001100001 00010001100000 10000101111010
+001 11101001100001 00010001100011 10000101111010
+011 11101001100001 00010001100010 10000101111010
+1-- 11101001100001 00000001100000 10000101111010
+1-- 00010001100001 00000010010000 10000101111011
+010 00010001100001 10011010010000 10000101111011
+000 00010001100001 10011010010001 10000101111011
+011 00010001100001 10011010010010 10000101111011
+001 00010001100001 10011010010011 10000101111011
+011 10011010010000 00000010010011 00110001111100
+001 10011010010000 00000010010010 00110001111100
+1-1 10011010010000 00000010010000 00110001111100
+1-0 10011010010000 00000010010000 00110001111100
+010 10011010010000 00000010010001 00110001111100
+000 10011010010000 00000010010000 00110001111100
+1-- 00000010010011 00000001100000 00110001111101
+011 00000010010011 10001001100000 00110001111101
+001 00000010010011 10001001100001 00110001111101
+010 00000010010011 10001001100010 00110001111101
+000 00000010010011 10001001100011 00110001111101
+011 00000010010010 10000001100001 00110001111110
+001 00000010010010 10000001100000 00110001111110
+000 00000010010010 10000001100010 00110001111110
+010 00000010010010 10000001100011 00110001111110
+1-- 00000010010010 00000001100000 00110001111110
+1-- 00000010010001 00000001100000 00110001111111
+000 00000010010001 10001001100001 00110001111111
+010 00000010010001 10001001100000 00110001111111
+011 00000010010001 10001001100010 00110001111111
+001 00000010010001 10001001100011 00110001111111
+001 10011010010001 00000010010011 00110010000000
+011 10011010010001 00000010010010 00110010000000
+1-1 10011010010001 00000010010000 00110010000000
+000 10011010010001 00000010010001 00110010000000
+100 10011010010001 00000010010000 00110010000000
+-10 10011010010001 00000010010000 00110010000000
+000 10011010010010 00000010010010 00110010000001
+010 10011010010010 00000010010011 00110010000001
+1-0 10011010010010 00000010010000 00110010000001
+111 10011010010010 00000010010000 00110010000001
+011 10011010010010 00000010010001 00110010000001
+-01 10011010010010 00000010010000 00110010000001
+1-- 10011010010011 00000010010000 00110010000010
+011 10011010010011 00000010010000 00110010000010
+001 10011010010011 00000010010001 00110010000010
+000 10011010010011 00000010010011 00110010000010
+010 10011010010011 00000010010010 00110010000010
+011 00010001100000 10010010010011 10000110000011
+001 00010001100000 10010010010010 10000110000011
+000 00010001100000 10010010010000 10000110000011
+010 00010001100000 10010010010001 10000110000011
+1-- 00010001100000 00000010010000 10000110000011
+000 10010010010011 00001100000011 00110010000100
+010 10010010010011 00001100000010 00110010000100
+011 10010010010011 00001100000000 00110010000100
+001 10010010010011 00001100000001 00110010000100
+1-- 10010010010011 00000000000000 00110010000100
+1-- 10010010010010 00000000000000 00110010000101
+001 10010010010010 00001100000000 00110010000101
+011 10010010010010 00001100000001 00110010000101
+000 10010010010010 00001100000010 00110010000101
+010 10010010010010 00001100000011 00110010000101
+010 10010010010000 00001010010001 00110010000110
+000 10010010010000 00001010010000 00110010000110
+011 10010010010000 00001010010011 00110010000110
+001 10010010010000 00001010010010 00110010000110
+1-- 10010010010000 00000010010000 00110010000110
+010 10010010010001 00001010010000 00110010000111
+000 10010010010001 00001010010001 00110010000111
+011 10010010010001 00001010010010 00110010000111
+001 10010010010001 00001010010011 00110010000111
+1-- 10010010010001 00000010010000 00110010000111
+1-- 00010001100011 00000000011000 10000110001000
+011 00010001100011 10011100011000 10000110001000
+001 00010001100011 10011100011001 10000110001000
+000 00010001100011 10011100011011 10000110001000
+010 00010001100011 10011100011010 10000110001000
+1-- 10011100011000 00000000000000 01010010001001
+001 10011100011000 00000100000010 01010010001001
+011 10011100011000 00000100000011 01010010001001
+000 10011100011000 00000100000000 01010010001001
+010 10011100011000 00000100000001 01010010001001
+1-- 00000100000010 00000000011000 00000010001010
+010 00000100000010 10000100011011 00000010001010
+000 00000100000010 10000100011010 00000010001010
+011 00000100000010 10000100011001 00000010001010
+001 00000100000010 10000100011000 00000010001010
+1-- 00000100000011 00000000011000 00000010001011
+011 00000100000011 10001100011000 00000010001011
+001 00000100000011 10001100011001 00000010001011
+000 00000100000011 10001100011011 00000010001011
+010 00000100000011 10001100011010 00000010001011
+001 00000100000000 10000100011010 00000010001100
+011 00000100000000 10000100011011 00000010001100
+000 00000100000000 10000100011000 00000010001100
+010 00000100000000 10000100011001 00000010001100
+1-- 00000100000000 00000000011000 00000010001100
+1-- 00000100000001 00000000011000 00000010001101
+010 00000100000001 10001100011000 00000010001101
+000 00000100000001 10001100011001 00000010001101
+001 00000100000001 10001100011011 00000010001101
+011 00000100000001 10001100011010 00000010001101
+1-- 10011100011001 00000000000000 01010010001110
+011 10011100011001 00000100000010 01010010001110
+001 10011100011001 00000100000011 01010010001110
+010 10011100011001 00000100000000 01010010001110
+000 10011100011001 00000100000001 01010010001110
+1-- 10011100011011 00000000000000 01010010001111
+011 10011100011011 00000100000000 01010010001111
+001 10011100011011 00000100000001 01010010001111
+010 10011100011011 00000100000010 01010010001111
+000 10011100011011 00000100000011 01010010001111
+1-- 10011100011010 00000000000000 01010010010000
+010 10011100011010 00000100000011 01010010010000
+000 10011100011010 00000100000010 01010010010000
+001 10011100011010 00000100000000 01010010010000
+011 10011100011010 00000100000001 01010010010000
+011 11101001100000 00011001100011 10000110010001
+001 11101001100000 00011001100010 10000110010001
+000 11101001100000 00011001100000 10000110010001
+010 11101001100000 00011001100001 10000110010001
+1-- 11101001100000 00000001100000 10000110010001
+000 01101001100001 11100001100001 10000110010010
+010 01101001100001 11100001100000 10000110010010
+011 01101001100001 11100001100010 10000110010010
+001 01101001100001 11100001100011 10000110010010
+1-- 01101001100001 00000001100000 10000110010010
+001 11100001100001 00011000100111 10000110010011
+011 11100001100001 00011000100110 10000110010011
+010 11100001100001 00011000100100 10000110010011
+000 11100001100001 00011000100101 10000110010011
+1-- 11100001100001 00000000100100 10000110010011
+000 00011000100111 10010000100111 10001010010100
+010 00011000100111 10010000100110 10001010010100
+001 00011000100111 10010000100101 10001010010100
+011 00011000100111 10010000100100 10001010010100
+1-- 00011000100111 00000000100100 10001010010100
+000 10010000100111 00001100000011 10001010010101
+010 10010000100111 00001100000010 10001010010101
+001 10010000100111 00001100000001 10001010010101
+011 10010000100111 00001100000000 10001010010101
+1-- 10010000100111 00000000000000 10001010010101
+1-- 10010000100110 00000000000000 10001010010110
+000 10010000100110 00001100000010 10001010010110
+010 10010000100110 00001100000011 10001010010110
+001 10010000100110 00001100000000 10001010010110
+011 10010000100110 00001100000001 10001010010110
+010 10010000100101 00001010010000 10001010010111
+000 10010000100101 00001010010001 10001010010111
+001 10010000100101 00001010010011 10001010010111
+011 10010000100101 00001010010010 10001010010111
+1-- 10010000100101 00000010010000 10001010010111
+1-- 10010000100100 00000010010000 10001010011000
+000 10010000100100 00001010010000 10001010011000
+010 10010000100100 00001010010001 10001010011000
+011 10010000100100 00001010010011 10001010011000
+001 10010000100100 00001010010010 10001010011000
+1-- 00011000100100 00000000100100 10001010011001
+001 00011000100100 10011000100110 10001010011001
+011 00011000100100 10011000100111 10001010011001
+010 00011000100100 10011000100101 10001010011001
+000 00011000100100 10011000100100 10001010011001
+1-- 10011000100110 00000000100100 10001010011010
+001 10011000100110 00000000100100 10001010011010
+011 10011000100110 00000000100101 10001010011010
+000 10011000100110 00000000100110 10001010011010
+010 10011000100110 00000000100111 10001010011010
+001 00000000100101 10001001100011 10001010011011
+011 00000000100101 10001001100010 10001010011011
+010 00000000100101 10001001100000 10001010011011
+000 00000000100101 10001001100001 10001010011011
+1-- 00000000100101 00000001100000 10001010011011
+1-- 00000000100110 00000001100000 10001010011100
+010 00000000100110 10000001100011 10001010011100
+000 00000000100110 10000001100010 10001010011100
+011 00000000100110 10000001100001 10001010011100
+001 00000000100110 10000001100000 10001010011100
+1-- 00000000100111 00000001100000 10001010011101
+001 00000000100111 10001001100001 10001010011101
+011 00000000100111 10001001100000 10001010011101
+010 00000000100111 10001001100010 10001010011101
+000 00000000100111 10001001100011 10001010011101
+1-- 10011000100111 00000000100100 10001010011110
+000 10011000100111 00000000100111 10001010011110
+010 10011000100111 00000000100110 10001010011110
+001 10011000100111 00000000100101 10001010011110
+011 10011000100111 00000000100100 10001010011110
+011 10011000100101 00000000100110 10001010011111
+001 10011000100101 00000000100111 10001010011111
+1-1 10011000100101 00000000100100 10001010011111
+1-0 10011000100101 00000000100100 10001010011111
+000 10011000100101 00000000100101 10001010011111
+010 10011000100101 00000000100100 10001010011111
+000 00011000100101 10010000100101 10001010100000
+010 00011000100101 10010000100100 10001010100000
+011 00011000100101 10010000100110 10001010100000
+001 00011000100101 10010000100111 10001010100000
+1-- 00011000100101 00000000100100 10001010100000
+1-- 11100001100000 00000000100100 10000110100001
+000 11100001100000 00010000100100 10000110100001
+010 11100001100000 00010000100101 10000110100001
+001 11100001100000 00010000100110 10000110100001
+011 11100001100000 00010000100111 10000110100001
+1-- 00010000100100 00000010010000 10001010100010
+001 00010000100100 10010010010010 10001010100010
+011 00010000100100 10010010010011 10001010100010
+000 00010000100100 10010010010000 10001010100010
+010 00010000100100 10010010010001 10001010100010
+1-- 00010000100101 00000010010000 10001010100011
+010 00010000100101 10011010010000 10001010100011
+000 00010000100101 10011010010001 10001010100011
+001 00010000100101 10011010010011 10001010100011
+011 00010000100101 10011010010010 10001010100011
+1-- 00010000100110 00000000011000 10001010100100
+001 00010000100110 10010100011000 10001010100100
+011 00010000100110 10010100011001 10001010100100
+010 00010000100110 10010100011011 10001010100100
+000 00010000100110 10010100011010 10001010100100
+010 10010100011000 00001100000001 01010010100101
+000 10010100011000 00001100000000 01010010100101
+011 10010100011000 00001100000011 01010010100101
+001 10010100011000 00001100000010 01010010100101
+1-- 10010100011000 00000000000000 01010010100101
+010 10010100011001 00001100000000 01010010100110
+000 10010100011001 00001100000001 01010010100110
+001 10010100011001 00001100000011 01010010100110
+011 10010100011001 00001100000010 01010010100110
+1-- 10010100011001 00000000000000 01010010100110
+1-- 10010100011011 00000000000000 01010010100111
+000 10010100011011 00001100000011 01010010100111
+010 10010100011011 00001100000010 01010010100111
+011 10010100011011 00001100000000 01010010100111
+001 10010100011011 00001100000001 01010010100111
+011 00010000100111 10011100011000 10001010101000
+001 00010000100111 10011100011001 10001010101000
+010 00010000100111 10011100011010 10001010101000
+000 00010000100111 10011100011011 10001010101000
+1-- 00010000100111 00000000011000 10001010101000
+001 11100001100010 00010000100100 10000110101001
+011 11100001100010 00010000100101 10000110101001
+010 11100001100010 00010000100111 10000110101001
+000 11100001100010 00010000100110 10000110101001
+1-- 11100001100010 00000000100100 10000110101001
+1-- 11100001100011 00000000100100 10000110101010
+001 11100001100011 00011000100101 10000110101010
+011 11100001100011 00011000100100 10000110101010
+000 11100001100011 00011000100111 10000110101010
+010 11100001100011 00011000100110 10000110101010
+000 01101001100011 11100001100011 10000110101011
+010 01101001100011 11100001100010 10000110101011
+011 01101001100011 11100001100000 10000110101011
+001 01101001100011 11100001100001 10000110101011
+1-- 01101001100011 00000001100000 10000110101011
+011 10100001100000 01100001100011 10000110101100
+001 10100001100000 01100001100010 10000110101100
+000 10100001100000 01100001100000 10000110101100
+010 10100001100000 01100001100001 10000110101100
+1-- 10100001100000 00000001100000 10000110101100
+010 01100001100011 11101000100110 10000110101101
+000 01100001100011 11101000100111 10000110101101
+011 01100001100011 11101000100100 10000110101101
+001 01100001100011 11101000100101 10000110101101
+1-- 01100001100011 00000000100100 10000110101101
+1-- 11101000100111 00000000100100 10001010101110
+010 11101000100111 00010000100110 10001010101110
+000 11101000100111 00010000100111 10001010101110
+001 11101000100111 00010000100101 10001010101110
+011 11101000100111 00010000100100 10001010101110
+1-- 11101000100100 00000000100100 10001010101111
+000 11101000100100 00011000100100 10001010101111
+010 11101000100100 00011000100101 10001010101111
+011 11101000100100 00011000100111 10001010101111
+001 11101000100100 00011000100110 10001010101111
+1-- 11101000100101 00000000100100 10001010110000
+011 11101000100101 00010000100110 10001010110000
+001 11101000100101 00010000100111 10001010110000
+000 11101000100101 00010000100101 10001010110000
+010 11101000100101 00010000100100 10001010110000
+010 01100001100010 11100000100111 10000110110001
+000 01100001100010 11100000100110 10000110110001
+001 01100001100010 11100000100100 10000110110001
+011 01100001100010 11100000100101 10000110110001
+1-- 01100001100010 00000000100100 10000110110001
+011 11100000100111 00011000100100 10001010110010
+001 11100000100111 00011000100101 10001010110010
+010 11100000100111 00011000100110 10001010110010
+000 11100000100111 00011000100111 10001010110010
+1-- 11100000100111 00000000100100 10001010110010
+1-- 11100000100110 00000000100100 10001010110011
+000 11100000100110 00010000100110 10001010110011
+010 11100000100110 00010000100111 10001010110011
+001 11100000100110 00010000100100 10001010110011
+011 11100000100110 00010000100101 10001010110011
+011 11100000100100 00010000100111 10001010110100
+001 11100000100100 00010000100110 10001010110100
+000 11100000100100 00010000100100 10001010110100
+010 11100000100100 00010000100101 10001010110100
+1-- 11100000100100 00000000100100 10001010110100
+1-- 11100000100101 00000000100100 10001010110101
+011 11100000100101 00011000100110 10001010110101
+001 11100000100101 00011000100111 10001010110101
+000 11100000100101 00011000100101 10001010110101
+010 11100000100101 00011000100100 10001010110101
+001 01100001100000 11100000100110 10000110110110
+011 01100001100000 11100000100111 10000110110110
+000 01100001100000 11100000100100 10000110110110
+010 01100001100000 11100000100101 10000110110110
+1-- 01100001100000 00000000100100 10000110110110
+1-- 10100001100001 00000001100000 10000110110111
+011 10100001100001 01101001100010 10000110110111
+001 10100001100001 01101001100011 10000110110111
+000 10100001100001 01101001100001 10000110110111
+010 10100001100001 01101001100000 10000110110111
+001 10101001100011 01100001100001 10000110111000
+011 10101001100011 01100001100000 10000110111000
+000 10101001100011 01100001100011 10000110111000
+010 10101001100011 01100001100010 10000110111000
+1-- 10101001100011 00000001100000 10000110111000
+1-- 10101001100000 00000001100000 10000110111001
+010 10101001100000 01101001100001 10000110111001
+000 10101001100000 01101001100000 10000110111001
+011 10101001100000 01101001100011 10000110111001
+001 10101001100000 01101001100010 10000110111001
+1-- 10101001100001 00000001100000 10000110111010
+010 10101001100001 01100001100000 10000110111010
+000 10101001100001 01100001100001 10000110111010
+001 10101001100001 01100001100011 10000110111010
+011 10101001100001 01100001100010 10000110111010
+001 10100100011000 01100100000010 01010010111011
+011 10100100011000 01100100000011 01010010111011
+010 10100100011000 01100100000001 01010010111011
+000 10100100011000 01100100000000 01010010111011
+1-- 10100100011000 00000000000000 01010010111011
+1-- 01100100000010 00000000011000 00000010111100
+010 01100100000010 11100100011011 00000010111100
+000 01100100000010 11100100011010 00000010111100
+011 01100100000010 11100100011001 00000010111100
+001 01100100000010 11100100011000 00000010111100
+1-- 11100100011011 00000000000000 01010010111101
+001 11100100011011 00011100000001 01010010111101
+011 11100100011011 00011100000000 01010010111101
+010 11100100011011 00011100000010 01010010111101
+000 11100100011011 00011100000011 01010010111101
+1-- 00011100000001 00000000011000 00000010111110
+001 00011100000001 10010100011011 00000010111110
+011 00011100000001 10010100011010 00000010111110
+000 00011100000001 10010100011001 00000010111110
+010 00011100000001 10010100011000 00000010111110
+000 00011100000000 10011100011000 00000010111111
+010 00011100000000 10011100011001 00000010111111
+001 00011100000000 10011100011010 00000010111111
+011 00011100000000 10011100011011 00000010111111
+1-- 00011100000000 00000000011000 00000010111111
+1-- 00011100000010 00000000011000 00000011000000
+010 00011100000010 10011100011011 00000011000000
+000 00011100000010 10011100011010 00000011000000
+001 00011100000010 10011100011000 00000011000000
+011 00011100000010 10011100011001 00000011000000
+1-- 00011100000011 00000000011000 00000011000001
+011 00011100000011 10010100011000 00000011000001
+001 00011100000011 10010100011001 00000011000001
+000 00011100000011 10010100011011 00000011000001
+010 00011100000011 10010100011010 00000011000001
+001 11100100011010 00010100000000 01010011000010
+011 11100100011010 00010100000001 01010011000010
+000 11100100011010 00010100000010 01010011000010
+010 11100100011010 00010100000011 01010011000010
+1-- 11100100011010 00000000000000 01010011000010
+010 00010100000000 10010100011001 00000011000011
+000 00010100000000 10010100011000 00000011000011
+011 00010100000000 10010100011011 00000011000011
+001 00010100000000 10010100011010 00000011000011
+1-- 00010100000000 00000000011000 00000011000011
+1-- 00010100000001 00000000011000 00000011000100
+011 00010100000001 10011100011010 00000011000100
+001 00010100000001 10011100011011 00000011000100
+000 00010100000001 10011100011001 00000011000100
+010 00010100000001 10011100011000 00000011000100
+001 00010100000010 10010100011000 00000011000101
+011 00010100000010 10010100011001 00000011000101
+000 00010100000010 10010100011010 00000011000101
+010 00010100000010 10010100011011 00000011000101
+1-- 00010100000010 00000000011000 00000011000101
+000 00010100000011 10011100011011 00000011000110
+010 00010100000011 10011100011010 00000011000110
+001 00010100000011 10011100011001 00000011000110
+011 00010100000011 10011100011000 00000011000110
+1-- 00010100000011 00000000011000 00000011000110
+1-- 11100100011001 00000000000000 01010011000111
+000 11100100011001 00011100000001 01010011000111
+010 11100100011001 00011100000000 01010011000111
+001 11100100011001 00011100000011 01010011000111
+011 11100100011001 00011100000010 01010011000111
+010 11100100011000 00010100000001 01010011001000
+000 11100100011000 00010100000000 01010011001000
+001 11100100011000 00010100000010 01010011001000
+011 11100100011000 00010100000011 01010011001000
+1-- 11100100011000 00000000000000 01010011001000
+1-- 01100100000011 00000000011000 00000011001001
+001 01100100000011 11101100011001 00000011001001
+011 01100100000011 11101100011000 00000011001001
+010 01100100000011 11101100011010 00000011001001
+000 01100100000011 11101100011011 00000011001001
+1-- 11101100011001 00000000000000 01010011001010
+011 11101100011001 00010100000010 01010011001010
+001 11101100011001 00010100000011 01010011001010
+010 11101100011001 00010100000000 01010011001010
+000 11101100011001 00010100000001 01010011001010
+1-- 11101100011000 00000000000000 01010011001011
+001 11101100011000 00011100000010 01010011001011
+011 11101100011000 00011100000011 01010011001011
+000 11101100011000 00011100000000 01010011001011
+010 11101100011000 00011100000001 01010011001011
+011 11101100011010 00011100000001 01010011001100
+001 11101100011010 00011100000000 01010011001100
+010 11101100011010 00011100000011 01010011001100
+000 11101100011010 00011100000010 01010011001100
+1-- 11101100011010 00000000000000 01010011001100
+1-- 11101100011011 00000000000000 01010011001101
+000 11101100011011 00010100000011 01010011001101
+010 11101100011011 00010100000010 01010011001101
+001 11101100011011 00010100000001 01010011001101
+011 11101100011011 00010100000000 01010011001101
+1-- 01100100000001 00000000011000 00000011001110
+000 01100100000001 11101100011001 00000011001110
+010 01100100000001 11101100011000 00000011001110
+011 01100100000001 11101100011010 00000011001110
+001 01100100000001 11101100011011 00000011001110
+000 01100100000000 11100100011000 00000011001111
+010 01100100000000 11100100011001 00000011001111
+011 01100100000000 11100100011011 00000011001111
+001 01100100000000 11100100011010 00000011001111
+1-- 01100100000000 00000000011000 00000011001111
+1-- 10100100011001 00000000000000 01010011010000
+010 10100100011001 01101100000000 01010011010000
+000 10100100011001 01101100000001 01010011010000
+001 10100100011001 01101100000011 01010011010000
+011 10100100011001 01101100000010 01010011010000
+1-- 01101100000000 00000000011000 00000011010001
+001 01101100000000 11101100011010 00000011010001
+011 01101100000000 11101100011011 00000011010001
+010 01101100000000 11101100011001 00000011010001
+000 01101100000000 11101100011000 00000011010001
+011 01101100000001 11100100011010 00000011010010
+001 01101100000001 11100100011011 00000011010010
+000 01101100000001 11100100011001 00000011010010
+010 01101100000001 11100100011000 00000011010010
+1-- 01101100000001 00000000011000 00000011010010
+1-- 01101100000011 00000000011000 00000011010011
+000 01101100000011 11100100011011 00000011010011
+010 01101100000011 11100100011010 00000011010011
+011 01101100000011 11100100011000 00000011010011
+001 01101100000011 11100100011001 00000011010011
+1-- 01101100000010 00000000011000 00000011010100
+001 01101100000010 11101100011000 00000011010100
+011 01101100000010 11101100011001 00000011010100
+010 01101100000010 11101100011011 00000011010100
+000 01101100000010 11101100011010 00000011010100
+011 10100100011011 01101100000000 01010011010101
+001 10100100011011 01101100000001 01010011010101
+000 10100100011011 01101100000011 01010011010101
+010 10100100011011 01101100000010 01010011010101
+1-- 10100100011011 00000000000000 01010011010101
+001 10100100011010 01100100000000 01010011010110
+011 10100100011010 01100100000001 01010011010110
+000 10100100011010 01100100000010 01010011010110
+010 10100100011010 01100100000011 01010011010110
+1-- 10100100011010 00000000000000 01010011010110
+1-- 10101100011000 00000000000000 01010011010111
+000 10101100011000 01101100000000 01010011010111
+010 10101100011000 01101100000001 01010011010111
+011 10101100011000 01101100000011 01010011010111
+001 10101100011000 01101100000010 01010011010111
+1-- 10101100011001 00000000000000 01010011011000
+000 10101100011001 01100100000001 01010011011000
+010 10101100011001 01100100000000 01010011011000
+001 10101100011001 01100100000011 01010011011000
+011 10101100011001 01100100000010 01010011011000
+1-- 10101100011010 00000000000000 01010011011001
+000 10101100011010 01101100000010 01010011011001
+010 10101100011010 01101100000011 01010011011001
+011 10101100011010 01101100000001 01010011011001
+001 10101100011010 01101100000000 01010011011001
+1-- 10101100011011 00000000000000 01010011011010
+001 10101100011011 01100100000001 01010011011010
+011 10101100011011 01100100000000 01010011011010
+010 10101100011011 01100100000010 01010011011010
+000 10101100011011 01100100000011 01010011011010
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/s420.kiss2	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,142 @@
+.i 19
+.o 2
+.p 137
+.s 18
+.r 1111111111111111
+1----------------1- 1111111111111111 0000000000000000 1100000
+1----------------00 1111111111111111 0000000000000000 1000001
+1----------------01 1111111111111111 0000000000000000 1100001
+0------------------ 1111111111111111 0000000000000000 1000001
+10----------------1 0000000000000000 0001000000000000 0100010
+10----------------0 0000000000000000 0001000000000000 0000010
+00----------------- 0000000000000000 0000000000000000 0000010
+01----------------1 0000000000000000 0000000000000000 0000010
+11----------------1 0000000000000000 0000000000000000 0100010
+-1----------------0 0000000000000000 0000000000000000 0000010
+0------------------ 0001000000000000 0000000000000000 0000011
+11---------------1- 0001000000000000 0000000000000000 0100011
+11---------------00 0001000000000000 0000000000000000 0000011
+11---------------01 0001000000000000 0000000000000000 0100011
+10---------------00 0001000000000000 0010000000000000 0000011
+10---------------10 0001000000000000 0010000000000000 0100011
+10----------------1 0001000000000000 0010000000000000 0100011
+00----------------- 0010000000000000 0000000000000000 0000100
+10--------------0-0 0010000000000000 0011000000000000 0000100
+10--------------1-0 0010000000000000 0011000000000000 0100100
+10----------------1 0010000000000000 0011000000000000 0100100
+01----------------- 0010000000000000 0000000000000000 0000100
+11--------------0-0 0010000000000000 0000000000000000 0000100
+11--------------1-0 0010000000000000 0000000000000000 0100100
+11----------------1 0010000000000000 0000000000000000 0100100
+0------------------ 0011000000000000 0000000000000000 0000101
+11---------------10 0011000000000000 0000000000000000 0100101
+11---------------00 0011000000000000 0000000000000000 0000101
+11----------------1 0011000000000000 0000000000000000 0100101
+10---------------1- 0011000000000000 0100000000000000 0100101
+10---------------01 0011000000000000 0100000000000000 0100101
+10---------------00 0011000000000000 0100000000000000 0000101
+10----------------1 0100000000000000 0101000000000000 0100110
+10-------------0--0 0100000000000000 0101000000000000 0000110
+10-------------1--0 0100000000000000 0101000000000000 0100110
+00----------------- 0100000000000000 0000000000000000 0000110
+01-------------0--1 0100000000000000 0000000000000000 0000110
+11-------------0--1 0100000000000000 0000000000000000 0100110
+-1-------------0--0 0100000000000000 0000000000000000 0000110
+01-------------1--- 0100000000000000 0000000000000000 0000110
+11-------------1--- 0100000000000000 0000000000000000 0100110
+0------------------ 0101000000000000 0000000000000000 0000111
+11---------------10 0101000000000000 0000000000000000 0100111
+11---------------00 0101000000000000 0000000000000000 0000111
+11----------------1 0101000000000000 0000000000000000 0100111
+10---------------10 0101000000000000 0110000000000000 0100111
+10---------------00 0101000000000000 0110000000000000 0000111
+10----------------1 0101000000000000 0110000000000000 0100111
+0------------------ 0110000000000000 0000000000000000 0001000
+11--------------1-0 0110000000000000 0000000000000000 0101000
+11--------------0-0 0110000000000000 0000000000000000 0001000
+11----------------1 0110000000000000 0000000000000000 0101000
+10--------------1-- 0110000000000000 0111000000000000 0101000
+10--------------0-0 0110000000000000 0111000000000000 0001000
+10--------------0-1 0110000000000000 0111000000000000 0101000
+0------------------ 0111000000000000 0000000000000000 0001001
+11---------------1- 0111000000000000 0000000000000000 0101001
+11---------------00 0111000000000000 0000000000000000 0001001
+11---------------01 0111000000000000 0000000000000000 0101001
+10---------------1- 0111000000000000 1000000000000000 0101001
+10---------------01 0111000000000000 1000000000000000 0101001
+10---------------00 0111000000000000 1000000000000000 0001001
+00----------------- 1000000000000000 0000000000000000 0001010
+10----------------1 1000000000000000 1001000000000000 0101010
+10------------1---0 1000000000000000 1001000000000000 0101010
+10------------0---0 1000000000000000 1001000000000000 0001010
+01------------0---1 1000000000000000 0000000000000000 0001010
+11------------0---1 1000000000000000 0000000000000000 0101010
+11------------1---1 1000000000000000 0000000000000000 0101010
+01------------1---1 1000000000000000 0000000000000000 0001010
+11------------1---0 1000000000000000 0000000000000000 0101010
+11------------0---0 1000000000000000 0000000000000000 0001010
+01----------------0 1000000000000000 0000000000000000 0001010
+00----------------- 1001000000000000 0000000000000000 0001011
+10---------------1- 1001000000000000 1010000000000000 0101011
+10---------------00 1001000000000000 1010000000000000 0001011
+10---------------01 1001000000000000 1010000000000000 0101011
+01----------------- 1001000000000000 0000000000000000 0001011
+11---------------1- 1001000000000000 0000000000000000 0101011
+11---------------01 1001000000000000 0000000000000000 0101011
+11---------------00 1001000000000000 0000000000000000 0001011
+00----------------- 1010000000000000 0000000000000000 0001100
+10--------------1-- 1010000000000000 1011000000000000 0101100
+10--------------0-1 1010000000000000 1011000000000000 0101100
+10--------------0-0 1010000000000000 1011000000000000 0001100
+01----------------- 1010000000000000 0000000000000000 0001100
+11--------------1-0 1010000000000000 0000000000000000 0101100
+11--------------0-0 1010000000000000 0000000000000000 0001100
+11----------------1 1010000000000000 0000000000000000 0101100
+00----------------- 1011000000000000 0000000000000000 0001101
+10---------------00 1011000000000000 1100000000000000 0001101
+10---------------10 1011000000000000 1100000000000000 0101101
+10----------------1 1011000000000000 1100000000000000 0101101
+01----------------- 1011000000000000 0000000000000000 0001101
+11---------------10 1011000000000000 0000000000000000 0101101
+11---------------00 1011000000000000 0000000000000000 0001101
+11----------------1 1011000000000000 0000000000000000 0101101
+00----------------- 1100000000000000 0000000000000000 0001110
+10-------------0--1 1100000000000000 1101000000000000 0101110
+10-------------0--0 1100000000000000 1101000000000000 0001110
+10-------------1--- 1100000000000000 1101000000000000 0101110
+11----------------1 1100000000000000 0000000000000000 0101110
+01----------------1 1100000000000000 0000000000000000 0001110
+11-------------0--0 1100000000000000 0000000000000000 0001110
+11-------------1--0 1100000000000000 0000000000000000 0101110
+01----------------0 1100000000000000 0000000000000000 0001110
+0------------------ 1101000000000000 0000000000000000 0001111
+10---------------1- 1101000000000000 1110000000000000 0101111
+10---------------00 1101000000000000 1110000000000000 0001111
+10---------------01 1101000000000000 1110000000000000 0101111
+11---------------1- 1101000000000000 0000000000000000 0101111
+11---------------00 1101000000000000 0000000000000000 0001111
+11---------------01 1101000000000000 0000000000000000 0101111
+10--------------1-- 1110000000000000 1111000000000000 0110000
+10--------------0-0 1110000000000000 1111000000000000 0010000
+10--------------0-1 1110000000000000 1111000000000000 0110000
+00----------------- 1110000000000000 0000000000000000 0010000
+01----------------- 1110000000000000 0000000000000000 0010000
+11--------------1-- 1110000000000000 0000000000000000 0110000
+11--------------0-0 1110000000000000 0000000000000000 0010000
+11--------------0-1 1110000000000000 0000000000000000 0110000
+01----------------- 1111000000000000 0000000000000000 0010001
+11---------------00 1111000000000000 0000000000000000 0010001
+11---------------10 1111000000000000 0000000000000000 0110001
+11----------------1 1111000000000000 0000000000000000 0110001
+00----------------- 1111000000000000 0000000100000000 0010001
+10---------------10 1111000000000000 0000000100000000 0110001
+10---------------00 1111000000000000 0000000100000000 0010001
+10----------------1 1111000000000000 0000000100000000 0110001
+00----------------- 0000000100000000 0000000000000000 0010010
+10-----------1----- 0000000100000000 0001000000000000 0110010
+10-----------0----0 0000000100000000 0001000000000000 0010010
+10-----------0----1 0000000100000000 0001000000000000 0110010
+01----------------- 0000000100000000 0000000000000000 0010010
+11-----------1----0 0000000100000000 0000000000000000 0110010
+11-----------0----0 0000000100000000 0000000000000000 0010010
+11----------------1 0000000100000000 0000000000000000 0110010
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/tbk.kiss2	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,1574 @@
+
+.i 6 
+.o 9 
+.p 1569 
+.s 32
+000000 st0 st0 000000000
+000001 st0 st0 000000001
+000010 st0 st0 000000001
+000011 st0 st0 000000001
+100011 st0 st16 000000001
+11--00 st0 st0 000000001
+1-1-00 st0 st0 000000001
+1--100 st0 st0 000000001
+-11-00 st0 st0 000000001
+-1-100 st0 st0 000000001
+--1100 st0 st0 000000001
+11--01 st0 st0 000000001
+1-1-01 st0 st0 000000001
+1--101 st0 st0 000000001
+-11-01 st0 st0 000000001
+-1-101 st0 st0 000000001
+--1101 st0 st0 000000001
+11--10 st0 st0 000000001
+1-1-10 st0 st0 000000001
+1--110 st0 st0 000000001
+-11-10 st0 st0 000000001
+-1-110 st0 st0 000000001
+--1110 st0 st0 000000001
+000100 st0 st1 000000001
+001000 st0 st2 000000001
+010000 st0 st3 000000001
+100000 st0 st4 000000001
+000101 st0 st5 000000001
+001001 st0 st6 000000001
+010001 st0 st7 000000001
+100001 st0 st8 000000001
+000110 st0 st9 000000001
+001010 st0 st10 000000001
+010010 st0 st11 000000001
+100010 st0 st12 000000001
+000111 st0 st13 100000001
+001011 st0 st15 000000001
+001111 st0 st13 100000001
+010011 st0 st14 000000001
+010111 st0 st13 100000001
+011011 st0 st0 000000001
+011111 st0 st13 100000001
+100111 st0 st29 100000001
+101011 st0 st31 000000001
+101111 st0 st29 100000001
+110011 st0 st30 000000001
+110111 st0 st29 100000001
+111011 st0 st16 000000001
+111111 st0 st29 100000001
+000000 st16 st16 000000010
+000001 st16 st16 000000010
+000010 st16 st16 000000010
+000011 st16 st0 000000010
+100011 st16 st16 000000010
+11--00 st16 st16 000000010
+1-1-00 st16 st16 000000010
+1--100 st16 st16 000000010
+-11-00 st16 st16 000000010
+-1-100 st16 st16 000000010
+--1100 st16 st16 000000010
+11--01 st16 st16 000000010
+1-1-01 st16 st16 000000010
+1--101 st16 st16 000000010
+-11-01 st16 st16 000000010
+-1-101 st16 st16 000000010
+--1101 st16 st16 000000010
+11--10 st16 st16 000000010
+1-1-10 st16 st16 000000010
+1--110 st16 st16 000000010
+-11-10 st16 st16 000000010
+-1-110 st16 st16 000000010
+--1110 st16 st16 000000010
+000100 st16 st17 000000010
+001000 st16 st18 000000010
+010000 st16 st19 000000010
+100000 st16 st20 000000010
+000101 st16 st21 000000010
+001001 st16 st22 000000010
+010001 st16 st23 000000010
+100001 st16 st24 000000010
+000110 st16 st25 000000010
+001010 st16 st26 000000010
+010010 st16 st27 000000010
+100010 st16 st28 000000010
+000111 st16 st13 100000010
+001011 st16 st15 000000010
+001111 st16 st13 100000010
+010011 st16 st14 000000010
+010111 st16 st13 100000010
+011011 st16 st0 000000010
+011111 st16 st13 100000010
+100111 st16 st29 100000010
+101011 st16 st31 000000010
+101111 st16 st29 100000010
+110011 st16 st30 000000010
+110111 st16 st29 100000010
+111011 st16 st16 000000010
+111111 st16 st29 100000010
+000000 st1 st0 000000011
+000001 st1 st1 000000011
+000010 st1 st1 000000011
+000011 st1 st1 000000011
+100011 st1 st17 000000011
+11--00 st1 st0 000000011
+1-1-00 st1 st0 000000011
+1--100 st1 st0 000000011
+-11-00 st1 st0 000000011
+-1-100 st1 st0 000000011
+--1100 st1 st0 000000011
+11--01 st1 st0 000000011
+1-1-01 st1 st0 000000011
+1--101 st1 st0 000000011
+-11-01 st1 st0 000000011
+-1-101 st1 st0 000000011
+--1101 st1 st0 000000011
+11--10 st1 st0 000000011
+1-1-10 st1 st0 000000011
+1--110 st1 st0 000000011
+-11-10 st1 st0 000000011
+-1-110 st1 st0 000000011
+--1110 st1 st0 000000011
+000100 st1 st1 010000011
+001000 st1 st0 000000011
+010000 st1 st0 000000011
+100000 st1 st0 000000011
+000101 st1 st0 000000011
+001001 st1 st0 000000011
+010001 st1 st0 000000011
+100001 st1 st0 000000011
+000110 st1 st0 000000011
+001010 st1 st0 000000011
+010010 st1 st0 000000011
+100010 st1 st0 000000011
+000111 st1 st13 100000011
+001011 st1 st0 000000011
+001111 st1 st13 100000011
+010011 st1 st0 000000011
+010111 st1 st13 100000011
+011011 st1 st0 000000011
+011111 st1 st13 100000011
+100111 st1 st29 100000011
+101011 st1 st16 000000011
+101111 st1 st29 100000011
+110011 st1 st16 000000011
+110111 st1 st29 100000011
+111011 st1 st16 000000011
+111111 st1 st29 100000011
+000000 st17 st16 000000100
+000001 st17 st17 000000100
+000010 st17 st17 000000100
+000011 st17 st1 000000100
+100011 st17 st17 000000100
+11--00 st17 st16 000000100
+1-1-00 st17 st16 000000100
+1--100 st17 st16 000000100
+-11-00 st17 st16 000000100
+-1-100 st17 st16 000000100
+--1100 st17 st16 000000100
+11--01 st17 st16 000000100
+1-1-01 st17 st16 000000100
+1--101 st17 st16 000000100
+-11-01 st17 st16 000000100
+-1-101 st17 st16 000000100
+--1101 st17 st16 000000100
+11--10 st17 st16 000000100
+1-1-10 st17 st16 000000100
+1--110 st17 st16 000000100
+-11-10 st17 st16 000000100
+-1-110 st17 st16 000000100
+--1110 st17 st16 000000100
+000100 st17 st17 010000100
+001000 st17 st16 000000100
+010000 st17 st16 000000100
+100000 st17 st16 000000100
+000101 st17 st16 000000100
+001001 st17 st16 000000100
+010001 st17 st16 000000100
+100001 st17 st16 000000100
+000110 st17 st16 000000100
+001010 st17 st16 000000100
+010010 st17 st16 000000100
+100010 st17 st16 000000100
+000111 st17 st13 100000100
+001011 st17 st0 000000100
+001111 st17 st13 100000100
+010011 st17 st0 000000100
+010111 st17 st13 100000100
+011011 st17 st0 000000100
+011111 st17 st13 100000100
+100111 st17 st29 100000100
+101011 st17 st16 000000100
+101111 st17 st29 100000100
+110011 st17 st16 000000100
+110111 st17 st29 100000100
+111011 st17 st16 000000100
+111111 st17 st29 100000100
+000000 st2 st0 000000101
+000001 st2 st2 000000101
+000010 st2 st2 000000101
+000011 st2 st2 000000101
+100011 st2 st18 000000101
+11--00 st2 st0 000000101
+1-1-00 st2 st0 000000101
+1--100 st2 st0 000000101
+-11-00 st2 st0 000000101
+-1-100 st2 st0 000000101
+--1100 st2 st0 000000101
+11--01 st2 st0 000000101
+1-1-01 st2 st0 000000101
+1--101 st2 st0 000000101
+-11-01 st2 st0 000000101
+-1-101 st2 st0 000000101
+--1101 st2 st0 000000101
+11--10 st2 st0 000000101
+1-1-10 st2 st0 000000101
+1--110 st2 st0 000000101
+-11-10 st2 st0 000000101
+-1-110 st2 st0 000000101
+--1110 st2 st0 000000101
+000100 st2 st0 000000101
+001000 st2 st2 010000101
+010000 st2 st0 000000101
+100000 st2 st0 000000101
+000101 st2 st0 000000101
+001001 st2 st0 000000101
+010001 st2 st0 000000101
+100001 st2 st0 000000101
+000110 st2 st0 000000101
+001010 st2 st0 000000101
+010010 st2 st0 000000101
+100010 st2 st0 000000101
+000111 st2 st13 100000101
+001011 st2 st0 000000101
+001111 st2 st13 100000101
+010011 st2 st0 000000101
+010111 st2 st13 100000101
+011011 st2 st0 000000101
+011111 st2 st13 100000101
+100111 st2 st29 100000101
+101011 st2 st16 000000101
+101111 st2 st29 100000101
+110011 st2 st16 000000101
+110111 st2 st29 100000101
+110111 st2 st29 100000101
+111011 st2 st16 000000101
+111111 st2 st29 100000101
+000000 st18 st16 000000110
+000001 st18 st18 000000110
+000010 st18 st18 000000110
+000011 st18 st2 000000110
+100011 st18 st18 000000110
+11--00 st18 st16 000000110
+1-1-00 st18 st16 000000110
+1--100 st18 st16 000000110
+-11-00 st18 st16 000000110
+-1-100 st18 st16 000000110
+--1100 st18 st16 000000110
+11--01 st18 st16 000000110
+1-1-01 st18 st16 000000110
+1--101 st18 st16 000000110
+-11-01 st18 st16 000000110
+-1-101 st18 st16 000000110
+--1101 st18 st16 000000110
+11--10 st18 st16 000000110
+1-1-10 st18 st16 000000110
+1--110 st18 st16 000000110
+-11-10 st18 st16 000000110
+-1-110 st18 st16 000000110
+--1110 st18 st16 000000110
+000100 st18 st16 000000110
+001000 st18 st18 010000110
+010000 st18 st16 000000110
+100000 st18 st16 000000110
+000101 st18 st16 000000110
+001001 st18 st16 000000110
+010001 st18 st16 000000110
+100001 st18 st16 000000110
+000110 st18 st16 000000110
+001010 st18 st16 000000110
+010010 st18 st16 000000110
+100010 st18 st16 000000110
+000111 st18 st13 100000110
+001011 st18 st0 000000110
+001111 st18 st13 100000110
+010011 st18 st0 000000110
+010111 st18 st13 100000110
+011011 st18 st0 000000110
+011111 st18 st13 100000110
+100111 st18 st29 100000110
+101011 st18 st16 000000110
+101111 st18 st29 100000110
+110011 st18 st16 000000110
+110111 st18 st29 100000110
+111011 st18 st16 000000110
+111111 st18 st29 100000110
+000000 st3 st0 000000111
+000001 st3 st3 000000111
+000010 st3 st3 000000111
+000011 st3 st3 000000111
+100011 st3 st19 000000111
+11--00 st3 st0 000000111
+1-1-00 st3 st0 000000111
+1--100 st3 st0 000000111
+-11-00 st3 st0 000000111
+-1-100 st3 st0 000000111
+--1100 st3 st0 000000111
+11--01 st3 st0 000000111
+1-1-01 st3 st0 000000111
+1--101 st3 st0 000000111
+-11-01 st3 st0 000000111
+-1-101 st3 st0 000000111
+--1101 st3 st0 000000111
+11--10 st3 st0 000000111
+1-1-10 st3 st0 000000111
+1--110 st3 st0 000000111
+-11-10 st3 st0 000000111
+-1-110 st3 st0 000000111
+--1110 st3 st0 000000111
+000100 st3 st0 000000111
+001000 st3 st0 000000111
+010000 st3 st3 010000111
+100000 st3 st0 000000111
+000101 st3 st0 000000111
+001001 st3 st0 000000111
+010001 st3 st0 000000111
+100001 st3 st0 000000111
+000110 st3 st0 000000111
+001010 st3 st0 000000111
+010010 st3 st0 000000111
+100010 st3 st0 000000111
+000111 st3 st13 100000111
+001011 st3 st0 000000111
+001111 st3 st13 100000111
+010011 st3 st0 000000111
+010111 st3 st13 100000111
+011011 st3 st0 000000111
+011111 st3 st13 100000111
+100111 st3 st29 100000111
+101011 st3 st16 000000111
+101111 st3 st29 100000111
+110011 st3 st16 000000111
+110111 st3 st29 100000111
+111011 st3 st16 000000111
+111111 st3 st29 100000111
+000000 st19 st16 000001000
+000001 st19 st19 000001000
+000010 st19 st19 000001000
+000011 st19 st3 000001000
+100011 st19 st19 000001000
+11--00 st19 st16 000001000
+1-1-00 st19 st16 000001000
+1--100 st19 st16 000001000
+-11-00 st19 st16 000001000
+-1-100 st19 st16 000001000
+--1100 st19 st16 000001000
+11--01 st19 st16 000001000
+1-1-01 st19 st16 000001000
+1--101 st19 st16 000001000
+-11-01 st19 st16 000001000
+-1-101 st19 st16 000001000
+--1101 st19 st16 000001000
+11--10 st19 st16 000001000
+1-1-10 st19 st16 000001000
+1--110 st19 st16 000001000
+-11-10 st19 st16 000001000
+-1-110 st19 st16 000001000
+--1110 st19 st16 000001000
+000100 st19 st16 000001000
+001000 st19 st16 000001000
+010000 st19 st19 010001000
+100000 st19 st16 000001000
+000101 st19 st16 000001000
+001001 st19 st16 000001000
+010001 st19 st16 000001000
+100001 st19 st16 000001000
+000110 st19 st16 000001000
+001010 st19 st16 000001000
+010010 st19 st16 000001000
+100010 st19 st16 000001000
+000111 st19 st13 100001000
+001011 st19 st0 000001000
+001111 st19 st13 100001000
+010011 st19 st0 000001000
+010111 st19 st13 100001000
+011011 st19 st0 000001000
+011111 st19 st13 100001000
+100111 st19 st29 100001000
+101011 st19 st16 000001000
+101111 st19 st29 100001000
+110011 st19 st16 000001000
+110111 st19 st29 100001000
+111011 st19 st16 000001000
+111111 st19 st29 100001000
+000000 st4 st0 000001001
+000001 st4 st4 000001001
+000010 st4 st4 000001001
+000011 st4 st4 000001001
+100011 st4 st20 000001001
+11--00 st4 st0 000001001
+1-1-00 st4 st0 000001001
+1--100 st4 st0 000001001
+-11-00 st4 st0 000001001
+-1-100 st4 st0 000001001
+--1100 st4 st0 000001001
+11--01 st4 st0 000001001
+1-1-01 st4 st0 000001001
+1--101 st4 st0 000001001
+-11-01 st4 st0 000001001
+-1-101 st4 st0 000001001
+--1101 st4 st0 000001001
+11--10 st4 st0 000001001
+1-1-10 st4 st0 000001001
+1--110 st4 st0 000001001
+-11-10 st4 st0 000001001
+-1-110 st4 st0 000001001
+--1110 st4 st0 000001001
+000100 st4 st0 000001001
+001000 st4 st0 000001001
+010000 st4 st0 000001001
+100000 st4 st4 010001001
+000101 st4 st0 000001001
+001001 st4 st0 000001001
+010001 st4 st0 000001001
+100001 st4 st0 000001001
+000110 st4 st0 000001001
+001010 st4 st0 000001001
+010010 st4 st0 000001001
+100010 st4 st0 000001001
+000111 st4 st13 100001001
+001011 st4 st0 000001001
+001111 st4 st13 100001001
+010011 st4 st0 000001001
+010111 st4 st13 100001001
+011011 st4 st0 000001001
+011111 st4 st13 100001001
+100111 st4 st29 100001001
+101011 st4 st16 000001001
+101111 st4 st29 100001001
+110011 st4 st16 000001001
+110111 st4 st29 100001001
+111011 st4 st16 000001001
+111111 st4 st29 100001001
+000000 st20 st16 000001010
+000001 st20 st20 000001010
+000010 st20 st20 000001010
+000011 st20 st4 000001010
+100011 st20 st20 000001010
+11--00 st20 st16 000001010
+1-1-00 st20 st16 000001010
+1--100 st20 st16 000001010
+-11-00 st20 st16 000001010
+-1-100 st20 st16 000001010
+--1100 st20 st16 000001010
+11--01 st20 st16 000001010
+1-1-01 st20 st16 000001010
+1--101 st20 st16 000001010
+-11-01 st20 st16 000001010
+-1-101 st20 st16 000001010
+--1101 st20 st16 000001010
+11--10 st20 st16 000001010
+1-1-10 st20 st16 000001010
+1--110 st20 st16 000001010
+-11-10 st20 st16 000001010
+-1-110 st20 st16 000001010
+--1110 st20 st16 000001010
+000100 st20 st16 000001010
+001000 st20 st16 000001010
+010000 st20 st16 000001010
+100000 st20 st20 010001010
+000101 st20 st16 000001010
+001001 st20 st16 000001010
+010001 st20 st16 000001010
+100001 st20 st16 000001010
+000110 st20 st16 000001010
+001010 st20 st16 000001010
+010010 st20 st16 000001010
+100010 st20 st16 000001010
+000111 st20 st13 100001010
+001011 st20 st0 000001010
+001111 st20 st13 100001010
+010011 st20 st0 000001010
+010111 st20 st13 100001010
+011011 st20 st0 000001010
+011111 st20 st13 100001010
+100111 st20 st29 100001010
+101011 st20 st16 000001010
+101111 st20 st29 100001010
+110011 st20 st16 000001010
+110111 st20 st29 100001010
+111011 st20 st16 000001010
+111111 st20 st29 100001010
+000001 st5 st0 000001011
+000000 st5 st5 000001011
+000010 st5 st5 000001011
+000011 st5 st5 000001011
+100011 st5 st21 000001011
+11--00 st5 st0 000001011
+1-1-00 st5 st0 000001011
+1--100 st5 st0 000001011
+-11-00 st5 st0 000001011
+-1-100 st5 st0 000001011
+--1100 st5 st0 000001011
+11--01 st5 st0 000001011
+1-1-01 st5 st0 000001011
+1--101 st5 st0 000001011
+-11-01 st5 st0 000001011
+-1-101 st5 st0 000001011
+--1101 st5 st0 000001011
+11--10 st5 st0 000001011
+1-1-10 st5 st0 000001011
+1--110 st5 st0 000001011
+-11-10 st5 st0 000001011
+-1-110 st5 st0 000001011
+--1110 st5 st0 000001011
+000100 st5 st0 000001011
+001000 st5 st0 000001011
+010000 st5 st0 000001011
+100000 st5 st0 000001011
+000101 st5 st5 010001011
+001001 st5 st0 000001011
+010001 st5 st0 000001011
+100001 st5 st0 000001011
+000110 st5 st0 000001011
+001010 st5 st0 000001011
+010010 st5 st0 000001011
+100010 st5 st0 000001011
+000111 st5 st13 100001011
+001011 st5 st0 000001011
+001111 st5 st13 100001011
+010011 st5 st0 000001011
+010111 st5 st13 100001011
+011011 st5 st0 000001011
+011111 st5 st13 100001011
+100111 st5 st29 100001011
+101011 st5 st16 000001011
+101111 st5 st29 100001011
+110011 st5 st16 000001011
+110111 st5 st29 100001011
+111011 st5 st16 000001011
+111111 st5 st29 100001011
+000001 st21 st16 000001100
+000000 st21 st21 000001100
+000010 st21 st21 000001100
+000011 st21 st5 000001100
+100011 st21 st21 000001100
+11--00 st21 st16 000001100
+1-1-00 st21 st16 000001100
+1--100 st21 st16 000001100
+-11-00 st21 st16 000001100
+-1-100 st21 st16 000001100
+--1100 st21 st16 000001100
+11--01 st21 st16 000001100
+1-1-01 st21 st16 000001100
+1--101 st21 st16 000001100
+-11-01 st21 st16 000001100
+-1-101 st21 st16 000001100
+--1101 st21 st16 000001100
+11--10 st21 st16 000001100
+1-1-10 st21 st16 000001100
+1--110 st21 st16 000001100
+-11-10 st21 st16 000001100
+-1-110 st21 st16 000001100
+--1110 st21 st16 000001100
+000100 st21 st16 000001100
+001000 st21 st16 000001100
+010000 st21 st16 000001100
+100000 st21 st16 000001100
+000101 st21 st21 010001100
+001001 st21 st16 000001100
+010001 st21 st16 000001100
+100001 st21 st16 000001100
+000110 st21 st16 000001100
+001010 st21 st16 000001100
+010010 st21 st16 000001100
+100010 st21 st16 000001100
+000111 st21 st13 100001100
+001011 st21 st0 000001100
+001111 st21 st13 100001100
+010011 st21 st0 000001100
+010111 st21 st13 100001100
+011011 st21 st0 000001100
+011111 st21 st13 100001100
+100111 st21 st29 100001100
+101011 st21 st16 000001100
+101111 st21 st29 100001100
+110011 st21 st16 000001100
+110111 st21 st29 100001100
+111011 st21 st16 000001100
+111111 st21 st29 100001100
+000001 st6 st0 000001101
+000000 st6 st6 000001101
+000010 st6 st6 000001101
+000011 st6 st6 000001101
+100011 st6 st22 000001101
+11--00 st6 st0 000001101
+1-1-00 st6 st0 000001101
+1--100 st6 st0 000001101
+-11-00 st6 st0 000001101
+-1-100 st6 st0 000001101
+--1100 st6 st0 000001101
+11--01 st6 st0 000001101
+1-1-01 st6 st0 000001101
+1--101 st6 st0 000001101
+-11-01 st6 st0 000001101
+-1-101 st6 st0 000001101
+--1101 st6 st0 000001101
+11--10 st6 st0 000001101
+1-1-10 st6 st0 000001101
+1--110 st6 st0 000001101
+-11-10 st6 st0 000001101
+-1-110 st6 st0 000001101
+--1110 st6 st0 000001101
+000100 st6 st0 000001101
+001000 st6 st0 000001101
+010000 st6 st0 000001101
+100000 st6 st0 000001101
+000101 st6 st0 000001101
+001001 st6 st6 010001101
+010001 st6 st0 000001101
+100001 st6 st0 000001101
+000110 st6 st0 000001101
+001010 st6 st0 000001101
+010010 st6 st0 000001101
+100010 st6 st0 000001101
+000111 st6 st13 100001101
+001011 st6 st0 000001101
+001111 st6 st13 100001101
+010011 st6 st0 000001101
+010111 st6 st13 100001101
+011011 st6 st0 000001101
+011111 st6 st13 100001101
+100111 st6 st29 100001101
+101011 st6 st16 000001101
+101111 st6 st29 100001101
+110011 st6 st16 000001101
+110111 st6 st29 100001101
+111011 st6 st16 000001101
+111111 st6 st29 100001101
+000001 st22 st16 000001110
+000000 st22 st22 000001110
+000010 st22 st22 000001110
+000011 st22 st6 000001110
+100011 st22 st22 000001110
+11--00 st22 st16 000001110
+1-1-00 st22 st16 000001110
+1--100 st22 st16 000001110
+-11-00 st22 st16 000001110
+-1-100 st22 st16 000001110
+--1100 st22 st16 000001110
+11--01 st22 st16 000001110
+1-1-01 st22 st16 000001110
+1--101 st22 st16 000001110
+-11-01 st22 st16 000001110
+-1-101 st22 st16 000001110
+--1101 st22 st16 000001110
+11--10 st22 st16 000001110
+1-1-10 st22 st16 000001110
+1--110 st22 st16 000001110
+-11-10 st22 st16 000001110
+-1-110 st22 st16 000001110
+--1110 st22 st16 000001110
+000100 st22 st16 000001110
+001000 st22 st16 000001110
+010000 st22 st16 000001110
+100000 st22 st16 000001110
+000101 st22 st16 000001110
+001001 st22 st22 010001110
+010001 st22 st16 000001110
+100001 st22 st16 000001110
+000110 st22 st16 000001110
+001010 st22 st16 000001110
+010010 st22 st16 000001110
+100010 st22 st16 000001110
+000111 st22 st13 100001110
+001011 st22 st0 000001110
+001111 st22 st13 100001110
+010011 st22 st0 000001110
+010111 st22 st13 100001110
+011011 st22 st0 000001110
+011111 st22 st13 100001110
+100111 st22 st29 100001110
+101011 st22 st16 000001110
+101111 st22 st29 100001110
+110011 st22 st16 000001110
+110111 st22 st29 100001110
+111011 st22 st16 000001110
+111111 st22 st29 100001110
+000001 st7 st0 000001111
+000000 st7 st7 000001111
+000010 st7 st7 000001111
+000011 st7 st7 000001111
+100011 st7 st23 000001111
+11--00 st7 st0 000001111
+1-1-00 st7 st0 000001111
+1--100 st7 st0 000001111
+-11-00 st7 st0 000001111
+-1-100 st7 st0 000001111
+--1100 st7 st0 000001111
+11--01 st7 st0 000001111
+1-1-01 st7 st0 000001111
+1--101 st7 st0 000001111
+-11-01 st7 st0 000001111
+-1-101 st7 st0 000001111
+--1101 st7 st0 000001111
+11--10 st7 st0 000001111
+1-1-10 st7 st0 000001111
+1--110 st7 st0 000001111
+-11-10 st7 st0 000001111
+-1-110 st7 st0 000001111
+--1110 st7 st0 000001111
+000100 st7 st0 000001111
+001000 st7 st0 000001111
+010000 st7 st0 000001111
+100000 st7 st0 000001111
+000101 st7 st0 000001111
+001001 st7 st0 000001111
+010001 st7 st7 010001111
+100001 st7 st0 000001111
+000110 st7 st0 000001111
+001010 st7 st0 000001111
+010010 st7 st0 000001111
+100010 st7 st0 000001111
+000111 st7 st13 100001111
+001011 st7 st0 000001111
+001111 st7 st13 100001111
+010011 st7 st0 000001111
+010111 st7 st13 100001111
+011011 st7 st0 000001111
+011111 st7 st13 100001111
+100111 st7 st29 100001111
+101011 st7 st16 000001111
+101111 st7 st29 100001111
+110011 st7 st16 000001111
+110111 st7 st29 100001111
+111011 st7 st16 000001111
+111111 st7 st29 100001111
+000001 st23 st16 000010000
+000000 st23 st23 000010000
+000010 st23 st23 000010000
+000011 st23 st7 000010000
+100011 st23 st23 000010000
+11--00 st23 st16 000010000
+1-1-00 st23 st16 000010000
+1--100 st23 st16 000010000
+-11-00 st23 st16 000010000
+-1-100 st23 st16 000010000
+--1100 st23 st16 000010000
+11--01 st23 st16 000010000
+1-1-01 st23 st16 000010000
+1--101 st23 st16 000010000
+-11-01 st23 st16 000010000
+-1-101 st23 st16 000010000
+--1101 st23 st16 000010000
+11--10 st23 st16 000010000
+1-1-10 st23 st16 000010000
+1--110 st23 st16 000010000
+-11-10 st23 st16 000010000
+-1-110 st23 st16 000010000
+--1110 st23 st16 000010000
+000100 st23 st16 000010000
+001000 st23 st16 000010000
+010000 st23 st16 000010000
+100000 st23 st16 000010000
+000101 st23 st16 000010000
+001001 st23 st16 000010000
+010001 st23 st23 010010000
+100001 st23 st16 000010000
+000110 st23 st16 000010000
+001010 st23 st16 000010000
+010010 st23 st16 000010000
+100010 st23 st16 000010000
+000111 st23 st13 100010000
+001011 st23 st0 000010000
+001111 st23 st13 100010000
+010011 st23 st0 000010000
+010111 st23 st13 100010000
+011011 st23 st0 000010000
+011111 st23 st13 100010000
+100111 st23 st29 100010000
+101011 st23 st16 000010000
+101111 st23 st29 100010000
+110011 st23 st16 000010000
+110111 st23 st29 100010000
+111011 st23 st16 000010000
+111111 st23 st29 100010000
+000001 st8 st0 000010001
+000000 st8 st8 000010001
+000010 st8 st8 000010001
+000011 st8 st8 000010001
+100011 st8 st24 000010001
+11--00 st8 st0 000010001
+1-1-00 st8 st0 000010001
+1--100 st8 st0 000010001
+-11-00 st8 st0 000010001
+-1-100 st8 st0 000010001
+--1100 st8 st0 000010001
+11--01 st8 st0 000010001
+1-1-01 st8 st0 000010001
+1--101 st8 st0 000010001
+-11-01 st8 st0 000010001
+-1-101 st8 st0 000010001
+--1101 st8 st0 000010001
+11--10 st8 st0 000010001
+1-1-10 st8 st0 000010001
+1--110 st8 st0 000010001
+-11-10 st8 st0 000010001
+-1-110 st8 st0 000010001
+--1110 st8 st0 000010001
+000100 st8 st0 000010001
+001000 st8 st0 000010001
+010000 st8 st0 000010001
+100000 st8 st0 000010001
+000101 st8 st0 000010001
+001001 st8 st0 000010001
+010001 st8 st0 000010001
+100001 st8 st8 010010001
+000110 st8 st0 000010001
+001010 st8 st0 000010001
+010010 st8 st0 000010001
+100010 st8 st0 000010001
+000111 st8 st13 100010001
+001011 st8 st0 000010001
+001111 st8 st13 100010001
+010011 st8 st0 000010001
+010111 st8 st13 100010001
+011011 st8 st0 000010001
+011111 st8 st13 100010001
+100111 st8 st29 100010001
+101011 st8 st16 000010001
+101111 st8 st29 100010001
+110011 st8 st16 000010001
+110111 st8 st29 100010001
+111011 st8 st16 000010001
+111111 st8 st29 100010001
+000001 st24 st16 000010010
+000000 st24 st24 000010010
+000010 st24 st24 000010010
+000011 st24 st8 000010010
+100011 st24 st24 000010010
+11--00 st24 st16 000010010
+1-1-00 st24 st16 000010010
+1--100 st24 st16 000010010
+-11-00 st24 st16 000010010
+-1-100 st24 st16 000010010
+--1100 st24 st16 000010010
+11--01 st24 st16 000010010
+1-1-01 st24 st16 000010010
+1--101 st24 st16 000010010
+-11-01 st24 st16 000010010
+-1-101 st24 st16 000010010
+--1101 st24 st16 000010010
+11--10 st24 st16 000010010
+1-1-10 st24 st16 000010010
+1--110 st24 st16 000010010
+-11-10 st24 st16 000010010
+-1-110 st24 st16 000010010
+--1110 st24 st16 000010010
+000100 st24 st16 000010010
+001000 st24 st16 000010010
+010000 st24 st16 000010010
+100000 st24 st16 000010010
+000101 st24 st16 000010010
+001001 st24 st16 000010010
+010001 st24 st16 000010010
+100001 st24 st24 010010010
+000110 st24 st16 000010010
+001010 st24 st16 000010010
+010010 st24 st16 000010010
+100010 st24 st16 000010010
+000111 st24 st13 100010010
+001011 st24 st0 000010010
+001111 st24 st13 100010010
+010011 st24 st0 000010010
+010111 st24 st13 100010010
+011011 st24 st0 000010010
+011111 st24 st13 100010010
+100111 st24 st29 100010010
+101011 st24 st16 000010010
+101111 st24 st29 100010010
+110011 st24 st16 000010010
+110111 st24 st29 100010010
+111011 st24 st16 000010010
+111111 st24 st29 100010010
+000010 st9 st0 000010011
+000001 st9 st9 000010011
+000000 st9 st9 000010011
+000011 st9 st9 000010011
+100011 st9 st25 000010011
+11--00 st9 st0 000010011
+1-1-00 st9 st0 000010011
+1--100 st9 st0 000010011
+-11-00 st9 st0 000010011
+-1-100 st9 st0 000010011
+--1100 st9 st0 000010011
+11--01 st9 st0 000010011
+1-1-01 st9 st0 000010011
+1--101 st9 st0 000010011
+-11-01 st9 st0 000010011
+-1-101 st9 st0 000010011
+--1101 st9 st0 000010011
+11--10 st9 st0 000010011
+1-1-10 st9 st0 000010011
+1--110 st9 st0 000010011
+-11-10 st9 st0 000010011
+-1-110 st9 st0 000010011
+--1110 st9 st0 000010011
+000100 st9 st0 000010011
+001000 st9 st0 000010011
+010000 st9 st0 000010011
+100000 st9 st0 000010011
+000101 st9 st0 000010011
+001001 st9 st0 000010011
+010001 st9 st0 000010011
+100001 st9 st0 000010011
+000110 st9 st9 010010011
+001010 st9 st0 000010011
+010010 st9 st0 000010011
+100010 st9 st0 000010011
+000111 st9 st13 100010011
+001011 st9 st0 000010011
+001111 st9 st13 100010011
+010011 st9 st0 000010011
+010111 st9 st13 100010011
+011011 st9 st0 000010011
+011111 st9 st13 100010011
+100111 st9 st29 100010011
+101011 st9 st16 000010011
+101111 st9 st29 100010011
+110011 st9 st16 000010011
+110111 st9 st29 100010011
+111011 st9 st16 000010011
+111111 st9 st29 100010011
+000010 st25 st16 000010100
+000001 st25 st25 000010100
+000000 st25 st25 000010100
+000011 st25 st9 000010100
+100011 st25 st25 000010100
+11--00 st25 st16 000010100
+1-1-00 st25 st16 000010100
+1--100 st25 st16 000010100
+-11-00 st25 st16 000010100
+-1-100 st25 st16 000010100
+--1100 st25 st16 000010100
+11--01 st25 st16 000010100
+1-1-01 st25 st16 000010100
+1--101 st25 st16 000010100
+-11-01 st25 st16 000010100
+-1-101 st25 st16 000010100
+--1101 st25 st16 000010100
+11--10 st25 st16 000010100
+1-1-10 st25 st16 000010100
+1--110 st25 st16 000010100
+-11-10 st25 st16 000010100
+-1-110 st25 st16 000010100
+--1110 st25 st16 000010100
+000100 st25 st16 000010100
+001000 st25 st16 000010100
+010000 st25 st16 000010100
+100000 st25 st16 000010100
+000101 st25 st16 000010100
+001001 st25 st16 000010100
+010001 st25 st16 000010100
+100001 st25 st16 000010100
+000110 st25 st25 010010100
+001010 st25 st16 000010100
+010010 st25 st16 000010100
+100010 st25 st16 000010100
+000111 st25 st13 100010100
+001011 st25 st0 000010100
+001111 st25 st13 100010100
+010011 st25 st0 000010100
+010111 st25 st13 100010100
+011011 st25 st0 000010100
+011111 st25 st13 100010100
+100111 st25 st29 100010100
+101011 st25 st16 000010100
+101111 st25 st29 100010100
+110011 st25 st16 000010100
+110111 st25 st29 100010100
+111011 st25 st16 000010100
+111111 st25 st29 100010100
+000010 st10 st0 000010101
+000001 st10 st10 000010101
+000000 st10 st10 000010101
+000011 st10 st10 000010101
+100011 st10 st26 000010101
+11--00 st10 st0 000010101
+1-1-00 st10 st0 000010101
+1--100 st10 st0 000010101
+-11-00 st10 st0 000010101
+-1-100 st10 st0 000010101
+--1100 st10 st0 000010101
+11--01 st10 st0 000010101
+1-1-01 st10 st0 000010101
+1--101 st10 st0 000010101
+-11-01 st10 st0 000010101
+-1-101 st10 st0 000010101
+--1101 st10 st0 000010101
+11--10 st10 st0 000010101
+1-1-10 st10 st0 000010101
+1--110 st10 st0 000010101
+-11-10 st10 st0 000010101
+-1-110 st10 st0 000010101
+--1110 st10 st0 000010101
+000100 st10 st0 000010101
+001000 st10 st0 000010101
+010000 st10 st0 000010101
+100000 st10 st0 000010101
+000101 st10 st0 000010101
+001001 st10 st0 000010101
+010001 st10 st0 000010101
+100001 st10 st0 000010101
+000110 st10 st0 000010101
+001010 st10 st10 010010101
+010010 st10 st0 000010101
+100010 st10 st0 000010101
+000111 st10 st13 100010101
+001011 st10 st0 000010101
+001111 st10 st13 100010101
+010011 st10 st0 000010101
+010111 st10 st13 100010101
+011011 st10 st0 000010101
+011111 st10 st13 100010101
+100111 st10 st29 100010101
+101011 st10 st16 000010101
+101111 st10 st29 100010101
+110011 st10 st16 000010101
+110111 st10 st29 100010101
+111011 st10 st16 000010101
+111111 st10 st29 100010101
+000010 st26 st16 000010110
+000001 st26 st26 000010110
+000000 st26 st26 000010110
+000011 st26 st10 000010110
+100011 st26 st26 000010110
+11--00 st26 st16 000010110
+1-1-00 st26 st16 000010110
+1--100 st26 st16 000010110
+-11-00 st26 st16 000010110
+-1-100 st26 st16 000010110
+--1100 st26 st16 000010110
+11--01 st26 st16 000010110
+1-1-01 st26 st16 000010110
+1--101 st26 st16 000010110
+-11-01 st26 st16 000010110
+-1-101 st26 st16 000010110
+--1101 st26 st16 000010110
+11--10 st26 st16 000010110
+1-1-10 st26 st16 000010110
+1--110 st26 st16 000010110
+-11-10 st26 st16 000010110
+-1-110 st26 st16 000010110
+--1110 st26 st16 000010110
+000100 st26 st16 000010110
+001000 st26 st16 000010110
+010000 st26 st16 000010110
+100000 st26 st16 000010110
+000101 st26 st16 000010110
+001001 st26 st16 000010110
+010001 st26 st16 000010110
+100001 st26 st16 000010110
+000110 st26 st16 000010110
+001010 st26 st26 010010110
+010010 st26 st16 000010110
+100010 st26 st16 000010110
+000111 st26 st13 100010110
+001011 st26 st0 000010110
+001111 st26 st13 100010110
+010011 st26 st0 000010110
+010111 st26 st13 100010110
+011011 st26 st0 000010110
+011111 st26 st13 100010110
+100111 st26 st29 100010110
+101011 st26 st16 000010110
+101111 st26 st29 100010110
+110011 st26 st16 000010110
+110111 st26 st29 100010110
+111011 st26 st16 000010110
+111111 st26 st29 100010110
+000010 st11 st0 000010111
+000001 st11 st11 000010111
+000000 st11 st11 000010111
+000011 st11 st11 000010111
+100011 st11 st27 000010111
+11--00 st11 st0 000010111
+1-1-00 st11 st0 000010111
+1--100 st11 st0 000010111
+-11-00 st11 st0 000010111
+-1-100 st11 st0 000010111
+--1100 st11 st0 000010111
+11--01 st11 st0 000010111
+1-1-01 st11 st0 000010111
+1--101 st11 st0 000010111
+-11-01 st11 st0 000010111
+-1-101 st11 st0 000010111
+--1101 st11 st0 000010111
+11--10 st11 st0 000010111
+1-1-10 st11 st0 000010111
+1--110 st11 st0 000010111
+-11-10 st11 st0 000010111
+-1-110 st11 st0 000010111
+--1110 st11 st0 000010111
+000100 st11 st0 000010111
+001000 st11 st0 000010111
+010000 st11 st0 000010111
+100000 st11 st0 000010111
+000101 st11 st0 000010111
+001001 st11 st0 000010111
+010001 st11 st0 000010111
+100001 st11 st0 000010111
+000110 st11 st0 000010111
+001010 st11 st0 000010111
+010010 st11 st11 010010111
+100010 st11 st0 000010111
+000111 st11 st13 100010111
+001011 st11 st0 000010111
+001111 st11 st13 100010111
+010011 st11 st0 000010111
+010111 st11 st13 100010111
+011011 st11 st0 000010111
+011111 st11 st13 100010111
+100111 st11 st29 100010111
+101011 st11 st16 000010111
+101111 st11 st29 100010111
+110011 st11 st16 000010111
+110111 st11 st29 100010111
+111011 st11 st16 000010111
+111111 st11 st29 100010111
+000010 st27 st16 000011000
+000001 st27 st27 000011000
+000000 st27 st27 000011000
+000011 st27 st11 000011000
+100011 st27 st27 000011000
+11--00 st27 st16 000011000
+1-1-00 st27 st16 000011000
+1--100 st27 st16 000011000
+-11-00 st27 st16 000011000
+-1-100 st27 st16 000011000
+--1100 st27 st16 000011000
+11--01 st27 st16 000011000
+1-1-01 st27 st16 000011000
+1--101 st27 st16 000011000
+-11-01 st27 st16 000011000
+-1-101 st27 st16 000011000
+--1101 st27 st16 000011000
+11--10 st27 st16 000011000
+1-1-10 st27 st16 000011000
+1--110 st27 st16 000011000
+-11-10 st27 st16 000011000
+-1-110 st27 st16 000011000
+--1110 st27 st16 000011000
+000100 st27 st16 000011000
+001000 st27 st16 000011000
+010000 st27 st16 000011000
+100000 st27 st16 000011000
+000101 st27 st16 000011000
+001001 st27 st16 000011000
+010001 st27 st16 000011000
+100001 st27 st16 000011000
+000110 st27 st16 000011000
+001010 st27 st16 000011000
+010010 st27 st27 010011000
+100010 st27 st16 000011000
+000111 st27 st13 100011000
+001011 st27 st0 000011000
+001111 st27 st13 100011000
+010011 st27 st0 000011000
+010111 st27 st13 100011000
+011011 st27 st0 000011000
+011111 st27 st13 100011000
+100111 st27 st29 100011000
+101011 st27 st16 000011000
+101111 st27 st29 100011000
+110011 st27 st16 000011000
+110111 st27 st29 100011000
+111011 st27 st16 000011000
+111111 st27 st29 100011000
+000010 st12 st0 000011001
+000001 st12 st12 000011001
+000000 st12 st12 000011001
+000011 st12 st12 000011001
+100011 st12 st28 000011001
+11--00 st12 st0 000011001
+1-1-00 st12 st0 000011001
+1--100 st12 st0 000011001
+-11-00 st12 st0 000011001
+-1-100 st12 st0 000011001
+--1100 st12 st0 000011001
+11--01 st12 st0 000011001
+1-1-01 st12 st0 000011001
+1--101 st12 st0 000011001
+-11-01 st12 st0 000011001
+-1-101 st12 st0 000011001
+--1101 st12 st0 000011001
+11--10 st12 st0 000011001
+1-1-10 st12 st0 000011001
+1--110 st12 st0 000011001
+-11-10 st12 st0 000011001
+-1-110 st12 st0 000011001
+--1110 st12 st0 000011001
+000100 st12 st0 000011001
+001000 st12 st0 000011001
+010000 st12 st0 000011001
+100000 st12 st0 000011001
+000101 st12 st0 000011001
+001001 st12 st0 000011001
+010001 st12 st0 000011001
+100001 st12 st0 000011001
+000110 st12 st0 000011001
+001010 st12 st0 000011001
+010010 st12 st0 000011001
+100010 st12 st12 010011001
+000111 st12 st13 100011001
+001011 st12 st0 000011001
+001111 st12 st13 100011001
+010011 st12 st0 000011001
+010111 st12 st13 100011001
+011011 st12 st0 000011001
+011111 st12 st13 100011001
+100111 st12 st29 100011001
+101011 st12 st16 000011001
+101111 st12 st29 100011001
+110011 st12 st16 000011001
+110111 st12 st29 100011001
+111011 st12 st16 000011001
+111111 st12 st29 100011001
+000010 st28 st16 000011010
+000001 st28 st28 000011010
+000000 st28 st28 000011010
+000011 st28 st12 000011010
+100011 st28 st28 000011010
+11--00 st28 st16 000011010
+1-1-00 st28 st16 000011010
+1--100 st28 st16 000011010
+-11-00 st28 st16 000011010
+-1-100 st28 st16 000011010
+--1100 st28 st16 000011010
+11--01 st28 st16 000011010
+1-1-01 st28 st16 000011010
+1--101 st28 st16 000011010
+-11-01 st28 st16 000011010
+-1-101 st28 st16 000011010
+--1101 st28 st16 000011010
+11--10 st28 st16 000011010
+1-1-10 st28 st16 000011010
+1--110 st28 st16 000011010
+-11-10 st28 st16 000011010
+-1-110 st28 st16 000011010
+--1110 st28 st16 000011010
+000100 st28 st16 000011010
+001000 st28 st16 000011010
+010000 st28 st16 000011010
+100000 st28 st16 000011010
+000101 st28 st16 000011010
+001001 st28 st16 000011010
+010001 st28 st16 000011010
+100001 st28 st16 000011010
+000110 st28 st16 000011010
+001010 st28 st16 000011010
+010010 st28 st16 000011010
+100010 st28 st28 010011010
+000111 st28 st13 100011010
+001011 st28 st0 000011010
+001111 st28 st13 100011010
+010011 st28 st0 000011010
+010111 st28 st13 100011010
+011011 st28 st0 000011010
+011111 st28 st13 100011010
+100111 st28 st29 100011010
+101011 st28 st16 000011010
+101111 st28 st29 100011010
+110011 st28 st16 000011010
+110111 st28 st29 100011010
+111011 st28 st16 000011010
+111111 st28 st29 100011010
+000011 st13 st0 000011011
+100011 st13 st16 000011011
+000001 st13 st13 100011011
+000010 st13 st13 100011011
+000000 st13 st13 100011011
+11--00 st13 st0 000011011
+1-1-00 st13 st0 000011011
+1--100 st13 st0 000011011
+-11-00 st13 st0 000011011
+-1-100 st13 st0 000011011
+--1100 st13 st0 000011011
+11--01 st13 st0 000011011
+1-1-01 st13 st0 000011011
+1--101 st13 st0 000011011
+-11-01 st13 st0 000011011
+-1-101 st13 st0 000011011
+--1101 st13 st0 000011011
+11--10 st13 st0 000011011
+1-1-10 st13 st0 000011011
+1--110 st13 st0 000011011
+-11-10 st13 st0 000011011
+-1-110 st13 st0 000011011
+--1110 st13 st0 000011011
+000100 st13 st0 000011011
+001000 st13 st0 000011011
+010000 st13 st0 000011011
+100000 st13 st0 000011011
+000101 st13 st0 000011011
+001001 st13 st0 000011011
+010001 st13 st0 000011011
+100001 st13 st0 000011011
+000110 st13 st0 000011011
+001010 st13 st0 000011011
+010010 st13 st0 000011011
+100010 st13 st0 000011011
+000111 st13 st13 100011011
+001011 st13 st0 000011011
+001111 st13 st13 100011011
+010011 st13 st0 000011011
+010111 st13 st13 100011011
+011011 st13 st0 000011011
+011111 st13 st13 100011011
+100111 st13 st29 100011011
+101011 st13 st16 000011011
+101111 st13 st29 100011011
+110011 st13 st16 000011011
+110111 st13 st29 100011011
+111011 st13 st16 000011011
+111111 st13 st29 100011011
+000011 st29 st0 000011100
+100011 st29 st16 000011100
+000001 st29 st29 100011100
+000010 st29 st29 100011100
+000000 st29 st29 100011100
+11--00 st29 st16 000011100
+1-1-00 st29 st16 000011100
+1--100 st29 st16 000011100
+-11-00 st29 st16 000011100
+-1-100 st29 st16 000011100
+--1100 st29 st16 000011100
+11--01 st29 st16 000011100
+1-1-01 st29 st16 000011100
+1--101 st29 st16 000011100
+-11-01 st29 st16 000011100
+-1-101 st29 st16 000011100
+--1101 st29 st16 000011100
+11--10 st29 st16 000011100
+1-1-10 st29 st16 000011100
+1--110 st29 st16 000011100
+-11-10 st29 st16 000011100
+-1-110 st29 st16 000011100
+--1110 st29 st16 000011100
+000100 st29 st16 000011100
+001000 st29 st16 000011100
+010000 st29 st16 000011100
+100000 st29 st16 000011100
+000101 st29 st16 000011100
+001001 st29 st16 000011100
+010001 st29 st16 000011100
+100001 st29 st16 000011100
+000110 st29 st16 000011100
+001010 st29 st16 000011100
+010010 st29 st16 000011100
+100010 st29 st16 000011100
+000111 st29 st13 100011100
+001011 st29 st0 000011100
+001111 st29 st13 100011100
+010011 st29 st0 000011100
+010111 st29 st13 100011100
+011011 st29 st0 000011100
+011111 st29 st13 100011100
+100111 st29 st29 100011100
+101011 st29 st16 000011100
+101111 st29 st29 100011100
+110011 st29 st16 000011100
+110111 st29 st29 100011100
+111011 st29 st16 000011100
+111111 st29 st29 100011100
+000011 st15 st0 000011101
+100011 st15 st16 000011101
+000001 st15 st15 000011101
+000010 st15 st15 000011101
+000000 st15 st15 000011101
+11--00 st15 st0 000011101
+1-1-00 st15 st0 000011101
+1--100 st15 st0 000011101
+-11-00 st15 st0 000011101
+-1-100 st15 st0 000011101
+--1100 st15 st0 000011101
+11--01 st15 st0 000011101
+1-1-01 st15 st0 000011101
+1--101 st15 st0 000011101
+-11-01 st15 st0 000011101
+-1-101 st15 st0 000011101
+--1101 st15 st0 000011101
+11--10 st15 st0 000011101
+1-1-10 st15 st0 000011101
+1--110 st15 st0 000011101
+-11-10 st15 st0 000011101
+-1-110 st15 st0 000011101
+--1110 st15 st0 000011101
+000100 st15 st0 000011101
+001000 st15 st0 000011101
+010000 st15 st0 000011101
+100000 st15 st0 000011101
+000101 st15 st0 000011101
+001001 st15 st0 000011101
+010001 st15 st0 000011101
+100001 st15 st0 000011101
+000110 st15 st0 000011101
+001010 st15 st0 000011101
+010010 st15 st0 000011101
+100010 st15 st0 000011101
+000111 st15 st13 100011101
+001011 st15 st15 011011101
+001111 st15 st13 100011101
+010011 st15 st0 000011101
+010111 st15 st13 100011101
+011011 st15 st0 000011101
+011111 st15 st13 100011101
+100111 st15 st29 100011101
+101011 st15 st31 011011101
+101111 st15 st29 100011101
+110011 st15 st16 000011101
+110111 st15 st29 100011101
+111011 st15 st16 000011101
+111111 st15 st29 100011101
+000011 st31 st0 000011110
+100011 st31 st16 000011110
+000001 st31 st31 000011110
+000010 st31 st31 000011110
+000000 st31 st31 000011110
+11--00 st31 st16 000011110
+1-1-00 st31 st16 000011110
+1--100 st31 st16 000011110
+-11-00 st31 st16 000011110
+-1-100 st31 st16 000011110
+--1100 st31 st16 000011110
+11--01 st31 st16 000011110
+1-1-01 st31 st16 000011110
+1--101 st31 st16 000011110
+-11-01 st31 st16 000011110
+-1-101 st31 st16 000011110
+--1101 st31 st16 000011110
+11--10 st31 st16 000011110
+1-1-10 st31 st16 000011110
+1--110 st31 st16 000011110
+-11-10 st31 st16 000011110
+-1-110 st31 st16 000011110
+--1110 st31 st16 000011110
+000100 st31 st16 000011110
+001000 st31 st16 000011110
+010000 st31 st16 000011110
+100000 st31 st16 000011110
+000101 st31 st16 000011110
+001001 st31 st16 000011110
+010001 st31 st16 000011110
+100001 st31 st16 000011110
+000110 st31 st16 000011110
+001010 st31 st16 000011110
+010010 st31 st16 000011110
+100010 st31 st16 000011110
+000111 st31 st13 100011110
+001011 st31 st15 011011110
+001111 st31 st13 100011110
+010011 st31 st0 000011110
+010111 st31 st13 100011110
+011011 st31 st0 000011110
+011111 st31 st13 100011110
+100111 st31 st29 100011110
+101011 st31 st31 011011110
+101111 st31 st29 100011110
+110011 st31 st16 000011110
+110111 st31 st29 100011110
+111011 st31 st16 000011110
+111111 st31 st29 100011110
+000011 st14 st0 000011111
+100011 st14 st16 000011111
+000001 st14 st14 000011111
+000010 st14 st14 000011111
+000000 st14 st14 000011111
+11--00 st14 st0 000011111
+1-1-00 st14 st0 000011111
+1--100 st14 st0 000011111
+-11-00 st14 st0 000011111
+-1-100 st14 st0 000011111
+--1100 st14 st0 000011111
+11--01 st14 st0 000011111
+1-1-01 st14 st0 000011111
+1--101 st14 st0 000011111
+-11-01 st14 st0 000011111
+-1-101 st14 st0 000011111
+--1101 st14 st0 000011111
+11--10 st14 st0 000011111
+1-1-10 st14 st0 000011111
+1--110 st14 st0 000011111
+-11-10 st14 st0 000011111
+-1-110 st14 st0 000011111
+--1110 st14 st0 000011111
+000100 st14 st0 000011111
+001000 st14 st0 000011111
+010000 st14 st0 000011111
+100000 st14 st0 000011111
+000101 st14 st0 000011111
+001001 st14 st0 000011111
+010001 st14 st0 000011111
+100001 st14 st0 000011111
+000110 st14 st0 000011111
+001010 st14 st0 000011111
+010010 st14 st0 000011111
+100010 st14 st0 000011111
+000111 st14 st13 100011111
+001011 st14 st0 000011111
+001111 st14 st13 100011111
+010011 st14 st14 001011111
+010111 st14 st13 100011111
+011011 st14 st0 000011111
+011111 st14 st13 100011111
+100111 st14 st29 100011111
+101011 st14 st16 000011111
+101111 st14 st29 100011111
+110011 st14 st30 001011111
+110111 st14 st29 100011111
+111011 st14 st16 000011111
+111111 st14 st29 100011111
+000011 st30 st0 000100000
+100011 st30 st16 000100000
+000001 st30 st30 000100000
+000010 st30 st30 000100000
+000000 st30 st30 000100000
+11--00 st30 st16 000100000
+1-1-00 st30 st16 000100000
+1--100 st30 st16 000100000
+-11-00 st30 st16 000100000
+-1-100 st30 st16 000100000
+--1100 st30 st16 000100000
+11--01 st30 st16 000100000
+1-1-01 st30 st16 000100000
+1--101 st30 st16 000100000
+-11-01 st30 st16 000100000
+-1-101 st30 st16 000100000
+--1101 st30 st16 000100000
+11--10 st30 st16 000100000
+1-1-10 st30 st16 000100000
+1--110 st30 st16 000100000
+-11-10 st30 st16 000100000
+-1-110 st30 st16 000100000
+--1110 st30 st16 000100000
+000100 st30 st16 000100000
+001000 st30 st16 000100000
+010000 st30 st16 000100000
+100000 st30 st16 000100000
+000101 st30 st16 000100000
+001001 st30 st16 000100000
+010001 st30 st16 000100000
+100001 st30 st16 000100000
+000110 st30 st16 000100000
+001010 st30 st16 000100000
+010010 st30 st16 000100000
+100010 st30 st16 000100000
+000111 st30 st13 100100000
+001011 st30 st0 000100000
+001111 st30 st13 100100000
+010011 st30 st14 001100000
+010111 st30 st13 100100000
+011011 st30 st0 000100000
+011111 st30 st13 100100000
+100111 st30 st29 100100000
+101011 st30 st16 000100000
+101111 st30 st29 100100000
+110011 st30 st30 001100000
+110111 st30 st29 100100000
+111011 st30 st16 000100000
+111111 st30 st29 100100000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/exdev.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,130 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+
+% develop Local ITL formula into state diagram
+%
+% Mon May 20 17:24:23 BST 1991
+% require([chop]).
+
+:-dynamic verbose/0,state/2,links/2.
+:-dynamic stay/3.
+
+:-assert(verbose).
+verbose(off) :- retract(verbose),fail;true.
+verbose(on) :- asserta(verbose).
+
+deve(ITL) :-
+	init,!,
+	expand(ITL,ITL0),		% chop standard form
+	itlstd(ITL0,StdNOW),		% BDT
+	assert(itl_state(StdNOW,1)),!,  % Initial State
+	deve0((1,ITL0)).
+
+deve0((S,ITL)) :-
+%        increment_state(ITL,ITL_1,S),
+        show_state(S,ITL),
+%	setof(Next,itldecomp(ITL,Next,S),
+	bagof(Next,itldecomp(ITL,Next,S),
+	    Nexts),!,
+	deve1(Nexts).
+deve0(_).
+
+deve1([]).
+deve1([H|T]) :- deve0(H),deve1(T).
+
+itldecomp(ITL,(NextS,Next),From) :-
+	init_var(current,From),
+	itl(ITL,Next,Cond),
+	%% showing
+	itlshow(Next,NextS,Cond,From).
+
+itlshow(Next,S,Cond,From):-
+	itlstd(Next,StdNext),
+	check_state(StdNext,Cond,New,S),
+	inc_var(itl_transition,_),
+	assertz(state(From,Cond,S)),
+	(links(S,From),!;assertz(links(S,From))),
+	!,
+	itlshow0(S,Cond,Next,New).
+
+itlshow0(S,Cond,Next,New) :- verbose,!,
+	itlshow1(S,Cond,Next,New),nl,!,New=1.
+itlshow0(0,_,_,0):- !,put(101),!,fail.   % "e"
+itlshow0(false,_,_,0):- !,put(102),!,fail.  % "f"
+itlshow0(true,_,_,0):- !,put(116),!,fail.  % "t"
+itlshow0(_,_,_,0):- !,put(46),!,fail.    % "."
+itlshow0(S,_,_,1):- !,write(S),put(46),ttyflush,!.  % "."
+
+itlshow1(0,Cond,_,_):-!,
+	write(Cond),write('->'),write(empty).
+itlshow1(true,Cond,_,_):-!,
+	write(Cond),write('->'),write(true).
+itlshow1(false,Cond,_,_):-!,
+	write(Cond),write('->'),write(false).
+itlshow1(S,Cond,_,0):-!,
+	write(Cond),write('->'),write(S).
+itlshow1(S,Cond,Org,1):-
+	write(Cond),write('->'),write(S),
+	put(9),write(Org),!.
+
+init :-
+	subterm_init,
+	abolish(state,3),
+	asserta(state(true,[more],true)),
+	asserta(state(true,[empty],0)),
+        abolish(itl_state,2),
+        abolish(stay,3),asserta(stay(0,0,0)),
+        asserta(itl_state(false,false)),
+        asserta(itl_state(empty,0)),
+        asserta(itl_state(true,true)),
+	abolish(links,2),asserta(links(true,true)),
+	init_var(itl_transition,1),
+	init_var(itl_state_number,1),!.
+
+show_state(S,ITL) :-
+	nl,write('state('),write(S),  % (
+	(verbose,write(' , '), write(ITL),write(')'),nl;write(')')),!.
+
+check_state(true,[more |_],0,true):-!.
+check_state(true,[empty|_],0,0):-!.
+check_state(false,_,0,false):-!.
+check_state(STD,_,0,S):-
+	itl_state(STD,S),!.
+check_state(STD,_,1,S):-
+	inc_var(itl_state_number,S),
+	assert(itl_state(STD,S)),!.
+
+init_var(X,_) :- functor(F,X,1),assert(F),fail.
+init_var(X,_) :- functor(F,X,1),retract(F),fail.
+init_var(X,V) :- functor(F,X,1),arg(1,F,V),assert(F),!.
+inc_var(Name,X1) :- 
+        functor(F,Name,1),retract(F),arg(1,F,X),
+        X1 is X+1,functor(F1,Name,1),arg(1,F1,X1),
+        asserta(F1),!.
+
+%init_var(X,_) :- recorded(X,_,Ref),erase(Ref),fail.
+%init_var(X,V) :- recorda(X,V,_).
+%inc_var(Name,X1) :- 
+%	recorded(Name,X,Ref),X1 is X+1,
+%	erase(Ref),recorda(Name,X1,_).
+
+increment_state(stay(P,now),stay(P,S),S) :- !,
+      (stay(P,F,S);assertz(stay(P,F,S))),!.
+increment_state(N,N,_) :- atomic(N),!.
+increment_state(P,R,S) :- functor(P,H,N),functor(R,H,N),
+      increment_state_arg(N,P,R,S).
+increment_state_arg(0,_P,_R,_):-!.
+increment_state_arg(N,P,R,S):-arg(N,P,PA),arg(N,R,RA),
+      N1 is N-1,increment_state(PA,RA,S),
+      increment_state_arg(N1,P,R,S).
+
+/* end */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gm/demoi	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,7 @@
+:- use_module(library(gmlib)).
+
+:-[init],compile(display).
+% :-start.
+% :-display.
+
+display(Host) :- start(Host),display.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gm/demoim	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,25 @@
+% Sat May 22 11:43:11 JST 1993
+
+:- use_module(library(gmlib)).
+
+?-op(900,xfy,[(&),('&&')]).
+?-op(700,xfy,['<->','\=',proj]).
+?-op(60,fy,['~','#','<>', '@',^]).
+?-op(60,fy,[*]).
+
+:-
+  unix(system('make tmpa M=lite:')),
+  ['.tmpc'],
+  unix(system('make display M=lite:')),
+  ['.tmpc'].
+
+make :- unix(system('make M=lite:')),consult(lite:['.tmpc','.tmpl']).
+
+:- use_module(lite).
+:- load(lite:[ex,kiss_ex,display]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gm/display.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,269 @@
+%
+% Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+%                                  The University, Newcastle upton Tyne
+%
+% Everyone is permitted to copy and distribute verbatim copies
+% of this license, but changing it is not allowed.  You can also
+% use this wording to make the terms for other programs.
+%
+% Please, send your comments to kono@csl.sony.co.jp
+% $Id$
+%
+% Display Interface for ITL Verifier
+%    Using SICStus Prolog's Graphic Manager ( InterViews Package)
+%
+
+:- use_module(library(gmlib)).
+
+:-dynamic font/2.
+
+small :- (retract(font(_,_));true),assert(font("7x14",14)).
+large :- (retract(font(_,_));true),assert(font("12x24",24)).
+
+:-small.
+% font("7x14",14).
+
+width(W,H):-
+   font(_,Fs),
+   W is integer(1000/24*Fs), H is integer(500/24*Fs).
+
+display:-
+   tell(tmp),told,see(tmp),seen,
+   font(Font,_),width(W,H),
+   View <= view(W,H),
+   View=>setfont(Font),
+   In <= input("",Font),In => enable,
+   Execute <= button("Execute",exe,font(Font)),Execute=>disable,
+   Counter <= button("Counter Example",diag,font(Font)), Counter=>disable,
+   Map     <= button("Map",map,font(Font)), Map=>disable,
+   ST      <= output("State: Edge:",Font),
+   K <= window("ITL Verifier",vbox([scroller(View),
+	    space(
+	    hbox([output("Enter temporal logic formula:",Font),space,ST])),
+	    space(frame(In)),
+	    border,
+	    space(
+	    hbox([space,
+		  button("Verify",verify,font(Font)),
+		  space,Execute, space,Counter, space,
+		  vbox([
+		  button("Verbose on",verbose(on),
+		    [style(radio),font(Font)]),
+		  button("        off",verbose(off),
+		    [style(radio),font(Font)])
+		  ]),
+		  Map,
+		  space,
+		  button("Quit",quit,font(Font)),
+		  space]))
+	    ])),
+     verbose(off),
+   _ <= buttonstate(verbose(_),off),
+   K => open,
+   handle(In,View,K,[Execute,Counter,Map,ST]).
+
+handle(In,View,K,N):-
+   K => waitevent(E),
+   handle(E,In,View,K,N).
+handle(E,In,View,K,N):-
+   (E=button(_,verify);E=menu(_,verify);E=return(_,_)) ->
+	handle_verify(In,View,K,N), !,handle(In,View,K,N)
+	;
+   E=button(_,map) -> 
+        clear_event(K), View=>update, width(_,H),
+        view_state(View,H),!,handle(In,View,K,N)
+	;
+   E=button(_,exe) ->
+	[Mb,Eb|_]=N, (Mb=>enable,Eb=>enable,
+	display_exe(View),
+	K=>waitevent(E1), handle_more(E1,In,View,K,N,exe),!;
+	Mb=>disable,Eb=>enable,
+	!, handle(In,View,K,N))
+	;
+   E=button(_,diag) ->
+	[Mb,Eb|_]=N, (Mb=>enable,Eb=>enable,
+	display_diag(View),
+	K=>waitevent(E1),handle_more(E1,In,View,K,N,diag),!;
+	Mb=>enable,Eb=>disable,
+	!, handle(In,View,K,N))
+	;
+   E=button(_,verbose(on)) -> verbose(on),!, handle(In,View,K,N)
+	;
+   E=button(_,verbose(off)) -> verbose(off),!, handle(In,View,K,N)
+	;
+   E=button(_,noevent) ->!, handle(In,View,K,N) 
+	;
+   K => close.           % all end
+
+clear_event(W) :- repeat,W=>nextevent(E),E=noevent.
+
+handle_verify(In,_,_,N) :-
+	[Mb,Eb,Map,ST|_]=N,Mb=>disable,Eb=>disable,Map=>disable,
+	In => in(Text),s2term(Text,Term),
+	command(Term,Term1),!,
+	t2string(Term1,Text0), In => out(Text0),
+	(Term1=prolog(_); ex(Term1)),!,
+	Mb=>enable,Eb=>enable,Map=>enable,
+	(verbose ; display_statistics(ST)),!.
+
+display_statistics(ST) :-
+	itl_state_number(S), % number of state
+        itl_transition(L),   % number of transition
+        name(S,Ss),name(L,Ls),
+        append("State: ",Ss,S0),append(S0," Edge:",S1),append(S1,Ls,S2),
+        ST=>out(S2),!.
+
+% 
+handle_more(Ev,_,_,_,_,E) :-
+   Ev=button(_,E),
+   !,fail.        % find another solution
+handle_more(Ev,In,View,K,N,_) :-
+   Ev=button(_,Label),button_event(Label),!,
+   handle(Ev,In,View,K,N).
+handle_more(Ev,In,View,K,N,_) :-
+   Ev=return(_,_),!,
+   handle(Ev,In,View,K,N).
+handle_more(_,In,View,K,N,E) :-!,
+   View=>getevent(Ev),
+   handle_more(Ev,In,View,K,N,E).
+
+button_event(verify).
+button_event(diag).
+button_event(exe).
+button_event(quit).
+button_event(map).
+button_event(verbose(on)).
+button_event(verbose(off)).
+%%---------------------------------------------------------------------
+% display_diagnosis
+display_diag(View) :- diag(X),
+	write_display_diag(X,View).
+
+% display_execution exapmle.
+display_exe(View) :- exe(Z),
+	write_display_diag(Z,View).
+
+write_display_diag(counter_example(Hist),View) :-!,display_ce(Hist,View).
+write_display_diag(execution(Hist),View) :-!,display_ce(Hist,View).
+write_display_diag(R,View):-!,
+	atomic(R),name(R,Text),
+	View=>clear,View=>string(0,0,Text).
+
+display_ce(Hist,View) :-
+	font(_,Fs),
+	View=>clear,  % View=>batchmode,
+        View=>setpattern(4),
+	X is Fs/2,Y=0,W is integer(60/24*Fs),H is integer(60/24*Fs),
+	(variable_list(L);L=[]),append(L,['Time'],L1),!,
+	display_var(['State'|L1],View,X,Y,H,X,X1),
+	X2 is X1+X,
+	display_ce(Hist,L,View,X2,Y,W,H,0). % ,View=>batchmodeoff.
+display_var([],_,_,_,_,X,X):-!.
+display_var([Var|L],View,X,Y,H,X1,X2):-
+	Y1 is Y+H,
+	name(Var,VarText),
+	View=>stringlength(VarText,Len),
+	(X1>X+Len,X3=X1;X3 is X+Len),!,
+	View=>string(X,Y,VarText),
+	display_var(L,View,X,Y1,H,X3,X2).
+
+display_ce([],_,_,_,_,_,_,_):-!.
+display_ce([(S->[_|Cond])|Hist],L,View,X,Y,W,H,T) :-
+	X1 is X+W,Y1 is Y+H,T1 is T+1,
+	name(S,SText),View=>string(X1,Y,SText),
+	display_now(L,Cond,View,X1,Y1,W,H,T),
+	display_ce(Hist,L,View,X1,Y,W,H,T1).
+
+display_now([],_,View,X,Y,_,_,T):-!,
+	name(T,SText),View=>string(X,Y,SText).
+display_now([V|Vr],Cond,View,X,Y,W,H,T):-
+	display_state(Cond,V,View,X,Y,W,H),
+	Y1 is Y+H,
+	display_now(Vr,Cond,View,X,Y1,W,H,T).
+
+display_state([V|_],V,View,X,Y,W,H) :-!, % true
+	X2 is X+W,Y2 is Y+H,
+	View=>fillrect(X,Y,X2,Y2).
+display_state([not(V)|_],V,View,X,Y,W,H) :-!, % false
+	X2 is X+W,Y2 is Y+H,
+	View=>rect(X,Y,X2,Y2).
+display_state([_|T],V,View,X,Y,W,H) :-!,
+	display_state(T,V,View,X,Y,W,H).
+display_state([],_,View,X,Y,W,H) :-!,    % unknown
+	X2 is X+W,Y2 is Y+H/2,Y3 is Y2+3,
+	View=>rect(X,Y2,X2,Y3).
+
+s2term("",true):-!.
+s2term(Text,Term) :-
+	telling(O),
+	tell(tmp),format("~s.~n",[Text]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,read(Term),read_error(Term,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2term(_,true):-tell(tmp),told,see(tmp),seen.
+
+read_error(true,Er,I,O) :- 
+	tell(tmp),told,see(tmp),seen,
+	see(I),tell(O),unix(system('rm tmp')),
+	write('read error:'),write(Er),nl.
+
+t2string(Term,Text) :-
+	telling(O),
+	tell(tmp),write(Term),told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2string(_,true):-tell(tmp),told,see(tmp),seen.
+
+read_string(-1,[]) :- !.
+read_string(C,[C|T]) :- 
+	get0(C1),read_string(C1,T).
+
+
+command(demo(X),Term):-!,demo(X,Term).   % predefined examples
+command(ex(X),Term):-!,ex(X,Term).
+command(prolog(X,P),X):-!,call(P).
+command(prolog(P),prolog(P)):-!,call(P).
+command(X,X).
+
+view_state :-
+   make_state_view(View,W,K),
+   view_state(View,W),View=>enable,
+   repeat,
+       K=>waitevent(E),E=down(_,_,_,_),K=>close.
+
+make_state_view(View,W,K) :-
+   width(W,_),font(Font,_),
+   View <= view(W,W),
+   View=>setfont(Font),
+   K <= window("State Pattern",vbox([scroller(View) ])),
+   K => open.
+
+view_state(View,W) :-
+   View=>setpattern(0),
+   itl_state_number(S),
+   View=>clear,View=>disable,View=>update, % View=>batchmode,
+   View=>string(0,W,"T"),                  % This prevents core dump
+   D0 is integer(W/(S+1)),(D0=0,D=1;D=D0),!,
+   view_state_write(View,W,S,D).
+view_state_write(View,W,S,D) :- 
+   links(X,Y), link_translate(X,Y,X1,Y1,W,S),
+%   View=>fillcircle(X1,Y1,2),fail.
+%   View=>circle(X1,Y1,2),
+    X2 is X1+D,Y2 is Y1+D,View=>fillrect(X1,Y1,X2,Y2),
+    View=>update,
+    fail.
+view_state_write(_View,_,_,_):-true. % View=>batchmodeoff.
+
+link_translate(false,Y,X1,Y1,W,S) :- !,
+    link_translate(S,Y,X1,Y1,W,S).
+link_translate(X,false,X1,Y1,W,S) :- !,
+    link_translate(X,S,X1,Y1,W,S).
+link_translate(X,Y,X1,Y1,W,S) :- number(X),number(Y),!,
+    X1 is integer(X*W/(S+1))+1, Y1 is integer(Y*W/(S+1)).
+link_translate(X,_,X1,0,W,S) :- number(X),!,
+    X1 is integer(X*W/(S+1)).
+link_translate(_,Y,0,Y1,W,S) :- number(Y),!,
+    Y1 is integer(Y*W/(S+1)).
+link_translate(_,_,0,0,_,_).
+
+%%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/init	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,14 @@
+%?-op(900,xfy,[(&),('&&')]).
+%?-op(700,xfy,['<->','\=',proj]).
+%?-op(600,xfy,['=>','<=']).
+%?-op(60,fy,['~','#','<>', '@',^]).
+%?-op(60,fy,[*]).
+%?-op(1200,fy,[dynamic]).
+
+:-[op].
+make :- unix(system('make tmpa')),['.tmpc','.tmpl'].
+?- unix(system('make tmpa')),['.tmpc','.tmpa'] ;
+
+  ['ndcomp.pl','bdtstd.pl','chop.pl','diag.pl','ex.pl','cp.pl'].
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/initgm	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,25 @@
+% Sat May 22 11:43:11 JST 1993
+
+:- use_module(library(gmlib)).
+
+?-op(900,xfy,[(&),('&&')]).
+?-op(700,xfy,['<->','\=',proj]).
+?-op(60,fy,['~','#','<>', '@',^]).
+?-op(60,fy,[*]).
+
+:-
+  unix(system('make all M=lite:')),
+  ['.tmpc'],
+  unix(system('make display M=lite:')),
+  ['.tmpc'].
+
+make :- unix(system('make M=lite:')),consult(lite:['.tmpc','.tmpl']).
+
+:- use_module(lite).
+:- load(lite:[ex,kiss_ex,display]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/initm	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,26 @@
+
+% Sat May 22 11:43:11 JST 1993
+
+% ?-op(900,xfy,[(&),('&&')]).
+% ?-op(700,xfy,['<->','\=',proj]).
+% ?-op(700,xfy,['=>','<=']).
+% ?-op(60,fy,['~','#','<>', '@',^]).
+% ?-op(60,fy,[*]).
+
+:-lite:[op].
+
+:-
+  unix(system('make tmpa M=lite:')),
+  ['.tmpc'].
+
+make :- unix(system('make tmpa M=lite:')),
+   consult(lite:['.tmpc','.tmpl']).
+
+:- use_module(lite).
+:- ensure_loaded(lite:[ex,kiss_ex]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/initr	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,29 @@
+
+% Sat May 22 11:43:11 JST 1993
+
+% ?-op(900,xfy,[(&),('&&')]).
+% ?-op(700,xfy,['<->','\=',proj]).
+% ?-op(700,xfy,['=>','<=']).
+% ?-op(60,fy,['~','#','<>', '@',^]).
+% ?-op(60,fy,[*]).
+
+:-use_module(library(system)).
+:-lite:[op].
+
+:-
+  system('make tmpa M=lite:'),
+  ['.tmpc'].
+
+make :- system('make tmpa M=lite:'),
+   consult(lite:['.tmpc','.tmpl']).
+
+:- use_module(lite).
+:- ensure_loaded(lite:[ex,kiss_ex]).
+:- ensure_loaded(lite:[dvcomp]).
+:- ensure_loaded(lite:[rstd]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/initv	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,49 @@
+
+% Sat May 22 11:43:11 JST 1993
+
+:-  module(lite,[
+	ex/1,  			% ex(ITL)   verification predicate
+	ex/2,			% ex(No,Example)
+	diag/1,diag/0, 		% find counter example
+	exe/1, exe/0,		% find sample execution
+	verbose/1, 		% verbose mode
+	lazy/1,			% lazy mode (dvcomp only)
+	kiss/0, 		% kiss format geneartion
+	read_kiss/1,		% read KISS2 format
+	read_kiss/4,		% read KISS2 format
+	read_kiss/3,		% read KISS2 format
+	tgen/0, 		% tokio clause geneartion
+	itl/1,			% one step tableau expansion
+	itl/3,			%     " in detail
+	itl_statistics/0,  	% show number of state etc. 
+	st/3,			% external state machine
+	st_variables/2,		%     its variables
+	sbterm/0,		% show sub term/ state database
+	display/0, large/0, small/0, 	% show state database
+	start/0, display_diag/1, display_exe/1,
+	state/0 		% show state database
+]).
+
+% ?-op(900,xfy,[(&),('&&')]).
+% ?-op(700,xfy,['<->','\=',proj]).
+% ?-op(700,xfy,['=>','<=']).
+% ?-op(60,fy,['~','#','<>', '@',^]).
+% ?-op(60,fy,[*]).
+
+:-[op].
+
+:-
+  unix(system('make tmpa M=lite:')),
+  ['.tmpc'].
+
+make :- unix(system('make tmpa M=lite:')),
+   consult(['.tmpc','.tmpl']).
+
+:- ensure_loaded([dvcomp,bdtstd,chop,diag,kiss,ex,cp]).
+:- ensure_loaded([ex,kiss_ex]).
+
+% :-start.
+% :-display.
+% display(Host) :- start(Host),display.
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/itl.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,30 @@
+
+gather(A,X,X1) :- atomic(A),!,
+	X = [A|X1].
+gather(F,X,X1) :- functor(F,_,N),!,
+	gather_args(0,N,F,X,X1).
+gather_args(N,N1,_,X,X) :- N =:= N1,!.
+gather_args(N,N1,F,X,X1) :- 
+	N0 is N+1,arg(N0,F,A), 
+	gather(A,X,X0),gather_args(N0,N1,F,X0,X1).
+
+
+itl(A,C,T,X,X) :- atomic(A),!,
+	itl_variable(C,A,T).
+itl_variable(C,A,T) :-
+	true(C,A,C,C1),!,
+
+	itl_false(C,A,F,X0,X1).
+itl_true(C,A,T,X,X) :-
+itl_true(_,_,X,X) :-
+
+true([],A,C,[A|C]):-!.
+true([A|_],A,C,C):-!.
+true([not(A)|_],A,C,C):-!,fail.
+true([_|T],A,C,C1):-!,true(T,A,C,C1).
+
+false([],A,C,[A|C]):-!.
+false([not(A)|_],A,C,C):-!.
+false([A|_],A,C,C):-!,fail.
+false([_|T],A,C,C1):-!,false(T,A,C,C1).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/itlstd.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,82 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Header$
+*/
+
+% ITL standarization
+%
+% Wed Jun 19 12:11:29 BST 1991
+%
+% a standard form of ITL, based on subterm classification
+%
+%   P = \Sum Pn & Px
+%   Q = \Sum Qn & Qx
+%   P & Q =  	empty,Pn,Qn ;        	( Px = Qx = true)
+%		more,Pn,Qn & Qx; 	( Px = true )
+%		more,Pn,(Px & Q)
+%
+subterm_init :- 
+	abolish(sb,3),
+	asserta((sb(-1,[],[]))),
+	abolish(sbn,1),
+	asserta(sbn(0)),
+        abolish(itl_state,2),
+        assertz(itl_state(([[]->false]),false)),
+        assertz(itl_state(([[]->true]),0)),!.
+
+
+std_check(I,J,N) :-
+	sb(N,I,J),!.
+std_check(I,J,N1) :-
+	retract(sbn(N)),N1 is N+1,asserta(sbn(N1)),
+	assertz(sb(N1,I,J)),!.
+
+itlstd(P,List) :- 
+	setof(N,subterm(P,N),List),!.
+
+subterm(P,C->T) :-
+	subterm(P,T,[],C0),
+	sortC(C0,C).
+	
+% bubble sort
+sortC([],[]).
+sortC([H|T],[Min|Y]):-
+    min(T,H,Min,Rest),
+    sortC(Rest,Y).
+
+min([],X,X,[]).
+min([H|T],X,Y,[H|S]) :- ord(H,X),!,min(T,X,Y,S).
+min([H|T],X,Y,[X|S]) :- min(T,H,Y,S).
+
+ord(not(X),not(Y)) :- !,X @> Y.
+ord(X,not(Y))  :- !,X @> Y.
+ord(not(X),Y)  :- !,X @> Y.
+ord(X,Y)   :- !,X @> Y.
+
+subterm(true,true,C,C):-!.
+subterm(false,false,C,C):-!.
+subterm(P,V,C,C1) :- atomic(P),!, local(V,P,C,C1).
+subterm(up(P),V,C,C1) :- !, local(V,up(P),C,C1).
+subterm(down(P),V,C,C1) :- !, local(V,down(P),C,C1).
+subterm((false&_),false,C,C) :-!.
+subterm((_&false),false,C,C) :-!.
+subterm((P&Q),V,C,C1) :-!,
+	std_check(P,Q,N),local(V,N,C,C1).
+subterm(@(Q),V,C,C1) :-!,
+	std_check(@(Q),'$$$',N),local(V,N,C,C1).
+subterm(^(Q),V,C,C1) :-!,
+	std_check(^(Q),'$$$',N),local(V,N,C,C1).
+subterm((P,Q),V,C,C1) :-!,
+	subterm(P,PV,C,C0),subterm(Q,QV,C0,C1), and(PV,QV,V).
+subterm((P;Q),V,C,C1) :-!,
+	subterm(P,PV,C,C0),subterm(Q,QV,C0,C1), or(PV,QV,V).
+subterm(not(P),V,C,C1) :-!,
+	subterm(P,PV,C,C1),negate(PV,V).
+% end %
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kiss.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,274 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+
+% :- dynamic st_variables/2.
+
+set_input_var(L) :- abolish(input_variable_list,1),
+	asserta(input_variable_list(L)).
+
+kiss :-
+	(variable_list(L);L=[]),
+	(st_variables(In,_);In=[]),
+	delete(L,In,Out),
+	write('# '),write_kiss_var_list(In),write((->)),
+		write_kiss_var_list(Out),nl,
+%	write('.v '),length(L,Ll),write(Ll),nl,
+	write('.p '),itl_transition(X),write(X),nl,
+	write('.s '),itl_state_number(Y),write(Y),nl,
+	write('.i '),length(In,Inl),write(Inl),nl,
+	write('.o '),length(Out,Outl),write(Outl),nl,
+	kiss(In,Out).
+
+kiss(In,Out) :-
+	state(S,Cond,D),
+	write_kiss(S,Cond,D,In,Out),fail.
+kiss(_,_) :- write('.e'),nl.
+
+write_kiss_var_list([]):-!.
+write_kiss_var_list([H|L]):-!,write(H),put(32),   % " "
+	write_kiss_var_list(L).
+
+write_kiss(S,Cond,D,In,Out) :-
+       write_kiss_var(In,Cond),put(32),   % " "
+       write_kiss_state(S),
+       write_kiss_state(D),
+       write_kiss_var(Out,Cond),nl,!.
+
+write_kiss_state(0) :-	!,
+       write(se),put(9).
+write_kiss_state(true) :-!,
+       write(st),put(9).
+write_kiss_state(false) :-	!,
+       write(sf),put(9).   
+write_kiss_state(S) :-	!,
+       write(s),write(S),put(9).
+
+delete([],_,[]) :-!.
+delete([H|X],L,Y) :- member(H,L),!,delete(X,L,Y).
+delete([H|X],L,[H|Y]) :- delete(X,L,Y).
+
+write_kiss_var([],_):-!.
+write_kiss_var([H|L],Cond) :- member(H,Cond),!,write(1),
+	write_kiss_var(L,Cond).
+write_kiss_var([H|L],Cond) :- member(not(H),Cond),!,write(0),
+	write_kiss_var(L,Cond).
+write_kiss_var([_|L],Cond) :- write(-),
+	write_kiss_var(L,Cond).
+
+tgen :-
+	(variable_list(L);L=[]),
+	(st_variables(In,_);In=[]),
+	delete(L,In,Out),
+	write(('?-'(static(L)))),put(46),nl,  % "."
+	make_print_state(L,L1,LL),
+	write((print_state :- L1,write(LL))),put(46),nl,
+	tgen(In,Out).
+tgen(In,Out) :-
+	state(S,Cond,D),
+	write_tclause(S,Cond,D,In,Out),fail.
+tgen(_,_).
+
+make_print_state([H],(H1= *(H)),((H) = H1)):-!.
+make_print_state([H|L],((H1= *(H)),L1),(((H) = H1),LL1)):-
+	make_print_state(L,L1,LL1).
+
+write_tclause(S,[empty|Cond],true,In,Out) :-!,
+	write_tstate(S), write(' :- '), % write(empty),put(44), % ","
+	write_tcondition(In,Out,Cond),
+	write(true), put(46),nl.  % true, empty or false  "."
+write_tclause(_S,[empty|_Cond],false,_In,_Out) :-!.
+%write_tclause(S,[empty|Cond],false,In,_Out) :-!,
+%	write_tstate(S), write(' :- '),write(empty),put(44),
+%	write_tcondition(In,[],Cond), % don't touch output
+%	write(fail),put(46),nl.  % true, empty or false
+write_tclause(S,[empty|Cond],D,In,Out) :-!,
+	write_tstate(S), write(' :- '), % write(empty),put(44), % ","
+	write_tcondition(In,Out,Cond),
+	write_tstate(D),put(46),nl.  % true, empty or false  "."
+write_tclause(_S,[more|_Cond],false,_In,_Out) :-!.
+%write_tclause(S,[more|Cond],false,In,_Out) :-!,
+%	write_tstate(S), write(' :- '),write(more),put(44),  % ","
+%	write_tcondition(In,[],Cond),  % don't touch output
+%	write(fail), put(46),nl.
+write_tclause(S,[more|Cond],true,In,Out) :-!,
+	write_tstate(S), write(' :- '),write(more),put(44),
+	write_tcondition(In,Out,Cond),
+	write(true), put(46),nl.
+write_tclause(S,[more|Cond],D,In,Out) :-!,
+	write_tstate(S), write(' :- '),write(more),put(44),
+	write_tcondition(In,Out,Cond),
+	write((@)),write_tstate(D),
+	put(46),nl.
+
+write_tcondition(In,Out,Cond) :-
+	write_tvar(In,Cond,'= '),
+	write_tvar(Out,Cond,':= ').
+write_tvar([],_,_):-!.
+write_tvar([H|L],Cond,Eq) :- member(H,Cond),!,
+	write(*(H)),write(Eq),write(1),put(44),
+	write_tvar(L,Cond,Eq).
+write_tvar([H|L],Cond,Eq) :- member(not(H),Cond),!,
+	write(*(H)),write(Eq),write(0),put(44),
+	write_tvar(L,Cond,Eq).
+write_tvar([_|L],Cond,Eq) :- 
+	write_tvar(L,Cond,Eq).
+
+write_tstate(0) :-	!,
+       write(empty).
+write_tstate(true) :-!,
+       write(true).
+write_tstate(false) :-	!,
+       write(fail).
+write_tstate(S) :-	!,
+       write(s),write(S).
+
+/*
+
+KISS2 format
+
+.i 4 
+.o 2 
+.p 60 
+.s 10
+--01 st0 st0 00
+
+*/
+
+read_kiss(File) :-
+	read_kiss(File,empty).
+
+read_kiss(File,Emode) :-
+	see(File),
+	get0(C), read_kiss_header(C,C1,IL,OL),
+	nonvar(IL),nonvar(OL),
+	make_vars(IL,"i",0,In),
+	make_vars(OL,"o",0,Out),
+	init_read_kiss(In,Out,IL,OL),
+	read_kiss_body(C1,In,Out,Emode),
+	seen.
+read_kiss(_,_) :- write('Error'),nl,seen.
+
+make_vars(N,_,_,[]) :- N =< 0,!.
+make_vars(N,V,M,[H|L]) :-!,
+	name(M,LM),append(V,LM,LH), name(H,LH),
+	N1 is N-1,M1 is M+1,
+	make_vars(N1,V,M1,L).
+
+read_kiss(File,In,Out,Emode) :-
+	see(File),
+	read_kiss(In,Out,Emode),!,
+	seen.
+read_kiss(_,_,_,_) :- write('Error'),nl,seen.
+
+read_kiss(In,Out,Emode) :-
+	get0(C), read_kiss_header(C,C1,IL1,OL1),
+	((var(In),make_vars(IL1,"i",0,In));true),
+	((var(Out),make_vars(OL1,"o",0,Out));true),
+	init_read_kiss(In,Out,IL,OL),
+	check_vars(IL,OL,IL1,OL1),
+	read_kiss_body(C1,In,Out,Emode).
+
+init_read_kiss(In,Out,IL,OL) :-
+	abolish(st_variables,2),
+	abolish(st,3),
+	assert(st_variables(In,Out)),
+	assert(st(true,true,true)),
+	length(In,IL),length(Out,OL).
+
+check_vars(IL,0,IL,_) :-!.  % ignore output
+check_vars(IL,OL,IL,OL) :-!.
+check_vars(IL,_OL,IL1,_OL1) :-IL=\=IL1,
+	write('Input variable number is wrong'),nl,fail.
+check_vars(_IL,OL,_IL1,OL1) :-OL=\=OL1,
+	write('Output variable number is wrong'),nl,fail.
+
+read_kiss_header(C,C2,IL,OL) :-[C]=".",!, get(C0),
+	read_kiss_header1(C0,C1,IL,OL),
+	read_kiss_header(C1,C2,IL,OL).
+    read_kiss_header1(C,C2,IL,_OL):-[C]="i",!,get(C0),
+	read_number(C0,C1,IL),skip_line(C1,C2).
+    read_kiss_header1(C,C2,_IL,OL):-[C]="o",!,get(C0),
+	read_number(C0,C1,OL),skip_line(C1,C2).
+    read_kiss_header1(C,C1,_,_):-[C]="p",!,
+	skip_line(C,C1).
+    read_kiss_header1(C,C1,_,_):-[C]="s",!,
+	skip_line(C,C1).
+    read_kiss_header1(C,C1,_,_):-
+	skip_line(C,C1).
+read_kiss_header(C,C,_,_) :-([C]="0";[C]="1";[C]="-"),!.
+read_kiss_header(C,C1,IL,OL) :- 
+	skip_line(C,C0),
+	read_kiss_header(C0,C1,IL,OL).
+
+read_kiss_body(-1,_,_,_) :-!.
+read_kiss_body(C,In,Out,Emode) :-
+	([C]="0";[C]="1";[C]="-"),!,
+	read_kiss_var(In ,C, _, In1),get(C1),
+	read_kiss_state(C1,C2,S),
+	read_kiss_state(C2,C3,D),
+	read_kiss_var(Out,C3,C4,Out1),
+	assert_state(Emode,S,In1,Out1,D),
+	skip_line(C4,C5),
+	read_kiss_body(C5,In,Out,Emode).
+read_kiss_body(C,In,Out,Emode) :-
+	skip_line(C,C1),
+	read_kiss_body(C1,In,Out,Emode).
+
+assert_state(_,S,In1,Out1,D) :-
+	st(S,_,_),!,
+	assertz(st(S,(In1,Out1),D)).
+assert_state(empty,S,In1,Out1,D) :-!,
+	assertz(st(S,empty,empty)),
+	assertz(st(S,(In1,Out1),D)).
+assert_state(_,S,In1,Out1,D) :-
+	assertz(st(S,(In1,Out1),D)).
+
+read_kiss_var([],C, C, true):-!.
+read_kiss_var([_],C, C1, true):- [C]="-",!,get0(C1).
+read_kiss_var([H],C, C1, not(H)):- [C]="0",!,get0(C1).
+read_kiss_var([H],C, C1, H):- [C]="1",!,get0(C1).
+read_kiss_var([H|L],C, C1, O):-
+	kiss_var([C],H,O,O1),!,get0(C0),
+	read_kiss_var(L,C0,C1,O1).
+read_kiss_var(L,_, C1, O):- get0(C),
+	read_kiss_var(L,C, C1, O).
+
+kiss_var("-",_,O,O).
+kiss_var("0",H,(not(H),O),O).
+kiss_var("1",H,(H,O),O).
+
+read_number(C,C1,N) :- read_number1(C,C1,NL),name(N,NL).
+read_number(_,_,0) :- write('A number is expected.'),nl.
+read_number1(C,C1,[C|L]) :- 
+	([C]="0"; [C]="1"; [C]="2"; [C]="3"; [C]="4"; [C]="5";
+	 [C]="6"; [C]="7"; [C]="8"; [C]="9"),!,get0(C2),
+	 read_number1(C2,C1,L).
+read_number1(C,C,[]).
+
+read_kiss_state(C,C1,N) :- read_kiss_state1(C,C1,NL),name(N,NL).
+read_kiss_state(_,_,0) :- write('A kiss_state is expected.'),nl.
+read_kiss_state1(C,C1,[C|L]) :- 
+	 [Z]="0",C>=Z, !,
+	 get0(C2),
+	 read_kiss_state1(C2,C1,L).
+read_kiss_state1(C,C1,[]) :-
+	skip_space(C,C1),!.
+
+skip_space(C,C1):- ([C]=" ";[C]="	"),!,
+	get(C0),skip_space(C0,C1).
+skip_space(C,C).
+
+skip_line(10,C) :- !,get0(C).
+skip_line(-1,C) :- !,C= -1.
+skip_line(_,C) :- get0(C0),skip_line(C0,C).
+
+/* end */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kiss_ex.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,28 @@
+:-asserta(st_variables([a,b],[q])).
+
+st(s0,((not(a);not(b)),q),s0). 
+st(s0, (a,b,not(p)),s1).
+st(s0, empty,empty).
+st(s1,(not(c),q),s1).
+st(s1,(c,not(q)),s2).
+st(s1, empty,empty).
+st(s2,(a,not(b),q),s2).
+st(s2,((not(a);b),not(q)),s3).
+st(s2, empty,empty).
+st(s3,(c,not(q)),s0).
+st(s3,(not(c),not(q)),s3).
+st(s3, empty,empty).
+
+st(ns0,((not(a);not(b))),ns0). 
+st(ns0, (a,b,not(p)),ns1).
+st(ns0, empty,empty).
+st(ns1,(not(c)),ns1).
+st(ns1,(c,not(q)),ns2).
+st(ns1, empty,empty).
+st(ns2,(a,not(b)),ns2).
+st(ns2,((not(a);b)),ns3).
+st(ns2, empty,empty).
+st(ns3,(c,not(q)),ns0).
+st(ns3,(not(c)),ns3).
+st(ns3, empty,empty).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lite.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,39 @@
+% Sat May 22 11:43:11 JST 1993
+
+:-  module(lite,[
+	ex/1,  			% ex(ITL)   verification predicate
+	ex/2,			% ex(No,Example)
+	diag/1,diag/0, 		% find counter example
+	exe/1, exe/0,		% find sample execution
+	verbose/1, 		% verbose mode (default on)
+	renaming/1, 		% 2var renaming mode (default on)
+	singleton/1, 		% singleton removal mode (default on)
+	detailed/1, 		% detailed trace of 2var
+	set_limit/1, 		% 2var state limit
+	lazy/1,			% lazy mode (dvcomp only)
+	kiss/0, 		% kiss format geneartion
+	read_kiss/1,		% read KISS2 format
+	read_kiss/4,		% read KISS2 format
+	read_kiss/3,		% read KISS2 format
+	tgen/0, 		% tokio clause geneartion
+	itl/1,			% one step tableau expansion
+	itl/3,			%     " in detail
+	itl_statistics/0,  	% show number of state etc. 
+	st/3,			% external state machine
+	st_variables/2,		%     its variables
+	sbterm/0,		% show sub term/ state database
+	display/0, large/0, small/0, 	% show state database
+	start/0, display_diag/1, display_exe/1,
+	state/0 		% show state database
+]).
+
+%?-op(900,xfy,[(&),('&&')]).
+%?-op(700,xfy,['<->','\=',proj]).
+%?-op(60,fy,['~','#','<>', '@',^]).
+%?-op(60,fy,[*]).
+?-[op].
+% :- use_module(library(gmlib)).
+:- ensure_loaded([dvcomp,rstd,chop,diag,kiss,ex,cp]).
+% ,display]).
+
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ndcomp.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,323 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+
+:-dynamic verbose/0,state/2,links/2.
+:-dynamic stay/3.
+:-dynamic regular_limit/1.
+
+% itl decomposition for DST
+
+% requires [chop]
+% itl(Predicate,Next,Empty,ConditionLists)
+
+itl(P) :- expand(P,P0),
+	moref(Ev),itl(P0,Next,Ev,[],C),
+	write(([Ev|C]->Next)),nl,fail.
+itl(_).
+itl(P,Next,[Ev|C]) :- moref(Ev),itl(P,Next,Ev,[],C).
+
+moref(empty).
+moref(more).
+
+itl(true,true,_,C,C):-!.
+itl(false,false,_,C,C):-!.
+itl(more,false,empty,C,C).
+itl(more,true,E,C,C):-!,E = more.
+% next two rule determines descrete time
+itl(empty,true,empty,C,C).      
+itl(empty,false,E,C,C):-!,E = more.  % no succeeding more interval
+itl(N,F,E,C,C1):-number(N),!,
+        sb(Subterm,N),!,itl(Subterm,F,E,C,C1).
+itl(?(Cond,T,F),N,E,C,C1):-!,
+        itl(Cond,CN,E,C,C0),itl_cond(CN,T,F,N,E,C0,C1).
+itl_cond(true,T,_,N,E,C,C1) :-!,
+        itl(T,N,E,C,C1).
+itl_cond(false,_,F,N,E,C,C1) :-!,
+        itl(F,N,E,C,C1).
+itl_cond(CN,T,F,N,E,C,C1) :-!,
+        itl(T,TN,E,C,C0),
+        itl(F,FN,E,C0,C1), negate(CN,NCN),
+        and(TN,CN,N1),and(FN,NCN,N2), or(N1,N2,N).
+
+itl(P,FF,_,C,C1) :- atomic(P),!, local(FF,P,C,C1).
+    local(true,P,C,C1):- true(C,P,C,C1).
+       true([],P,C,[P|C]):-!.
+       true([P|_],P,C,C):-!.
+       true([not(P)|_],P,_,_):-!,fail.
+       true([_|T],P,C,C1):-true(T,P,C,C1).
+    local(false,P,C,C1):- false(C,P,C,C1).
+       false([],P,C,[not(P)|C]):-!.
+       false([P|_],P,_,_):-!,fail.
+       false([not(P)|_],P,C,C):-!.
+       false([_|T],P,C,C1):-false(T,P,C,C1).
+itl(@(P),P,more,C,C).		   % strong next
+itl(@(_),false,E,C,C):-!,E=empty.
+
+% Regular Variable
+itl(^(R),F,empty,C,C1):-
+    local(F0,up(R),C,C0),
+    local(F1,down(R,0),C0,C1),and(F0,F1,F).
+itl(^(R),F1,E,C,C1):-!, E=more,
+    local(F,up(R),C,C1),and(F,^(R,0),F1).
+
+itl(^(_R,S),false,_,C,C):-
+	regular_limit(X),S>X,!.
+itl(^(R,S),F,empty,C,C1):-
+    local(F,down(R,S),C,C1).
+itl(^(R,S),^(R,S1),E,C,C):-!, E=more, S1 is S+1.
+
+% Quantifier
+itl(exists(P,Q),F,E,C,C0) :-!,
+	itl(Q,QT,E,[P|C],C1),itl_ex(QT,Q,E,P,F,C1,C0).
+    itl_ex(true,_,_,P,true,C,C1):-!,remove_p(C,P,C1).
+    itl_ex(false,Q,E,P,F,C,C0):-  !,remove_p(C,P,C1),
+    	itl(Q,QF,E,[not(P)|C1],C2),remove_p(C2,P,C0), exists(QF,P,F).
+    itl_ex(QT,Q,E,P,F,C,C0):- remove_p(C,P,C1),
+    	itl(Q,QF,E,[not(P)|C1],C2), remove_p(C2,P,C0),
+        or(QT,QF,TF),exists(TF,P,F).
+    % constant order optimzation for quantifier
+    exists(P,P,true):-!.
+    exists(P,_,P):-atomic(P),!.
+    exists(Q,P,exists(P,Q)).
+    remove_p([],_,[]):-!.
+    remove_p([not(P)|T],P,T):-!.
+    remove_p([P|T],P,T):-!.
+    remove_p([H|T],P,[H|T1]):-!,remove_p(T,P,T1).
+itl(*(P),F,empty,C,C1):-!,itl(P,F,empty,C,C1).
+itl(*(P),F,E,C,C1):-!,E=more,
+	itl(P,PX,more,C,C1),
+	closure(PX,P,F).
+    closure(false,_,false):-!.
+    closure(PX,P,(PX & *(P))).              %% infinite clousre (strong)
+%%    closure(PX,P,(PX & (*(P);empty))).    %% finite closure (weak)
+%% external state diagram (determinization)
+itl(st(N),F,E,C,C1):-!,
+	setof((Cond=>X),st(N,Cond,X),L),
+	itl_transition(L,F,E,C,C1).
+    itl_transition([],false,_,C,C):-!.
+    itl_transition([(Cond=>true)|T],F,E,C,C1):-!,
+    	itl((Cond),F0,E,C,C0),
+        itl_transition(T,F1,E,C0,C1),or(F0,F1,F).
+    itl_transition([(Cond=>empty)|T],F,E,C,C1):-!,
+    	itl((empty,Cond),F0,E,C,C0),
+        itl_transition(T,F1,E,C0,C1),or(F0,F1,F).
+    itl_transition([(Cond=>X)|T],F,E,C,C1):-
+    	itl((more,Cond),F0,E,C,C0),
+        itl_transition1(F0,X,T,F,E,C0,C1).
+    itl_transition1(false,_,T,F,E,C,C1):-!,
+        itl_transition(T,F,E,C,C1).
+    itl_transition1(true,X,T,F1,E,C,C1):-!,
+        itl_transition(T,F,E,C,C1),or(F,st(X),F1).
+%% ignore last state to check non stop predicate
+itl(free_fin(_),F,empty,C,C):-!,F=true.
+itl(free_fin(L),F1,more,C,C1):-!,
+    itl(L,F,more,C,C1),free_fin(F,F1).
+    free_fin(true,true):-!.
+    free_fin(false,false):-!.
+    free_fin(X,free_fin(X)):-!.
+%%
+itl((P,Q),N,E,C,C1) :-!,
+	itl(P,PN,E,C,C0),itland(PN,Q,N,E,C0,C1).
+itland(false,_,false,_,C0,C0):-!.
+itland(true,Q,QN,E,C0,C1):-!,itl(Q,QN,E,C0,C1).
+itland(PN,Q,N,E,C0,C1):-
+	itl(Q,QN,E,C0,C1),and(PN,QN,N).		%% and/3 in chop.pl
+itl((P;Q),N,E,C,C1) :-!,
+	itl(P,PN,E,C,C0),itlor(PN,Q,N,E,C0,C1).
+itlor(true,_,true,_,C0,C0):-!.
+itlor(false,Q,QN,E,C0,C1):-!,itl(Q,QN,E,C0,C1).
+itlor(PN,Q,N,E,C0,C1):-
+	itl(Q,QN,E,C0,C1),or(PN,QN,N).		%% or/3 in chop.pl
+itl(not(P),NN,E,X,X1) :- !,
+	itl(P,N,E,X,X1),
+	negate(N,NN).				%% negate/2 in chop.pl
+% F = empty?(P,Q):(empty(P)*more(Q)+more(PM)&Q)
+itl((P&Q),F,empty,C,C1) :-!,
+	itl((P,Q),F,empty,C,C1).
+itl((P&Q),F,more,C,C2) :-!,
+	itl(P,PE,empty,C,C0),
+	C0 = C0R,
+	itl(P,PM,more,C0R,C1),
+	chop(PM,PE,F,Q,C1,C2).
+
+chop(false,false,false,_,C,C):-!.
+chop(PM,false,(PM & Q),Q,C,C):-!.
+chop(PM,true,F,Q,C,C1):-!,
+    itl(Q,QF,more,C,C1),
+    chop1(PM,QF,Q,F).
+chop(PM,PE,F,Q,C,C):-!,
+	write('next empty conflict:'),write((PM,PE,F,Q,C)),nl,!,
+	fail.
+
+chop1(false,QF,_,QF):-!.
+chop1(false,false,_,false):-!.
+chop1(PM,false,Q,(PM&Q)):-!.
+chop1(_,true,_,true):-!.
+chop1(PM,QF,Q,(QF;(PM&Q))):-!.
+
+itl(proj(_,Q),F,empty,C,C1) :-!,
+	itl(Q,F,empty,C,C1).
+itl(proj(P,Q),F,more,C,C1) :-!,
+	itl(P,PM,more,C,C0),
+	itl(Q,QM,more,C0,C1),
+	prj(PM,QM,P,F).
+prj(false,_,_,false):-!.
+prj(_,false,_,false):-!.
+prj(PM,QM,P,(PM&proj(P,QM))).
+
+itl(prefix(P),F,empty,C,C1) :-!,
+	itl(P,PE,empty,C,C0),
+	itl(P,PM,more,C0,C1),    % this must be satistifiable
+	prefix(PM,PE,F).
+itl(prefix(P),F,more,C,C1) :-!,
+	itl(P,PM,more,C,C1),
+	prefix(PM,F).
+
+prefix(true,true):-!.
+prefix(false,false):-!.
+prefix(PM,prefix(PM)):-!.
+
+prefix(true,_,true):-!.
+prefix(_,true,true):-!.
+prefix(false,false,false):-!.
+prefix(_,false,true):-!.
+
+itl(Def,_,_,_,_) :-
+    write('error: '),write(Def),nl,!,fail.
+
+itl_statistics :- nl,
+        itl_state_number(X),write(X),write(' states'),nl,fail.
+itl_statistics :- 
+        sbn(X),write(X),write(' subterms'),nl,fail.
+itl_statistics :- 
+        init_var(tmp,0),
+        ((links(_,_),inc_var(tmp,_),fail);true),
+        tmp(N),
+%       init_var(tmp,0),
+%       ((state(_,_,_),inc_var(tmp,_),fail);true),
+%       recorded(tmp,L,_),
+        itl_transition(L),
+        write(N),put(47),  % "/"
+        write(L),write(' state transitions'),nl,fail.
+itl_statistics.
+
+
+:-assert(verbose).
+verbose(off) :- retract(verbose),fail;true.
+verbose(on) :- asserta(verbose).
+
+deve(ITL) :-
+	init,!,
+	expand(ITL,ITL0),		% chop standard form
+	itlstd(ITL0,StdNOW),		% BDT
+	assert(itl_state(StdNOW,1)),!,  % Initial State
+	deve0((1,ITL0)).
+
+deve0((S,ITL)) :-
+%        increment_state(ITL,ITL_1,S),
+        show_state(S,ITL),
+%	setof(Next,itldecomp(ITL,Next,S),
+	bagof(Next,itldecomp(ITL,Next,S),
+	    Nexts),!,
+	deve1(Nexts).
+deve0(_).
+
+deve1([]).
+deve1([H|T]) :- deve0(H),deve1(T).
+
+itldecomp(ITL,(NextS,Next),From) :-
+	init_var(current,From),
+	itl(ITL,Next,Cond),
+	%% showing
+	itlshow(Next,NextS,Cond,From).
+
+itlshow(Next,S,Cond,From):-
+	itlstd(Next,StdNext),
+	check_state(StdNext,Cond,New,S),
+	inc_var(itl_transition,_),
+	assertz(state(From,Cond,S)),
+	(links(S,From),!;assertz(links(S,From))),
+	!,
+	itlshow0(S,Cond,Next,New).
+
+itlshow0(S,Cond,Next,New) :- verbose,!,
+	itlshow1(S,Cond,Next,New),nl,!,New=1.
+itlshow0(0,_,_,0):- !,put(101),!,fail.   % "e"
+itlshow0(false,_,_,0):- !,put(102),!,fail.  % "f"
+itlshow0(true,_,_,0):- !,put(116),!,fail.  % "t"
+itlshow0(_,_,_,0):- !,put(46),!,fail.    % "."
+itlshow0(S,_,_,1):- !,write(S),put(46),ttyflush,!.  % "."
+
+itlshow1(0,Cond,_,_):-!,
+	write(Cond),write('->'),write(empty).
+itlshow1(true,Cond,_,_):-!,
+	write(Cond),write('->'),write(true).
+itlshow1(false,Cond,_,_):-!,
+	write(Cond),write('->'),write(false).
+itlshow1(S,Cond,_,0):-!,
+	write(Cond),write('->'),write(S).
+itlshow1(S,Cond,Org,1):-
+	write(Cond),write('->'),write(S),
+	put(9),write(Org),!.
+
+init :-
+	subterm_init,
+	abolish(state,3),
+	asserta(state(true,[more],true)),
+	asserta(state(true,[empty],0)),
+        abolish(itl_state,2),
+        abolish(stay,3),asserta(stay(0,0,0)),
+        asserta(itl_state(false,false)),
+        asserta(itl_state(empty,0)),
+        asserta(itl_state(true,true)),
+        init_var(regular_limit,5),
+	abolish(links,2),asserta(links(true,true)),
+	init_var(current,0),
+	init_var(itl_transition,1),
+	init_var(itl_state_number,1),!.
+
+show_state(S,ITL) :-
+	nl,write('state('),write(S),  % (
+	(verbose,write(' , '), write(ITL),write(')'),nl;write(')')),!.
+
+check_state(true,[more |_],0,true):-!.
+check_state(true,[empty|_],0,0):-!.
+check_state(false,_,0,false):-!.
+check_state(STD,_,0,S):-
+	itl_state(STD,S),!.
+check_state(STD,_,1,S):-
+	inc_var(itl_state_number,S),
+	assert(itl_state(STD,S)),!.
+
+init_var(X,_) :- functor(F,X,1),assert(F),fail.
+init_var(X,_) :- functor(F,X,1),retract(F),fail.
+init_var(X,V) :- functor(F,X,1),arg(1,F,V),assert(F),!.
+inc_var(Name,X1) :- 
+        functor(F,Name,1),retract(F),arg(1,F,X),
+        X1 is X+1,functor(F1,Name,1),arg(1,F1,X1),
+        asserta(F1),!.
+set_var(Name,X,X1) :-
+        functor(F,Name,1),retract(F),!,arg(1,F,X),
+        functor(F1,Name,1),arg(1,F1,X1),asserta(F1),!.
+set_var(Name,X,_) :- init_var(Name,X).
+
+increment_state(stay(P,now),stay(P,S),S) :- !,
+      (stay(P,F,S);assertz(stay(P,F,S))),!.
+increment_state(N,N,_) :- atomic(N),!.
+increment_state(P,R,S) :- functor(P,H,N),functor(R,H,N),
+      increment_state_arg(N,P,R,S).
+increment_state_arg(0,_P,_R,_):-!.
+increment_state_arg(N,P,R,S):-arg(N,P,PA),arg(N,R,RA),
+      N1 is N-1,increment_state(PA,RA,S),
+      increment_state_arg(N1,P,R,S).
+
+%% end %%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/op.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,5 @@
+:-op(900,xfy,[(&),('&&')]).
+:-op(600,xfy,['<->','\=',proj]).
+:-op(600,xfy,['=>','<=']).
+:-op(60,fy,['~','#','<>', '@',^]).
+:-op(60,fy,[*]).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/problems	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,1880 @@
+Thu Jan 18 22:42:24 JST 2001
+
+| ?- ex(((true&false)->(<>(empty)))).
+ 
+¤Ï¡¢valid ¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£¼ÂºÝ¤Ë¤Ï¡¢infinite->not(<>(empty)).
+
+Thu Jan 18 21:04:13 JST 2001
+
+¤Þ¤º¡¢chop.pl ¤ÎÃæ¤Î¡¢X & false ¤òfalse¤ËÊÑ´¹¤·¤Æ¤¤¤ë¤Î¤ò
+È´¤¯É¬Íפ¬¤¢¤ë¡£
+
+Thu Jan 18 19:59:33 JST 2001
+
+in POPL01
+
+LICS00 ¤Î infinite ¤òÆþ¤ì¤ë¤è¤¦¤Ë Lite ¤ò³ÈÄ¥¤¹¤ë¤³¤È¤¬
+¤Ç¤­¤ë¤Î¤«?
+
+ñ½ã¤Ê³ÈÄ¥¤Ë¤Ï¤Ê¤é¤Ê¤¤¡£
+    infinite =def (true & false )
+¤À¤«¤é¡£¤³¤ì¤Ï¡¢º£¤Î¼ÂÁõ¤Ç¤Ï unsatisfiable¡£
+
+P&Q ¤Ç¡¢Q ¤¬Ã±½ã¤Ëfalse¤À¤«¤é¤È¤¤¤Ã¤Æ¡¢Äü¤á¤é¤ì¤Ê¤¤¡£º£¤Ï¡¢node ¤Ï¡¢
+	empty,false
+	empty,true
+	more,false
+	more,some_other
+¤È¤¤¤¦¤è¤¦¤ËÆÃħÉÕ¤±¤é¤ì¤Æ¤¤¤ë¡£¤³¤ì¤Ç­¤ê¤ë¤Î¤«?
+
+Eventurality check ¤¬É¬Í×̵¤¤¤ÈÎɤ¤¤ó¤À¤±¤É¡£
+
+Rabin automaton ¤Ã¤Æ¤Ê¤ó¤À? Buchi ¤ÈƱ¤¸¤Ê¤ó¤¸¤ã¤Ê¤¤¤Î?
+
+true & false ¤Ï¡¢
+	empy -> false
+	more -> true & false
+¤ËŸ³«¤µ¤ì¤ë¡£º£¤Ï¡¢empty ¤À¤±¤ò¸«¤Æ¡¢validity/satisfiability ¤ò
+Ä´¤Ù¤Æ¤¤¤ë¡£¤·¤«¤·¡¢¤³¤ì¤ò¡¢
+    ¡Ö¤¢¤ëÆÃÄê¤Îfalse exit ¥ë¡¼¥×¤òsatisfiable¤À¤È¤ß¤Ê¤¹¡×
+¤³¤È¤Ë¤è¤ê¡¢infinite interval ¤òƳÆþ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+
+ÌäÂê¤Ï¡¢¤É¤Î¤è¤¦¤Ê false exit ¥ë¡¼¥×¤¬ satisfiable ¤À¤È¤¤¤¦
+¤³¤È? ¤È¤¤¤¦¤è¤ê¤Ï¡¢¤³¤ì¤Ç unsatisfiable ¤Ë¤Ê¤ë formula¤Ã¤Æ
+²¿?
+	more -> false
+¤Î¤¿¤°¤¤¤À¤±¤«?
+    finite
+	empy -> true
+	more -> true & true
+¤Ï¡¢¤É¤¦¤Ê¤ë?
+    ~infinite
+	empy -> true
+	more -> ~(true & false)
+¤È¤Ê¤ë¡£¤Ê¤Î¤Ç¡¢¤³¤ì¤Ï finite ¤ËÅù¤·¤¤¡£
+
+infinite ¤Ï¡¢false loop ¤òɽ¤·¤Æ¤¤¤ë¤È¹Í¤¨¤ë¡£
+
+Á´¤Æ¤Î¼°P¤ò¡¢finite -> P ¤Ç¡¢¥Á¥§¥Ã¥¯¤¹¤ì¤Ð¡¢finite LITL ¤Ë¤Ê¤ë¡£
+(¤Ê¤é¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤)
+
+¤Ã¤Æ¡¢¤³¤È¤Ï¡¢false loop ¤òdetect¤¹¤ì¤ÐÎɤ¤¤À¤±¤«? ¤³¤ì¤Ï¡¢
+·ë¹½°×¤·¤¤¤¬¡¢·×»»ÎÌŪ¤Ë¤Ï¡¢¤Á¤ç¤Ã¤ÈÂçÊѤ«¤Ê¡£
+    finitely
+	valid, satisfiable, unsatisfiable...
+    inifinitly
+	valid, satisfiable...
+infinitely satisfiable ¤È¤Ï¡¢
+    flase loop ¤¬Â¸ºß¤¹¤ë¤³¤È
+valid ¤Ï¡¢
+    false loop °Ê³°¤Ï¡¢empty false ¤Ç¤¢¤ë¤³¤È(?)
+
+¤¨¡¼¤È¡¢¤½¤ì¤À¤È¡¢inifinitly satisiable ¤Ê¼°¤Ï¡¢finitly unsatisfiable
+¤À¤±¤É¡¢¤½¤ì¤Ç¤¤¤¤¤Î? ¤À¤È¤¹¤ë¤È¡¢valid ¤Ê¼°¤Ï¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¤Í¡£
+
+¤³¤ì¤Ï¡¢¤Á¤ç¤Ã¤È¤¦¤ì¤·¤¯¤Ê¤¤¤Ç¤¢¤í¤¦¡£¤È¤¤¤¦¤³¤È¤Ï¡¢
+    infinitely valid ¤Ï¡¢
+    false loop °Ê³°¤Ï¡¢empty ture ¤Ç¤¢¤ë¤³¤È(?)
+¤ò´Þ¤à¤È¹Í¤¨¤ë¤Î¤¬Àµ¤·¤¤¡£¤À¤È¤¹¤ë¤È¡¢
+    |= finitie /\ finite
+¤Ã¤Æ¤³¤È¤Ë¤Ê¤ë¤Í¡£¤½¤ì¤Ï¡¢¤Á¤ç¤Ã¤È¤¦¤ì¤·¤¯¤Ê¤¤¤«¡£
+
+¤¦¡¼¤à¡¢Moszkowski ¤Ï¡¢¤É¤¦¤¤¤¦ÁªÂò¤ò¤·¤¿¤ó¤À¤í¤¦?
+
+
+Wed Nov 22 16:27:45 JST 1995
+
+rstd ¦¤Ç limit ¤ò°·¤¦¤³¤È¤Ë¤¹¤ë¡£
+rename_list ¤Çlimit¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤Ê¤ë¡£singleton ¤Îlimit
+¤ò¤Ï¤º¤µ¤Ê¤¤¤È¤¤¤±¤Ê¤¤¤À¤í¤¦¡£over(r,N)¤¬³°¤Ë¤Ç¤Ê¤¤¤Î¤¬
+¤Á¤ç¤Ã¤È¾ðÊóÉÔ­¤À¤Ê¡£
+
+itlstd ¤¬ idempotent ¤Ë¤Ê¤Ã¤Æ¤Ê¡¼¤¤!!! ¤·¤¯¤·¤¯¡£
+itlstd(X,Y,_),bdt2itl(Y,Z),itlstd(Z,Y1,_) ¤ÇY=Y1¤Ë¤Ê¤ë
+¤Ï¤º¤Ê¤Î¤À¤¬...
+
+itlstd2 ¤Ç¤Ï¡¢singleton remove, renaming ¤Ï¹Ô¤Ê¤ï¤Ê¤¤¤Ç¡¢limit over
+¤À¤±¤ò¼è¤ê°·¤¦¡£¤³¤ì¤Ë¤è¤Ã¤Ædetailed trace ¤¬²Äǽ¤È¤Ê¤ë¡£¤³¤ì¤Ë¡¢
+½¾Íè¤Îitlstd¤ò¤«¤±¤ì¤Ð¡¢¤â¤È¤ËÌá¤ë¤Ï¤º¤À¡£¤¬¡¢¤É¤¦¤â¼ºÇÔ¤·¤Æ¤¤¤ë
+¤é¤·¤¤¡£
+
+Tue Nov 21 18:33:19 JST 1995
+
+renaming ¤Î trace ¤Ï original limit ¤Ç¹Ô¤Ê¤¦¡£
+detailed trace ¤Ï no limit ¤Ç¹Ô¤Ê¤¦¡£
+itl/5 ¤Ï2ÅٸƤФì¤ë¤¬¡¢¤Þ¤¢¡¢ÎɤȤ¹¤ë¤«¡£
+
+rstd ¦¤Çlimit¤ÎÃÖ¤­´¹¤¨¤ò¤¹¤ì¤Ð¤À¤¤¤Ö¤Þ¤·¤Ê¤ó¤À¤¬...
+
+renmaing ¤Ç¡¢over limit ¤ò¼è¤ê°·¤¦Êý¤¬Åý°ìŪ¤«¡£
+
+Wed Nov 15 12:58:28 JST 1995
+
+over(r,N) ¤¬ true/false ¤ËÃÖ¤­´¹¤ï¤Ã¤Æ¤¤¤Æ¡¢unify¤¹¤ë¤«? 
+
+¤¤¤º¤ì¤Ë¤»¤è¡¢¤Á¤ç¤Ã¤Èµ¤¤Þ¤º¤¤¡£¤É¤ÎÊÑ¿ô¤¬ÃÖ¤­´¹¤ï¤ë¤«¤Ï¡¢
+renaming ¤ò trace ¤¹¤ì¤Ðʬ¤«¤ë¤¬...
+
+¤³¤ÎÃÖ¤­´¹¤¨¤òrstd¦¤Ç¹Ô¤Ê¤Ã¤Æ¡¢original/restricted¤ÎξÊý¤ò
+¤È¤Ã¤Æ¤ª¤¯¡£¤½¤·¤Æ¡¢¤É¤ÎÊÑ¿ô¤¬ÃÖ¤­´¹¤ï¤Ã¤¿¤«Ê¬¤«¤ë¤è¤¦¤Ë¤¹¤ë¡£
+(renaming information¤ËÆþ¤ì¤Æ¤ª¤¯) ¤Ç¤â¡¢¤³¤Î¾ðÊó¤â¤É¤¦¤»
+lazy¤ËÀ¸À®¤¹¤ë¤ó¤À¤è¤Í? ¤Ê¤ó¤«ÊѤÀ¡£
+
+¤¢¤ë¤¤¤Ï¡¢detailed trace¤ÎÊý¤Ç¤ÏÃÖ´¹¤¨¤·¤Ê¤¤? true/false ¤Ë
+ÃÖ¤­´¹¤¨¤Æ¤âƱ¤¸state¤Ç¼Â¸½¤Ç¤­¤ë¤Ï¤º¡£¤À¤¬¡¢unify ¤Ï¤·¤Ê¤¤¤È
+¤¤¤±¤Ê¤¤¡£
+
+¤¤¤º¤ì¤Ë¤»¤è¡¢lazy state generation ¤Ç¤Ï¡¢
+   full trace, restricted trace
+¤ÎξÊý¤ò¤ª¤³¤Ê¤¦¡£¤³¤Î¤¿¤á¤Ë¤Ï¡¢over ¤ÎÃÖ¤­´¹¤¨¤òrstd ¤Ç¹Ô¤Ê¤Ã¤¿
+Êý¤¬Îɤ¤¤À¤í¤¦¡£
+
+¤¦¡¼¤à¡¢¤Ç¤â¡¢¤½¤¦¤¹¤ë¤È¡¢itlstd ¤¬non-deterministic ¤Ë¤Ê¤Ã¤Æ
+¤·¤Þ¤¦¡£¤½¤ì¤Ï¡¢¤¤¤Þ¤¤¤Á¤À¡£
+
+Tue Nov 14 19:56:26 JST 1995
+
+Detailed trace ¤Î»þ¤Ï Fromula ¤È state number ¤ÈξÊý»ý¤ÁÊ⤫¤Ê¤¤¤È
+¤À¤á¤À¡£
+
+¤È¤¤¤¦¤³¤È¤Ï¡¢diag routine ¤ò½ñ¤­Ä¾¤µ¤Ê¤¤¤È¥À¥á¤«¡£ndcomp ¤Ï
+¤¢¤­¤é¤á¤ë¤«?
+
+Mon Nov 13 22:33:34 JST 1995
+
+trace ¤¹¤ë¤È¤­¤Ërenaming ¤Ï¡¢¤¤¤é¤Ê¤¤¤ó¤¸¤ã¤Ê¤¤?
+detailed trace¤ò¤É¤¦¤»»È¤¦¤È¤¹¤ì¤Ð... ¤½¤¦¤¹¤ì¤Ð¡¢
+choice ¤â¹Í¤¨¤Ê¤¯¤Æ¤âÎɤ¤¡£
+
+Sun Nov 12 23:37:36 JST 1995
+
+^r ¤Îtrace
+
+state¤Ï·è¤Þ¤Ã¤Æ¤¤¤ë
+duplicated ¤Ï rename inforamtion ¤ò»È¤Ã¤Ætrace ¤Ç¤­¤ë¡£
+
+detailed expansion ¤·¤Æ¡¢unify ¤¹¤ë¡£¶ñÂÎŪ¤Ë¤Ï¡¢
+BDD¤Ë¤½¤Ã¤Æʬ²ò¤¹¤ë¡£¤³¤ì¤Ë¤è¤Ã¤Æ¡¢true_false ¤¬r^n¤Î
+tree¤ËŸ³«¤µ¤ì¤ë¤Ï¤º¡£¤µ¤ì¤Ê¤±¤ì¤Ð¡¢Ê̤Τâ¤Î¤òõ¤¹¡£
+
+true_false¤Îchoice¤Ë¤è¤Ã¤ÆÃͤ¬°Û¤Ê¤ë¤ï¤±¤À¤±¤É...?
+choice ¤Ï¡¢°ì¤Ä¤ÎBDD¤Ë´Ø¤·¤Æ°ì¤Ä¤·¤«¤Ç¤Ê¤¤¡£(leaf¤Ë¤·¤«¤Ê¤¤
+¤«¤é) ¤È¤¤¤¦¤³¤È¤Ï¡¢Ê£¿ô¤Îchoice ¤Ï¡¢
+    °Û¤Ê¤ë & ¤Î empty
+¤Ç¤·¤«µ¯¤­¤Ê¤¤¡£¤Ê¤ó¤é¤«¤Îidentity¤ò»Ä¤·¤¿Êý¤¬¤¤¤¤¤ó¤À¤±¤É¡£
+¤Þ¡¢·ë²ÌŪ¤ËƱ¤¸state¤Ë¤¤¤Ã¤Æ¡¢¤¹¤Ù¤Æ¤Î¾ò·ï¤¬¿Ô¤¯¤µ¤ì¤ë¤Ê¤é¡¢
+¹½¤ï¤Ê¤¤¤«¡£detailed expansion ¤Ï¤¹¤Ù¤Æ¤ò´Þ¤ó¤Ç¤¤¤ë¤Î¤À¤«¤é¡¢
+¹½¤ï¤Ê¤¤¤Ï¤º¡£
+
+¤Þ¤º¤Ï¡¢renaming ¤Î¥«¥¿¤ò¤Ä¤±¤è¤¦¡£
+
+¤â¤Ã¤ÈÁªÂòŪ¤Ë^r¤ò¥È¥ì¡¼¥¹¤·¤¿Êý¤¬Îɤ¯¤Ê¤¤? singleton ^r
+¤ò¤Ê¤ó¤é¤«¤Îterm¤Ë¥Þ¥Ã¥×¤Ç¤­¤Ê¤â¤Î¤«?
+
+Sat Nov 11 09:55:41 JST 1995
+
+2path singleton removal ¤¬¤è¤¦¤ä¤Ã¤È¤Ç¤­¤¿¡£
+¤¿¤À¤·¡¢¤É¤¦¤â¡¢order sensitive ¤Ê¤ó¤À¤è¤Ê¡£over ¤¬@<,@>¤Ë
+¤è¤Ã¤Æ¤Ç¤ë»þ¤È¤Ç¤Ê¤¤»þ¤¬¤¢¤ë¡£
+
+sbdt_split, sbdt_ife ¤Ë¤è¤Ã¤Æremoval/rename¤Ë¤è¤ëorder¤ò½¤Àµ¤·¤Ê¤¤
+¤È¤¤¤±¤Ê¤«¤Ã¤¿¡£¤ä¤à¤ò¤¨¤Ê¤¤¤È¤³¤í¤«?
+
+¤·¤«¤·singleton removal¤ò½ñ¤¤¤¿¤é¡¢¤â¤È¤ÎÊý¤âÎɤ¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£
+¤É¤¦¤â¡¢bdt routine¤Ë¤ÏÌäÂ꤬¤¢¤Ã¤¿¤ß¤¿¤¤¡£true & true ¤ò½ü¤¯
+¤è¤¦¤Ë¤·¤¿¤Î¤¬¸ú¤¤¤¿¤È¤â»×¤¨¤Ê¤¤¤ó¤À¤¬.... sbdt_opt ¤Î¤»¤¤¤«?
+
+state number¤¬¤Ç¤Ê¤¯¤Ê¤ëbug¤òľ¤·¤¿
+
+¤¢¤È¤Ï¡¢trace ¤ÎÌäÂê¤À¤Ê¡£r^n¤Î¼Â¹Ô¤¬¤Á¤ã¤ó¤È¥È¥ì¡¼¥¹¤Ç¤­¤ë¤È
+¤¤¤¤¤ó¤À¤±¤É¡£
+
+Thu Nov  9 12:03:32 JST 1995
+
+P & Q ¤ò¡¢sb(P_BDD & Q_BDD) ¤È¤¤¤¦·Á¤Ç»ý¤Ã¤Æ¤¤¤ë¤±¤É..
+sb(P_BDD,PN)
+sb(Q_BDD,QN)
+PN & QN ¤È¤¤¤¦Êý¤¬Îɤ¯¤Ê¤¤? ¤Û¤È¤ó¤ÉƱ¤¸¤À¤È¤Ï»×¤¦¤±¤É....
+?(PN & QN,true,false) ¤È¤Ê¤ë¤Î¤«.... ¤¦¡¼¤ó¡£
+
+Q¤ÎŸ³«¤ò°ì²ó¤ËÍÞ¤¨¤é¤ì¤Ê¤¤? ? ¤ò̤Ÿ³«¤Î¥Þ¡¼¥¯¤Ë
+»È¤¨¤Ê¤¤¤«?
+
+Wed Nov  8 20:31:23 JST 1995
+
+¤Ï¤ä¤ê°ìöBDD¤ËÍ¤Æ2path¤Ç½èÍý¤¹¤ë¤³¤È¤È¤¹¤ë¡£
+
+first path:  singleton varble ¤Î detect
+  (regular variable¤¬¤Ê¤¤¾ì¹ç¤Ï¡¢¤½¤Î¤Þ¤Þstd_check
+   singleton removal ¤Ç¾Ã¤¨¤ë¤³¤È¤Ï¤Ê¤¤)
+regular variable ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤ì¤Ç½ªÎ»
+rename list ¤ò·×»»
+second path path:  
+  singleton variable ¤¬¤¢¤Ã¤¿¾ì¹ç¡¢
+  t/f¤Îtree ¤ò parallel traverse
+  t/f ¤Þ¤¿¤Ï¡¢[tf]/tf ¤ÎÁȹ礻¤òtf¤ËÃÖ¤­´¹¤¨¤ë
+  Ê£¿ô¤Îsingleton variable¤ò½çÉÔƱ¤Ë½èÍý¤·¤ÆÎɤ¤
+
+regular variable ¤¬¤¢¤ë¤«¤É¤¦¤«¤Ï¡¢singleton removval ¤Î
+·ë²Ì¤Ë°Í¸¤¹¤ë¤Î¤Ç¡¢1path ¤Ç¸·Ì©¤Ë¼è¤ê½ü¤¯¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
+¤¬¡¢2nd path ¤Ç¤Ï³Î¼Â¤Ë¼è¤ê½ü¤¯¤³¤È¤¬½ÐÍè¤ë¡£
+
+¤Ö¤Ö¡¢2nd path¤ÏÁ´Á³½èÍý¤¬°ã¤¦!! sbdt ¤È¶¦ÍѤϤǤ­¤Ê¤¤
+
+Tue Nov  7 15:45:07 JST 1995
+
+chop ¤Î¥ì¥Ù¥ë¤Çʬ¤±¤ì¤Ð¡¢¤Þ¤¢¡¢Îɤ¤¡£ÌäÂê¤Ï¡¢¤½¤Î¤¢¤È¡£¤È¡¢
+¹Í¤¨¤ë¤È¡¢BDD¤ËÊÑ´¹¤¹¤ë¥ì¥Ù¥ë¤ÇÂбþ¤¹¤ëÊý¤¬Ë¾¤Þ¤·¤¤¤«¤âÃΤì¤Ê¤¤¡£
+¤â¤Á¤í¤ó¡¢º£¤Î¤Þ¤Þ¤Ç¤âsafe¤Ê¤ó¤À¤±¤É¡¢Íî¤Á¤Æ¤¤¤ë¤â¤Î¤¬Â¿¤¤¡£
+¤½¤ì¤Ï·ë²ÌŪ¤Ë¾õÂÖ¤òÁý¤ä¤·¤Æ¤¤¤ë¤³¤È¤Ë¤Ê¤ë¡£
+
+°ì¤Ä¤ÎÊýË¡¤Ï¡¢
+   p(^r)  =>   ?(^r,pt,pf)
+¤È¤¹¤ë¡£
+   (pt,pf; tf), (pt;pf)
+¤ÈÊÑ·Á¤¹¤ë¡£¤È¡¢¤³¤ó¤Ê¶ñ¹ç¡£¤³¤ì¤Ï½Å¤¤¤Ê¤¡¡£
+
+(~ ^r), ^r ¤¬¥Ü¥È¥à¥¢¥Ã¥×¤Ç¤Ïf¤Ë¤Ê¤é¤Ê¤¤¡£¤Þ¡¢¤½¤¦¤¤¤¦¤³¤È¤Ê¤ó¤À¤è¤Ê¡£
+
+Tue Nov  7 10:38:59 JST 1995
+
+¤É¤¦¤â¡¢singleton removal ¤À¤È¡¢[a](^r = length(2)), f(^r)
+¤Î¤è¤¦¤Ê¤â¤Î¤Ï´°àú¤Ë¥È¥ì¡¼¥¹¤Ç¤­¤ë¤é¤·¤¤¡£
+[a](^r = length(2)), *(^r) ¤âOk ¤À¤Ã¤¿¡£
+
+¤Ç¤â¡¢¤µ¤¹¤¬¤Ëʸˡµ­½Ò¤Ïȯ»¶¤¹¤ë¡£
+
+·ë¶É¡¢¤É¤¦¤¤¤¦À©¸Â¤Ê¤Î¤«¤Ê¤¡? diag »þ¤Ë¡¢full trace ¤Ç¤­¤¿¤«¤É¤¦¤«¤ò
+¥Á¥§¥Ã¥¯¤¹¤ë¤«...
+
+¤É¤¦¤â¡¢¥·¥ó¥°¥ë¥È¥ó¥Á¥§¥Ã¥¯¤¬´Å¤¤¤Ê¡£¤â¤Ã¤È¡¢¤Á¤ã¤ó¤È¥Á¥§¥Ã¥¯¤¹¤ë
+¤¿¤á¤Ë¤Ï?
+
+Mon Nov  6 15:57:46 JST 1995
+
+[p_0,p_1,...,p_n] ¤Ï¡¢
+p_0,p_1,...,p_n        -> true
+~ p_0,~ p_1,...,~ p_n  -> false
+else                   -> true_false
+¤È¤¤¤¦·Á¤ÇBDD(MTBDD)¤Ë¤Ê¤ë¡£3ÃÍÏÀÍý
+
+^r -> true_false
+
+true_false -> empty? choice ? true : fals
+                   : true_false
+
+t,tf  -> tf
+t;tf  -> t
+tt;tf -> tf
+f,tf  -> f
+f;tf  -> tf
+tt,tf -> tf
+
+(¤¢¤ì¡¢cross term¤Ï?)
+³Î¤«¤Ë¤³¤ì¤Ç¤¦¤Þ¤¯¤¤¤­¤Þ¤¹¡£¤Ï¤¤¡£* ^r ¤â´°àú¡£
+
+ÌäÂê¤Ï¡¢¼Â¹Ô¤òtrace¤Ç¤­¤ë¤«¤É¤¦¤«¤À¤Ê¡£
+
+Mon Nov  6 08:50:01 JST 1995
+
+singleton ¤Î¸ú²Ì¤ÏÍ­¸Â¤«?
+
+BDD¤ÎÃæ¤Çsingleton duplicate ¤òµö¤¹¤È¤¹¤ë¤È¡¢¤³¤ì¤Ï»ß¤Þ¤ë¤Î¤«?
+   selection(uniq set of subterm)
+¤È¤¤¤¦·Á¤Ë¤Ê¤ë¤Ï¤º¡£¤À¤«¤é¡¢¤È¤Þ¤ë¤Ï¤º¡£subterm¤ÏÍ­¸Â¡£singleton ¤Ë¤Ï¡¢
+R̾¤Ë¤è¤ë¶èÊ̤µ¤¨É¬Í×̵¤¤¡£
+   ^r -> ^([false,true])
+   ^([p_0,p_1...p_n]) -> ^([px_0,px_1...px_n])
+¤È¤¤¤¦Å¸³«¤Ë¤Ê¤ë? ºÆsort¤ÏɬÍס£
+
+°ìÈÌŪ¤Ë¡¢^(r,[p_0,p_1...p_n]) ¤È¤¤¤¦·Á¤Ç¼ý«¤·¤Ê¤¤¤Î? r ¤¬°ì¤Ä¤À¤Ã¤¿¤é...
+¥Í¥¹¥È¤·¤¿¤éout¡£¤Ç¤ânest¤Ï¤¢¤Ã¤Æ¤â¸ÇÄê¤À¤«¤é¡£
+
+¤¬¡¢¤³¤ì¤Çcomputation¤ò¥È¥ì¡¼¥¹¤Ç¤­¤ë¤Î¤«? ¤¤¤ä¡¢ÆÃÊ̤ÊŸ³«¤¬É¬Íס£
+
+¤¢¤È¡¢determinization ¤·¤Ê¤¤¤È¤Í¡£(¤É¤¦¤ä¤Ã¤Æ?)
+   ^([p_0,p_1...p_n]) -> ^([px_0,px_1...px_n])
+¤ÎºÝ¤Ë¡¢px_0 ¤Ë¤Ï next ¤Î¤ß¤¬Æþ¤ë¡£¤½¤¦¤¹¤ì¤ÐÎɤ¤¡£
+    itl(p_0,more,..)
+¤Ç¤Î½ÐÎϤÏnext,true,false¡£Ok¡£
+
+Sun Nov  5 21:34:33 JST 1995
+
+¤·¤«¤·¡¢¤Ê¤ó¤È * ^R ¤ÏÈó¾ï¤ËÂ礭¤Ê¾õÂÖ¤òÀ¸À®¤¹¤ë¡£
+^R ¤È true & ^R ¤Î´³¾Ä¤¬Â礭¤Ê¾õÂÖ¤òÀ¸À®¤·¤Æ¤·¤Þ¤¦¡£(¤é¤·¤¤)
+¤³¤ì¤òÍÞ¤¨¤ë¤Ë¤Ï? °ì¤Ä¤Ïlength ¤ÇƬ¤òÍÞ¤¨¤ë¤³¤È¤À¤Ê¡£
+¤¢¤¢¡¢¤Ç¤â¡¢¤ä¤Ã¤Ñ¤êÂ礭¤¤¤«¡£¤¢¤ó¤Þ¤ê¡¢¤¦¤Þ¤¯¤Ê¤¤¡£
+length(10) ¤Ç¤â·ë¹½µðÂ礫..
+
+proj ¤Ç¤âƱ¤¸¤è¤¦¤ÊÌäÂê¤Ï¤¢¤Ã¤¿¤Î¤À¤±¤É...
+
+^r ¤Î permuation ¤ÎÂоÎÀ­¤ò²¿¤È¤«¤·¤Ê¤¤¸Â¤ê¤À¤á¤À¤Í¡£
+¤·¤«¤·¡¢½ç½ø¤ÏÊѤ¨¤Á¤ã¥À¥á¤Ê¤ó¤Ç¤·¤ç¤¦? ¤¦¡¼¤à¡£
+¤Ç¤â¤µ¡¢¥â¥Ç¥ë¼«¿È¤Ï¾®¤µ¤¤¤ó¤À¤¬.... ¤¦¡¼¤à¡£
+
+¤¤¤ä¡¢¤³¤Î¾ì¹ç¤Ï singleton removal ¤¬¸ú¤¯¤ß¤¿¤¤¡£¤½¤¦¤«¡£
+
+¤³¤ì¤Ïsingleton ¤Î½èÍý¤¬Àµ¤·¤¯¤Ê¤¤¤«¤é¤¸¤ã¤Ê¤¤?
+
+singleton ¤Î¸ú²Ì¤ÏÍ­¸Â¤«?
+      f(r^1,....r^n) -> exists
+¤À¤È¤¹¤ì¤ÐÍ­¸Â¡£¤À¤±¤É¡¢¸ÇÄꤷ¤Æ¤Ï¤À¤á¡£
+      r^s ? length(1) : r^s ? length(2) : ....
+¤È¤Ê¤ê¤¦¤ë?
+
+Wed Nov  1 21:12:04 JST 1995
+
+ÎãÂê¤Í¡¼... ¤·¤«¤·¡¢<>^R ¤¬»È¤¨¤Ê¤¤¤È¤Ê¤ë¤È....
+¤¢¡¢¤Ç¤â¡¢* ^R ¤Ï»È¤¨¤ë¡£
+
+Mon Oct 16 16:05:31 JST 1995
+
+LITL ¤Ç¡¢closure, proj È´¤­¤À¤Èpolynominal order¤ÎÊýË¡¤¬¤¢¤ë!?
+    ~(....&....(...&... ~(...&....)))
+¤È¤¤¤¦·Á¤Ç¡¢¤³¤ì¤Ëvariable pattern¤òËä¤á¹þ¤ó¤Ç¤¤¤±¤ÐÎɤ¤¡£¤³¤ì¤À¤È
+marking ¤À¤«¤é state space database ¤Ï¤¤¤é¤Ê¤¤¡£
+
+tableau expansion ¤Ç¤â¡¢À¸À®¤µ¤ì¤ë¾õÂÖ¤ÏƱ¤¸¿ô¤À¤«¤é·ë²ÌŪ¤Ëpolynominal
+¤Ë¤Ê¤Ã¤Æ¤¤¤¿¤Î¤«¤â....  ¤¿¤·¤«¤Ë¡¢quantifier, closure, proj ¤òÆþ¤ì¤ë¤È
+verification ¤ÏÆñ¤·¤¯¤Ê¤Ã¤Æ¤¤¤¿¡£
+
+¤¤¤ä¡¢¤Ç¤â¡¢empty interval ¤¬¤¢¤ë¤È¡¢¤½¤¦¤â¤¤¤«¤Ê¤¤¤«?
+     ~(....&....(...&... ~(...&....)))
+¤ÎǤ°Õ¤Îchop¤òand,empty¤ËÊѤ¨¤ëÁàºî¤¬¤¤¤ë¡£¤³¤ì¤Ï exponential¡£
+     p & p & p & p        & p
+     p & p & p & p,empty  , p
+chomp (non-empty interval chop) ¤À¤Ã¤¿¤é¡¢Âç¾æÉס£
+
+¤Ç¤â¡¢closure, proj ¤ò¤¤¤ì¤ë¤Ê¤é¤ª¤ó¤Ê¤¸¤«¡£
+
+Mon Oct  9 19:51:27 BST 1995
+
+proj ¤Ç¤Ï¡¢r^n ¤Î n ¤ò³¬Áز½¤¹¤ë¡£r^0 ¤Ï¡¢¤¹¤Ù¤Æ¤Î³¬ÁؤǶ¦Í­¤µ¤ì¤ë¡£
+¾¤Îlength¤Ï¶¦Í­¤µ¤ì¤Ê¤¤¤È¤ß¤ë¤Î¤¬Àµ¤·¤¤¤Î¤À¤í¤¦¡£length(1) proj Q
+¤À¤È¡¢r^1^1 = r^0^1 ¤À¤è¤Í?
+
+P proj Q ¤Ç¡¢Q part ¤Înext part ¤Ï¡¢
+proj ¤ÎÃæ¤Ëencupsulated ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢term ¤Ï¤¤¤¸¤ëɬÍפϤʤ¤¡£¤¬¡¢
+condition ¤Ï¤¤¤¸¤ëɬÍפ¬¤¢¤ë¡£¤¿¤À¤·¡¢renaming ¤ò original clock
+level ¤ÈƱ¤¸¤Ë¤¹¤ë¤È limit ¤¬¸ú¤­¤¹¤®¤ë¤À¤í¤¦¡£¤·¤«¤·¡¢¤³¤³¤òÊ£»¨¤Ë
+¤¹¤ë¤Î¤Ï¡¢¤É¤¦¤«¤Ê¤¡¡£term level ¤â³¬Áز½¤¹¤ì¤Ð¡¢ÌäÂê¤Ï¤Ê¤¤¡£
+(r^n)^n ¤È¤«...
+
+·ë¶É¡¢singleton removal ¤Ï¡¢¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¤Í¡£¤³¤ì¤¬¤¦¤Þ¤¯¤¤¤±¤Ð¡¢¤À¤¤
+¤ÖÈϰϤ¬¹­¤Þ¤ë¤Î¤À¤¬.... ¤»¤á¤Æ¡¢eventuality ¤ÈƱ¤¸¤°¤é¤¤¤Þ¤Ç¤Ë¤Ç¤­¤Ê
+¤¤¤Î? ¤¢¡¢¤½¤¦¤«¡¢r^s ¤òmarking ¤È¸«¤ì¤Ð¤¤¤¤¤ï¤±¤Í¡£¤·¤«¤·¡¢·ë¹½¡¢¤á¤ó
+¤É¤¯¤µ¤¤¤È¤¤¤¨¤Ð¤á¤ó¤É¤¯¤µ¤¤¡£
+
+Time constant regular variable
+
+renaming ¤Ê¤·¤Ê¤é¤Ð¡¢³ä¤È¼«ÌÀ¡£
+  r^0 ... r^limit
+¤òunify¤¹¤ì¤ÐÎɤ¤¡£renaming ¤¢¤ê¤À¤È¡¢¤â¤¦¾¯¤·Ê£»¨¤Ë¤Ê¤ë¡£r^n ¤ò state
+¤È¸«¤ë¤Î¤¬´Êñ¡£¤¤¤º¤ì¤Ë¤»¤è¡¢¤«¤Ê¤êÀ©¸Â¤µ¤ì¤¿´¶¤¸¤À¤Í¡£
+
+renaming ¤Î¡¢¤â¤Ã¤Èµ¤¤Îʹ¤¤¤¿algorithm¤¬¤¢¤ì¤Ð...
+
+Mon Oct  9 05:48:38 BST 1995
+
+^r -> true/false ¤Ç¤Ï¡¢[a](^r=length(2)) ¤¬ unsatisfiable.
+over(r) ¤Ç¤Ï¡¢true/false ¤ËÃÖ¤­´¹¤¨¤Æ¤¤¤ë¡£^r -> +r/-r ¤Ç¤â¡¢
+[a](^r=length(2))¤Ï¤À¤á¡£¤³¤ì¤Ë¤µ¤é¤Ë¹©Éפ¬¤¤¤ë¡£
+¤Ç¤â¡¢¤½¤ì¤Ï¤³¤Ã¤Á¤ÎÊý¤¬¤Þ¤·¤À¤È¤¤¤¦¤³¤È¤À¤í¤¦¡£¤Ç¤â¡¢¤É¤ì¤¯¤é¤¤
+¤Þ¤·¤Ê¤Î? local ¤Ç¤Ê¤¤¤°¤é¤¤¤«?
+
+singleton ¤ò ^(r,s) ¤ÇÃÖ¤­´¹¤¨¤Æ¤â¡¢[a](^r=lenth(2)) ¤Ï¡¢> length(4)
+¤Çfail ¤¹¤ë¡£¤Ê¤ó¤Ç?
+
+Sat Oct  7 17:20:17 BST 1995
+
+singleton removal ¤ò r^s ¤Ç¹Ô¤Ê¤¦¤È¡¢limit ¤ò°ì¤Ä¿­¤Ð¤¹¸ú²Ì¤¬
+¤¢¤ë¤é¤·¤¤¡£¤·¤¿¤¬¤Ã¤Ælimit¤Þ¤Ç¤¤¤¯¤è¤¦¤Ê¾ì¹ç¤Ï¾õÂÖ¤¬Áý¤¨¤ë¡£
+r^s ¤ÎÁªÂò¤òÆÈΩ¤Ë¹Ô¤Ê¤¦¤è¤¦¤ÊÊýË¡¤Ç¡¢¤Á¤ã¤ó¤È¤Ç¤­¤ë¤Î¤«?
+¤Ç¤­¤Ê¤¤¤è¤¦¤Êµ¤¤â¤¹¤ë¡£
+
+Sat Oct  7 10:08:57 BST 1995
+
+(1) ÈÖ¹æ¤òµÍ¤á¤ë (ÈÖ¹ælimit¤¢¤ê)
+
+¤Ï¡¢¤ä¤Ã¤Æ¤ß¤¿¤±¤É¡¢^r ¤Ë¤Ï¸ú²Ì¤¬¤¢¤ë¤ó¤À¤±¤É¡¢Â¾¤Î¤Ï¤Û¤È¤ó¤É
+´Ø·¸¤Ê¤¤¤Ê¤¡¡£[a](^r...) ¤ß¤¿¤¤¤Ê¤â¤Î¤Ë¤Ï¤­¤«¤Ê¤¤¤Î¤À¤í¤¦¡£
+
+Fri Oct  6 09:46:45 JST 1995
+
+(1) ÈÖ¹æ¤òµÍ¤á¤ë (ÈÖ¹ælimit¤¢¤ê)
+(2) singleton removal
+
+¤³¤ÎÆó¤Ä¤Ç¤«¤Ê¤ê¤¤¤¯¤Ï¤º¡£(2)¤É¤¦¤Ë¤«¤Ê¤ó¤Ê¤¤¤Î?
+
+(3) ÈÖ¹æ¤ò¹½Â¤²½¤¹¤ë low resolution?
+
+Edge driven ¤Ê logic ¤Ë¤Ç¤­¤ë¤«?
+
+Thu Oct  5 18:27:29 JST 1995
+
+¤¦¡¼¤à¡£length limit ¤Ï¡¢¤¦¤Þ¤¯¤¤¤¯¤¬¡¢¤½¤ì°Ê³°¤ÎÀ©¸Â¤¬¤¤¤Þ¤¤¤Á
+¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¤Í¡£
+
+rename ¤·¤Æ ^r ¤Î¿ô¤òÀ©¸Â¤¹¤ëÊýË¡¤À¤È¡¢over ¤ËÊÑ´¹¤µ¤ì¤ë¤â¤Î¤¬
+¤¢¤Þ¤ê¤Ë¥¢¥É¥Û¥Ã¥¯¤Ë·è¤Þ¤Ã¤Æ¤·¤Þ¤¦¡£
+    r^n
+¤Î  n  ¤Ë¡¢²¿¤« term ¤ò»ý¤Ã¤ÆÍè¤ì¤Ê¤¤¤Î?
+
+total order ¤ò»ý¤Ã¤ÆÍè¤ë¤«... ¸ú²Ì¤¢¤ë¤Î?  ¤µ¤¡...
+
+Sun Sep 24 01:14:36 JST 1995
+
+¤À¤«¤é¡¢
+
+^r = false ¤Ë¤¹¤ë¤È¡¢
+
+[a](^r=legth(2)) -> [a](false=legth(2))
+[a](false=legth(1))
+[a](false=legth(0)) = unsatisfiable
+
+¤Ë¤Ê¤ë¤«¤é¤À¤á¤Ê¤Î¡£¤¦¤ó¤¦¤ó¡£
+true = length(2) ¤â false = length(2)
+¤â¡¢Î¾Êý¤È¤âunsatisfiable¡£¤É¤Á¤é¤«¤È¤¤¤¦¤È¡¢
+    (length(2);not(length(2)))  & true
+¤È¤Ê¤ë¤Î¤¬Àµ¤·¤¤¡£
+    (length(2) & true) ; (not(length(2))  & true)
+¤Ï? ¤³¤ì¤Ï Ok ¤Ê¤Ï¤º¡£
+
+¤À¤Ã¤¿¤é¡¢expansion ¤¹¤ëÁ°¤Ësingleton¤ò¥Á¥§¥Ã¥¯¤·¤Æ¡¢singleton
+¤ËÂФ·¤Æ¤Ï quantifiy ¤·¤Æ¤·¤Þ¤¦¤Ã¤Æ¤Î¤Ï? ¤¦¡¼¤à...
+
+¤¸¤ã¤¢¡¢¤Ê¤ó¤Ç ^r -> ^r;not(^r) ¤Ç¤Ï¤À¤á¤Ê¤Î¤«?
+¤³¤ì¤Ï¡¢½ª¤ê¤ò¶¦Í­¤¹¤ë¤â¤Î¤ò¤¤¤Ã¤·¤ç¤Ë¤·¤Æ¤¤¤ë¤«¤é¡£
+
+^r on n+1
+   |--|   T
+   |-|    F
+   ||     F
+    |-|   T
+    ||    F
+     ||   F
+
+¤È¤¹¤ë
+
+^r on n
+  |---|
+  |--|    
+  |-|    
+  ||
+
+¤¬¿·¤·¤¤¤â¤Î¡£¤³¤ì¤é¤Ï¡¢ÆÈΩ¡£¤Õ¤ó¤Õ¤ó¡£
+
+Tue Sep 19 23:53:19 JST 1995
+
+¤É¤¦¤âÊѤÀ¤Ê¡£
+down(r^0)  ¤È    true;false ¤È¤Ï¤É¤³¤¬°ã¤¦¤ó¤À?
+state(1 , not(true& ?(^r,not(@ @empty),@ @empty)&true))
+                      [a](^r = length(2))
+[empty,down(r,0),up(r)]->false
+[empty,not(down(r,0)),up(r)]->empty
+[empty,down(r,0),not(up(r))]->empty
+[empty,not(down(r,0)),not(up(r))]->empty
+[more,down(r,0),up(r),ev(r^0)]->false
+[more,not(down(r,0)),up(r),ev(r^0)]->2
+not(true& ?(^r,not(@ @empty),@ @empty)&true);
+                      [a](^r = length(2));
+not(not(@empty)&true),not(@empty&true)
+                      [i](length(1)),not(length(1)&true)
+[more,down(r,0),not(up(r)),ev(r^0)]->3
+not(true& ?(^r,not(@ @empty),@ @empty)&true);
+                      [a](^r = length(2));
+not(@empty&true)
+                      not(length(1)&true)
+[more,not(down(r,0)),not(up(r)),ev(r^0)]->3
+
+¤ä¤Ã¤Ñ¤ê°ã¤¦¡£true ¤À¤È¡¢length(1)¤Çtrue length(2)¤Çfalse¤È¤¤¤¦
+µ»¤¬½ÐÍè¤Ê¤¤¡£¤³¤ÎÁªÂò¤Ï¤³¤Î¾ì½ê¤ÇÆÈΩ¤ËÁªÂò¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+(¤¨¤¨?¤À¤±¤É¡¢true;false ¤Ê¤ó¤À¤«¤é... ¤À¤Ã¤¿¤étrue¤«?)
++r, -r ¤ÎÊý¤¬¤Þ¤·¤«?
+
+Sat Sep 16 11:44:25 JST 1995
+
+singleton ^r ¤ò true, false ¤ËÃÖ¤­´¹¤¨¤ë¤È¡¢[]true,[]false ¤Î°ÕÌ£¤Ë
+¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£¼ÂºÝ¤Ï¡¢true/false ¤Ê¤Î¤Ë¡£¤À¤«¤é¡¢singleton removal
+¤Ï¤¦¤Þ¤¯¤Ê¤¤¡£
+
+t0:   ^r  = length(2)
+t1:   r^0 = length(1)    empty/not(r^0)
+t2:   r^0 = mpty(1)      empty/r^0
+
+Quantifier¤ËÃÖ¤­´¹¤¨¤ë? ¤À¤Ã¤¿¤é»Ä¤·¤Æ¤ª¤¤¤¿Êý¤¬¤Þ¤·?
+²¿¤«operator¤òºî¤ë?
+  some -> true/false
+quantified true? <>false ¤«¤Ê? not([](true)) = not(not(true & not true))). 
+¤Ç¤â¡¢¤³¤ì¤À¤È¤¤¤Ä¤«¤Ïfalse¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£operator¤Ë¤¹¤ë¤È¡¢deterministic
+¤Ç¤Ê¤¯¤Ê¤ë¤«¡£¤½¤ì¤Ï¤Þ¤º¤¤¡£negation¤¬¡£
+
+Fri Sep 15 11:26:13 JST 1995
+
+singleton check ¤òitl»þ¤Ë¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤?
+
+Wed Sep 13 18:24:24 JST 1995
+
+·ë¶É¡¢RITL¤Ï CFG ¤ò´Þ¤ó¤Ç¤¤¤ë¤Î¤À¤«¤é¡¢Regular Subset ¤ò·è¤á¤ë¤³¤È¤Ï
+¤Ç¤­¤Ê¤¤¡£
+
+^r ¤Îdepth¤òÀ©¸Â¤¹¤ì¤Ð¡¢¤¢¤ëÄøÅ٤ϤǤ­¤ë¡£¤·¤«¤·¡¢¤³¤ì¤Ç¤Ï
+fairness¤Ë¤Ï¤Ê¤é¤Ê¤¤¤Í¡£
+
+depth °Ê³°¤ÎÀ©¸Â¤Ï? ¾õÂÖ¿ô¤ÎÀ©¸Â¤¬Ë¾¤Þ¤·¤¤¡£
+
+singleton ¤Î remove ¤Ç¤«¤Ê¤ê¤Î¤³¤È¤¬½ÐÍè¤ë¤È¸À¤¨¤Ð¡¢¤½¤¦¤Ê¤Î¤À¤¬¡£
+
+singleton remove ¤Î¥¿¥¤¥ß¥ó¥°?
+   itl¤Î»þ¤Ë detect?
+   itlstd ¤Î»þ¤Ë detect?
+remove ¤Î»ÅÊý
+   eventually(^r,N)
+   eventually(not(^r,N))
+¤òÁÞÆþ¤¹¤ë¡£¤È¤¤¤¦¤³¤È¤Ï¡¢itldecomp ¤Î show ¤ÎľÁ°¤Ç
+¹Ô¤¨¤ÐÎɤ¤¡£
+
+¤·¤«¤·¡¢¤³¤ì¤À¤ÈÀµ³Î¤Ê¾õÂÖ½ÐÎϤǤϤʤ¤¡£¤Ç¤Ï¤Ê¤¤¤¬¸¶ÍýŪ¤Ë¥È¥ì¡¼¥¹
+¤Ç¤­¤ëÉôʬ¤ò¤Ï¤·¤ç¤Ã¤Æ¤¤¤ë¤À¤±¡£mark ¤òÉÕ¤±¤ë¤Î¤Ç¤ÏƱ¤¸¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
+¤ä¤Ï¤êremove¤·¤¿¤¤¡£
+
+^r¤Î½Ð¸½ÉÑÅÙ¤ò²¡¤µ¤¨¤ë¤³¤È¤Ç¡¢logic¤Ë¤Ê¤ë¤«? Î㤨¤Ð2¤Ä¤È¤«?
+
+*  consistent ¤Ë¤Ê¤é¤Ê¤¤==safe¤Ç¤Ê¤¤(ɸ½à·Á¤ò¹©Éפ¹¤ì¤Ð...)
+*  ¤Ç¤Ê¤¯¤Æ¤âÎɤ¤¤È¤¤¤¦¹Í¤¨Êý¤â¤¢¤ë¡£characterrise¤Ç¤­¤ë?
+
+¤¤¤º¤ì¤Ë¤»¤è¡¢singleton removal ¤Ç¤É¤³¤Þ¤Ç¤¤¤¯¤«¤À¤Ê¡£
+
+Sun Jul 23 10:16:02 JST 1995
+
+* ^r ->  +r, -r   depth ¤Ë¤è¤Ã¤ÆÆÈΩ¤ËÁªÂò
+* +r ¤â r^depth ¤Ë¤è¤êÁªÂò
+
+¤³¤ì¤À¤È¡¢[a](^r),<>(not(^r))¤¬satisfiable
+
+* ^r ->  +r, -r   depth ¤Ë¤è¤Ã¤ÆÆÈΩ¤ËÁªÂò¤·¤Ê¤¤
+
+¤È¡¢[a](^r=length(2))¤¬unsatisfiable
+
+¤¦¡¼¤à¡¢¤¦¤Þ¤¯¤¤¤«¤ó¡£
+
+Sat Jul 22 12:52:11 JST 1995
+
+* depth¤Î°ã¤¤¤Ïchop¤Î½èÍý¤Ç¹Ô¤Ê¤¦
+* ^r¤Îempty¤È¡¢+r, -r¤Îempty¤ÏÆÈΩ
+* ^r¤Îmore¤È¡¢+r, -r¤Î´Ø·¸
+
+  +r, -r ¤Ï¡¢°Û¤Ê¤ëdepth¤ÇT/F¤Î»þ¤ËÀ¸¤¸¤ë
+´û¤Ë +r ¤¬¤¢¤ë»þ¤Ï¡¢¤½¤ì¤Ë¹çή¤·¤ÆÎɤ¤
++r/\-r ¤È¤Ê¤ë¤³¤È¤Ï¤Ê¤¤¡£¤½¤ì¤Ïfalse¡£
+
+|-------|       +r
+|---------|     -r
+   ^r  +r ¤È¤¹¤ë
+   not(^r)¤¬¤¢¤Ã¤¿¤é-r¤È¤¹¤ë
+
+¤³¤ì¤Ç¤¤¤¤¤«?
+   tail¤ò¶¦Í­¤¹¤ër¤Ç¤¢¤ë not(^r),¤È^r¤Î°·¤¤¤ÏÂоÎ
+   ^r/-r¤ÎÁȹ礻¤Ï?
+
++r, -r ¤¬²ò¾Ã¤µ¤ì¤ë¾ì¹ç
+
+* +r or -r ¤¬empry¤Ë¤Ê¤ë¤È¤­
+      -r ¤Ïempty¤Ë¤Ê¤é¤Ê¤¤
+
++r¤¬»Ä¤Ã¤Æ³²¤¬¤¢¤ë¤«? -r¤¬¤Ê¤±¤ì¤Ð´Ø·¸¤Ê¤¤
+¾õÂÖ¤ÏÁý¤¨¤ë¤±¤É¡£
+
+Fri Jul 14 18:31:19 JST 1995
+
+°Û¤Ê¤ë chop ¤Ç¡¢°Û¤Ê¤ër¤ÎÈÖ¹æ¤òÉÕ¤±¤ë¡£
+¤½¤ÎÈÖ¹æËè¤Ë up(^r), down(r,n) ¤ò¹Ô¤Ê¤¦
+
+¤³¤ì¤Ë¤è¤Ã¤Æ¡¢¤¹¤Ù¤Æ¤ÎÁȹ礻¤¬°ì±þÆÀ¤é¤ì¤ë¡£
+
+ÈÖ¹æ¤Ï¾õÂ֤ˤÏÉղ䷤ʤ¤¡£(¤¤¤¤¤Î¤«?)
+Ʊ¤¸interval¾å¤Ç¤Ï¡¢
+    r, not(r)
+¤¬¤¢¤êÆÀ¤ë... ¤³¤ì¤Ï... µ¤¤Þ¤º¤¤¤«¡£
+    ^r ->   +^r, -^r
+¤È¤¹¤ë? ¤¹¤ë¤È... +up, -up ¤¬¤¢¤ë?
+
+¤Þ¤¢¡¢»î¤·¤Æ¤ß¤è¤¦¡£(¤ä¤Ã¤Ñ¤ê¤À¤á¤À¤Ã¤¿...)
+
+Thu Jul 13 14:05:06 JST 1995
+
+r^n ¤Î¿ô¤ò¸º¤é¤¹
+  => Åù²Á¤Ç¥æ¥Ë¡¼¥¯¤Êɽ¸½
+
+singleton r^n ¤Ï¾Ã¤»¤ë
+
+doubleton r^n¤É¤¦¤·¤òÍ»¹ç¤·¤¿¤¤¡£
+
+¿·¤·¤¤r¤òr^n¤ËÁêÂÐŪ¤ËÄêµÁ¤¹¤ë (¤½¤ì¤Ï¤Ç¤­¤ë¤Î¤À¤¬... +r/-r)
+¤Î¤Ï¡¢¤¦¤Þ¤¯¤¤¤Ã¤¿¤Î¤À¤¬¡¢Â­¤ê¤Ê¤¤¤â¤Î¤¬¤¢¤ë¡£¾õÂÖ¿ô¤¬
+­¤ê¤Ê¤¤¡£
+
+* ɬÍפʾõÂÖ¿ô¤Î¤ß¤ò¶èÊ̤¹¤ë
+* Ʊ¤¸·ë²Ì¤òÀ¸¤¸¤ëÊÑ¿ô¤Ï¶èÊ̤·¤Ê¤¤
+
+¼«Ê¬¼«¿È¤ÈƱ¤¸¤«¤É¤¦¤« / °ã¤¦¤È¤¤¤¦¤³¤È¤ò³Ð¤¨¤Ê¤¤¤È¤¤¤±¤Ê¤¤
+   Ʊ¤¸¤À¤Ã¤¿¤é´Ø·¸¤Ê¤¤
+
+What happen in next case? ([a](^r))
+
+   not(r^5) & true, r^5 & true, ^r  & true, not(^r) & true
+
+    ---|-----| r^5
+    ---|----| r
+
+r^5¤¬Íî¤Á¤ì¤Ð°ì¤Ä¸º¤ë¡£¸º¤é¤Ê¤±¤ì¤Ðr^6¤Ç°ì¤ÄÁý¤¨¤ë¡£¤·¤«¤·¡¢
+¤³¤Î¾ì¹ç¤ÏÁý¤¨¤Æ¤Ï¤¤¤±¤Ê¤¤¡£r^5 ¤È ^r ¼«¿È¤Ï´Ø·¸¤¬Ìµ¤¤¡£
+¤¬¡¢·ë²Ì¤ÏƱ¤¸¤È¤¤¤¦´Ø·¸¤¬¤¢¤ë¡£( ¤¦¤¬¡¼¡¢¤ï¤«¤é¤Ê¤¤¤è¤¦.... )
+
+st6:
+not(r^5) & true, r^5 & true, ^r  & true, not(^r) & true
+
+up(^r),down(r^5),down(^r)	@not(r^5)&t, t, t,  @not(r^6)&t
+up(^r),down(r^5),not(down(^r))	@not(r^5)&t, t, @(r^6)&t,  t
+up(^r),not(down(r^5)),down(^r)	t, @not(r^5)&t, t,  @not(r^6)&t
+up(^r),not(down(r^5)),not(down(^r))	
+				t, @not(r^5)&t, @(r^6)&t,  t
+
+
+Mon Jul 10 20:01:46 JST 1995
+
+f(^r) =>   contratint_1(^r) & continuation_1(^r)
+g(^r) =>   contratint_2(^r) & continuation_2(^r)
+
+r(r^n)&c(r^n) ¤¬n¤ò½ü¤¤¤ÆÅù¤·¤¤»þ¡¢
+r^n => r^n' ¤¬¤¤¤¨¤ë¡£
+¤±¤É¡¢Ê̤ËÅù¤·¤¤É¬Á³À­¤â¤Ê¤¤¡£(¤¿¤·¤«¤Ë...)
+
+r^n¤Ïquantify¤·¤ÆÎɤ¤¡£¤È¤¤¤¦¤³¤È¤Ï¡¢Æ±¤¸¤Ê¤é¾Ã¤·¤ÆÎɤ¤¤È¤¤¤¦¤³¤È?
+¤È¤¤¤¦¤³¤È¤«¡£cross term ¤Ï?
+   exists(^r, empty(^r)? ...)
+
+r0: {    +r(const, continu), 
+         -r(const, continu)  }
+r1: {    +r(const, continu), 
+         -r(const, continu)  }
+
+¤¤¤Ä¤«¤Ï
+	+r(empty,continu)
+	+r(true,continu)
+¤Î¤É¤Á¤é¤«¤Ë¤¤¤¯¡£¤¤¤ä¡¢¤¤¤«¤Ê¤¤¡£empty¤Ê¤éÌäÂê̵¤¤¡£true¤¬ÌäÂê(?)
+     +r(fixpoint,contiu)
+¤È¤¤¤¦·Á¤Ë¤Ê¤ë¡£¤³¤ì¤¬¤¿¤¯¤µ¤ó¸ºß¤¹¤ë¤È¤¤¤¦¤³¤È¤Ë¤Ê¤ë¡£
+     +/-r^n(fixpoint_k,continu_k_i)
+¤È¤¤¤¦¤ï¤±¤À¡£¤³¤Î¾ì¹ç¤Îr^n¤Î½Å¤Ê¤ê¤¬²ò¾Ã¤Ç¤­¤ì¤ÐÌäÂê¤Ï²ò·è¡£
+¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¤Í...
+    
+
+¤Ç¡¢Æ±¤¸¤â¤Î¤Ï¾Ã¤·¤ÆÎɤ¤¡£½ç½ø¤ò¤½¤í¤¨¤Ê¤¤¤È¾Ã¤·¤Ë¤¯¤¤¡£
+°ã¤¦r¤Ç¤âƱ¤¸¥«¥Ã¥³¤Ê¤é¾Ã¤·¤ÆÎɤ¤¡£(reular variable¤Ï¡¢¼Â¼Á¤Ï
+°ì¤Ä, ^r =>  r,^common ¤Ë¤¹¤ë¤«? ¤½¤ì¤Ï¤Á¤ç¤Ã¤È°ã¤¦)
+¤³¤Î¾ì¹ç¤Ï¾Ã¤·¤Æ¤â´³¾Ä¤Î¥Ñ¥¿¡¼¥ó¤¬ÊѤï¤é¤Ê¤¤¡£´³¾Ä¥Ñ¥¿¡¼¥ó
+¤´¤È¤Ë¥Þ¥Ã¥Á¥ó¥°¤ò¤È¤ë¤«¤é¡£(Í­¸Â¤ÎÁȹ礻¤Ê¤Î¤«?)
+
+¾Ã¤¹¤Î¤Ïterm level¤Ç¤ª¤³¤Ê¤¦?
+      c(r^n, i_n...) & ...
+      c(r^n, i_n...)
+¤È¤¤¤¦term¤·¤«r^n¤Ë´Ø¤·¤Æ¤Ï¤Ç¤Æ¤³¤Ê¤¤¡£¾Ã¤»¤ë¤ó¤À¤Ã¤¿¤é¡¢Â¾¤Î
+ÊýË¡¤Ï¤¤¤¤²Ã¸º¤Ç¤âÂç¾æÉס£
+
+f(r^n)¤Èf(r^n'1)¤Î´Ø·¸
+  |------|-|
+    |----|-|
+r^n, r^n' ¼«¿È¤ÏÆÈΩ
+
+r^1(r,c)
+r^2(r,c)
+  empty(r^1),empty(r^2),empty(r) => c
+    cross term
+  empty(r^1),more(r^2), empty(r) => c,(more(r),r^1(@(r),c))
+  more(r^1),more(r^2), more(r) => 
+    more(r),r^1(@(r),c),r^2(@(r),c)
+==
+  r^1(c);c,more(r),r^1(@(r),c);more(r),r^1(@(r),c),r^2(@(r),c)
+¾¤Îr^n¤È´³¾Ä¤¹¤ëÊýË¡¤¬ÊѤï¤Ã¤Æ¤·¤Þ¤¦...
+
+
+Sun Jul  9 15:32:43 JST 1995
+
+  r^1 & true;
+  r^2 & true;
+  r^3 & true
+
+°ì¤Ä¤Ë¤Þ¤È¤á¤é¤ì¤Ê¤¤?
+
+   f(+/- r^n)                    (ɬ¤ºtop¤Ë¤¢¤ë/°ìÅÙŸ³«¤µ¤ì¤Æ¤¤¤ë¤«¤é)
+   |-------------|-----------|
+               down(r^n) => true/false
+
+À­¼Á
+   f(+/- r^n)
+       down(r^n)      =>  f((+/-true ,empty))
+       not(down(r^n)) =>  f(+/- r^n)
+         parallel term¤¬¤¢¤ë»þ¤Ï̵¤¯¤Ê¤ë¤Þ¤ÇŸ³«¤¹¤ë
+	     r^n, *length(3) ¤Ê¤É¤Ï? ¤³¤ì¤Ï̵»ë¤·¤ÆÎɤ¤
+	     r^n, *length(3) & true ¤¬ÌäÂê
+                => evenrually true + *length(3)
+
+¤À¤«¤é¡¢n¤¬Ê£¿ô¤¢¤Ã¤Æ¤â¡¢f((+/-true ,empty))¤¬Æ±¤¸¤Ê¤éƱ¤¸¤Ç¤è¤¤(?)
+
+   f(+/- r^n)  => true & down(r^n),f(+/-true,empty)
+      => down(r^n) =  eventually(f(+/-true,empty))
+
+¤È¤¤¤¦¤³¤È¤Ï¡¢¤ä¤Ã¤Ñ¤êdown(r^n)¤ò³°¤Ë½Ð¤»¤ë¤È¤¤¤¦¤³¤È?  
+r^n & true ¤Ê¤é         eventually(true)
+not(r^n) & true ¤Ê¤é?
+
+¤Õ¤à¡£¤½¤·¤Æ eventually(f) ¤Î f ¤Ë¤Ïr^n¤ÏÆþ¤é¤Ê¤¤¡£¤³¤ì¤Ï
+¤¤¤±¤ë¤«¤âÃΤì¤Ê¤¤¡£
+
+chop¤Î½èÍý¤Î»þ¤Ë¡¢eventuality list¤òbdt¤Î·Á¤Ç³°¤Ë½Ð¤»¤ÐÎɤ¤¡£
+eventuality ¤¬Ëþ¤¿¤µ¤ì¤¿»þ¤¬r^n¤¬À®Î©¤·¤¿»þ¡£(¤³¤ì¤â
+Á°¹Í¤¨¤¿¤Ê...)
+  ^r & ....
+¤È¤¤¤¦·Á¤À¤±?
+
+   (^r, g) & f  => ev(f),(g & f)   ¤Á¤ç¤Ã¤È°ã¤¦...
+   (^r & f),(g & f)
+
+¤È¤Ï¾¯¤·°Û¤Ê¤ë¤è¡£not ¤¬¤¦¤Þ¤¯¤Ê¤¤¤Ï¤º¡£
+    not(ev(f)); not(g & f)  (?)
+
+¤½¤¦¤«... ev(f)¤¬Ëþ¤¿¤µ¤ì¤ì¤Ð¡¢^r¤ÏÍî¤Á¤ÆÎɤ¤¡£(Íî¤Á¤ì¤ë)
+Íî¤Á¤Ê¤¯¤Æ¤â¤¤¤¤¡£
+
+Á°¤â¤Ã¤Æevenruality form¤ËITL¤ò½ñ¤­´¹¤¨¤ë¤Î¤Ï?
+    f(r) => g(eventualy(h))
+
+ËÜÅö¤Ëdiceidable¤Ê¤Î¤«? À°¿ôÊýÄø¼°¤¬½ñ¤±¤ë¤È¤¹¤ì¤Ð...  
+
+Fri Jul  7 18:51:32 JST 1995
+
+true & ^r & true =>
+  r^1 & true;
+  r^2 & true;
+  r^3 & true
+¤È¤Ê¤ë¡£¤È¤¤¤¦¤³¤È¤Ï¡¢¤Ò¤È¤Ä¤Îinterval¤À¤±¤ò¸«¤ÆµÛ¼ý¤¹¤ë¤³¤È¤Ï½ÐÍè¤Ê¤¤¡£ 
+
+            t1  t2
+            up(r)         down(r^1)
+    r&true   |-------------|--------------------
+not(r&true)  |----------------|not(down(r^1)----
+             |---|up(r)----|not(down(r^2)-------
+
+r^1 ¤Ï¶¥¹ç¤¹¤ër^1¤¬¤¢¤ë»þ¤·¤«´Ø·¸¤·¤Ê¤¤¡£¤·¤¿¤¬¤Ã¤ÆñÆȤË
+½Ð¤Æ¤¯¤ër^1¤Ï¸½ºß»þÅÀ¤Ç
+  fin(r^1)      => true
+  fin(not(r^1)) => false
+¤ò·è¤á¤ÆÎɤ¤¡£¤³¤ì¤À¤±¤Ç¡¢true & ^r & true ¤Ï¼ý«¤¹¤ë¡£
+¤¬¡¢¤½¤ì¤À¤±¤Ç¼ý«¤¹¤ë¤«? ¤¿¤Ö¤ó¡¢¤·¤Ê¤¤¡£
+
+(1)
+Ê£¿ô¤Î»ÏÅÀ¤ò»ý¤Ä¾õÂÖ¤ò°ì¤Ä¤Ë¤Þ¤È¤á¤é¤ì¤ì¤Ð¤Ç¤­¤ë¡£+r, -r ¤Ï¤½¤¦¤¤¤¦
+ÊýË¡¤À¤Ã¤¿¡£¤¬°ì¤Ä¤Ë¤Ï¤Ê¤é¤Ê¤¤¡£Í­¸Â¤ÊÁȹ礻¤Ë¤Ê¤ë¡£
+
+(2)
+¼ý«¤¹¤ë¤È¤¹¤ì¤Ð¡¢¶¦Í­¤µ¤ì¤¿r^n¤ÎÁȤ¬Í­¸Â¤Ê¾ì¹ç¤Ç¤¢¤ë¡£¤³¤ì¤Ï¡¢finiteness
+¤Î¾ò·ï¤ËÁêÅö¤¹¤ë¡£Á°¤â¤Ã¤Æ¶¦Í­¤µ¤ì¤ë²ÄǽÀ­¤Î¤¢¤ëterm¤òÀ¸À®¤Ç¤­¤ë¤«? (
+¤¿¤Ö¤ó¤Ç¤­¤ë) 
+
+Á°¤â¤Ã¤ÆÊ£¿ô½Ð¤ÆÍ褿(°ã¤¦sytactical interval¾å¤Î)^r¤ËÈÖ¹æ¤òÉÕ¤±¤Æ
+¼±Ê̤·¤Æ¤ª¤¯¡£¶¥¹ç¤Ï¡¢°Û¤Ê¤ëÈÖ¹æ¾å¤Ç¤·¤«µ¯¤­¤Ê¤¤? 
+   [](<>(^r))  = not(ture & not(true & ^r))
+¤Î¤è¤¦¤Ê¾ì¹ç¤Ï? ¤½¤¦¤«¡£Æ±¤¸ÈÖ¹æ¾å¤Î¶¦Í­¤Ï+r, -r¤Ç¹½¤ï¤Ê¤¤¡£
+(true or false ¤À¤«¤é)
+   [](<>(^r))  <-> [](<>(^r)) 
+¤Î¤è¤¦¤Ê¾ì¹ç¤Ï?
+
+Fri Jun 30 20:08:47 JST 1995
+
+f(r^1,r^2,r^3) & true, 
+g(r^1,r^2,r^3) & true
+
+f(r^1,r^2,r^3)¤Èg(r^1,r^2,r^3)¤ò¸«¤Ê¤¬¤ér^n¤Î¿ô¤ò¸º¤é¤µ¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£ 
+
+r^n ¤Ï¡¢empty¤Î»þ¤·¤«±Æ¶Á¤·¤Ê¤¤¡£more¤Î»þ¤Ïtrue¤ÈƱ¤¸¡£
+
+^r ¤Î¤ß¤¬¿·¤·¤¤r^n¤òÁý¤ä¤¹¡£¤³¤ì¤ò¤¤¤«¤ËµÛ¼ý¤¹¤ë¤«¤òÄ´¤Ù¤ì¤ÐÎɤ¤?
+
+f(r^cur,r^1,r^2,r^3) & true, 
+  =>   r^cur ? +f(r^1,r^2,r^3) : -f(r^1,r^2,r^3)  & true
+g(r^cur,r^1,r^2,r^3) & true
+  =>   r^cur ? +g(r^1,r^2,r^3) : -g(r^1,r^2,r^3)  & true
+
+
+Fri Jun 30 10:48:46 JST 1995
+
+³Æstate¤Ë¡¢regular variable¤Îmap¤ò³ä¤êÅö¤Æ¤ë¡£ÊýË¡¤¬¤¤¤Þ¤¤¤Á
+¤ï¤«¤é¤Ê¤¤¡£^r¤ÎÀ¸À®¤µ¤ì¤¿¾õÂÖ¤ò¼±Ê̤¹¤ë¤³¤È¤¬É¬Íס£
+
+^r(s)  ¤ò¤ä¤Ã¤Æ¤ß¤ë¡£ÀΤâ¤ä¤Ã¤¿¡£
+   true & ^r 
+¤¬Çúȯ¤¹¤ë
+   r^1 ; r^2; r^3;  ...  ; true & ^r 
+¤³¤ì¤¬
+   r^1 true & ^r 
+¤È¤Ê¤ì¤ÐÎɤ¤¡£
+   r^1 .... r^2
+¤Ï¿·¤·¤¤r^n¤Ë¤Ê¤ë¡£(Áê¸ß´Ø·¸¤Ï?) ^r ¤É¤¦¤·¤ÎÀ©Ìó¤òÊÝ»ý¤·¤¿
+¤â¤Ã¤È¤â¾¯¤Ê¤¤r^n¤òÁªÂò¤¹¤ì¤ÐÎɤ¤¡£(¤³¤ÎÊÑ´¹¤Ïsafe & compete?)
+Áê¸ß´Ø·¸¤òÊݸ¤·¤Ê¤¤¤Ê¤é^r¤ò¤¹¤Ù¤Æ¶¦Ä̤ˤ¹¤ì¤ÐÎɤ¤¡£¤¬¡¢
+¤½¤ì¤Ï¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¡£
+   r^1 , not(r^2)  -> r^1, not(r^1) -> false
+¤Î¤è¤¦¤Ê¾ì¹ç¤¬¤¢¤ë¤«¤é¡£
+   r^1 , not(r^2)  -> r^1
+¤«? 
+
+¾¤ÎÊÑ¿ô¤¬Æþ¤ë¾ì¹ç¤Ï? r^1 .. r^n ¤Ë°Í¸¤¹¤ëterm¤ÎÊÑ´¹¤ò
+·×»»¤¹¤ë¡£= BDT ¤Î leaf ¤Î¿ô¡£¤½¤ì¤òɽ¸½¤Ç¤­¤ëºÇ¾®¤Îr^n¤ò
+ºî¤ë¡£
+
+¤½¤¦¤¹¤ì¤Ð¡¢temporal operator¤Î¥Í¥¹¥È¤ÏÊѤï¤é¤Ê¤¤¤Î¤À¤«¤é¡¢
+Á´ÂΤÏÍ­¸Â¤Ë¤Ê¤ë¤Ï¤º¡£
+
+¤³¤ì¤Ç¤Ê¤ó¤Çfull¤Ç¤Ê¤¯¤Æregular¤Ë¤Ê¤ë¤Î? ^r ¤¬context dependent
+¤Ç¤Ê¤¤¤«¤é¡£ r^1 , not(r^2)  -> r^1 ¤Ï¡¢context dependent ¤Ç¤Ï
+¤Ç¤­¤Ê¤¤¡£(¤Ê¤ë¤Û¤É...)
+
+Wed May 24 20:32:34 JST 1995
+
+^r¤Ï¡¢¤ä¤Ï¤ê¡¢
+    ^r -> +r, -r
+¤ÎÊÑ´¹¤Ç¤Ê¤ó¤È¤«¤¹¤ë¤Ù¤­¡£¤³¤¦¤·¤ÆÀ¸À®¤·¤¿¥â¥Ç¥ë¤Ï¡¢Àµ¤·¤¤RITL¤ò
+´Þ¤ó¤Ç¤¤¤ë¡£¤¢¤È¤ÏÀ°¹çÀ­¤Î¥Á¥§¥Ã¥¯¤ò¤¹¤ì¤ÐÎɤ¤¡£
+
+(1) local consstency check   => regular variable
+(2) global consistency check => regular constant
+
+¤É¤¦¤¤¤¦¤è¤¦¤Ëcheck¤¹¤ë¤Î? ¤ó....
+
+
+ÀΤÎbdcomp.pl ¤òbddlib¤Ç½ñ¤­´¹¤¨¤ë¡£
+
+characteristic function f(q)
+   f(q) = more,fx_q(sbn,sbx,P);empty,fn_q(P)
+
+      f(p&q) =  f(q) & q
+
+
+Tue May  2 17:49:35 JST 1995
+
+BDDLIB¤òÁȤ߹ç¤ï¤»¤¿¤¬¡¢¤ä¤Ã¤Ñ¤ê Prolog <-> BDD ¤ÎÊÑ´¹¤¬Æþ¤ë¤À¤±
+ÃÙ¤¯¤Ê¤ë¤À¤±¤À¤Ã¤¿¡£bdtstd.pl ¤ÏåºÎï¤Ë¤Ê¤ë¤Î¤À¤¬¡£
+
+Á°ºî¤Ã¤¿BDD¤ÎÊý¼°¤âÃÙ¤¯¤Ê¤ë¤À¤±¤À¤Ã¤¿¡£(BDT/*) ¤½¤ì¤Ï¡¢
+    BDD ¤Î leaf ¤ònext leaf¤ËŸ³«
+    BDD¤ÎºÆ¹½À®
+    next leaf¤ò2-3 tree¤ËÅÐÏ¿
+    ¿·¤·¤¤next leaf ¤ò¤µ¤é¤ËŸ³«
+¤È¤¤¤¦¤Î¤¬¤¹¤´¤¯ÃÙ¤«¤Ã¤¿¤«¤é¡£
+
+Charcteristic Function ¤òºî¤ê¾å¤²¤ëÊýË¡¤Ï¡¢º£°ì¤À¡£¤Ç¤âBDDLIB¤Ê¤é
+¤¦¤Þ¤¯¤¤¤¯¤«¤â¤·¤ì¤Ê¤¤¡£
+
+Subterm¤òÁ°¤â¤Ã¤Æ¡¢¤¹¤Ù¤Æ¡¢
+    condition, next
+¤È¤¤¤¦BDD¤ËŸ³«¤·¤Æ¤ª¤¤¤¿¤é?
+
+Quantifier¤Ê¤É¤Ï¡¢Subterm¤ÎÃæ¤Ë¾õÂÖ¤¬¸½¤ì¤Æ¤·¤Þ¤¦¡£¤À¤«¤é¡¢
+Á°¤â¤Ã¤Æ¡¢Ãæ¤òŸ³«¤·¤Æ¤ª¤¯¡£
+
+¤½¤¦¤¹¤ì¤Ð¡¢¤¢¤È¤Î½èÍý¤Ï¡¢BDD¤Î¤ß¤Ç¤Ç¤­¤ë¤Ï¤º¤À¡£(¤·¤«¤·¡¢CFË¡¤È
+·ë²Ì¤ÏƱ¤¸?)
+
+Wed Mar 29 17:22:43 JST 1995
+
+regular(r,....r....)
+¤È¤¤¤¦·Á¤ò»È¤¦ ( QPTL <-> RITL ¤À¤«¤é... )
+
+Quantifier¤òľÀܻȤ¦¤Î¤Ï?
+   st(0) = exists(c, c->st(1),not(c)->st(2))
+¤µ¤¡...
+
+begin(r,formuala) -> T/F
+end(r,formula)    -> T/F
+
+°Û¤Ê¤ë¤¦formula¤¬¼Â¤ÏƱ¤¸¤À¤Ã¤¿¡£-> ¤¤¤Ä¤« regular(r, f)
+¤È¤¤¤¦Æ±¤¸·Á¤Ë¤Ê¤ë¡£
+
+regular(r,f(r))
+    empty(f(r))      ->  r=true,empty
+    not(empty(f(r))) ->  r=false,empty
+regular(r,f(r))
+    more(f(r))      ->   r=true,regular(r,fx(r))
+    not(more(f(r))) ->   r=false,regular(r,fx(r))
+
+¤·¤¿¤¬¤Ã¤ÆÀ¸À®¤µ¤ì¤ë¥â¥Ç¥ë¤Ï¾éĹ¡£
+
+chop ¤¬Í褿»þ¤Ë r ¤òreset ¤·¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£
+(¤À¤è¤Í...)  ¤À¤Ã¤¿¤é¡¢regular(r,f(r))¤Ï¤¤¤é¤Ê¤¤?
+¤É¤¦¤ä¤Ã¤Æ? r ¤òÁ°¤â¤Ã¤ÆÀë¸À¤¹¤ë¤Ã¤Æ¤Î¤Ï?
+
+PDA ¤È¤Î´Ø·¸¤Ï?
+
+Thu Dec 15 20:21:58 JST 1994
+
+Model¤È¤ÎÂбþ
+
+     t0 -[+-]-> t1 -[+-]-> t2 -[+-]-> t3 
+
+      |---------|-----------|
+     r0         r1          r2
+                |-----------|-----------|
+                r0'        r1'         r2'
+
+r0 ¤Ï¾ï¤ËÍ×ÁÇ0¤«¤é»Ï¤á¤ë¡£
+¤«¤é»Ï¤á¤ë¡£
+r0 -[-]-> r1 ¤Ç½¸¹ç¤ÎÍ×ÁǤ˥·¥Õ¥È¤¹¤ë¡£
+r0 -[+]-> r1 ¤Ç¼¡¤Î»þ´Ö¤Î¤â¤Î¤È°ã¤¦FA¤Ç¤¢¤ë¤³¤È¤òɽ¤¹¡£
+
+Mon Nov 28 19:27:37 JST 1994
+
+RITL¥¹¥Æ¡¼¥È¤òITL formula¤ÎboolÂå¿ô¤Çɽ¤¹¡£boolÂå¿ô¤ÏBDD¤Çɽ¸½¤¹¤ë¡£
+
+¤â¤È¤â¤ÈITL formula¼«¿È¤¬subterm¤Î½¸¹ç¤À¤«¤é¡¢Æó½Å¤ÎboolÂå¿ô¤Ë¤Ê¤ë¡£
+¤·¤¿¤¬¤Ã¤Æ¡¢double exponential algorithm¤È¤Ê¤ë¡£
+
+r/not(r) flip ¤Ç¤Ï¡¢¤¹¤Ù¤Æ¤ÎÁȹ礻¤ÏÀ¸¤¸¤ë¤¬¡¢¤¹¤Ù¤Æ¤ÎÁȹ礻¤Î
+Ï¢·ë¤Ïɽ¸½¤Ç¤­¤Ê¤¤¡£¤·¤¿¤¬¤Ã¤Æ¡¢À¸¤¸¤¿¤¹¤Ù¤Æ¤ÎÁȹ礻¤ò¤È¤Ã¤Æ
+¤ª¤±¤ÐÎɤ¤¡£
+
+½¸¹ç¤Îºî¤êÊý
+   r/not(r) flip ¤ÇÀ¸¤¸¤¿LITL¤ò½¸¹ç¤È¤·¤Æ»ý¤Ä (implementation¤Ï?)
+
+   r ¤ÎÎã
+       [1]    r -(+r)->     r, r -(-r)-> not(r)    {r,not(r)}
+       [2]    r -> {r,not(r)} -> {r,not(r)}   (½ª¤ê)
+
+   t & r ¤ÎÎã (detail¤Ï°Û¤Ê¤ë¡£empty¤Î¾ì¹ç¤¬¤¢¤ë¤«¤é)
+       [1]    t & r -(+r)-> r\/t & r, t & r -(-r)-> not(r)\/t & r
+              {r\/t&r, not(r)\/t&r}
+       [2]    {r\/t&r, not(r)\/t&r} -> {r;t&r, not(r);t&r} (½ª¤ê)
+   [a](r=length(2))¤ÎÎã
+       [1]     [a](r=length(2)) -(+r)- >     r =length(1)/\[a](r=length(2))
+                                -(-r)- > not(r)=length(1)/\[a](r=length(2))
+               {r =length(1)/\[a](r=length(2)),
+                not(r)=length(1)/\[a](r=length(2))}
+       [2]     {r =length(1)/\[a](r=length(2)),
+                not(r)=length(1)/\[a](r=length(2))} =>
+               { r =length(0)/\  r =length(1)/\[a](r=length(2)),   F
+                 r =length(0)/\ ~r =length(1)/\[a](r=length(2)),
+                ~r =length(0)/\  r =length(1)/\[a](r=length(2)),
+                ~r =length(0)/\ ~r =length(1)/\[a](r=length(2))}   F
+       [3]      =>    [2] ¤Ø
+                   or [1]'¤Ø (r=length(1)¤¬true¤Î¾ì¹ç)
+
+¤â¤Ã¤È¥³¥ó¥Ñ¥¯¥È¤Ë¤Ê¤ë¤ó¤¸¤ã¤Ê¤¤? (¤³¤ì¤À¤Èfiniteness¤ÏÌÀ²ò¤À¤±¤É)
+ITL(r)¤Ï¡¢r¤òr/not(r)¤ËǤ°Õ¤ËÃÖ´¹¤·¤¿¤â¤Î¤Îsubset¡£¤É¤ì¤È¤É¤ì¤¬°ìÃפ¹¤ë¤«¤ò
+³Ð¤¨¤ì¤ÐÎɤ¤¤Î¤Ç¤Ï? => ³«»Ï»þÅÀ¤¬Åù¤·¤¤¤â¤Î¤¬°ìÃס£
+Index¤òÉÕ¤±¤ë¤Î¤Ï¥À¥á¡£=> ¥â¥Ç¥ë¤¬Í­¸Â¤Ë¤Ê¤é¤Ê¤¤¡£(¤¦¡¼¤à¡¢¤ï¤«¤é¤Ê¤¤)
+
+    ITL(r) => Ÿ³« => subset
+
+
+¥â¥Ç¥ë¤Î²ò¼á
+
+   boolÂå¿ô¤Ï¡¢r¤Îassignment¤¬Í¿¤¨¤é¤ì¤ë¤È²ò·è¤¹¤ë¡£¤·¤«¤·¡¢°ì¤Ä¤Î
+   ¥Î¡¼¥É¤¬Ê̤ʲò¼á¤ò¶¦Í­¤¹¤ë¤³¤È¤â¤¢¤êÆÀ¤ë¡£
+
+   Term´Ö¤ÏǤ°Õ¤ËÁ«°Ü¤¹¤ë¤Î¤«?
+   ¤½¤¦¤Ç¤Ï¤Ê¤¯¤Æ¡¢Æ±»þ¤ËÁ«°Ü¤¹¤ë¡£
+
+   °Û¤Ê¤ë³«»Ï»þÅÀ¤ò»ý¤Är¤Ï¡¢Æ±»þ¤Ë°Û¤Ê¤ëÁ«°Ü¤ò²ö¤ë
+   ¤¹¤Ù¤Æ²Äǽ¤ÊÁ«°Ü¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤Ê¤¯¡¢¤¤¤¯¤Ä¤«¤ÏF¤È¤Ê¤ê¶Ø»ß¤È¤Ê¤ë
+       => r ¤ËÂФ¹¤ëÀ©Ìó
+
+¼Â¹Ô¤Ç¤­¤ë?
+
+   boolÀá¤Î°ì¤Ä¤Îinstance¤òŬÅö¤Ë¼Â¹Ô¤¹¤ì¤ÐÎɤ¤
+
+R¤Ëñ°ì¤Îautomaton¤ò³ä¤ê¿¶¤ë¤³¤È¤Ï²Äǽ¤«?
+   [a](R = r)  where r is automaton constant
+
+»þ´Ö¤òÁ̤äƥâ¥Ç¥ë¤òºî¤ë
+
+   ¤³¤ì¤Ë¤è¤Ã¤Æ¡¢state minimization¤âƱ»þ¤ËÁö¤é¤»¤ë¤³¤È¤¬¤Ç¤­¤ë
+   Minimization¤Î¥Æ¥¹¥È¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¸«¤ë¤³¤È
+
+Thu Nov 24 14:54:00 JST 1994
+
+LTTL = LITL < RE
+    LITL* = RE
+    RITL  = RE    RITL(= 2nd order LITL)
+    RITL is decidable
+
+LTTL = LITL on compact time
+
+Even(p)¤Ï¡¢LITL¤Ç¤â¤À¤á¡£
+    (p.)* ¤¬¤Ç¤­¤Ê¤¤
+    (abac)* -> (a[bc])*
+
+LITL -> LTTL converter
+
+LITL/LTTL¤Ï¡¢¤ä¤Ã¤Ñ¤ê·²¤ò¹½À®¤¹¤ë
+
+[]a & []b & []a
+a...ab...ba...a ->  a until (b until []a)
+    ¤À¤«¤éconversion¤Ç¤­¤ë?
+a & b & a¤Ï
+     a, <>(b, <>a)
+¤«... ¤¦¤¦¡¢¤Ç¤­¤½¤¦¤Êµ¤¤¬¤¹¤ë...
+
+P & Q ->   start(P),(run(P) until lttl(Q)) ¤ËÊÑ·Á¤¹¤ë
+           run(P)¤Ë¤Ïquantifier¤¬Æþ¤ë¤Î¤«? Æþ¤é¤Ê¤¤?
+
+events      continue
+|----------|..........|
+|-> <>(events)
+           |-> [](continue)
+<>events,  <>(continue until Q))
+¤È¤¤¤¦¤è¤¦¤Ëcompile¤¹¤ë¡£¤Õ¤à¡£
+
+l(P) & Q    l(P) = LTTL formula of P
+   <>(P) ->  <>(P,<>(l(Q)))
+   [](P) ->  P until l(Q)
+   
+
+RITL decidability
+
+    Reverse Specification
+
+    R -> +(R) -(R) on Start Time
+
+    empty(R) ¤Ï hidden ¤À¤±¤É¡¢+R/-R ¤Ë´Ø¤·¤Æ¤ÏƱ´ü¤¹¤ë
+    ¤³¤³¤¬¤Þ¤ÀÎɤ¯Ê¬¤«¤é¤Ê¤¤¡£
+
+    Model¤òľÀܹ½À®¤·¤Ê¤¤¡£filtration¤Î°ÕÌ£¤Ç¤â...Â礭¤¹¤®¤ë¤«¤é¡£
+    ¤½¤ÎÂå¤ï¤ê¡¢Model constraint¤ò¹½À®¤¹¤ë¡£
+
+Generating C / In-kernel implementation
+
+Wed Oct  5 15:30:19 JST 1994
+
+Regular variable.
+
+^r ->     more(^r), @(    ^r) 
+      not(more(^r)),@(not(^r)) 
+^r ->     empty(^r),     empty
+      not(empty(^r), not(empty)
+
+This gives ^r constraints, and produce finite state.
+
+Meaning of regular variable.
+
+Mij(^r) = f(Mi(more(^r),empty(^r)),Mi+1j(^r))
+
+^r's automaton is depend on clock, and fin time is controled
+in finite state machine's way. Mij(^r) is f(Mi(p)...Mj(p)).
+^r = lenght(3) & ^r = length(2) is statisfiable.
+Is this different from interval variable? Yes. But How?
+
+If we need all regular variable act the same automaton,
+  exists(^c) [a](^r= ^c),...
+where ^c is a time stable automaton.
+
+It is ok to show:, 
+   M |= not(^r),(^r & true)
+
+Problem.
+
+   [a](^r=lenth(2)) , lenth(4)  is unsatisfiable
+
+   empty(^r),(empty =^r) => ^r      (true)
+   empty(^r),(len(1)=^r) => not(^r) (false)
+
+((empty = ^r)&true), ((length(1) = ^r)&true)
+but this is satisfiable.... ?-?
+
+
+Let's think about,
+   exists_automatic(R)     f(R) = g
+automatic unification = boolean unification?
+
+Sat Jun 12 10:41:24 JST 1993
+
+dvcomp uses subterm tree for decomposition and
+ndcomp uses chop normal form. Since development
+result is not the same, lazy generation of
+state is not allowed.
+
+sb's and itl_state's hash and sharing is important.
+Time to write C version?
+
+Sun Jun  6 14:15:42 JST 1993
+
+Now module system is supported.
+tgen/0 generates Tokio program and
+kiss/0 generates KISS format for SIS.
+
+ex(300,X),ex(true proj ~X) becomes very large. Terminates?
+ex(300,(X,Y)),ex(true proj (X;Y)) is still very large, but
+ex(300,(X,Y)),ex(true proj X) is Ok.
+
+old/bdcomp does not check sbterm early. This is the reason why this
+method is slow.
+     expansion ; subterm check   is bad
+     expansion with subterm check will be ok.
+
+How about permutation?
+    Declare permutation from the begining.
+
+    |- permute V on F <-> F
+
+How about anti-symmetry?
+    
+    |- odd-permute  V on F <-> ~ F
+    |- even-permute V on F <-> ~ F
+
+Mon Nov  9 15:18:49 JST 1992
+
+prefix operator is wrong.
+     length(2),prefix((length(3),fin(false)))
+must be false.
+
+Mon Sep 21 20:16:39 JST 1992
+
+
+I'm very sorry to send you rather large example. But it is 
+a little dificult to extract simple example.
+
+To compile and load,
+
+| ?- [bddi].
+
+
+In next example, fixpoint predicates find a subtle counter example of ITL
+formula.
+  (p&&p&&p&&p&&p&& ~p&&p)->[](<>p)
+
+is tested by
+
+| ?- ex(10,X),fixpoint(X).
+
+First, this formula is translated into a finite state automaton.
+Like this.
+
+                 +----------+
+     E,PL -------| Logic    |--->   E,PL
+                 |          |
+     Sn   +------|          |--->+  Sx
+          |      |          |    |
+          |      +----------+    |
+          |      +----------+    |
+	  +-<----| Latch    |----+
+                 +----------+     
+
+In this case, Sn/Sx pairs are vector of ITL subterm. "Logic" is
+defined in boolean constraint on Sn/Sx.
+
+In fixpoint/10, fixpoint(F,Fix,Fix1,E,P,PL,Sn,Sx,S,N),
+   F    current possible state (boolean constraint of Sn)
+   Fix	disjunction of visit state
+   Fix1	previous visit state, if it is eqaul to Fix, everything is done.
+   E,P,PL	Input/Output value of variable in state diagram
+   Sn	state variable
+   Sx	next state variable
+   S	for display subterm state.
+   N	depth count
+
+fixpoint(_,Fix,Fix1,_E,_P,_PL,_Sn,_Sx,_S,_N):-
+	bool:taut(Fix=:=Fix1,1),!,write('end'),nl.
+fixpoint(F0,_,Fix,E,P,PL,Sn,Sx,S,N):-
+	quantify(Sn,F0,F0S),bool:sat(F00=:=F0S),  % take all possible state 
+	display_state(E,E*F00,P,PL,S,_,Sn),     % find counter example
+	quantify([E|PL], ~E*F00,F0P),           % for all possible I/O
+	bool:sat(F0Q=:=F0P),           
+	copy_term([E,Sx,F0Q],[0,Sn,F1]),        % replace Sn/Sx
+	bool:sat(Fix1=:=Fix+F1),                % for termination
+	write_state_number(N,N1,'depth:'),!,
+	fixpoint(F1,Fix,Fix1,E,P,PL,Sn,Sx,S,N1).
+
+So this traces all possible execution in finite state automaton.
+
+| ?- ex(10,X),fixpoint(X).
+depth:0                       % it becomes slower and slower...
+depth:1
+depth:2
+depth:3
+depth:4
+depth:5
+depth:6
+depth:7
+empty,[t(p,0)],[...]          % find one counter example
+|:                            % a return is required
+depth:8
+end
+
+X = ((p&&p&&p&&p&&p&& ~p&&p)->[](<>p)) ?
+
+yes
+| ?-
+
+I think I need something like setarg in boolean constraint.
+Sun Sep 20 18:10:30 JST 1992
+
+Why not add exclusive status as a primitive?
+    states([a,b,c,d,e,f]) -> [](( ~(( a,b)), ... )
+	2^n ... Wow!
+It generates
+    status(a)->  ... ; status(b)-> ...  status(f)-> .. ; status([])-> ...
+	generate n+1.
+
+Tue Sep 15 13:04:43 JST 1992
+
+·ë¶É¡¢Regular variable state ¤ò¶¦Í­¤·¤Ê¤¤¤È¼ý«¤·¤Ê¤¤¤·¡¢
+¶¦Í­¤Ç¤­¤ë¤«¤É¤¦¤«¤ÎȽÃǤÏÂç°èŪ¤À¤«¤é¡¢¤³¤ÎÊýË¡¤Ç¤Ï
+¤Ç¤­¤Ê¤¤¤é¤·¤¤¡£
+
+Tue Sep 15 11:36:36 JST 1992
+
+Regular variable must be non-deterministic.
+^r
+[more,up(r),down(r)] is not false
+
+If we don't care about down, we cannot distinguish
+    ^r& ^r ,not( ^r )
+
+    up(r)      down(1)    ~down(1)
+    |                |       |
+    |----------------|-------|
+               up(r)       down(2)
+
+Mon Sep 14 14:07:52 JST 1992
+
+(^r & ^r),not(^r)
+itl:0 [empty,up(r),down(r,0)] -> false
+itl:0 [more,up(r),down(r,0)]  ->  false
+itl:0 [more,up(r),~down(r,0)] ->  (stay(r,now)&^r),not(stay(r,now))  now=1
+stay(^r,0)
+
+(stay(r,now)&^r),not(stay(r,now)) 
+itl:1 [empty]->false
+itl:1 [more,down(r,1),up(r),down(r)]->false
+itl:1 [more,~down(r,1)]-> (stay(r,now)&^r),not(stay(r,now)) now = 1 2
+itl:1 [more,down(r,1),~down(r,0)]]-> 
+    stay(r,1);(stay(r,now)&^r),not(stay(r,now)) 3
+stay(2,1)
+
+stay(r,1);(stay(r,3)&^r),not(stay(r,3)) 
+itl:3 [empty,down(1)]->empty
+itl:3 [empty,~down(1)]->false
+itl:3 [more,down(r,1)]->true
+itl:3 [more,~down(r,1)]-> stay(r,2);(stay(r,4)&^r),not(stay(r,4)) = 3
+itl:3 [more,down(r,1),~down(r,0)]]-> stay(r,1);(stay(r,3)&^r),not(stay(r,3)) 3
+stay(2,1),stay(4,3)
+
+Mon Sep 14 00:25:08 JST 1992
+
+^r ¤ÇÀ¸À®¤µ¤ì¤ëautomaton¤Ï¡¢^r¤òÉáÄ̤ÎÊÑ¿ô¤È¸«¤ÆÀ¸À®¤¹¤ëtableau¤Î
+subset¤Ç¤¢¤ë¡£½¾¤Ã¤Æ¡¢tableau¤Înode¤ò»Ø¤·¼¨¤¹¤³¤È¤Ç ^r ¤Î¥â¥Ç¥ë¤ò
+ºî¤ë¤³¤È¤¬½ÐÍè¤ë¡£¤·¤«¤·¡¢¤¦¤Þ¤¯¤¤¤«¤Ê¤¤...
+
+(^r & true),not(^r) ¤Î¥â¥Ç¥ë¤Ï¤Ê¤¤¤«¤é
+
+¤½¤³¤Ç¡¢stay(r,N)¤ò»È¤¦  (up(r),emtpy & true & down(r),empty) ¤Ç¤Ï¤À¤á¡£
+^r & ^r -> ^r ¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¤«¤é¡£
+
+¤¹¤ë¤È¥â¥Ç¥ë¹½ÃÛ¤¬¼ý«¤·¤Ê¤¤  --> ¤³¤ì¤Ï Full ITL ¤À¤«¤é
+
+¤·¤«¤·RITL¤Î¥â¥Ç¥ë¤ÏÍ­¸Â¤À¤«¤é stay(r,N)¤Î¤«¤Ê¤ê¤ÎÉôʬ¤Ï
+Áê¸ß¤ËÅù¤·¤¤¡£Åù¤·¤¤¤«¤É¤¦¤«¤ò¤É¤¦È½ÃǤ¹¤ë¤«¤¬ÌäÂê¡£
+
+Deterministic Path¤¬Åù¤·¤±¤ì¤ÐƱ¤¸state¤ÈȽÃǤ¹¤ë¤Î¤Ç¤Ï­¤ê¤Ê¤¤
+Loop¤¬ºî¤ì¤Ê¤¤¤«¤é¡£
+
+¤à¤·¤í¤¹¤Ù¤ÆÅù¤·¤¤¤Î¤¬Default¤Ç¡¢É¬Íפʻþ¤À¤±Ê¬Î¥¤¹¤ë¤Î¤¬Ë¾¤Þ¤·¤¤
+
+Mon Jan  1 11:05:38 JST 1990
+
+^r & ^r
+itl:0 [empty,up(r),down(r)] -> empty
+itl:0 [more,up(r),down(r)]  ->  false
+itl:0 [more,up(r),~down(r)] ->  stay(r,[true])&^r  1
+stay(r,[]) -> down,empty
+stay(r,[]) -> ~down,more
+
+stay(r,[])&^r
+itl:1 [empty,down(r,[]),down(r,[true]),up(r)]
+itl:1 [more,down(r,[true]),up(r),down(r,[])]->false
+itl:1 [more,~down(r,[true])]-> stay(r,[true,true])&^r 2
+itl:1 [more,down(r,[true]),up(r),down(r,[])]->false
+itl:1 [more,down(r,[true]),up(r),~down(r,[])]->stay(r,[true]) 3 -> false
+itl:1 [more,down(r,[true]),~up(r)])]->false
+stay(r,[]) -> down,empty
+stay(r,[true]) -> down,up(r),empty
+stay(r,[true]) -> more, ~down, stay(r,[true,true])
+                                    stay(r,[true])  ?why not
+stay(r,[true]) -> more, down, up(r), stay(r,[true])  -> false
+
+stay(r,[true,true]) -> down,up(r),empty
+itl:2 [empty,down(r,[]),down(r,[true,true]),up(r)]
+itl:2 [more,down(r,[true,true]),up(r),down(r,[])]->false
+itl:2 [more,~down(r,[true,true])]-> stay(r,[true,true,true])&^r 4
+itl:2 [more,down(r,[true,true]),up(r),down(r,[])]->false
+itl:2 [more,down(r,[true,true]),up(r),~down(r,[])]->stay(r,[true]) 3 -> false
+itl:2 [more,down(r,[true,true]),~up(r)])]->false
+stay(r,[true,true]) -> down,up(r),empty
+stay(r,[true,true]) -> more, ~down, stay(r,[true,true,true])
+                                    stay(r,[true,true])  ?why
+stay(r,[true,true]) -> more, down.
+
+Sat Sep 12 18:05:26 JST 1992
+
+How about contiion-history list?
+
+    (p->^r),@((q->^r),@empty)
+    itl:0  [more,p,up(r),~down(r,[])]	-> stay(r,[p]),(q->^r,@empty)	1
+    itl:0  [more,~p]-> true
+    stay(r,[])    p ->stay([p]),~down
+                 ~p->true
+
+    stay(r,[p]),q->^r,@empty
+    itl:1  [more,p,q,up(r),~down(r,[p]),~down(r,[])]	
+         -> empty,stay(r,[(p,q),p]),stay(r,[p]),stay(r,[q]) 2
+    itl:1  [more,~p,q,up(r),~down(r,[p]),~down(r,[])]	
+         -> empty,stay(r,[(~p,q),p]),stay(r,[q]) 3
+    itl:1  [more,~q]	-> empty,stay(r,[~q,p]) 4
+    stay(r,[])    q ->stay(r,[q]),~down
+                 ~q ->true
+    stay(r,[p])   q ->stay(r,[(p,q),p]),~down
+                  q ->stay(r,[(~p,q),p]),~down
+                 ~q->true
+
+    empty,stay(r,[(p,q),p]),stay(r,[p]),stay(r,[q]) 
+    itl:2  [empty,q]	-> false
+    itl:2  [empty,~q,down(r,1),down(r,0)]	-> true 
+    stay(r,[(p,q),p])    ->down
+    stay(r,[p])    ~q->down
+    stay(r,[q])    ~q->down
+    stay(r,[(p,q),p])  ~q->down
+
+    empty,stay(r,[(~p,q),p]),stay(r,[q]) 
+    itl:3  [empty,down(r,1),down(r,0)]	-> true 
+    stay(r,[(p,q),p])  ->down
+    stay(r,[q])  ->down
+
+    empty,stay(r,[~q,p])
+    itl:3  [empty,down(r,1)]	-> true 
+    stay(r,[~q,p]) ->: down
+
+Fri Sep 11 16:13:48 JST 1992
+
+Parallel Regular variable construction
+
+    itl:0  [up(r),~down(r,0)] -> ... stay(r,0).... 1   -> stay(r,N1)
+           [up(r),~down(r,0)] -> ... stay(r,0).... 2   -> stay(r,N2)
+
+    ^r:0   [up(r),~down(r,0)] -> ... stay(r,N1).... 1
+           [up(r),~down(r,0)] -> ... stay(r,N2).... 2
+
+    equivalence list
+           stay(r,i) = stay(r,j) 
+    if     stay(r,4) -f-> stay(r,i)
+           stay(r,4) -g-> stay(r,j),   f->g
+
+    stay(r,n) .... itl:n -> [x0,x1,x2...xk]
+
+Tue Sep  8 22:13:51 JST 1992
+
+true & ^r
+[empty,up(r),down(r)]->true
+[more,up(r),down(r)]->(stay(r,1);true & ^r)
+[more,up(r),~down(r)]->(stay(r,1);true & ^r) = 3 
+[more,~up(r)]->(true & ^r)
+
+How to prevent stay(r,N) multiplier?
+
+state(3) = (stay(r,1);true & ^r) 
+[empty,down(r,1)]->empty
+[empty,down(r,3),up(r),not(down(r,1))]->empty
+[empty,not(down(r,3)),up(r),not(down(r,1))]->false
+[empty,down(r,3),not(up(r)),not(down(r,1))]->false
+[empty,not(down(r,3)),not(up(r)),not(down(r,1))]->false
+[more,up(r)]->(stay(r,1);stay(r,3);true & ^r)
+[more,not(up(r))]->3
+
+Why stay(3) = stay(1)?   .... Finitarity?
+
+state(1 , ^r& ^r,not(^r))
+[empty,down(r,1),up(r)]->false
+[empty,not(down(r,1)),up(r)]->false
+[empty,down(r,1),not(up(r))]->false
+[empty,not(down(r,1)),not(up(r))]->false
+[more,down(r,1),up(r)]->3       (stay(r,1);stay(r,1)& ^r),not(stay(r,1))
+[more,not(down(r,1)),up(r)]->4  stay(r,1)& ^r,not(stay(r,1))
+[more,down(r,1),not(up(r))]->false
+[more,not(down(r,1)),not(up(r))]->false
+
+state(3 , (stay(r,1);stay(r,1)& ^r),not(stay(r,1)))
+[empty,down(r,1)]->false
+[empty,not(down(r,1))]->false
+[more,up(r),down(r,1)]->3
+[more,not(up(r)),down(r,1)]->3
+[more,not(down(r,1))]->3
+
+state(4 , stay(r,1)& ^r,not(stay(r,1)))
+[empty,down(r,4),up(r),down(r,1)]->false
+[empty,not(down(r,4)),up(r),down(r,1)]->false
+[empty,down(r,4),not(up(r)),down(r,1)]->false
+[empty,not(down(r,4)),not(up(r)),down(r,1)]->false
+[empty,not(down(r,1))]->false
+[more,up(r),down(r,1)]->3
+[more,not(up(r)),down(r,1)]->4
+[more,not(down(r,1))]->4
+
+1.4510000000000002 sec.
+
+
+Tue Jun 30 17:01:37 JST 1992
+
+Quantifier does not works well.
+?-fixpoint(even(p)=evenp(p)).
+Projection looks like difficult.
+
+Tue Jun 30 08:58:27 JST 1992
+
+fixpoint((a,(more = (more & more)))) terminates. why?
+fixpoint(more = (more & more)) causes loop. why?
+
+It looks like SICSuts's bug. Some how I avoid that.
+
+Sun Mar 01 01:01:57 1992 BST
+
+Yes, I almost finish BDD version.
+
+Quantification is very subtle in SICStus.
+
+?-bool:sat(_A=:= B*C),bool:sat(_A=:=A),bool:sat(E =:= ~B*A^A).
+?-bool:sat(_A=:= B*C),bool:sat(A=:=_A),bool:sat(E =:= ~B*A^A).
+give us different result.
+
+?-fixpoint(p-> [](<>(p))  causes quantifier failure.
+
+exists(p,..) is now working, but closure is not.
+
+Mon Feb 10 20:06:36 1992 BST
+
+?-fixpoint(p,X).
+    subterm(p,N,_,[p(N)],[])              p =:= N
+    ?-tableau(N,F1,[],[])
+        F1 = exists(p,F*R)/replace(S,S')
+                      N=p,   F1=nil?
+      	copy_term([],[],N],[[],[],F]),    no constrain on N/F
+	?-bool:sat(F1=:=(N+F)).
+ ?-bool:taut(N=:=F1,1)     N=:=(N+F)  x
+
+
+Wed Nov 06 21:56:57 1991 BST
+
+Dense time modification.
+
+more <-> more & more
+ discrete time:
+      more      -> empty->false;more->true
+      true      -> empty->true; more->true
+      more&more -> empty->false;more->true&more
+      true&more -> empty->false;   <---- This makes difference
+                   more->true
+ dense time:
+      more&more* > empty->false;more->more*
+      more*     -> empty->true ;more->more*
+
+      more      -> empty->false;more->true
+      true      -> empty->true; more->true
+      more&more -> empty->false;more->true
+      true      -> empty->true; more->true
+
+
+Tue Jun 25 07:21:11 1991 BST
+
+2nd order local variable is also easily implemented. Notation?
+regurlar
+
+Tue Jun 25 07:06:28 1991 BST
+
+For verification,
+Information hiding is bad. Necessary information muse be accessed by
+everyone for reliability. Only useless information is allow to hide.
+If some information does not change world, it is useless. Higer
+abstraction makes many information useless, which can be hide.
+
+Tue Jun 25 06:52:32 1991 BST
+
+Closure is easily implemented.
+Single varible quantifier is also easy. These are effectively
+equivalent in expressiveness.
+
+But nested quantifier is very different. Its decomposition is
+same as sigle variable case,  but to make a standard form, it
+requires P-space. Quantifier impelentation of bdtstd/itlstd
+will be difficult.
+
+Derivation tree generation method is much suitable for quantifier.
+But is it worth implement? It is better to find out another
+abstraction mechanism, such as multi-linear projection.
+
+The important this is not what IS existing, but how it DOES exists.
+Quantifier lacks synchronization type.
+
+Tue Jun 21 21:08:31  BST 1991
+
+Problem on Theorem prover
+
+1) it does not handle eventuality
+      |= true & empty  ( compact interval )
+      |= finite -> (true &  empty)  <- eventuality axiom
+       ( open interval ) introducing topology? and differencial?
+       d/dt f(x,t)  is related to scheduling? very close to ....
+2) dense time
+      what's wrong?
+3) 3-stages: itlstd, decomposition, checking are redundant each other.
+      -> derivation tree construction ( do this first )
+      (bdcomp.pl must work faster)
+4) extensions
+       infinite interval
+       interval variable
+       projection
+       framing
+       multi-linear
+       scheduler
+       other standard form
+       interactive proof/protocol design
+       rational length operator
+5) overupping interval (minus length)
+
+Tue Jun 18 16:45:35 BST 1991
+
+true & q ->
+  NDST
+   e0, e1   q->true
+   m0, e1   q->@true
+   m0, m1   ->@(true & q)
+   else false
+  DST
+  [e0,q]  -> true 
+  [m0,q]  -> @true ;@(true & q)
+  [e0,~q] -> false
+  [m0,~q] -> @false;@(true & q)
+
+~(true & q) ->
+  NDST
+   e0, e1   q->false
+   m0, e1   q->@false
+   m0, m1   ->@~(true & q)
+   else true
+  DST
+  [e0,q]  -> false 
+  [m0,q]  -> ~(@true ;@(true & q))
+  [e0,~q] -> true
+  [m0,~q] -> ~(@false;@(true & q))
+
+Tue Jun 18 15:49:21 BST 1991
+
+
+%
+% London 23:38 36.52 	Newyork 18:38 	Tokyo 07:38 
+%
+p & q
+  ->  |-----|-----|
+           1   0
+
+ifEmpty(p)      1->p 
+ifNotEmpty(p)  ~1->p
+
+
+P & Q ->
+   0         P,Q
+  ~0, 1    beg(P),Q
+  ~0,~1    Pn, @(Px,Q)
+
+p & q ->
+  NDST
+   0       p,q->true
+  ~0, 1    p,q->@true
+  ~0,~1    p->@(true & q)
+           else false
+  DST
+  [p,q]  -> [0]true +[~0,1]@true +[~0,~1]@(true & q) <- sometime?
+  [p,~q] -> [0]false+[~0,1]@false+[~0,~1]@(true & q)
+  [~p]   -> []false
+      a path must contain true eventuality
+
+~(p & q) ->
+  NDST
+   0       p,q->false
+  ~0, 1    p,q->@false
+  ~0,~1    p->@~(true & q)
+           else true
+  DST
+  [p,q]  -> [0]false+[~0,1]@false+[~0,~1]@~(true & q) <- never?
+  [p,~q] -> [0]true +[~0,1]@true +[~0,~1]@~(true & q)
+  [~p]   -> []true
+      a path must not contain false eventuality
+
+
+i¤Î¤Ï¼°¤ÎÃæ¤Î&¤Î¿ô¤ËÅù¤·¤¤
+
+empty
+   0  true
+  ~0  false
+~empty
+   0  false
+  ~0  true
+fin(p)
+   [p]   -> [0]true +[~0]@fin(p)
+   [~p]  -> [0]false+[~0]@fin(p)
+keep(p)
+   [p]   -> [0]true+[~0]@keep(p)
+   [~p]  -> [0]true+[~0]false
+p & q & r ->
+  NDST
+   2, 1, 0    p,q,r->true
+   2, 1,~0    p,q,r->@true
+   2,~1,~0    p,q->@(true & r)
+  ~2,~1,~0    p->@(true & q & r)
+  DST
+  [~p]      -> []false
+  [p,~q]    -> [        0]false 
+              +[ 2, 1,~0]@false 
+              +[ 2,~1,~0]@(true & r)
+              +[~2,~1,~0]@(true & q & r)
+  [p,q,~r]  -> [        0]false 
+              +[ 2, 1,~0]@false 
+              +[ 2,~1,~0]@(true & r)
+              +[~2,~1,~0]@(true & q & r)
+  [p,q,r]   -> [        0]true 
+              +[ 2, 1,~0]@true 
+              +[ 2,~1,~0]@(true & r)
+              +[~2,~1,~0]@(true & q & r)
+
+~(p & q & r) ->
+  NDST
+   2, 1, 0    p,q,r->false
+   2, 1,~0    p,q,r->@false
+   2,~1,~0    p,q->@~(true & r)
+  ~2,~1,~0    p->@~(true & q & r)
+  DST
+  [~p]      -> []true
+  [p,~q]    -> [       0]true 
+              +[ 2, 1,~0]@true 
+              +[ 2,~1,~0]@~(true & r)
+              +[~2,~1,~0]@~(true & q & r)
+  [p,q,~r]  -> [       0]true 
+              +[ 2, 1,~0]@true 
+              +[ 2,~1,~0]@~(true & r)
+              +[~2,~1,~0]@~(true & q & r)
+  [p,q,r]   -> [        0]false 
+              +[ 2, 1,~0]@false 
+              +[ 2,~1,~0]@~(true & r)
+              +[~2,~1,~0]@~(true & q & r)
+
+
+Thu Jun 13 12:00:39 BST 1991
+
+Empty Queue should be incoporated into Cond part.
+Only true/false remains in Em_j part.
+
+ S = \Sum_j Cond_j -> ( \Sum_i empty_i->Em_{i,j} ->  More_j )
+~S = \Sum_j Cond_j -> ( \Sum_i empty_i->Em_{i,j} -> ~More_j )
+
+Thu Jun 13 11:32:44 BST 1991
+
+ S = \Sum Cond_j -> ( empty->Em_j  ; ~empty->More_j )
+~S = \Sum Cond_j -> ( empty->~Em_j ; ~empty->~More_j )
+  since empty is invisible, ; means non deterministic choice
+More_j  = Keep \and @ More   => troubled on negation
+
+Cond_j -> ( empty->Em_j + (Keep_j \and @ More_j) )
+  =>
+Cond_j +  Keep_j -> ( empty->Em_j + ~empty->@ More_j )
+Cond_j + ~Keep_j -> ( empty->Em_j + ~empty->false )
+
+Example
+
+ empty ->  true -> (empty->true + ~empty->false)
+~empty ->  true -> (empty->false+ ~empty->true)
+fin(p) ->  true -> (empty->p+ ~empty->@fin(p))
+keep(p) ->   p -> (empty->true + ~empty->@keep(p))
+          + ~p -> (empty->true + ~empty->false)
+
+Wed Jun 12 16:05:31 BST 1991
+
+ITL->DST converter using BDT
+
+varialbe order
+p & q
+   ~p -> []
+    p,q  -> [e0, (t & q)]     e0 = (t & q)
+    p,~q -> [~e0,(t & q)]
+t & q   (contains both ~e0, e0)
+   ~q -> [~e0,(t & q)]
+   q ->  [e0,t,(t & q)]
+t  -> [e1,(~e1,t)]            e1 = (t)
+
+ITL model checker
+
+Wed May 22 15:37:30 BST 1991
+
+The problem is negation of state digram is time consuming task.
+To make a symmetrical treatment of negation on state digram,
+exclusion normal form is good. 
+
+P  == (ab -> empty) + ((~a)b -> false) + (a(~b)+~a~b -> @next)
+~P == (ab -> false) + ((~a)b -> empty) + (a(~b)+~a~b -> @~next)
+
+True-Set + False-Set + Next-Set
+
+It requires 2^numver(variables on expression) terms. (Sad..)
+
+P,Q -> PQ
+P;Q -> PQ + ~PQ + P~Q
+
+Tue May 21 19:16:12 BST 1991
+
+Extenstion of state diagram is necessary.
+
+  true & p     = <>p
+      s0 -empty->    p
+      s0 -e(true)->  s0
+      s0 -e(p)->     true
+  ~(true & ~p) = #p
+      s0 -empty->    p
+      s0 -a(~p)->    false
+      s0 -e(true)->  s1(~true & ~p)
+  ~(p & ~q) = #p
+      s0 -empty->    ~p;q
+      s0 -a(p)->     s1(~(true & ~q))
+      s1 -a(~q)->    false
+    p & q 
+      s0 -empty->    p,q
+      s0 -p->        s1(true&q)
+      s1 -e(true)->  s1
+      s1 -e(q)->     true        = s1 -a(~q)-> false
+
+Tue May 21 15:08:51 BST 1991
+
+The point is the concurrent development of negation form.
+	|- ~(On Some interval, P)  <->
+	|- For all interval, ~P  <->
+	|\- On Some interval, P
+	|- ~~P <-> |-P
+
+	|-P,|\-Q => |-P0,@Pnext , |\-Q0,@Qnext
+	=> |\-Q0,@Qnext
+	   |-(P0,~Q0),@Pnext
+	   |-(P0,Q0),@(Pnext,~Qnext)
+   example
+	|- ~(q & ~p) => 
+	   |\- q,~p,empty
+	       |- empty,~(q,~p)
+	   |\- empty(q),~p,~empty =>
+	       |- q,p
+	       |- ~q
+	   |\- q,@(q & ~p) => 
+	       |- ~q
+	       |- q, @~(true & ~p)
+Anther problem is Empty/More state.
+	An interval can be empty/~empty
+	~(empty,P) -> ~empty;~P    this is funny
+	|- ~(empty,P) <-> |\- empty,P
+	   ~P,~(empty,P),empty is Ok
+	   This means false transision has separate Empty flag
+	empty,(P&Q) -> empty,P,Q
+Global variables maps 
+	local variable state diagram -> {true, false}
+	How to calculate it comformity?
+
+Thu May 16 12:54:27 BST 1991
+
+Decomposition Rule for Model Checking
+    ~ , ; & @
+Failure Set
+Success Set
+    ?-de(Proposition,Now,Next).
+
+    de((P,Q),(NP,NQ),(XP,XQ),F) :- de(P,NP,XP,F),de(Q,NQ,XQ,F).
+    de((P;Q),Now,Next,F) :- de(P,Now,Next,F).
+    de((P;Q),Now,Next,F) :- de(Q,Now,Next,F).
+    de(~P,Now,Next,(FN,FX)) :- de(P,FN,FX,(Now,Next)).
+    de(@P,true,P,(FN,FX)) :- de(P,FN,FX,(Now,Next)). % weak?
+    de((P&Q),(PN,Now),Next,F) :- % empty case
+	de(P,PN,true,PF),de(Q,Now,Next).
+    de((P&Q),Now,Next,F) :- % non empty case
+	de(P,PN,true,PF),de(Q,Now,Next).
+
+Now is allways classical/local.
+
+Using Binary Decision Tree on Interval Variable
+
+    <t>P = true & P
+    [t]P = ~<t>~P = ~(true & ~P)
+    while i do j = i-> j&(while i do j) ; empty
+
+so everything is & and ~ and ; and ,.
+
+Formula = { Interval Variable, Local Variable, connectives }
+
+P = set of BDT on Interval Variables
+        P
+       /\
+      P  ~P
+There is only a finite number of interval variables.
+
+Clausal Form:
+     P :- x ; y ; P.
+     P :- empty.
+
+      P
+      x
+     /\
+
+it is better to make BDT primitives...
+
+variablesBDT
+compBDT
+andBDT
+orBDT
+negBDT
+hashBDT
+
+Mon May 20 14:24:59 BST 1991
+
+ITL decomposition Rule for Model Checker
+
+choices
+
+interval is  finite / infinite
+interval is  open   / close
+interval is  empty  / non-empty
+
+ITL   finite/close and has empty
+
+p,q
+p;q
+~p
+p&q
+
+local variable
+non local variable
+
+~(true & ~p)
+
+s0 
+Success: nil 
+Failure: true & ~p
+
+decompositon( Formula , Local State, Next Intervals )
+Formula -> (Local-0,  empty);
+	   (Local-1, ~empty) & Next Intervals ( with eventuality )
+~empty contains eventuality (OK?)
+
+local variable
+p -> p,empty ; (p,~empty & true)
+P & Q -> (empty,P,Q); ( empty,P & ~empty,Q ); ( ~empty, P & Q )
+
+local part should have standard form
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/read.me	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,337 @@
+LITE: A little LITL Verifier
+
+ Copyright (C) 1994,1991, 
+ Shinji Kono (kono@csl.sony.co.jp)
+   Sony Computer Science Laboratory, Inc.
+   The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+
+Files
+    Makefile		Makefile for *.ql/*.pl, "make" is called from Prolog
+    bdtstd.pl		Binary Tree Database of Temporal Logic Formula
+    chop.pl		Chop normal form expander
+    demoi		Install Script for X-Window Interface
+    demoim		    "  with module
+    diag.pl		Diagnosis and Execution
+    display.pl		X-Window Interface (GM and InterViews)
+    dvcomp.pl		Lazy expansion version of ITL tableau
+    ex.pl		Built-in Examples
+    exdev.pl		Expansion Loop
+    init		Install Script 
+    initm		Install Script with module
+    kiss.pl		KISS2 format for UCB SIS
+    lite.pl		Install Script 
+    ndcomp.pl		ITL tableau expansion
+    read.me		This file
+
+0. Installation
+
+    Edit Makefile and change
+          PROLOG               your prolog path name, such as sicstus
+          PROLOG_TYPE          SICSTUS, XSB, SBPROLOG, CPROLOG, CPROLOG15
+    see cp.pl.c for portbaliity information.
+
+    Run your Prolog. I use SICStus Prolog but Quintus Prolog or C-Prolog 
+    will work.  In case of SBPROLOG, you also need SB_START_FILE.
+
+    Then consult a file init. 
+
+?-[init].
+
+    It runs unix make and compile and load necessary Prolog programs.
+    If you need a moduled version use ?-[initm].
+
+    In case of SB-Prolog, type
+	make
+    by hand. This create file named "lite". Then start SB-Prolog like this.
+        sbprolog lite
+    or you can use load(lite). Then you need to initialize by
+        ?- lite_start.
+
+0.1 How to run
+
+    Try numbered examples in ex.pl.
+
+?-ex(2).
+
+    It generates state machine. It also accepts an ITL formula.
+
+?-ex( [](p) -> <> p ).
+
+    Please be careful about funny Prolog operator grammar.
+    Someday I will make a parser for Ben's notation. But not now...
+    After the state machine expansion, there are two diagnosis predicates.
+
+?-diag.
+
+    This shows ``valid'' if it is a theorem, otherwise it shows you a counter
+    example.
+
+?-exe.
+
+    This shows an execution of ITL formula, if it is possible. It is
+    a counter example of negation of the original formula. ?-diag(N) or 
+    ?-exe(N) shows at least N length examples.  
+   	1: +p-q   means "at clock 1, p is true and q is false". 
+    Please note exe(N)/diag(N) generate all possible state transition,
+    but it only shows one possible state transition conditon for a
+    state transition.
+
+    In case of a large formula, you may want to make output tarse.
+
+?-verbose(off). 
+    generates one character per state transition condition.
+     e   empty
+     t   true
+     f   false
+     123. newly genrated state number
+     .   transition to a registerd state
+?-verbose(on).
+
+?-ex. runs all examples in diag.pl. But it takes several hours.
+      Some of the examples are quite large.
+?-exex. runs all examples and save state machine in file ``ex''.
+
+0.1. X-Window Interace
+
+    If you want to run X-window version, you have to install InterViews
+    interface for SICSTUS. It requires ispgm binary and library/gmlib.
+    ?-[demoim].    % This loads and runs X-window interface.
+    Type-in a formula. 
+       ex(1) or demo(1) for the example number in ex.pl.
+    Push verify buttom and execute buttom in order.
+    Execute and Counter Example buttons show an example in a graphical way.
+    Map button shows bitmap of the characteristic function.
+
+0.1.1 Tcl/Tk Interface
+
+
+0.2. KISS format interface
+
+    To generate KISS2 format for SIS, try run
+
+?-kiss.
+
+    right after verification. To specify input variables and
+    output variables assert this predicate:
+	st_variables(In,Out).
+    State machine description is also supported
+    in this system. You can read a KISS2 format state machine.
+    Only one state machine is accepted because of variable 
+    declaration.
+
+?- read_kiss(File,In,Out,Empty).
+
+    reads KISS2 format. In and Out are list of variables in the order
+    of the KISS2 file. If Out is [], output variales are omitted.
+    If In or Out are uninstantiated variables, name 'i0' or 'o2'
+    are used.  Empty is usually set to empty and it generates 
+    empty condition for each state, for example:
+	st(st0,empty,empty).
+    To modify or to generate KISS format again, you have to
+    verify it.
+	?- ex(st(st0)).
+    `st0' is the start state of automaton. The state machine can
+    be used in arbitrary temporal logic expression. But if you 
+    generate very non-deterministic modification, the output
+    can be very large. For examle:
+	 ?- ex(exists(i0,st(st0))).
+
+?- read_kiss(File).
+    =>  read_kiss(File,_,_,empty)
+?- read_kiss(File,Empty).
+    =>  read_kiss(File,_,_,Empty)
+
+0.3
+    dvcomp.pl contains lazy state transition clause generation and binary
+    tree representation of ITL term.  Reconsult it after [init].  It 
+    reduces memory usage drastically. To control lazy generation, use:
+       ?-lazy(on).
+       ?-lazy(off).
+    kiss format generation is not supported for lazy generation.
+
+1. Syntax of ITL Formula
+
+Comma for conjunction, and semi-coron for disjunction as in Prolog.
+& for chop operator. @ for strong next. next(P) for weak next. 
+Postfix * means weak closure, that is, it allows 0 times execution.
+To use existential quantifier, a form exists(R,f(R)) is used,
+here R have to be Prolog variable.
+
+Other definitions are found in chop.pl. If you want to see the expanding
+results ( chop normal form, cannot be readable...) use ?-expand(X,Y).
+
+    ~(P) 	=   not(P)
+    P->Q 	=   (not(P);Q)
+    P<->Q 	=   ((not(P);Q),(P; not(Q)))
+    P=Q 	=   ((not(P);Q),(P; not(Q)))
+    (P && Q) 	=   ((not(empty),P) & Q)               strong chop
+    <>(Q) 	=   (true & Q)
+    #(Q) 	=   not(true & not(Q))
+    [](Q) 	=   not(true & not(Q))
+    '[a]'(Q) 	=   not(true & not(Q) & true)
+    fin(Q) 	=   (true & (empty,Q))
+    halt(Q) 	=   [](empty=Q)
+    keep(Q) 	=   not(true & not((empty ; Q)))
+    more 	=   not(empty)
+    skip 	=   @(empty)
+    length(I)            expanded into series of strong next.
+    less(I)              expanded into series of weak next.
+    next(P) 	=   (empty; @(P))
+    gets(A,B)	=   keep(@A<->B)
+    stable(A) 	=   keep(@A<->A)
+
+    P proj Q  	=   Q is true using P as a clock period
+    *P          =   P&P&..&P.. chop infinite closure 
+
+    Q=>P 	=   exists(R,(Q = R,stable(R),fin(P = R)))
+    P<=Q 	=   Q=>P
+    +A  	=   (A & (empty;A) *)                  strong closure
+    while(Cond,Do)	=   ((Cond->Do) , (~Cond->empty)) * 
+    exists(P,Q) =   Exsistential Quantifier
+    all(P,Q)   	=   not(exists(P,not(Q)))
+
+    even(P) 	=   exists(Q,(Q, keep( @Q = ~Q),[](Q->P)))
+    evenp(P) 	=   ((P,skip) & skip;empty,P)* & (empty;skip)
+    phil(L,R)  	=   ([]((~L  =    ~R)) & @ (L, ~R,@ (L,R, @ (R,[]( ~L)))) )
+
+For user define predicate use define/2. Ex.
+	define(yeilds(A,B), not(not(A) & B)).
+
+
+1.1 Finte State Automaton support
+
+1.1.1 Output.
+
+This version supports Finite State Automaton I/O. The output of
+our verifier is finite automaton.
+
+?-tgen.
+
+generates automaton as Tokio Temporal Logic Programming Language.
+KISS2 format output is also supported, see 0.2.
+
+1.1.2 Input
+
+It is possible to use automaton as a part of ITL formula.
+Finite automaton is stored in Prolog clauses.
+
+st(s0) starts Finite State Automaton (FSA) from s0 states.
+This is a temporal logic term, so you can use this anywhere
+in ITL formula, for example: st(s0) & not(st(s0)), <>(st(s0)).
+FSA is defined as Prolog clauses in this way:
+
+st_variables([q],[s]).   
+%   st_varaibles(Input_variables,Output_variables)
+%   This is important only for KISS format generation
+	    
+st(s0,((not(a);not(b)),q),s0). 
+%    st(Current_State, Condition, Next_State)
+st(s1,(not(c),q),s1).
+st(s1, empty,empty).
+
+Conditions can be non-deterministic. Actually it allows
+arbitrary ITL formula, but if you use temporal condtions,
+it is not a state machine any more. The automaton is
+determinized during verfication, since generated state
+machine is determinisc. Be careful, the output can be very large.
+
+If a state machine contains no empty conditions, it is
+not satisfiable in ITL, because our ITL only have finite
+interval. But it may contains infinite clock periods. 
+
+2. Basic Algorithm of the Verifier
+
+This program uses classic tableau method. So hold your breath, it is
+exponential to the number of the variables in the formula and  also
+combinatorial to the nesting of temporal logic operator. I think it is
+possible to reduce complexity for the nesting, but not for the
+variables.
+
+Major contribution (I think) is in the classification of ITL formula,
+which is found in bdtstd.pl. I use binary decision tree (not diagram)
+standard form among subterms in original formula. Since this program
+always keep state machine deterministic, determinization of state
+machine is done by outer-most loop.
+
+The algorithm is quite simple. There are three stages. In the first
+stage, an ITL formula is decomposed into three  parts: empty, now and
+next. In the second stage, next parts is classifyed using subterm bdt
+and stored into database.  In the third stage, decomposition is
+repeatedly applied until no more new next parts are generated.
+
+Since ITL assumes any interval is finite, no eventuality checking is
+necessary.  Diagnosis algorithm is linear to the number of the state.
+
+3. Wish lists
+
+It is possible to reduce complexity in somehow.
+
+4. Brief description of this program.
+
+File exdev.pl contains main driver of tableau based interval temporal 
+logic verifier. A developer deve(X) does tableau development.
+
+deve(ITL) :-
+	init,!,
+	expand(ITL,ITL0),
+	itlstd(ITL0,StdNext),
+	check_state(StdNext,ITL0,_,S),!,
+	deve0((S,ITL0)).
+
+In init, formula databases are initialized. 
+Usually ITL formula contains several macro definitions, expand(X,Y) 
+expands these macros form X to Y.
+The formula is translated into standard form in itlstd(X,Y), where X is original
+formula and Y is binary decision tree standard form (not diagram).
+The formula databases are maintained in check_state(Stdoriginal,NewFlag,No).
+Std is the standard form. We need original formula here for display.
+Whether Std is already in database or not is shown in NewFlag and when
+database sequence number (i.e. state number) is returned in No.
+
+deve0((S,ITL)) :-
+        show_state(S,ITL),
+	setof(Next,itldecomp(ITL,Next,S),
+	    Nexts),!,
+	deve1(Nexts).
+deve0(_).
+
+We are now in deve0(X) predicates. After displaying current states, it
+gathers possible tableau expansion using setof predicates. Since not so
+many formula is generated from one state, setof is not a bottle neck of
+this program. The real bottle neck is total number of state/condition pair and
+it's database looking up.  Setof predicates returns only new candidates and 
+theses are stored in a list, in LIFO way.
+
+deve1([]).
+deve1([H|T]) :- deve0(H),deve1(T).
+
+Here is a repetition part. 
+
+itldecomp(ITL,(NextS,Next),From) :-
+	itl(ITL,Next,Cond),
+	%% showing
+	itlshow(Next,NextS,Cond,From).
+
+Actual tableau expansion is done by itl(ITL,Next,Cond). It generate
+Sumof( Cond -> @(Next) ), where Cond is exclusive, that is, it generates
+deterministic automaton. You can test itl predicates by hands, for example,
+?-itl(p & q,Next,Cond).
+
+itlshow(Next,S,Cond,From):-
+	itlstd(Next,StdNext),
+	check_state(StdNext,Next,New,S),
+	assertz(state(From,Cond,S)),
+	!,itlshow1(S,Cond,Next,New).
+
+In itlshow, standard form conversion and database checking is performed.
+Rest of parts are related to state database and displaying.
+
+That's all. There are more stories about itlstd and itl predicates, but it is
+better to look source code rather than vague English...
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,5 @@
+test of fax
+test of fax
+test of fax
+test of fax
+test of fax
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/basic	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,42 @@
+:- multifile tclause/2.
+
+% Basic Composite
+%    fact is not allowed. use a:-true form.
+%    commented out one is defined internally for efficiency
+% @(A)	:- more,next(A).
+% #(A)	:- A,next(#(A)).
+% [](A)	:- A,next([](A)).
+% (A && B)	:- (A,more) & B.
+% (A &@ B)	:- A & @B.
+% keep(A)	:- next(keep(A)),ifMore(A).
+% fin(A)	:- next(fin(A)),ifEmpty(A).
+% gets(A,B)	:- keep(@A = B).
+% (A<-B)	:- A=B,stable(C),fin(A=C).
+(A<-B)		:- C<--B,fin(A=C).
+skip		:- @empty.
+<>(A)		:- true & A.
+halt(A)		:- A,!,empty.
+halt(A)		:- @(halt(A)).
+stable(A)	:- gets(A,A).
+% Framing
+% A <= B		:- more, <>(A:=B).
+A // B		:- process(A),process(B).
+frame(A,B)	:- frame(A), B.
+frames([H|T],B)	:- frame(H),frames(T,B).
+frames([],B)	:- B.
+readonlys([H|T],B)	:- readonly(H),readonlys(T,B).
+readonlys([],B)	:- B.
+% A:=B		:- forall_parent(flag(A,assign)),@A=B.
+% readonly(A)	:- flag(A,stay).
+% Closures
+*(_)		:- empty.
+*(A)		:- more,A & *(A).
+% These are very slow in interpreter
+while(A,B)	:- (A,!,more,B) & while(A,B).
+while(_,_)	:- empty.
+(if A then B else _)	:- A,!,B.
+(if _ then _ else C)	:- C.
+(_ else _)	:- fail.
+(if A then B)	:- A,!,B.
+(if _ then _)	:- true.
+% end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/bou.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,14 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
++(((stop,keep((red,not(start)));start,keep((green,not(stop)))))),
+[]((red,not(green);not(red),green)),
+[]((green->move)),
+[]((red->not(move))),
+halt(quit)
+)).
+
+st_variables([stop,start,quit],[red,green,move]).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/bou.tcl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,794 @@
+#!/usr/local/bin/wish -f
+# Program: bou
+# Tcl version: 7.3 (Tcl/Tk/XF)
+# Tk version: 3.6
+# XF version: 2.2
+#
+
+# module inclusion
+global env
+global xfLoadPath
+global xfLoadInfo
+set xfLoadInfo 0
+if {[info exists env(XF_LOAD_PATH)]} {
+  if {[string first $env(XF_LOAD_PATH) /usr/local/lib/] == -1} {
+    set xfLoadPath $env(XF_LOAD_PATH):/usr/local/lib/
+  } {
+    set xfLoadPath /usr/local/lib/
+  }
+} {
+  set xfLoadPath /usr/local/lib/
+}
+
+global argc
+global argv
+global tkVersion
+set tmpArgv ""
+for {set counter 0} {$counter < $argc} {incr counter 1} {
+  case [string tolower [lindex $argv $counter]] in {
+    {-xfloadpath} {
+      incr counter 1
+      set xfLoadPath "[lindex $argv $counter]:$xfLoadPath"
+    }
+    {-xfstartup} {
+      incr counter 1
+      source [lindex $argv $counter]
+    }
+    {-xfbindfile} {
+      incr counter 1
+      set env(XF_BIND_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcolorfile} {
+      incr counter 1
+      set env(XF_COLOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcursorfile} {
+      incr counter 1
+      set env(XF_CURSOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xffontfile} {
+      incr counter 1
+      set env(XF_FONT_FILE) "[lindex $argv $counter]"
+    }
+    {-xfmodelmono} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . monochrome
+      }
+    }
+    {-xfmodelcolor} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . color
+      }
+    }
+    {-xfloading} {
+      set xfLoadInfo 1
+    }
+    {-xfnoloading} {
+      set xfLoadInfo 0
+    }
+    {default} {
+      lappend tmpArgv [lindex $argv $counter]
+    }
+  }
+}
+set argv $tmpArgv
+set argc [llength $tmpArgv]
+unset counter
+unset tmpArgv
+
+
+# procedure to show window .toy
+proc ShowWindow.toy {args} {# xf ignore me 7
+
+  # build widget .toy
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFDestroy .toy"
+  } {
+    catch "destroy .toy"
+  }
+  toplevel .toy  \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom .toy program
+  wm sizefrom .toy program
+  wm maxsize .toy 1000 1000
+  wm title .toy {Toy}
+
+
+  # build widget .toy.frame1
+  frame .toy.frame1 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -height {293} \
+    -relief {raised} \
+    -width {141}
+
+  # build widget .toy.frame1.label2
+  label .toy.frame1.label2 \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -relief {raised} \
+    -text {Green}
+
+  # build widget .toy.frame1.label3
+  label .toy.frame1.label3 \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -relief {raised} \
+    -text {Red}
+
+  # build widget .toy.frame1.button4
+  button .toy.frame1.button4 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {event quit} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -relief {flat} \
+    -text {   Quit   }
+
+  # build widget .toy.frame1.button5
+  button .toy.frame1.button5 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {event stop} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -text {Stop}
+
+  # build widget .toy.frame1.button6
+  button .toy.frame1.button6 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {event start} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -text {Run}
+
+  # pack widget .toy.frame1
+  pack append .toy.frame1 \
+    .toy.frame1.label2 {top frame center fillx} \
+    .toy.frame1.label3 {top frame center fillx} \
+    .toy.frame1.button4 {bottom frame center fillx} \
+    .toy.frame1.button5 {bottom frame center fillx} \
+    .toy.frame1.button6 {bottom frame center fillx}
+
+  # build widget .toy.canvas0
+  canvas .toy.canvas0 \
+    -background {Cornsilk2} \
+    -height {207} \
+    -insertofftime {600} \
+    -relief {raised} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -selectforeground {CornSilk2} \
+    -width {295}
+
+  # pack widget .toy
+  pack append .toy \
+    .toy.frame1 {right frame e filly} \
+    .toy.canvas0 {left frame center expand fill}
+
+  # build canvas items .toy.canvas0
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree .toy"
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+proc DestroyWindow.toy {} {# xf ignore me 7
+  if {"[info procs XFEdit]" != ""} {
+    if {"[info commands .toy]" != ""} {
+      global xfShowWindow.toy
+      set xfShowWindow.toy 0
+      XFEditSetPath .
+      after 2 "XFSaveAsProc .toy; XFEditSetShowWindows"
+    }
+  } {
+    catch "destroy .toy"
+    update
+  }
+}
+
+
+# procedure to show window .
+proc ShowWindow. {args} {# xf ignore me 7
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom . user
+  wm sizefrom . ""
+  wm maxsize . 1280 1024
+  wm title . {xf}
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree ."
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+
+# User defined procedures
+
+
+# Procedure: event
+proc event { args} {
+	prolog "tokio:tokio_event($args)" 
+# tokio
+}
+
+
+# Internal procedures
+
+
+# Procedure: Alias
+if {"[info procs Alias]" == ""} {
+proc Alias { args} {
+# xf ignore me 7
+##########
+# Procedure: Alias
+# Description: establish an alias for a procedure
+# Arguments: args - no argument means that a list of all aliases
+#                   is returned. Otherwise the first parameter is
+#                   the alias name, and the second parameter is
+#                   the procedure that is aliased.
+# Returns: nothing, the command that is bound to the alias or a
+#          list of all aliases - command pairs. 
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is inserted
+##########
+  global internalAliasList
+
+  if {[llength $args] == 0} {
+    return $internalAliasList
+  } {
+    if {[llength $args] == 1} {
+      set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+      if {$xfTmpIndex != -1} {
+        return [lindex [lindex $internalAliasList $xfTmpIndex] 1]
+      }
+    } {
+      if {[llength $args] == 2} {
+        eval "proc [lindex $args 0] {args} {#xf ignore me 4
+return \[eval \"[lindex $args 1] \$args\"\]}"
+        set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+        if {$xfTmpIndex != -1} {
+          set internalAliasList [lreplace $internalAliasList $xfTmpIndex $xfTmpIndex "[lindex $args 0] [lindex $args 1]"]
+        } {
+          lappend internalAliasList "[lindex $args 0] [lindex $args 1]"
+        }
+      } {
+        error "Alias: wrong number or args: $args"
+      }
+    }
+  }
+}
+}
+
+
+# Procedure: GetSelection
+if {"[info procs GetSelection]" == ""} {
+proc GetSelection {} {
+# xf ignore me 7
+##########
+# Procedure: GetSelection
+# Description: get current selection
+# Arguments: none
+# Returns: none
+# Sideeffects: none
+##########
+
+  # the save way
+  set xfSelection ""
+  catch "selection get" xfSelection
+  if {"$xfSelection" == "selection doesn't exist or form \"STRING\" not defined"} {
+    return ""
+  } {
+    return $xfSelection
+  }
+}
+}
+
+
+# Procedure: MenuPopupAdd
+if {"[info procs MenuPopupAdd]" == ""} {
+proc MenuPopupAdd { xfW xfButton xfMenu {xfModifier ""} {xfCanvasTag ""}} {
+# xf ignore me 7
+# the popup menu handling is from (I already gave up with popup handling :-):
+#
+# Copyright 1991,1992 by James Noble.
+# Everyone is granted permission to copy, modify and redistribute.
+# This notice must be preserved on all copies or derivates.
+#
+##########
+# Procedure: MenuPopupAdd
+# Description: attach a popup menu to widget
+# Arguments: xfW - the widget
+#            xfButton - the button we use
+#            xfMenu - the menu to attach
+#            {xfModifier} - a optional modifier
+#            {xfCanvasTag} - a canvas tagOrId
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  set tk_popupPriv($xfMenu,focus) ""
+  set tk_popupPriv($xfMenu,grab) ""
+  if {"$xfModifier" != ""} {
+    set press "$xfModifier-"
+    set motion "$xfModifier-"
+    set release "Any-"
+  } {
+    set press ""
+    set motion ""
+    set release ""
+  }
+
+  bind $xfMenu "<${motion}B${xfButton}-Motion>"  "MenuPopupMotion $xfMenu %W %X %Y"
+  bind $xfMenu "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  if {"$xfCanvasTag" == ""} {
+    bind $xfW "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    bind $xfW "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  } {
+    $xfW bind $xfCanvasTag "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    $xfW bind $xfCanvasTag "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  }
+}
+}
+
+
+# Procedure: MenuPopupMotion
+if {"[info procs MenuPopupMotion]" == ""} {
+proc MenuPopupMotion { xfMenu xfW xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupMotion
+# Description: handle the popup menu motion
+# Arguments: xfMenu - the topmost menu
+#            xfW - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    set xfPopMinX [winfo rootx $xfW]
+    set xfPopMaxX [expr $xfPopMinX+[winfo width $xfW]]
+    if {$xfX >= $xfPopMinX && $xfX <= $xfPopMaxX} {
+      $xfW activate @[expr $xfY-[winfo rooty $xfW]]
+      if {![catch "$xfW entryconfig @[expr $xfY-[winfo rooty $xfW]] -menu" result]} {
+        if {"[lindex $result 4]" != ""} {
+          foreach binding [bind $xfMenu] {
+            bind [lindex $result 4] $binding [bind $xfMenu $binding]
+          }
+        }
+      }
+    } {
+      $xfW activate none
+    }
+  }
+}
+}
+
+
+# Procedure: MenuPopupPost
+if {"[info procs MenuPopupPost]" == ""} {
+proc MenuPopupPost { xfMenu xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupPost
+# Description: post the popup menu
+# Arguments: xfMenu - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfMenu]" != ""} {
+    if {![info exists tk_popupPriv($xfMenu,focus)]} {
+      set tk_popupPriv($xfMenu,focus) [focus]
+    } {
+      if {"$tk_popupPriv($xfMenu,focus)" == ""} {
+        set tk_popupPriv($xfMenu,focus) [focus]
+      }
+    }
+    set tk_popupPriv($xfMenu,grab) $xfMenu
+
+    catch "$xfMenu activate none"
+    catch "$xfMenu post $xfX $xfY"
+    catch "focus $xfMenu"
+    catch "grab -global $xfMenu"
+  }
+}
+}
+
+
+# Procedure: MenuPopupRelease
+if {"[info procs MenuPopupRelease]" == ""} {
+proc MenuPopupRelease { xfMenu xfW} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupRelease
+# Description: remove the popup menu
+# Arguments: xfMenu - the topmost menu widget
+#            xfW - the menu widget
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+  global tkVersion
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    if {$tkVersion >= 3.0} {
+      catch "grab release $tk_popupPriv($xfMenu,grab)"
+    } {
+      catch "grab none"
+    }
+    catch "focus $tk_popupPriv($xfMenu,focus)"
+    set tk_popupPriv($xfMenu,focus) ""
+    set tk_popupPriv($xfMenu,grab) ""
+    if {"[$xfW index active]" != "none"} {
+      $xfW invoke active; catch "$xfMenu unpost"
+    }
+  }
+  catch "$xfMenu unpost"
+}
+}
+
+
+# Procedure: NoFunction
+if {"[info procs NoFunction]" == ""} {
+proc NoFunction { args} {
+# xf ignore me 7
+##########
+# Procedure: NoFunction
+# Description: do nothing (especially with scales and scrollbars)
+# Arguments: args - a number of ignored parameters
+# Returns: none
+# Sideeffects: none
+##########
+}
+}
+
+
+# Procedure: SN
+if {"[info procs SN]" == ""} {
+proc SN { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SN
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  SymbolicName $xfName
+}
+}
+
+
+# Procedure: SymbolicName
+if {"[info procs SymbolicName]" == ""} {
+proc SymbolicName { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SymbolicName
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  global symbolicName
+
+  if {"$xfName" != ""} {
+    set xfArrayName ""
+    append xfArrayName symbolicName ( $xfName )
+    if {![catch "set \"$xfArrayName\"" xfValue]} {
+      return $xfValue
+    } {
+      if {"[info commands XFProcError]" != ""} {
+        XFProcError "Unknown symbolic name:\n$xfName"
+      } {
+        puts stderr "XF error: unknown symbolic name:\n$xfName"
+      }
+    }
+  }
+  return ""
+}
+}
+
+
+# Procedure: Unalias
+if {"[info procs Unalias]" == ""} {
+proc Unalias { aliasName} {
+# xf ignore me 7
+##########
+# Procedure: Unalias
+# Description: remove an alias for a procedure
+# Arguments: aliasName - the alias name to remove
+# Returns: none
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is removed
+##########
+  global internalAliasList
+
+  set xfIndex [lsearch $internalAliasList "$aliasName *"]
+  if {$xfIndex != -1} {
+    rename $aliasName ""
+    set internalAliasList [lreplace $internalAliasList $xfIndex $xfIndex]
+  }
+}
+}
+
+
+
+# application parsing procedure
+proc XFLocalParseAppDefs {xfAppDefFile} {
+  global xfAppDefaults
+
+  # basically from: Michael Moore
+  if {[file exists $xfAppDefFile] &&
+      [file readable $xfAppDefFile] &&
+      "[file type $xfAppDefFile]" == "link"} {
+    catch "file type $xfAppDefFile" xfType
+    while {"$xfType" == "link"} {
+      if {[catch "file readlink $xfAppDefFile" xfAppDefFile]} {
+        return
+      }
+      catch "file type $xfAppDefFile" xfType
+    }
+  }
+  if {!("$xfAppDefFile" != "" &&
+        [file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        "[file type $xfAppDefFile]" == "file")} {
+    return
+  }
+  if {![catch "open $xfAppDefFile r" xfResult]} {
+    set xfAppFileContents [read $xfResult]
+    close $xfResult
+    foreach line [split $xfAppFileContents "\n"] {
+      # backup indicates how far to backup.  It applies to the
+      # situation where a resource name ends in . and when it
+      # ends in *.  In the second case you want to keep the *
+      # in the widget name for pattern matching, but you want
+      # to get rid of the . if it is the end of the name. 
+      set backup -2  
+      set line [string trim $line]
+      if {[string index $line 0] == "#" || "$line" == ""} {
+        # skip comments and empty lines
+        continue
+      }
+      set list [split $line ":"]
+      set resource [string trim [lindex $list 0]]
+      set i [string last "." $resource]
+      set j [string last "*" $resource]
+      if {$j > $i} { 
+        set i $j
+        set backup -1
+      }
+      incr i
+      set name [string range $resource $i end]
+      incr i $backup
+      set widname [string range $resource 0 $i]
+      set value [string trim [lindex $list 1]]
+      if {"$widname" != "" && "$widname" != "*"} {
+        # insert the widget and resourcename to the application
+        # defaults list.
+        if {![info exists xfAppDefaults]} {
+          set xfAppDefaults ""
+        }
+        lappend xfAppDefaults [list $widname [string tolower $name] $value]
+      }
+    }
+  }
+}
+
+# application loading procedure
+proc XFLocalLoadAppDefs {{xfClasses ""} {xfPriority "startupFile"} {xfAppDefFile ""}} {
+  global env
+
+  if {"$xfAppDefFile" == ""} {
+    set xfFileList ""
+    if {[info exists env(XUSERFILESEARCHPATH)]} {
+      append xfFileList [split $env(XUSERFILESEARCHPATH) :]
+    }
+    if {[info exists env(XAPPLRESDIR)]} {
+      append xfFileList [split $env(XAPPLRESDIR) :]
+    }
+    if {[info exists env(XFILESEARCHPATH)]} {
+      append xfFileList [split $env(XFILESEARCHPATH) :]
+    }
+    append xfFileList " /usr/lib/X11/app-defaults"
+    append xfFileList " /usr/X11/lib/X11/app-defaults"
+
+    foreach xfCounter1 $xfClasses {
+      foreach xfCounter2 $xfFileList {
+        set xfPathName $xfCounter2
+        if {[regsub -all "%N" "$xfPathName" "$xfCounter1" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%T" "$xfPathName" "app-defaults" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%S" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%C" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[file exists $xfPathName] &&
+            [file readable $xfPathName] &&
+            ("[file type $xfPathName]" == "file" ||
+             "[file type $xfPathName]" == "link")} {
+          catch "option readfile $xfPathName $xfPriority"
+          if {"[info commands XFParseAppDefs]" != ""} {
+            XFParseAppDefs $xfPathName
+          } {
+            if {"[info commands XFLocalParseAppDefs]" != ""} {
+              XFLocalParseAppDefs $xfPathName
+            }
+          }
+        } {
+          if {[file exists $xfCounter2/$xfCounter1] &&
+              [file readable $xfCounter2/$xfCounter1] &&
+              ("[file type $xfCounter2/$xfCounter1]" == "file" ||
+               "[file type $xfCounter2/$xfCounter1]" == "link")} {
+            catch "option readfile $xfCounter2/$xfCounter1 $xfPriority"
+            if {"[info commands XFParseAppDefs]" != ""} {
+              XFParseAppDefs $xfCounter2/$xfCounter1
+            } {
+              if {"[info commands XFLocalParseAppDefs]" != ""} {
+                XFLocalParseAppDefs $xfCounter2/$xfCounter1
+              }
+            }
+          }
+        }
+      }
+    }
+  } {
+    # load a specific application defaults file
+    if {[file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        ("[file type $xfAppDefFile]" == "file" ||
+         "[file type $xfAppDefFile]" == "link")} {
+      catch "option readfile $xfAppDefFile $xfPriority"
+      if {"[info commands XFParseAppDefs]" != ""} {
+        XFParseAppDefs $xfAppDefFile
+      } {
+        if {"[info commands XFLocalParseAppDefs]" != ""} {
+          XFLocalParseAppDefs $xfAppDefFile
+        }
+      }
+    }
+  }
+}
+
+# application setting procedure
+proc XFLocalSetAppDefs {{xfWidgetPath "."}} {
+  global xfAppDefaults
+
+  if {![info exists xfAppDefaults]} {
+    return
+  }
+  foreach xfCounter $xfAppDefaults {
+    if {"$xfCounter" == ""} {
+      break
+    }
+    set widname [lindex $xfCounter 0]
+    if {[string match $widname ${xfWidgetPath}] ||
+        [string match "${xfWidgetPath}*" $widname]} {
+      set name [string tolower [lindex $xfCounter 1]]
+      set value [lindex $xfCounter 2]
+      # Now lets see how many tcl commands match the name
+      # pattern specified.
+      set widlist [info command $widname]
+      if {"$widlist" != ""} {
+        foreach widget $widlist {
+          # make sure this command is a widget.
+          if {![catch "winfo id $widget"] &&
+              [string match "${xfWidgetPath}*" $widget]} {
+            catch "$widget configure -$name $value" 
+          }
+        }
+      }
+    }
+  }
+}
+
+
+# prepare auto loading
+global auto_path
+global tk_library
+global xfLoadPath
+foreach xfElement [eval list [split $xfLoadPath :] $auto_path] {
+  if {[file exists $xfElement/tclIndex]} {
+    lappend auto_path $xfElement
+  }
+}
+catch "unset auto_index"
+
+catch "unset auto_oldpath"
+
+catch "unset auto_execs"
+
+
+# initialize global variables
+proc InitGlobals {} {
+  global {now}
+  set {now} {}
+
+  # please don't modify the following
+  # variables. They are needed by xf.
+  global {autoLoadList}
+  set {autoLoadList(bou.tcl)} {0}
+  set {autoLoadList(main.tcl)} {0}
+  global {internalAliasList}
+  set {internalAliasList} {}
+  global {moduleList}
+  set {moduleList(bou.tcl)} {}
+  global {preloadList}
+  set {preloadList(xfInternal)} {}
+  global {symbolicName}
+  set {symbolicName(c)} {.canvas0}
+  set {symbolicName(green)} {.frame1.label2}
+  set {symbolicName(quit)} {.frame1.button4}
+  set {symbolicName(red)} {.frame1.label3}
+  set {symbolicName(root)} {.}
+  set {symbolicName(run)} {.frame1.button6}
+  set {symbolicName(stop)} {.frame1.button5}
+  global {xfWmSetPosition}
+  set {xfWmSetPosition} {}
+  global {xfWmSetSize}
+  set {xfWmSetSize} {}
+  global {xfAppDefToplevels}
+  set {xfAppDefToplevels} {}
+}
+
+# initialize global variables
+InitGlobals
+
+# display/remove toplevel windows.
+ShowWindow.
+
+global xfShowWindow.toy
+set xfShowWindow.toy 1
+ShowWindow.toy
+
+# load default bindings.
+if {[info exists env(XF_BIND_FILE)] &&
+    "[info procs XFShowHelp]" == ""} {
+  source $env(XF_BIND_FILE)
+}
+
+# parse and apply application defaults.
+XFLocalLoadAppDefs Bou
+XFLocalSetAppDefs
+
+# eof
+#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/bou.tokio	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,139 @@
+%% ------------------------------------------------- BOUNCE
+
+:-use_module(library(tcltk)).
+
+toy :-  static([green, red, move, stop, start,quit]),
+	tk([name(toy)]),
+	*move:=0,*quit:=0,*stop:=0,*start:=0,*red:=1,*green:=0,
+	toy_init,
+	fin(tcl_command('destroy .')),
+	keep(tcl_command(update)).
+
+toy0 :-  static([green, red, move, stop, start,quit]),
+	% tk([name(toy)]),
+	*move:=0,*quit:=0,*stop:=0,*start:=0,*red:=1,*green:=0,
+	toy_init,
+	fin(tcl_command('destroy .')),
+	keep(tcl_command(update)).
+
+toy_init :-
+	[](check_event),		% Synchronize event
+        bounce_init([W|T],R,G),
+	@toy1([W|T],R,G).
+
+toy1(W,R,G) :- 
+	s1,						% automaton
+	[]((button_red(R),button_green(G),bounce(W))).  % output
+
+% ?- compile(['../tableau/gi.out']).
+
+% tokio / tcl event link
+start :- *start := 1,@((*start:=0;true)).
+stop :-  *stop  := 1,@((*stop:=0;true)).
+quit :-  *quit := 1.
+
+button_red(Out) :-
+        *red =0, out(Out,'""',red).
+button_red(Out) :-
+        *red =1, out(Out,'Red',red).
+button_green(Out) :-
+        *green =0, out(Out,'""',green).
+button_green(Out) :-
+        *green =1, out(Out,'Green',green).
+
+% size(400,400,10,fixed) :- true.
+size(200,200,5,'7x14') :- true.
+
+bounce_init( [Window0, View0, Circ0, Xout0, X, Yout0, 
+        Y, Xd, Yd, Ydd, Xlim, Ylim],Xout0,Yout0) :-
+%       Tcl/Tk link part
+
+	Window = '.toy',View = '$w.canvas0',
+	Xout = '$w.frame1.label3',  	% red
+	Yout = '$w.frame1.label2',  	% green
+%	Start = '$w.frame1.button6', 	% run
+%	Stop = '$w.frame1.button5',  	% stop
+%	Quit = '$w.frame1.button4',  	% quit
+
+        size(Hight,Width,R,_Font),
+	H0 = Hight-2, W0 = Width-2,
+	H1 = Hight/2, W1 = Width/2,
+	view(Hight,Width,Window,View),
+%	Box <= hbox([vbox([Xout,Yout,space,Start,Stop,Quit]),View]),
+	rectangle(0,0,0,H0,W0,View),
+        Circ = 'circle',circle(1,Circ,H1,W1,R,View),	
+	Window0<--Window, View0<--View, Circ0<--Circ, 
+	Xout0<--Xout,  Yout0<--Yout,
+	Ylim = Hight-10, Xlim = Width-10, Ydd = -R/2,
+	#((@Ylim=Ylim,@Xlim=Xlim,@Ydd=Ydd)),
+	@X = H1, @Y = W1, @Xd = R/2, @Yd = R*2.
+bounce([_, View, Obj, _Xout, X, _Yout, Y, Xd, Yd, Ydd, Xlim, _]) :- 
+	*move = 1,*quit = 0,
+	Y1 is Y+Yd,
+        moveto(View,Obj,X,Y),      
+	calc_xd(X, Xd, Xd1, Xlim),
+	calc_yd(Y, Yd, Ydt, Y1, Yt1),
+	@X = X+Xd,@Xd = Xd1, @Y = Yt1, @Yd = Ydt+Ydd.
+bounce([_, _, _, _, X, _, Y, Xd, Yd, _, _, _]) :- 
+	*move = 0,*quit = 0,
+	@X = X,@Xd = Xd, @Y = Y, @Yd = Yd.
+bounce([_W|_]) :-
+	*quit = 1.
+
+calc_xd(X, Xd, Xd1, _) :- X < 10,  Xd1 is abs(Xd).
+calc_xd(X, Xd, Xd1, Xlim) :- X > Xlim,  Xd1 is -abs(Xd).
+calc_xd(_, Xd, Xd, _):-true.
+
+calc_yd(Y, Yd, Ydt, _, Y0) :-
+	Y < 10,  Yd > 0 , Ydt = Yd,Y0 = 10.
+calc_yd(Y, Yd, Ydt, _, Y0) :-
+	Y < 10, Ydt = 9*(-Yd)/10,Y0 = 10.
+calc_yd(_, Yd, Yd, Y1, Y1):-true.
+
+% Tcl/Tk stuff
+
+out(Out,Data,Color) :-
+	tcl_command([Out,' configure -text ',Data,' -foreground ',Color]).
+
+view(_H,_W,Window,_View) :- 
+	tcl_command(['set w ',Window]),
+	tcl_command('source bou.tcl').
+
+rectangle(1,X,Y,X2,Y2,View) :-!,
+        tcl_command([View,' create rectangle ',
+                  X,' ',Y,' ', X2,' ',Y2,' ',
+                 '-stipple gray50 -fill black'
+        ]).
+
+rectangle(0,X,Y,X2,Y2,View) :- 
+        tcl_command([View,' create rectangle ',
+                  X,' ',Y,' ', X2,' ',Y2
+        ]).
+
+circle(1,C,X,Y,R,View) :-!, 
+	X0 is X-R, Y0 is Y-R, X1 is X+R, Y1 is Y+R,
+        tcl_command([View,' create oval ',
+                  X0,' ',Y0,' ', X1,' ',Y1,' -tag ',C,
+                 ' -stipple gray50 -fill black'
+        ]).
+
+circle(0,C,X,Y,R,View) :-!,
+	X0 is X-R, Y0 is Y-R, X1 is X+R, Y1 is Y+R,
+        tcl_command([View,' create oval ',
+                  X0,' ',Y0,' ', X1,' ',Y1,' -tag ',C,
+                 ' -stipple gray50 -fill black'
+        ]).
+
+move(View,Obj,X,Y) :- prolog((
+        tcl_command([View,' move ',Obj,' ',X,' ',Y])
+        )).
+
+moveto(View,Obj,X,Y) :- 
+        size(H,_,R,_),
+	X0 is X-R, Y0 is H-(Y-R), X1 is X+R, Y1 is H-(Y+R),
+	tcl_command([View,' coords ',Obj,' ',X0,' ',Y0,' ', X1,' ',Y1]).
+
+tk(X) :- prolog(tk_new(X,I)),*int:=I.
+tcl_command(X) :- 
+	% write(X),nl,
+	I= *int,prolog(tcl_eval(I,X,_)).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/demo.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,11 @@
+% :-ensure_loaded('../../Lite/lite').
+% :-ensure_loaded('../../Tokio/initm').
+% :-module(lite).
+
+% :-ensure_loaded('../../Tokio/initm').
+:-use_module('../lite').
+:-ensure_loaded(lite:disp).
+
+% display :- lite:display.
+
+% :-com([bou,gi],'tmp.out').
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/disp.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,408 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% LITE Tcl/Tk interface
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% :- ensure_loaded('../Lite/lite').
+:- ensure_loaded('../lite').
+
+:- module(lite).
+
+% :- use_module(library(tk)).
+:- use_module(library(tcltk)).
+:- verbose(off).
+
+:- dynamic r_event/2.
+
+:- abolish(show_state,2).
+% Next command keep check event during verification
+show_state(S,ITL) :-!,
+%        (tcl_eval(I,update,_);true),!,
+        (tk_do_one_event;true),
+        nl,write('state('),write(S),  % (
+        (verbose,write(' , '), write(ITL),write(')'),nl;write(')')),!.
+
+event(verbose,'1') :- verbose(on).
+event(verbose,'0') :- verbose(off).
+event(X,Y) :- assertz(r_event(X,Y)).   % ,write((X,Y)),nl.
+event(X) :-   assertz(r_event(X,[])).  % ,write((X)),nl.
+
+next(X,Y) :- r_event(_,_),retract(r_event(X,Y)),!.
+next(X,Y) :- tk_do_one_event,!,
+	next(X,Y).
+next(X,Y) :- next(X,Y).
+
+display :-
+	init_display(I),!,
+	event_loop(run,I).
+
+init_display(I) :-
+	(retract(r_event(_,_)),fail;true),
+%	tk_init('lite',[]),
+	tk_new([],I),
+%	tcl_eval('source disp.tcl'),
+	tcl_eval(I,'source xf-disp',_),
+        all_disable(I).
+canvas_origin(20,20).
+
+event_loop(quit,_I):-!.
+event_loop(_,I) :-
+	next(X,Y),execute(X,Y,I),!,event_loop(X,I).
+
+execute(verify,X,I) :- !,
+	verify(X,I).
+
+% !,X=1 -> verbose(on); verbose(off). causes error
+execute(verbose,X,_) :- X='1' -> verbose(on); verbose(off).
+execute(map,X,I) :- !,name(X,L),name(X1,L),view_state(a,X1,I).
+execute(execute,_,I) :- !,do_execute(I),!.
+execute(generate,_,_) :- !,
+	generate.
+execute(counter,_,I) :- !,do_diagnosis(I),!.
+execute(quit,_,I) :- !,
+	tcl_eval(I,'destroy .',_),
+	tcl_delete(I).
+%	tcl_eval(I,'destroy .',_).
+execute(prolog_call,X,_) :- !,prolog_call(X).
+execute(tokio_call,X,_) :- !,tokio_call(X).
+execute(X,_,_) :- !,write(event(X)),nl,ttyflush.
+
+generate :-
+	TOKIO = 'tmp.tokio',
+	tell(TOKIO),tgen,told,
+        user:com(TOKIO,'tmp.out').
+gen(X) :- consult(X),specification(Y),ex(Y),flush_output,generate.
+gen(X) :- 
+	name(X,XL),append(XL,".lite",YL),name(X1,YL),
+	consult(X1),specification(Y),ex(Y),flush_output,generate.
+
+verify(X,I) :-
+        all_disable(I),
+	abolish(st,3),abolish(specification,1),abolish(st_variables,2),
+	t2string(X,X0),s2terms(X0,X1),command(X1,X2,X3),
+	display_contents(X3,I),
+	ex(X2),!,
+	ttyflush, display_statistics(I),
+        all_enable(I).
+verify(_,I) :-
+        all_disable(I).
+display_contents(X,I) :-
+	ttyflush,t2strings(X,XS0),easy_pp(XS0,XS),
+	tcl_eval(I,'$symbolicName(entry) delete 0.0 end',_),
+	tcl_eval(I,['$symbolicName(entry) insert 0.0 {',chars(XS),'}'],_),
+        display_update(I).
+
+all_disable(I) :-
+	tcl_eval(I,'$symbolicName(map) configure -state disabled',_),
+	tcl_eval(I,'$symbolicName(execute) configure -state disabled',_),
+	tcl_eval(I,'$symbolicName(diag) configure -state disabled',_),
+	display_update(I).
+all_enable(I) :-
+	tcl_eval(I,'$symbolicName(map) configure -state normal',_),
+	tcl_eval(I,'$symbolicName(execute) configure -state normal',_),
+	tcl_eval(I,'$symbolicName(diag) configure -state normal',_),
+	display_update(I).
+
+% Backtrack Control of example/counter example
+
+do_execute(I) :- display_exe('.',I),next(X,Y),do_execute(X,Y,I),!.
+do_execute(_I).
+
+do_execute(execute,_,_) :-!,
+	fail.
+do_execute(X,Y,I) :- execute(X,Y,I),!.
+
+do_diagnosis(I) :- display_diag(',',I),next(X,Y),do_diagnosis(X,Y,I),!.
+do_diagnosis(_).
+
+do_diagnosis(diag,_,_) :-!,
+	fail.
+do_diagnosis(X,Y,I) :- execute(X,Y,I),!.
+
+% :- dynamic specification/1.
+
+% Text Based Commnad
+
+command([st(X,Y,Z)|T],Term,[st(X,Y,Z)|T1]):-!,
+	assertz(st(X,Y,Z)),!,
+	command(T,Term,T1).
+command([specification(X)|T],X,[specification(X)|T1]):-!,
+	command(T,X,T1).
+command([st_variables(X,Y)|T],Term,[st_variables(X,Y)|T1]):-!,
+	assertz(st_variables(X,Y)),
+	command(T,Term,T1).
+command([],true,[]) :-!.
+command([],_,[]) :-!.
+command([H],Term,[Term1]) :-!,
+	command(H,Term),!,Term=Term1.
+command([H|T],(Term1,Terms),[Term1|T1]) :-
+	command(H,Term1),!,command(T,Terms,T1).
+
+command(demo(X),Term):-!,lite:demo(X,Term).   % predefined examples
+command(ex(X),Term):-!,ex(X,Term).
+command(prolog(X,P),X):-!,safe_call(P).
+command(prolog(P),true):-!,safe_call(P).
+command(tokio(P),true):-!,safe_call(tokio(P)).
+command(consult(P),Term):-!,
+	command(file(P),Term).
+command(file(P),Term):-
+	on_exception(Er,(consult(P),specification(Term)),
+           read_error(Term,Er,user,user)).
+command(A,A) :- atomic(A),!.
+command(P,R) :- functor(P,H,N),functor(R,H,N),
+        command_arg(N,P,R).
+command_arg(0,_P,_R):-!.
+command_arg(N,P,R):-arg(N,P,PA),arg(N,R,RA),
+        N1 is N-1,command(PA,RA),command_arg(N1,P,R).
+
+prolog_call(X) :- 
+	t2string(X,X0),s2terms(X0,[X1|_]),safe_call(X1).
+tokio_call(X) :- 
+	t2string(X,X0),s2terms(X0,[X1|_]),safe_call(tokio(X1)).
+
+safe_call(X) :-
+	on_exception(Er,user:call(X),
+           read_error(X,Er,user,user)),!.
+safe_call(_).
+
+:-dynamic font/2.
+
+small :- (retract(font(_,_));true),assert(font("7x14",14)).
+large :- (retract(font(_,_));true),assert(font("12x24",24)).
+
+:-small.
+% font("7x14",14).
+
+width(W,H):-
+   font(_,Fs),
+   W is integer(1000/24*Fs), H is integer(500/24*Fs).
+
+display_statistics(I) :-
+        itl_state_number(S), % number of state
+        itl_transition(L),!, % number of transition
+        name(S,Ss),name(L,Ls),
+        append("State: ",Ss,S0),append(S0," Edge:",S1),append(S1,Ls,S2),
+        tcl_eval(I,['$symbolicName(states) configure -text {',chars(S2),'}'],_),!.
+display_statistics(I) :-
+        itl_state_number(S), % number of state
+        itl_transition(L),!, % number of transition
+        name(S,Ss),name(L,Ls),
+        append("State: ",Ss,S0),append(S0," Edge:",S1),append(S1,Ls,S2),
+        tcl_eval(I,['$symbolicName(states) configure -text {',chars(S2),'}'],_),!.
+
+%%---------------------------------------------------------------------
+% display_diagnosis
+display_diag(View,I) :- diag(X),
+	write_display_diag(X,View,I).
+
+% display_execution exapmle.
+display_exe(View,I) :- exe(Z),
+	write_display_diag(Z,View,I).
+
+write_display_diag(counter_example(Hist),View,I) :-!,display_ce(Hist,View,I).
+write_display_diag(execution(Hist),View,I) :-!,display_ce(Hist,View,I).
+write_display_diag(R,_View,I):-!,
+	atomic(R),
+	clear_display(I),
+	tcl_eval(I,['$symbolicName(canvas) create text 0 0 -text "',R,'"'],_).
+
+append([],X,X):-!.
+append([H|X],Y,[H|Z]) :- append(X,Y,Z).
+
+clear_display(I) :-
+	tcl_eval(I,'$symbolicName(canvas) delete all',_).
+display_ce(Hist,View,I) :-
+	canvas_origin(OX,OY),
+	font(_,Fs),
+	clear_display(I),
+	X is OX+Fs/2,Y=OY,W is integer(60/24*Fs),H is integer(60/24*Fs),
+	(variable_list(L);L=[]),append(L,['Time'],L1),!,
+	display_var(['State'|L1],View,X,Y,H,X,X1,I),
+	X2 is X1+X,
+	display_ce(Hist,L,View,X2,Y,W,H,0,I). % ,View=>batchmodeoff.
+display_var([],_,_,_,_,X,X,_):-!.
+display_var([Var|L],View,X,Y,H,X1,X2,I):-
+	Y1 is Y+H, font(_Fn,Fs),
+	name(Var,VarText),length(VarText,Len0),Len is Len0*Fs,
+	% View=>stringlength(VarText,Len),
+	(X1>X+Len,X3=X1;X3 is X+Len),!,
+	display_string(X,Y,VarText,I),
+	display_var(L,View,X,Y1,H,X3,X2,I).
+
+display_string(X,Y,Text,I) :-
+	font(Fn,_),
+        tcl_eval(I,['$symbolicName(canvas) create text ',X,' ',Y,' -font ',chars(Fn),
+                  ' -text "', chars(Text),'"'
+        ],_).
+display_ce([],_,_,_,_,_,_,_,_):-!.
+display_ce([(S->[_|Cond])|Hist],L,View,X,Y,W,H,T,I) :-
+	X1 is X+W,Y1 is Y+H,T1 is T+1,
+	name(S,SText),display_string(X1,Y,SText,I),
+	display_now(L,Cond,View,X1,Y1,W,H,T,I),
+	display_ce(Hist,L,View,X1,Y,W,H,T1,I).
+
+display_now([],_,_View,X,Y,_,_,T,I):-!,
+	name(T,SText),display_string(X,Y,SText,I).
+display_now([V|Vr],Cond,View,X,Y,W,H,T,I):-
+	XS is X-H/2,YS is Y-H/2,
+	display_state(Cond,V,View,XS,YS,W,H,I),
+	Y1 is Y+H,
+	display_now(Vr,Cond,View,X,Y1,W,H,T,I).
+
+rectangle(1,X,Y,X2,Y2,I) :-!,
+        tcl_eval(I,['$symbolicName(canvas) create rectangle ',
+                  X,' ',Y,' ', X2,' ',Y2,' ',
+                 '-stipple gray50 -fill black'
+        ],_).
+rectangle(0,X,Y,X2,Y2,I) :-
+        tcl_eval(I,['$symbolicName(canvas) create rectangle ',
+                  X,' ',Y,' ', X2,' ',Y2
+        ],_).
+display_state([V|_],V,_View,X,Y,W,H,I) :-!, % true
+	X2 is X+W,Y2 is Y+H,
+	rectangle(1,X,Y,X2,Y2,I).
+display_state([not(V)|_],V,_View,X,Y,W,H,I) :-!, % false
+	X2 is X+W,Y2 is Y+H,
+	rectangle(0,X,Y,X2,Y2,I).
+display_state([_|T],V,View,X,Y,W,H,I) :-!,
+	display_state(T,V,View,X,Y,W,H,I).
+display_state([],_,_View,X,Y,W,H,I) :-!,    % unknown
+	X2 is X+W,Y2 is Y+H/2,Y3 is Y2+3,
+	rectangle(0,X,Y2,X2,Y3,I).
+
+display_update(I) :- tcl_eval(I,'update',_).
+
+view_state(View,W,I) :-
+   itl_state_number(S),
+   clear_display(I),
+   canvas_origin(OX,OY),
+   calc_view_size(W,S,D,W0),
+%   write(calc_view_size(W,S,D,W0)),nl,
+   W1 is OX + W0 + D, H1 is OY + W0 + D,
+   rectangle(0,OX,OY,W1,H1,I),
+   view_state_write(View,W0,S,D,I).
+
+calc_view_size(W,S,D,W1) :-
+   D0 is integer(W/(S+1)),(D0<2,D=2;D=D0),!,
+   W0 is D*(S+1),(W0=<W,!,W1 = W0; W1 is integer(W)),!.
+
+view_state_write(_View,W,S,D,I) :- 
+   canvas_origin(OX,OY),
+   links(X,Y), link_translate(X,Y,X1,Y1,W,S),
+   X2 is OX+X1+D,Y2 is OY+Y1+D,
+   X11 is OX+X1,Y11 is OY+Y1,
+   rectangle(1,X11,Y11,X2,Y2,I),
+   display_update(I),
+   fail.
+view_state_write(_View,_,_,_,_):-true. 
+
+link_translate(false,Y,X1,Y1,W,S) :- !,
+    link_translate(S,Y,X1,Y1,W,S).
+link_translate(X,false,X1,Y1,W,S) :- !,
+    link_translate(X,S,X1,Y1,W,S).
+link_translate(X,Y,X1,Y1,W,S) :- number(X),number(Y),!,
+    X1 is integer(X*W/(S+1))+1, Y1 is integer(Y*W/(S+1)).
+link_translate(X,_,X1,0,W,S) :- number(X),!,
+    X1 is integer(X*W/(S+1)).
+link_translate(_,Y,0,Y1,W,S) :- number(Y),!,
+    Y1 is integer(Y*W/(S+1)).
+link_translate(_,_,0,0,_,_).
+
+%%
+
+s2term("",true):-!.
+s2term(Text,Term) :-
+	telling(O),
+	tell(tmp),format("~s.~n",[Text]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,read(Term),read_error(Term,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2term(_,true):-tell(tmp),told,see(tmp),seen.
+
+s2terms("",true):-!.
+s2terms(Text,Terms) :-
+	check_period(Text,0,Text1),
+	telling(O),
+	tell(tmp),format("~s~n",[Text1]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,s2terms0(Terms),read_error(Terms,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2terms(_,true):-tell(tmp),told,see(tmp),seen.
+
+s2terms0(Terms) :-read(X),s2terms0(X,Terms).
+s2terms0(end_of_file,[]):-!.
+s2terms0(H,[H|T]):-read(X),s2terms0(X,T).
+
+read_error(true,Er,I,O) :- 
+	tell(tmp),told,see(tmp),seen,
+	see(I),tell(O),    %   unix(system('rm tmp')),
+	write('read error:'),write(Er),nl.
+
+t2string(Term,Text) :-
+	telling(O),
+	tell(tmp),write(Term),told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2string(_,true):-tell(tmp),told,see(tmp),seen.
+
+t2strings(Terms,Text):-!,
+	telling(O),
+        t2strings(Terms),
+        told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2strings(_,true):-tell(tmp),told,see(tmp),seen.
+
+t2strings([]):-!.
+t2strings([Term|T]):-!,
+	tell(tmp),write(Term),put("."),put(10),t2strings(T).
+
+read_string(-1,[]) :- !.
+read_string(C,[C|T]) :- 
+	get0(C1),read_string(C1,T).
+
+check_period([],0,[32,46]):-!.
+check_period([],1,[]):-!.
+check_period([46],_,[46]):-!.
+check_period([46,X|T],_,[46,X|T1]):-(X=32;X=10;X=37),!,
+	check_period(T,1,T1).
+check_period([37|T],X,[37|T1]):-
+	skip_line(T,X,T1).
+check_period([X|T],P,[X|T1]):-(X=32;X=10),!,
+	check_period(T,P,T1).
+check_period([X|T],_,[X|T1]):-
+	check_period(T,0,T1).
+
+skip_line([],X,[]):-!,
+	check_period([],X,_).
+skip_line([10|T],X,[10|T1]):-!,
+	check_period(T,X,T1).
+skip_line([_|T],X,T1):-skip_line(T,X,T1).
+
+easy_pp(X,X1) :- easy_pp(X,X1,0).
+easy_pp([],[10],_) :- !.
+easy_pp([C|T],[C1,10|T0],_) :- C is ".",!,C1 = C,
+	easy_pp(T,T0,0).
+easy_pp([C|T],[C1,10|T0],N) :- C is ",",!,C1 = C,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C|T],[C1,10|T0],N) :- C is ";",!,C1 = C,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C,C|T],[C1,C1,10|T0],N) :- C is "&",!,C1 = C, % &&
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C|T],[C1,10|T0],N) :- C is "&",!,C1 = C,      % &
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([10|T],[10|T0],N) :- !,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([Par|T],[Par1|T0],N) :- Par is "(",!,Par1 = Par,
+	N1 is N+1,easy_pp(T,T0,N1).
+easy_pp([Par|T],[Par1|T0],N) :- Par is ")",!,Par1 = Par,
+	N1 is N-1,easy_pp(T,T0,N1).
+easy_pp([H|T],[H|T0],N) :- 
+	easy_pp(T,T0,N).
+
+easy_tab(N,T,T1):-N =< 0,!,T=T1.
+easy_tab(N,[32,32|T],T1) :-
+	N1 is N-1,easy_tab(N1,T,T1).
+
+% end %
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/disp.pl.pro	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,396 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% LITE Tcl/Tk interface
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+:- ensure_loaded('../Lite/lite').
+:- module(lite).
+% :- use_module(library(tk)).
+:- use_module(library(tcltk)).
+:- verbose(off).
+
+:- dynamic r_event/2.
+
+:- abolish(show_state,2).
+% Next command keep check event during verification
+show_state(S,ITL) :-!,
+        (tcl_eval(update);true),!,
+        nl,write('state('),write(S),  % (
+        (verbose,write(' , '), write(ITL),write(')'),nl;write(')')),!.
+
+event(verbose,'1') :- verbose(on).
+event(verbose,'0') :- verbose(off).
+event(X,Y) :- assertz(r_event(X,Y)).   % ,write((X,Y)),nl.
+event(X) :-   assertz(r_event(X,[])).  % ,write((X)),nl.
+
+next(X,Y) :- r_event(_,_),retract(r_event(X,Y)),!.
+next(X,Y) :- tk_do_one_event(0),!,
+	next(X,Y).
+
+display :-
+	init_display,!,
+	event_loop(run).
+
+init_display :-
+	(retract(r_event(_,_)),fail;true),
+	tk_init('lite',[]),
+%	tcl_eval('source disp.tcl'),
+	tcl_eval('source xf-disp'),
+        all_disable.
+canvas_origin(20,20).
+
+event_loop(quit):-!.
+event_loop(_) :-
+	next(X,Y),execute(X,Y),!,event_loop(X).
+
+execute(verify,X) :- !,
+	verify(X).
+
+% !,X=1 -> verbose(on); verbose(off). causes error
+execute(verbose,X) :- X='1' -> verbose(on); verbose(off).
+execute(map,X) :- !,name(X,L),name(X1,L),view_state(a,X1).
+execute(execute,_) :- !,do_execute,!.
+execute(generate,_) :- !,
+	generate.
+execute(counter,_) :- !,do_diagnosis,!.
+execute(quit,_) :- !,tcl_eval('destroy .').
+execute(prolog_call,X) :- !,prolog_call(X).
+execute(tokio_call,X) :- !,tokio_call(X).
+execute(X,_) :- !,write(event(X)),nl,ttyflush.
+
+generate :-
+	TOKIO = 'tmp.tokio',
+	tell(TOKIO),tgen,told,
+        user:com(TOKIO,'tmp.out').
+gen(X) :- consult(X),specification(Y),ex(Y),generate.
+gen(X) :- 
+	name(X,XL),append(XL,".lite",YL),name(X1,YL),
+	consult(X1),specification(Y),ex(Y),generate.
+
+verify(X) :-
+        all_disable,
+	abolish(st,3),abolish(specification,1),abolish(st_variables,2),
+	t2string(X,X0),s2terms(X0,X1),command(X1,X2,X3),
+	display_contents(X3),
+	ex(X2),!,
+	ttyflush, display_statistics,
+        all_enable.
+verify(_) :-
+        all_disable.
+display_contents(X) :-
+	ttyflush,t2strings(X,XS0),easy_pp(XS0,XS),
+	tcl_eval('$symbolicName(entry) delete 0.0 end'),
+	tcl_eval(['$symbolicName(entry) insert 0.0 {',XS,'}']),
+        display_update.
+
+all_disable :-
+	tcl_eval('$symbolicName(map) configure -state disabled'),
+	tcl_eval('$symbolicName(execute) configure -state disabled'),
+	tcl_eval('$symbolicName(diag) configure -state disabled'),
+	display_update.
+all_enable :-
+	tcl_eval('$symbolicName(map) configure -state normal'),
+	tcl_eval('$symbolicName(execute) configure -state normal'),
+	tcl_eval('$symbolicName(diag) configure -state normal'),
+	display_update.
+
+% Backtrack Control of example/counter example
+
+do_execute :- display_exe('.'),next(X,Y),do_execute(X,Y),!.
+do_execute.
+
+do_execute(execute,_) :-!,
+	fail.
+do_execute(X,Y) :- execute(X,Y),!.
+
+do_diagnosis :- display_diag(','),next(X,Y),do_diagnosis(X,Y),!.
+do_diagnosis.
+
+do_diagnosis(diag,_) :-!,
+	fail.
+do_diagnosis(X,Y) :- execute(X,Y),!.
+
+% :- dynamic specification/1.
+
+% Text Based Commnad
+
+command([st(X,Y,Z)|T],Term,[st(X,Y,Z)|T1]):-!,
+	assertz(st(X,Y,Z)),!,
+	command(T,Term,T1).
+command([specification(X)|T],X,[specification(X)|T1]):-!,
+	command(T,X,T1).
+command([st_variables(X,Y)|T],Term,[st_variables(X,Y)|T1]):-!,
+	assertz(st_variables(X,Y)),
+	command(T,Term,T1).
+command([],true,[]) :-!.
+command([],_,[]) :-!.
+command([H],Term,[Term1]) :-!,
+	command(H,Term),!,Term=Term1.
+command([H|T],(Term1,Terms),[Term1|T1]) :-
+	command(H,Term1),!,command(T,Terms,T1).
+
+command(demo(X),Term):-!,lite:demo(X,Term).   % predefined examples
+command(ex(X),Term):-!,ex(X,Term).
+command(prolog(X,P),X):-!,safe_call(P).
+command(prolog(P),true):-!,safe_call(P).
+command(tokio(P),true):-!,safe_call(tokio(P)).
+command(consult(P),Term):-!,
+	command(file(P),Term).
+command(file(P),Term):-
+	on_exception(Er,(consult(P),specification(Term)),
+           read_error(Term,Er,user,user)).
+command(A,A) :- atomic(A),!.
+command(P,R) :- functor(P,H,N),functor(R,H,N),
+        command_arg(N,P,R).
+command_arg(0,_P,_R):-!.
+command_arg(N,P,R):-arg(N,P,PA),arg(N,R,RA),
+        N1 is N-1,command(PA,RA),command_arg(N1,P,R).
+
+prolog_call(X) :- 
+	t2string(X,X0),s2terms(X0,[X1|_]),safe_call(X1).
+tokio_call(X) :- 
+	t2string(X,X0),s2terms(X0,[X1|_]),safe_call(tokio(X1)).
+
+safe_call(X) :-
+	on_exception(Er,user:call(X),
+           read_error(X,Er,user,user)),!.
+safe_call(_).
+
+:-dynamic font/2.
+
+small :- (retract(font(_,_));true),assert(font("7x14",14)).
+large :- (retract(font(_,_));true),assert(font("12x24",24)).
+
+:-small.
+% font("7x14",14).
+
+width(W,H):-
+   font(_,Fs),
+   W is integer(1000/24*Fs), H is integer(500/24*Fs).
+
+display_statistics :-
+        recorded(itl_state_number,S,_), % number of state
+        recorded(itl_transition,L,_),   % number of transition
+        name(S,Ss),name(L,Ls),
+        append("State: ",Ss,S0),append(S0," Edge:",S1),append(S1,Ls,S2),
+        tcl_eval(["$symbolicName(states) configure -text {",S2,"}"]),!.
+
+%%---------------------------------------------------------------------
+% display_diagnosis
+display_diag(View) :- diag(X),
+	write_display_diag(X,View).
+
+% display_execution exapmle.
+display_exe(View) :- exe(Z),
+	write_display_diag(Z,View).
+
+write_display_diag(counter_example(Hist),View) :-!,display_ce(Hist,View).
+write_display_diag(execution(Hist),View) :-!,display_ce(Hist,View).
+write_display_diag(R,_View):-!,
+	atomic(R),name(R,Text),
+	clear_display,
+	tcl_eval(['$symbolicName(canvas) create text 0 0 -text "',Text,'"']).
+
+append([],X,X):-!.
+append([H|X],Y,[H|Z]) :- append(X,Y,Z).
+
+clear_display :-
+	tcl_eval('$symbolicName(canvas) delete all').
+display_ce(Hist,View) :-
+	canvas_origin(OX,OY),
+	font(_,Fs),
+	clear_display,
+	X is OX+Fs/2,Y=OY,W is integer(60/24*Fs),H is integer(60/24*Fs),
+	(variable_list(L);L=[]),append(L,['Time'],L1),!,
+	display_var(['State'|L1],View,X,Y,H,X,X1),
+	X2 is X1+X,
+	display_ce(Hist,L,View,X2,Y,W,H,0). % ,View=>batchmodeoff.
+display_var([],_,_,_,_,X,X):-!.
+display_var([Var|L],View,X,Y,H,X1,X2):-
+	Y1 is Y+H, font(_Fn,Fs),
+	name(Var,VarText),length(VarText,Len0),Len is Len0*Fs,
+	% View=>stringlength(VarText,Len),
+	(X1>X+Len,X3=X1;X3 is X+Len),!,
+	display_string(X,Y,VarText),
+	display_var(L,View,X,Y1,H,X3,X2).
+
+display_string(X,Y,Text) :-
+	font(Fn,_),
+        name(X,XL),name(Y,YL),
+        tcl_eval(['$symbolicName(canvas) create text ',XL,' ',YL,' -font ',Fn,
+                  ' -text "', Text,'"'
+        ]).
+display_ce([],_,_,_,_,_,_,_):-!.
+display_ce([(S->[_|Cond])|Hist],L,View,X,Y,W,H,T) :-
+	X1 is X+W,Y1 is Y+H,T1 is T+1,
+	name(S,SText),display_string(X1,Y,SText),
+	display_now(L,Cond,View,X1,Y1,W,H,T),
+	display_ce(Hist,L,View,X1,Y,W,H,T1).
+
+display_now([],_,_View,X,Y,_,_,T):-!,
+	name(T,SText),display_string(X,Y,SText).
+display_now([V|Vr],Cond,View,X,Y,W,H,T):-
+	XS is X-H/2,YS is Y-H/2,
+	display_state(Cond,V,View,XS,YS,W,H),
+	Y1 is Y+H,
+	display_now(Vr,Cond,View,X,Y1,W,H,T).
+
+rectangle(1,X,Y,X2,Y2) :-!,
+        name(X,XL),name(Y,YL), name(X2,XL2),name(Y2,YL2),
+        tcl_eval(['$symbolicName(canvas) create rectangle ',
+                  XL,' ',YL,' ', XL2,' ',YL2,' ',
+                 '-stipple gray50 -fill black'
+        ]).
+rectangle(0,X,Y,X2,Y2) :-
+        name(X,XL),name(Y,YL), name(X2,XL2),name(Y2,YL2),
+        tcl_eval(['$symbolicName(canvas) create rectangle ',
+                  XL,' ',YL,' ', XL2,' ',YL2
+        ]).
+display_state([V|_],V,_View,X,Y,W,H) :-!, % true
+	X2 is X+W,Y2 is Y+H,
+	rectangle(1,X,Y,X2,Y2).
+display_state([not(V)|_],V,_View,X,Y,W,H) :-!, % false
+	X2 is X+W,Y2 is Y+H,
+	rectangle(0,X,Y,X2,Y2).
+display_state([_|T],V,View,X,Y,W,H) :-!,
+	display_state(T,V,View,X,Y,W,H).
+display_state([],_,_View,X,Y,W,H) :-!,    % unknown
+	X2 is X+W,Y2 is Y+H/2,Y3 is Y2+3,
+	rectangle(0,X,Y2,X2,Y3).
+
+display_update :- tcl_eval('update').
+
+view_state(View,W) :-
+   recorded(itl_state_number,S,_),
+   clear_display,
+   canvas_origin(OX,OY),
+   calc_view_size(W,S,D,W0),
+%   write(calc_view_size(W,S,D,W0)),nl,
+   W1 is OX + W0 + D, H1 is OY + W0 + D,
+   rectangle(0,OX,OY,W1,H1),
+   view_state_write(View,W0,S,D).
+
+calc_view_size(W,S,D,W1) :-
+   D0 is integer(W/(S+1)),(D0<2,D=2;D=D0),!,
+   W0 is D*(S+1),(W0=<W,!,W1 = W0; W1 is integer(W)),!.
+
+view_state_write(_View,W,S,D) :- 
+   canvas_origin(OX,OY),
+   links(X,Y), link_translate(X,Y,X1,Y1,W,S),
+   X2 is OX+X1+D,Y2 is OY+Y1+D,
+   X11 is OX+X1,Y11 is OY+Y1,
+   rectangle(1,X11,Y11,X2,Y2),
+   display_update,
+   fail.
+view_state_write(_View,_,_,_):-true. 
+
+link_translate(false,Y,X1,Y1,W,S) :- !,
+    link_translate(S,Y,X1,Y1,W,S).
+link_translate(X,false,X1,Y1,W,S) :- !,
+    link_translate(X,S,X1,Y1,W,S).
+link_translate(X,Y,X1,Y1,W,S) :- number(X),number(Y),!,
+    X1 is integer(X*W/(S+1))+1, Y1 is integer(Y*W/(S+1)).
+link_translate(X,_,X1,0,W,S) :- number(X),!,
+    X1 is integer(X*W/(S+1)).
+link_translate(_,Y,0,Y1,W,S) :- number(Y),!,
+    Y1 is integer(Y*W/(S+1)).
+link_translate(_,_,0,0,_,_).
+
+%%
+
+s2term("",true):-!.
+s2term(Text,Term) :-
+	telling(O),
+	tell(tmp),format("~s.~n",[Text]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,read(Term),read_error(Term,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2term(_,true):-tell(tmp),told,see(tmp),seen.
+
+s2terms("",true):-!.
+s2terms(Text,Terms) :-
+	check_period(Text,0,Text1),
+	telling(O),
+	tell(tmp),format("~s~n",[Text1]),told,tell(O),
+	seeing(I),
+	see(tmp),on_exception(Er,s2terms0(Terms),read_error(Terms,Er,I,O)),
+	see(tmp),seen,see(I),!.
+s2terms(_,true):-tell(tmp),told,see(tmp),seen.
+
+s2terms0(Terms) :-read(X),s2terms0(X,Terms).
+s2terms0(end_of_file,[]):-!.
+s2terms0(H,[H|T]):-read(X),s2terms0(X,T).
+
+read_error(true,Er,I,O) :- 
+	tell(tmp),told,see(tmp),seen,
+	see(I),tell(O),    %   unix(system('rm tmp')),
+	write('read error:'),write(Er),nl.
+
+t2string(Term,Text) :-
+	telling(O),
+	tell(tmp),write(Term),told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2string(_,true):-tell(tmp),told,see(tmp),seen.
+
+t2strings(Terms,Text):-!,
+	telling(O),
+        t2strings(Terms),
+        told,tell(O),
+	seeing(I),
+	see(tmp),get0(C),read_string(C,Text),see(tmp),seen,see(I),!.
+t2strings(_,true):-tell(tmp),told,see(tmp),seen.
+
+t2strings([]):-!.
+t2strings([Term|T]):-!,
+	tell(tmp),write(Term),put("."),put(10),t2strings(T).
+
+read_string(-1,[]) :- !.
+read_string(C,[C|T]) :- 
+	get0(C1),read_string(C1,T).
+
+check_period([],0,[32,46]):-!.
+check_period([],1,[]):-!.
+check_period([46],_,[46]):-!.
+check_period([46,X|T],_,[46,X|T1]):-(X=32;X=10;X=37),!,
+	check_period(T,1,T1).
+check_period([37|T],X,[37|T1]):-
+	skip_line(T,X,T1).
+check_period([X|T],P,[X|T1]):-(X=32;X=10),!,
+	check_period(T,P,T1).
+check_period([X|T],_,[X|T1]):-
+	check_period(T,0,T1).
+
+skip_line([],X,[]):-!,
+	check_period([],X,_).
+skip_line([10|T],X,[10|T1]):-!,
+	check_period(T,X,T1).
+skip_line([_|T],X,T1):-skip_line(T,X,T1).
+
+easy_pp(X,X1) :- easy_pp(X,X1,0).
+easy_pp([],[10],_) :- !.
+easy_pp([C|T],[C1,10|T0],_) :- C is ".",!,C1 = C,
+	easy_pp(T,T0,0).
+easy_pp([C|T],[C1,10|T0],N) :- C is ",",!,C1 = C,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C|T],[C1,10|T0],N) :- C is ";",!,C1 = C,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C,C|T],[C1,C1,10|T0],N) :- C is "&",!,C1 = C, % &&
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([C|T],[C1,10|T0],N) :- C is "&",!,C1 = C,      % &
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([10|T],[10|T0],N) :- !,
+	easy_tab(N,T0,T1),easy_pp(T,T1,N).
+easy_pp([Par|T],[Par1|T0],N) :- Par is "(",!,Par1 = Par,
+	N1 is N+1,easy_pp(T,T0,N1).
+easy_pp([Par|T],[Par1|T0],N) :- Par is ")",!,Par1 = Par,
+	N1 is N-1,easy_pp(T,T0,N1).
+easy_pp([H|T],[H|T0],N) :- 
+	easy_pp(T,T0,N).
+
+easy_tab(N,T,T1):-N =< 0,!,T=T1.
+easy_tab(N,[32,32|T],T1) :-
+	N1 is N-1,easy_tab(N1,T,T1).
+
+% end %
Binary file tk/disp.ql has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/disp.tcl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,73 @@
+#!/usr/local/bin/wish  -f
+wm geometry . +0+10
+wm minsize . 400 400
+set w ""
+set module "lite"
+catch {destroy $w}
+frame $w.frame
+label $w.frame.label -text "ITL formula:" 
+# entry $w.frame.entry -relief sunken -width 70
+text $w.frame.entry -width 70
+# bind $w.frame.entry <Return>  \
+#     {prolog "event verify [$w.frame.entry get]" $module}
+
+frame $w.frame2
+button $w.frame2.ok -text "Quit" \
+    -command "prolog {event quit 0} $module; destroy $w."
+checkbutton $w.frame2.verbose -text "Verbose"   \
+    -variable verbose -command \
+    {prolog "event verbose $verbose" $module}
+# button $w.frame2.verify -text "Verity"   -command \
+#     {prolog "event verify [$w.frame.entry get]" $module}
+button $w.frame2.verify -text "Verity"   -command \
+    {prolog "event verify [$w.frame.entry get 0.0 end]" $module}
+button $w.frame2.counter -state disabled \
+    -text "Counter Example"   -command "prolog {event counter a} $module"
+button $w.frame2.execute -state disabled \
+    -text "Execute"   -command "prolog {event execute a} $module"
+button $w.frame2.map -text "Map"  -state disabled  -command {
+      regexp {([0-9]+)x([0-9]+)} [wm geometry .] dm width height
+      set height [expr $height-150]
+      prolog "event map $height" $module
+      } 
+label $w.frame2.state -text "State:" 
+
+set c $w.c
+canvas $c -scrollincrement 10  -confine false 
+scrollbar $w.vscroll  -relief sunken -command "$c yview"
+scrollbar $w.hscroll -orient horiz -relief sunken -command "$c xview"
+pack append $w.frame \
+	$w.frame.label {left} $w.frame.entry {padx 5 left fillx} 
+pack append $w.frame2 \
+        $w.frame2.ok {left} \
+        $w.frame2.state {padx 5 left expand} \
+        $w.frame2.verify {right} \
+        $w.frame2.map {right} \
+        $w.frame2.counter {right} \
+        $w.frame2.execute {right} \
+        $w.frame2.verbose {right} 
+pack append $w. \
+        $w.frame2 {bottom fill pady 5} \
+        $w.frame {bottom fill pady 20} \
+        $w.hscroll {bottom fillx} $w.vscroll {right filly } \
+        $c {top expand fill}
+# $c config -xscroll "$w.hscroll set" -yscroll "$w.vscroll set"
+
+  set {symbolicName(entry)} $w.frame.entry
+  set {symbolicName(diag)} $w.frame2.counter
+  set {symbolicName(execute)} $w.frame2.execute
+  set {symbolicName(map)} $w.frame2.map
+  set {symbolicName(states)} $w.frame2.state
+  set {symbolicName(verify)} $w.frame2.verify
+  set {symbolicName(canvas)} $w.c
+
+update
+
+#
+
+# $w.frame2.counter configure -state normal 
+# $w.frame2.execute configure -state normal 
+# $w.frame2.map configure -state normal 
+# proc prolog {a {b user}} {
+#    puts "prolog $a $b"
+# }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/dummy_tcl.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,25 @@
+% Tcl/Tk dummy
+
+:- module(tk, [
+        tcl_eval/1,
+        tk_demo/0,
+        tk_test/0,
+        tk_file/2,
+        tk_init/2,
+        tk/1,
+        tk_do_one_event/1,
+        tk_main_loop/0]).
+
+tk(Opts) :-
+    tk_init('', Opts),
+    tcl_eval(update).
+
+tcl_eval(X) :- tcl_eval0(X),nl.
+
+tcl_eval0(X) :- number(X),put(X).
+tcl_eval0(X) :- atom(X),write(X).
+tcl_eval0([H|L]) :- tcl_eval0(H),tcl_eval0(L).
+
+tk_init(X,Y) :- write(tk_init(X,Y)),nl.
+tk_do_one_event(X) :-write(tk_init(X,Y)),nl.
+tk_main_loop :- write(tk_main_loop),nl.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/elevator.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,30 @@
+
+
+elevator((
+
+[]((upButton1 -> <>location1)),
+[]((upButton2 -> <>location2)),
+[]((downButton2 -> <>location2)),
+[]((downButton3 -> <>location3)),
+[]((destButton1 -> <>location1)),
+[]((destButton2 -> <>location2)),
+[]((destButton3 -> <>location3)),
+[](((location1,<>location3) -> ( [](location2) & @ location3))),
+[](((location3,<>location1) -> ( [](location2) & @ location1))),
+[](( 
+	(location1,~ location2,~ location3);
+	(~ location1,location2,~ location3);
+	(~ location1,~ location2,location3))),
+[](((upButton1,location1) -> (~ move , open))),
+[](((upButton2,location2) -> (~ move , open))),
+[](((downButton1,location1) -> (~ move , open))),
+[](((downButton2,location2) -> (~ move , open))),
+[](((destButton1,location1) -> (~ move , open))),
+[](((destButton2,location2) -> (~ move , open))),
+[](((destButton3,location3) -> (~ move , open))),
+[]((move -> ~ open)),
+[](((openButton, ~ move) ->  open)),
+[](((closeButton, ~ openButton) ->  ~ open))
+
+)).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/exdev.tokio	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 1991, Shinji Kono, Sony Computer Science Laboratory, Inc.
+                                  The University, Newcastle upton Tyne
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed.  You can also
+ use this wording to make the terms for other programs.
+
+ send your comments to kono@csl.sony.co.jp
+ $Id$
+*/
+
+% develop Local ITL formula into state diagram
+%
+% Tue May 24 19:20:39 JST 1994
+%    reuiqre lite verifier
+
+:-ensure_loaded('../tableau/lite').
+
+deve(ITL) :-
+	prolog(lite:(
+	init,!,
+	expand(ITL,ITL0),		% chop standard form
+	itlstd(ITL0,StdNOW),		% BDT
+	assert(itl_state(StdNOW,1)),!   % Initial State
+	)),
+	ITL0C <-- ITL0,
+	@ deve0((1,ITL0C)).
+
+deve0((S,ITL)) :-
+        prolog(lite:(show_state(S,ITL),
+	setof(Next,itldecomp(ITL,Next,S),Nexts))),
+	NextsC <-- Nexts,@ deve1(NextsC). % NextsC is temporal constants
+deve0(_) :- empty.
+
+deve1([]):- empty.
+deve1([H|T]) :- deve0(H) & deve1(T).
+
+/* end */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,17 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
++((
+  (stop-> keep(red)),
+  (start-> keep(green)),
+  next(halt((stop;start;quit)))
+  )),
+[]((red,not(green);not(red),green)),
+[]((green->move)),
+[]((red->not(move))),
+halt(quit)
+)).
+
+st_variables([stop,start,quit],[red,gree,move]).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi.tokio	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,44 @@
+?-static([green,move,quit,red,start,stop]).
+print_state:-(_5786= *green,_5800= *move,_5814= *quit,_5828= *red,_5842= *start,_5853= *stop),write((green=_5786,move=_5800,quit=_5814,red=_5828,start=_5842,stop=_5853)).
+true :- empty.
+true :- more,true.
+s1 :- *stop= 1,*start= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s1 :- *stop= 1,*start= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s1 :- *stop= 1,*start= 0,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s1 :- *stop= 1,*start= 0,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s1 :- *stop= 0,*start= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s1 :- *stop= 0,*start= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s1 :- *stop= 0,*start= 0,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s1 :- *stop= 0,*start= 0,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s1 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s1 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s1 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s4.
+s1 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s4.
+s2 :- *stop= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s2 :- *stop= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s2 :- *stop= 0,*start= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s2 :- *stop= 0,*start= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s2 :- *stop= 0,*start= 0,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s2 :- *stop= 0,*start= 0,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s2 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s2 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s2 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s3 :- *stop= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s3 :- *stop= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s3 :- *stop= 0,*start= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s3 :- *stop= 0,*start= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s3 :- *stop= 0,*start= 0,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s3 :- *stop= 0,*start= 0,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s3 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s3 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s3 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s4 :- *stop= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s4 :- *stop= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s4 :- *stop= 0,*start= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s4 :- *stop= 0,*start= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s4 :- *stop= 0,*start= 0,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s4 :- *stop= 0,*start= 0,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s4 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s4 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s4 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s4.
+s4 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s4.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi0.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,15 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
++(((stop,keep((red,not(start)));start,keep((green,not(stop)))))),
+% []((red,not(green);not(red),green)),
+% []((green->move)),
+[]((red->not(move))),
+% [](move),
+halt(quit)
+% length(10)
+)).
+
+st_variables([stop,start,quit],[red,gree,move]).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi1.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,21 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
++((
+  (stop-> keep(red)),
+  (start->
+      (length(4),keep(green)
+      )
+      & keep(red)),
+  next(halt((start;stop;quit)))
+  )),
+[]((red,not(green);not(red),green)),
+[]((green->move)),
+[]((red->not(move))),
+halt(quit)
+)).
+
+st_variables([stop,start,quit],[red,green,move]).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi10.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,21 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
++((
+  (stop-> keep(red)),
+  (start->
+      (less(4),keep(green)
+      )
+      & keep(red)),
+  next(halt((start;stop;quit)))
+  )),
+[]((red,not(green);not(red),green)),
+[]((green->move)),
+[]((red->not(move))),
+halt(quit)
+)).
+
+st_variables([stop,start,quit],[red,green,move]).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi2.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,26 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
+    +(((stop->
+              keep(not(move))),
+       (start ->
+              keep(move)),
+       next(halt((stop;start;quit)))
+    )),
+    proj(
+        (  length(5),
+           ((stable(red),stable(green))&skip)
+        ),(
+        st(s0),halt(quit)
+        )
+    )
+)).
+
+st_variables([stop,start,quit],[red,green,move]).
+
+st(s0,(green,not(red)),s1).
+st(s1,(not(green),red),s0).
+st(s0,empty,empty).
+st(s1,empty,empty).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi3.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,17 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
++((
+    keep((red,not(start)));
+    ((start,[](green),length(3)) & 
+    next(keep((red,not(stop),not(start)))))
+ )),
+[]((red,not(green);not(red),green)),
+[]((green->move)),
+[]((red->not(move))),
+halt(quit)
+)).
+st_variables([stop,start,quit],[red,green,move]).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/gi4.lite	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,27 @@
+%
+% specification for simple graphics interaction
+%
+
+specification((
+    +(((stop->
+              keep(not(move))),
+       ((start ->
+              keep((green,move;not(green),not(move))))),
+       next(halt((stop;start;quit)))
+    )),
+    proj(
+        (  length(10),
+           ((stable(red),stable(green))&skip)
+        ),(
+        st(s0),halt(quit)
+        )
+    )
+)).
+
+st_variables([stop,start,quit],[red,green,move]).
+
+
+st(s0,(green,not(red)),s1).
+st(s1,(not(green),red),s0).
+st(s0,empty,empty).
+st(s1,empty,empty).
Binary file tk/protcl.tgz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/tmp	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,1 @@
+(true proj(length(4),[](dc)),length(15))&true,(length(3),@ <>ac)proj true,(length(5),@ <>bc)proj true,(length(5),@ <>cc)proj true,[]((ac,not(bc),not(cc),not(dc);not(ac),bc,not(cc),not(dc);not(ac),not(bc),cc,not(dc);not(ac),not(bc),not(cc),dc)),true.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/tmp.out	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,575 @@
+:-use_module(library(tcltk)).
+r_0toy0(['$t'((r_0toy0(A,B),C),(tcl_command('destroy .',D,E),F),G,H)|A],['$t'(C,F,G,H)|B]).
+r_1toy0(['$t'(A,B,(tcl_command(update,['$t'(A,C,D,E)|F],['$t'((r_1toy0(G,H),I),J,K,L)|G]),D),E)|F],['$t'(I,B,K,L)|H]).
+toy(A,B):-
+    static([green,red,move,stop,start,quit]),
+    tk([name(toy)],A,C),
+    r_set_value(move,0),
+    r_set_value(quit,0),
+    r_set_value(stop,0),
+    r_set_value(start,0),
+    r_set_value(red,1),
+    r_set_value(green,0),
+    toy_init(C,D),
+    r_0toy0(D,E),
+    r_1toy0(E,B).
+r_0toy00(['$t'((r_0toy00(A,B),C),(tcl_command('destroy .',D,E),F),G,H)|A],['$t'(C,F,G,H)|B]).
+r_1toy00(['$t'(A,B,(tcl_command(update,['$t'(A,C,D,E)|F],['$t'((r_1toy00(G,H),I),J,K,L)|G]),D),E)|F],['$t'(I,B,K,L)|H]).
+toy0(A,B):-
+    static([green,red,move,stop,start,quit]),
+    r_set_value(move,0),
+    r_set_value(quit,0),
+    r_set_value(stop,0),
+    r_set_value(start,0),
+    r_set_value(red,1),
+    r_set_value(green,0),
+    toy_init(A,C),
+    r_0toy00(C,D),
+    r_1toy00(D,B).
+r_0toy_init0(A,['$t'(B,C,D,E)|F]):-
+    check_event(A,['$t'((r_0toy_init0(G,F),B),C,D,E)|G]).
+toy_init(A,['$t'(B,C,D,'$c'(E,F,notEmpty))|G]):-
+    r_0toy_init0(A,H),
+    bounce_init(['$t'(I,J)|'$t'(K,L)],'$t'(M,N),'$t'(O,P),H,['$t'((toy1([J|L],N,P,Q,G),B),C,D,'$c'(E,F,notEmpty))|Q]).
+r_0toy13(A,B,C,D,['$t'(E,F,G,H)|I]):-
+    unifyNext(A,J),
+    unifyNext(B,K),
+    unifyNext(C,L),
+    button_red(A,D,M),
+    button_green(B,M,N),
+    bounce(C,N,['$t'((r_0toy13(J,K,L,O,I),E),F,G,H)|O]).
+toy1(A,B,C,D,E):-
+    s1(D,F),
+    r_0toy13(B,C,A,F,E).
+r_0start0(A,A):-
+    r_set_value(start,0).
+r_0start0(A,A).
+start(['$t'((r_0start0(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_set_value(start,1).
+r_0stop0(A,A):-
+    r_set_value(stop,0).
+r_0stop0(A,A).
+stop(['$t'((r_0stop0(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_set_value(stop,1).
+quit(A,A):-
+    r_set_value(quit,1).
+button_red(A,B,C):-
+    r_read_value(red,0),
+    out(A,'""',red,B,C).
+button_red(A,B,C):-
+    r_read_value(red,1),
+    out(A,'Red',red,B,C).
+button_green(A,B,C):-
+    r_read_value(green,0),
+    out(A,'""',green,B,C).
+button_green(A,B,C):-
+    r_read_value(green,1),
+    out(A,'Green',green,B,C).
+size(A,B,C,D,E,E):-
+    uatom(A,200),
+    uatom(B,200),
+    uatom(C,5),
+    uatom(D,'7x14').
+r_0bounce_init3(A,B,C,['$t'((r_0bounce_init3(D,E,F,G,H),I),J,K,L)|G],['$t'(I,J,K,L)|H]):-
+    unifyNowNext(A,M,D),
+    unifyNow(D,M),
+    unifyNowNext(B,N,E),
+    unifyNow(E,N),
+    unifyNowNext(C,O,F),
+    unifyNow(F,O).
+bounce_init(A,B,C,D,E):-
+    ulist(A,F,G),
+    uconst(F,'.toy'),
+    ulist(G,H,I),
+    uconst(H,'$w.canvas0'),
+    ulist(I,J,K),
+    uconst(J,circle),
+    ulist(K,L,M),
+    uconst(L,'$w.frame1.label3'),
+    ulist(M,N,O),
+    unifyNext(N,P),
+    unifyNow(P,Q),
+    ulist(O,R,S),
+    uconst(R,'$w.frame1.label2'),
+    ulist(S,T,U),
+    unifyNext(T,V),
+    unifyNow(V,W),
+    ulist(U,X,Y),
+    unifyNext(X,Z),
+    unifyNow(Z,A1),
+    unifyAll(['$t'(B1,'$t'(C1,D1)),'$t'(-(E1),F1),'$t'(G1,H1),'$t'(I1,J1)],Y),
+    uconst(B,'$w.frame1.label3'),
+    uconst(C,'$w.frame1.label2'),
+    size('$t'(K1,L1),'$t'(M1,N1),'$t'(O1,P1),Q1,D,R1),
+    S1 is K1-2,
+    T1 is M1-2,
+    Q is K1/2,
+    W is M1/2,
+    view('$t'(K1,L1),'$t'(M1,N1),'$t'('.toy',U1),'$t'('$w.canvas0',V1),R1,W1),
+    rectangle(0,0,0,'$t'(S1,X1),'$t'(T1,Y1),'$t'('$w.canvas0',V1),W1,Z1),
+    circle(1,'$t'(circle,A2),'$t'(Q,B2),'$t'(W,C2),'$t'(O1,P1),'$t'('$w.canvas0',V1),Z1,D2),
+    I1 is K1-10,
+    G1 is M1-10,
+    E1 is O1/2,
+    r_0bounce_init3('$t'(I1,J1),'$t'(G1,H1),'$t'(-(E1),F1),D2,E),
+    A1 is O1/2,
+    C1 is O1*2.
+bounce(A,B,C):-
+    ulist(A,D,E),
+    ulist(E,F,G),
+    ulist(G,H,I),
+    ulist(I,J,K),
+    ulist(K,L,M),
+    unifyNowNext(L,N,O),
+    unifyNow(O,P),
+    ulist(M,Q,R),
+    ulist(R,S,T),
+    unifyNowNext(S,U,V),
+    unifyNow(V,W),
+    ulist(T,X,Y),
+    unifyNowNext(X,Z,A1),
+    unifyNow(A1,B1),
+    unifyAll(['$t'(C1,'$t'(D1,E1)),'$t'(F1,G1),H1,I1],Y),
+    r_read_value(move,1),
+    r_read_value(quit,0),
+    J1 is U+C1,
+    K1 is J1,
+    moveto(F,H,L,S,B,L1),
+    calc_xd(L,X,'$t'(B1,M1),H1,L1,N1),
+    calc_yd(S,'$t'(C1,'$t'(D1,E1)),'$t'(O1,P1),'$t'(K1,Q1),'$t'(W,R1),N1,C),
+    P is N+Z,
+    D1 is O1+F1.
+bounce(A,B,B):-
+    ulist(A,C,D),
+    ulist(D,E,F),
+    ulist(F,G,H),
+    ulist(H,I,J),
+    ulist(J,K,L),
+    unifyNowNext(K,M,N),
+    unifyNow(N,M),
+    ulist(L,O,P),
+    ulist(P,Q,R),
+    unifyNowNext(Q,S,T),
+    unifyNow(T,S),
+    ulist(R,U,V),
+    unifyNowNext(U,W,X),
+    unifyNow(X,W),
+    unifyAll(['$t'(Y,'$t'(Y,Z)),A1,B1,C1],V),
+    r_read_value(move,0),
+    r_read_value(quit,0).
+bounce(A,B,B):-
+    ulist(A,C,D),
+    r_read_value(quit,1).
+calc_xd(A,B,C,D,E,E):-
+    unifyNow(A,F),
+    unifyNow(B,G),
+    unifyNow(C,H),
+    F<10,
+    H is abs(G).
+calc_xd(A,B,C,D,E,E):-
+    unifyNow(A,F),
+    unifyNow(B,G),
+    unifyNow(C,H),
+    unifyNow(D,I),
+    F>I,
+    H is-(abs(G)).
+calc_xd(A,B,C,D,E,E):-
+    unifyAll(B,C).
+calc_yd(A,B,C,D,E,F,F):-
+    unifyNow(A,G),
+    unifyNow(B,H),
+    unifyNow(C,H),
+    unifyNow(E,10),
+    G<10,
+    H>0.
+calc_yd(A,B,C,D,E,F,F):-
+    unifyNow(A,G),
+    unifyNow(B,H),
+    unifyNow(C,I),
+    unifyNow(E,10),
+    G<10,
+    I is 9* -(H)/10.
+calc_yd(A,B,C,D,E,F,F):-
+    unifyAll(B,C),
+    unifyAll(D,E).
+out(A,B,C,D,E):-
+    tcl_command([A,' configure -text ',B,' -foreground ',C],D,E).
+view(A,B,C,D,E,F):-
+    tcl_command(['set w ',C],E,G),
+    tcl_command('source bou.tcl',G,F).
+rectangle(A,B,C,D,E,F,G,H):-
+    uatom(A,1),
+    !,
+    tcl_command([F,' create rectangle ',B,' ',C,' ',D,' ',E,' ','-stipple gray50 -fill black'],G,H).
+rectangle(A,B,C,D,E,F,G,H):-
+    uatom(A,0),
+    tcl_command([F,' create rectangle ',B,' ',C,' ',D,' ',E],G,H).
+circle(A,B,C,D,E,F,G,H):-
+    uatom(A,1),
+    unifyNow(C,I),
+    unifyNow(D,J),
+    unifyNow(E,K),
+    !,
+    L is I-K,
+    M is L,
+    N is J-K,
+    O is N,
+    P is I+K,
+    Q is P,
+    R is J+K,
+    S is R,
+    tcl_command([F,' create oval ','$t'(M,T),' ','$t'(O,U),' ','$t'(Q,V),' ','$t'(S,W),' -tag ',B,' -stipple gray50 -fill black'],G,H).
+circle(A,B,C,D,E,F,G,H):-
+    uatom(A,0),
+    unifyNow(C,I),
+    unifyNow(D,J),
+    unifyNow(E,K),
+    !,
+    L is I-K,
+    M is L,
+    N is J-K,
+    O is N,
+    P is I+K,
+    Q is P,
+    R is J+K,
+    S is R,
+    tcl_command([F,' create oval ','$t'(M,T),' ','$t'(O,U),' ','$t'(Q,V),' ','$t'(S,W),' -tag ',B,' -stipple gray50 -fill black'],G,H).
+move(A,B,C,D,E,E):-
+    unifyNow(A,F),
+    unifyNow(B,G),
+    unifyNow(C,H),
+    unifyNow(D,I),
+    call(tcl_command([F,' move ',G,' ',H,' ',I])).
+moveto(A,B,C,D,E,F):-
+    unifyNow(C,G),
+    unifyNow(D,H),
+    size('$t'(I,J),K,'$t'(L,M),N,E,O),
+    P is G-L,
+    Q is P,
+    R is I-(H-L),
+    S is R,
+    T is G+L,
+    U is T,
+    V is I-(H+L),
+    W is V,
+    tcl_command([A,' coords ',B,' ','$t'(Q,X),' ','$t'(S,Y),' ','$t'(U,Z),' ','$t'(W,A1)],O,F).
+tk(A,B,B):-
+    unifyNow(A,C),
+    call(tk_new(C,D)),
+    r_set_value(int,D).
+tcl_command(A,B,B):-
+    unifyNow(A,C),
+    r_read_value(int,D),
+    call(tcl_eval(D,C,E)).
+:-static([green,move,quit,red,start,stop]).
+print_state(A,A):-
+    r_read_value(green,B),
+    r_read_value(move,C),
+    r_read_value(quit,D),
+    r_read_value(red,E),
+    r_read_value(start,F),
+    r_read_value(stop,G),
+    write((green=B,move=C,quit=D,red=E,start=F,stop=G)).
+true(A,A):-
+    r_empty(A).
+true(['$t'(A,B,C,'$c'(D,E,notEmpty))|F],['$t'(A,B,C,'$c'(D,E,notEmpty))|F]).
+s1(A,A):-
+    r_read_value(stop,1),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,1),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,1),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,1),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s1(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s1(['$t'((s2(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,1),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s1(['$t'((s3(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
+s1(['$t'((s4(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s1(['$t'((s4(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
+s2(A,A):-
+    r_read_value(stop,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s2(A,A):-
+    r_read_value(stop,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s2(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s2(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s2(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s2(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s2(['$t'((s2(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,1),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s2(['$t'((s3(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
+s2(['$t'((s2(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s3(A,A):-
+    r_read_value(stop,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s3(A,A):-
+    r_read_value(stop,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s3(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s3(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s3(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s3(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s3(['$t'((s2(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,1),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s3(['$t'((s3(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
+s3(['$t'((s3(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
+s4(A,A):-
+    r_read_value(stop,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s4(A,A):-
+    r_read_value(stop,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s4(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s4(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s4(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1),
+    r_empty(A).
+s4(A,A):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,1),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0),
+    r_empty(A).
+s4(['$t'((s2(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,1),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s4(['$t'((s3(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,1),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
+s4(['$t'((s4(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,0),
+    r_set_value(move,0),
+    r_set_value(red,1).
+s4(['$t'((s4(A,B),C),D,E,'$c'(F,G,notEmpty))|A],['$t'(C,D,E,'$c'(F,G,notEmpty))|B]):-
+    r_read_value(stop,0),
+    r_read_value(start,0),
+    r_read_value(quit,0),
+    r_set_value(green,1),
+    r_set_value(move,1),
+    r_set_value(red,0).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/tmp.tokio	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,20 @@
+?-static([green,move,quit,red,start,stop]).
+print_state:-(_2063= *green,_2077= *move,_2091= *quit,_2105= *red,_2119= *start,_2130= *stop),write((green=_2063,move=_2077,quit=_2091,red=_2105,start=_2119,stop=_2130)).
+true :- empty.
+true :- more,true.
+s1 :- *stop= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s1 :- *stop= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s1 :- *stop= 0,*start= 1,*quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s1 :- *stop= 0,*start= 1,*quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s1 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s1 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s2 :- *quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s2 :- *quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s2 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s2 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
+s2 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s3 :- *quit= 1,*green:= 0,*move:= 0,*red:= 1,empty.
+s3 :- *quit= 1,*green:= 1,*move:= 1,*red:= 0,empty.
+s3 :- more,*stop= 0,*start= 1,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s3 :- more,*stop= 0,*start= 0,*quit= 0,*green:= 1,*move:= 1,*red:= 0,@s3.
+s3 :- more,*stop= 1,*start= 0,*quit= 0,*green:= 0,*move:= 0,*red:= 1,@s2.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/xf-disp	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,2174 @@
+#!/usr/local/bin/wish -f
+# Program: xf-disp
+# Tcl version: 7.3 (Tcl/Tk/XF)
+# Tk version: 3.6
+# XF version: 2.2
+#
+
+# module inclusion
+global env
+global xfLoadPath
+global xfLoadInfo
+set xfLoadInfo 0
+if {[info exists env(XF_LOAD_PATH)]} {
+  if {[string first $env(XF_LOAD_PATH) /usr/local/lib/] == -1} {
+    set xfLoadPath $env(XF_LOAD_PATH):/usr/local/lib/
+  } {
+    set xfLoadPath /usr/local/lib/
+  }
+} {
+  set xfLoadPath /usr/local/lib/
+}
+
+global argc
+global argv
+global tkVersion
+set tkVersion 3.6
+set tmpArgv ""
+for {set counter 0} {$counter < $argc} {incr counter 1} {
+  case [string tolower [lindex $argv $counter]] in {
+    {-xfloadpath} {
+      incr counter 1
+      set xfLoadPath "[lindex $argv $counter]:$xfLoadPath"
+    }
+    {-xfstartup} {
+      incr counter 1
+      source [lindex $argv $counter]
+    }
+    {-xfbindfile} {
+      incr counter 1
+      set env(XF_BIND_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcolorfile} {
+      incr counter 1
+      set env(XF_COLOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcursorfile} {
+      incr counter 1
+      set env(XF_CURSOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xffontfile} {
+      incr counter 1
+      set env(XF_FONT_FILE) "[lindex $argv $counter]"
+    }
+    {-xfmodelmono} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . monochrome
+      }
+    }
+    {-xfmodelcolor} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . color
+      }
+    }
+    {-xfloading} {
+      set xfLoadInfo 1
+    }
+    {-xfnoloading} {
+      set xfLoadInfo 0
+    }
+    {default} {
+      lappend tmpArgv [lindex $argv $counter]
+    }
+  }
+}
+set argv $tmpArgv
+set argc [llength $tmpArgv]
+unset counter
+unset tmpArgv
+
+
+# procedure to show window .top0
+proc ShowWindow.top0 {args} {# xf ignore me 7
+
+  # build widget .top0
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFDestroy .top0"
+  } {
+    catch "destroy .top0"
+  }
+  toplevel .top0  \
+    -background {Cornsilk2}
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom .top0 ""
+  wm sizefrom .top0 ""
+  wm maxsize .top0 1000 1000
+  wm minsize .top0 10 10
+  wm title .top0 {Execution}
+
+
+  # build widget .top0.frame0
+  frame .top0.frame0 \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # build widget .top0.frame0.scrollbar3
+  scrollbar .top0.frame0.scrollbar3 \
+    -background {Cornsilk2} \
+    -command {.top0.frame0.canvas2 xview} \
+    -orient {horizontal} \
+    -relief {raised}
+
+  # build widget .top0.frame0.scrollbar1
+  scrollbar .top0.frame0.scrollbar1 \
+    -background {Cornsilk2} \
+    -command {.top0.frame0.canvas2 yview} \
+    -relief {raised}
+
+  # build widget .top0.frame0.canvas2
+  canvas .top0.frame0.canvas2 \
+    -background {Cornsilk2} \
+    -confine {0} \
+    -height {384} \
+    -insertofftime {600} \
+    -relief {raised} \
+    -scrollregion {-1c -1c 20c 20c} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -width {394} \
+    -xscrollcommand {.top0.frame0.scrollbar3 set} \
+    -yscrollcommand {.top0.frame0.scrollbar1 set}
+  # bindings
+  bind .top0.frame0.canvas2 <Button-1> {crosshair .top0.frame0.canvas2 %x %y}
+
+  # pack widget .top0.frame0
+  pack append .top0.frame0 \
+    .top0.frame0.scrollbar1 {right frame center filly} \
+    .top0.frame0.canvas2 {top frame center expand fill} \
+    .top0.frame0.scrollbar3 {top frame center fillx}
+
+  # build widget .top0.frame1
+  frame .top0.frame1 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .top0.frame1.label6
+  label .top0.frame1.label6 \
+    -anchor {w} \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -relief {raised} \
+    -text {States:}
+
+  # build widget .top0.frame1.button13
+  button .top0.frame1.button13 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {      regexp {([0-9]+)x([0-9]+)} [wm geometry .top0] dm width height
+     set height [expr $height-150]
+     lite map $height
+#      lite map 300
+} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {Map}
+
+  # pack widget .top0.frame1
+  pack append .top0.frame1 \
+    .top0.frame1.label6 {left frame center expand fillx} \
+    .top0.frame1.button13 {left frame center}
+
+  # build widget .top0.frame6
+  frame .top0.frame6 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .top0.frame6.button8
+  button .top0.frame6.button8 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {lite counter a} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {Counter Example}
+
+  # build widget .top0.frame6.button10
+  button .top0.frame6.button10 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {lite execute a} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {Execute}
+
+  # build widget .top0.frame6.button9
+  button .top0.frame6.button9 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {canvaswh .top0.frame0.canvas2 1.6} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {Enlarge}
+
+  # build widget .top0.frame6.button11
+  button .top0.frame6.button11 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {canvaswh .top0.frame0.canvas2 0.625} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text { Shrink}
+
+  # pack widget .top0.frame6
+  pack append .top0.frame6 \
+    .top0.frame6.button8 {right frame center fillx} \
+    .top0.frame6.button10 {right frame center expand fillx} \
+    .top0.frame6.button9 {left frame center} \
+    .top0.frame6.button11 {left frame center}
+
+  # pack widget .top0
+  pack append .top0 \
+    .top0.frame0 {bottom frame center expand fill} \
+    .top0.frame1 {bottom frame center fill} \
+    .top0.frame6 {top frame center fillx}
+
+  # build canvas items .top0.frame0.canvas2
+  set xfTmpTag [.top0.frame0.canvas2 create window -2480.03 -2615.93]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -anchor {nw}
+  set xfTmpTag [.top0.frame0.canvas2 create line 326 189 326 199]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -tags {cursol}
+  set xfTmpTag [.top0.frame0.canvas2 create line 321 194 331 194]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -tags {cursol}
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree .top0"
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+proc DestroyWindow.top0 {} {# xf ignore me 7
+  if {"[info procs XFEdit]" != ""} {
+    if {"[info commands .top0]" != ""} {
+      global xfShowWindow.top0
+      set xfShowWindow.top0 0
+      XFEditSetPath .
+      after 2 "XFSaveAsProc .top0; XFEditSetShowWindows"
+    }
+  } {
+    catch "destroy .top0"
+    update
+  }
+}
+
+
+# procedure to show window .
+proc ShowWindow. {args} {# xf ignore me 7
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom . user
+  wm sizefrom . user
+  wm maxsize . 1280 1024
+  wm title . {Lite}
+
+
+  # build widget .frame
+  frame .frame \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # build widget .frame.frame0
+  frame .frame.frame0 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame.frame0.label4
+  label .frame.frame0.label4 \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -padx {2} \
+    -relief {raised} \
+    -text {ITL Formula:}
+
+  # build widget .frame.frame0.button3
+  button .frame.frame0.button3 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {text_clear .frame.frame4.text0} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {clear}
+
+  # build widget .frame.frame0.menubutton0
+  menubutton .frame.frame0.menubutton0 \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -relief {raised} \
+    -menu {.frame.frame0.menubutton0.m} \
+    -text {File}
+  # bindings
+  bind .frame.frame0.menubutton0 <Button-1> {MenuPopupPost .frame.frame0.menubutton0.m %X %Y}
+  bind .frame.frame0.menubutton0 <ButtonRelease-1> {MenuPopupRelease .frame.frame0.menubutton0.m %W}
+
+  # build widget .frame.frame0.menubutton0.m
+  menu .frame.frame0.menubutton0.m \
+    -background {Cornsilk2} \
+    -font {7x14} 
+  .frame.frame0.menubutton0.m add command \
+    -command {filehandling .frame.frame4.text0 load [FSBox "load"]} \
+    -label {Load}
+  .frame.frame0.menubutton0.m add command \
+    -command {filehandling .frame.frame4.text0 save [FSBox "save"]} \
+    -label {Save}
+  .frame.frame0.menubutton0.m add command \
+    -command {lite generate a} \
+    -label {Generate}
+  .frame.frame0.menubutton0.m add command \
+    -command {TokioCommand} \
+    -label {Tokio}
+  .frame.frame0.menubutton0.m add command \
+    -command {PrologCommand} \
+    -label {Prolog}
+  # bindings
+  bind .frame.frame0.menubutton0.m <Any-ButtonRelease-1> {MenuPopupRelease .frame.frame0.menubutton0.m %W}
+  bind .frame.frame0.menubutton0.m <Shift-Button-1> {MenuPopupPost .frame.frame0.menubutton0.m %X %Y}
+
+  # pack widget .frame.frame0
+  pack append .frame.frame0 \
+    .frame.frame0.label4 {left frame center expand fillx} \
+    .frame.frame0.button3 {right frame center} \
+    .frame.frame0.menubutton0 {left frame center fillx}
+
+  # build widget .frame.frame4
+  frame .frame.frame4 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame.frame4.scrollbar1
+  scrollbar .frame.frame4.scrollbar1 \
+    -background {Cornsilk2} \
+    -command {.frame.frame4.text0 yview} \
+
+  # build widget .frame.frame4.text0
+  text .frame.frame4.text0 \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -height {10} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -selectforeground {CornSilk2} \
+    -width {61} \
+    -yscrollcommand {.frame.frame4.scrollbar1 set}
+  # bindings
+  bind .frame.frame4.text0 <Button-2> {%W mark set insert @%x,%y
+        %W insert insert [selection get]
+        %W yview -pickplace insert}
+  bind .frame.frame4.text0 <Button-3> {%W mark set anchor insert
+        %W tag add sel insert @%x,%y}
+  bind .frame.frame4.text0 <Control-Key-a> {%W mark set insert {insert linestart}}
+  bind .frame.frame4.text0 <Control-Key-b> {%W mark set insert {insert -1char}}
+  bind .frame.frame4.text0 <Control-Key-d> {%W delete insert}
+  bind .frame.frame4.text0 <Control-Key-e> {%W mark set insert {insert lineend}}
+  bind .frame.frame4.text0 <Control-Key-f> {%W mark set insert {insert +1char}}
+  bind .frame.frame4.text0 <Control-Key-k> {if ![string compare [%W get insert] "\n"] {
+            %W delete insert} else {
+            %W delete insert {insert lineend}
+        }}
+  bind .frame.frame4.text0 <Control-Key-n> {%W mark set insert {insert +1line}}
+  bind .frame.frame4.text0 <Control-Key-p> {%W mark set insert {insert -1line}}
+  bind .frame.frame4.text0 <Control-Key-w> {if [llength [%W tag ranges sel]] {
+            %W delete sel.first sel.last
+        }}
+
+  # pack widget .frame.frame4
+  pack append .frame.frame4 \
+    .frame.frame4.text0 {left frame center expand fill} \
+    .frame.frame4.scrollbar1 {right frame center filly}
+
+  # pack widget .frame
+  pack append .frame \
+    .frame.frame0 {top frame center fillx} \
+    .frame.frame4 {left frame center expand fill}
+
+  # build widget .frame3
+  frame .frame3 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame3.button4
+  button .frame3.button4 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {lite quit 0} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {Quit}
+
+  # build widget .frame3.checkbutton5
+  checkbutton .frame3.checkbutton5 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {lite verbose "$verbose"} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {verbose} \
+    -variable {verbose}
+
+  # build widget .frame3.button7
+  button .frame3.button7 \
+    -activebackground {#eed5b7} \
+    -background {Cornsilk2} \
+    -command {lite verify "\'[$symbolicName(entry) get 0.0 end]\'"} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -text {Verify}
+
+  # pack widget .frame3
+  pack append .frame3 \
+    .frame3.button4 {left frame center} \
+    .frame3.checkbutton5 {right frame center} \
+    .frame3.button7 {top frame n fillx}
+
+  # pack widget .
+  pack append . \
+    .frame {top frame center expand fill} \
+    .frame3 {top frame center fill}
+
+  .frame.frame4.text0 insert end {}
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree ."
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+
+# User defined procedures
+
+
+# Procedure: FSBox
+proc FSBox { {fsBoxMessage "Select file:"} {fsBoxFileName ""} {fsBoxActionOk ""} {fsBoxActionCancel ""}} {
+# xf ignore me 5
+##########
+# Procedure: FSBox
+# Description: show file selector box
+# Arguments: fsBoxMessage - the text to display
+#            fsBoxFileName - a file name that should be selected
+#            fsBoxActionOk - the action that should be performed on ok
+#            fsBoxActionCancel - the action that should be performed on cancel
+# Returns: the filename that was selected, or nothing
+# Sideeffects: none
+##########
+# 
+# global fsBox(activeBackground) - active background color
+# global fsBox(activeForeground) - active foreground color
+# global fsBox(background) - background color
+# global fsBox(font) - text font
+# global fsBox(foreground) - foreground color
+# global fsBox(extensions) - scan directory for extensions
+# global fsBox(scrollActiveForeground) - scrollbar active background color
+# global fsBox(scrollBackground) - scrollbar background color
+# global fsBox(scrollForeground) - scrollbar foreground color
+# global fsBox(scrollSide) - side where scrollbar is located
+
+  global fsBox
+
+  set tmpButtonOpt ""
+  set tmpFrameOpt ""
+  set tmpMessageOpt ""
+  set tmpScaleOpt ""
+  set tmpScrollOpt ""
+  if {"$fsBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" "
+  }
+  if {"$fsBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$fsBox(background)\" "
+    append tmpFrameOpt "-background \"$fsBox(background)\" "
+    append tmpMessageOpt "-background \"$fsBox(background)\" "
+  }
+  if {"$fsBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$fsBox(font)\" "
+    append tmpMessageOpt "-font \"$fsBox(font)\" "
+  }
+  if {"$fsBox(scrollBackground)" != ""} {
+    append tmpScrollOpt "-background \"$fsBox(scrollBackground)\" "
+  }
+
+  if {[file exists [file tail $fsBoxFileName]] &&
+      [IsAFile [file tail $fsBoxFileName]]} {
+    set fsBox(name) [file tail $fsBoxFileName]
+  } {
+    set fsBox(name) ""
+  }
+  if {[file exists $fsBoxFileName] && [IsADir $fsBoxFileName]} {
+    set fsBox(path) $fsBoxFileName
+  } {
+    if {"[file rootname $fsBoxFileName]" != "."} {
+      set fsBox(path) [file rootname $fsBoxFileName]
+    }
+  }
+  if {$fsBox(showPixmap)} {
+    set fsBox(path) [string trimleft $fsBox(path) @]
+  }
+  if {"$fsBox(path)" != "" && [file exists $fsBox(path)] &&
+      [IsADir $fsBox(path)]} {
+    set fsBox(internalPath) $fsBox(path)
+  } {
+    if {"$fsBox(internalPath)" == "" ||
+        ![file exists $fsBox(internalPath)]} {
+      set fsBox(internalPath) [pwd]
+    }
+  }
+  # build widget structure
+
+  # start build of toplevel
+  if {"[info commands XFDestroy]" != ""} {
+    catch {XFDestroy .fsBox}
+  } {
+    catch {destroy .fsBox}
+  }
+  toplevel .fsBox  -borderwidth 0
+  catch ".fsBox config $tmpFrameOpt"
+  wm geometry .fsBox 350x300 
+  wm title .fsBox {File select box}
+  wm maxsize .fsBox 1000 1000
+  wm minsize .fsBox 100 100
+  # end build of toplevel
+
+  label .fsBox.message1  -anchor c  -relief raised  -text "$fsBoxMessage"
+  catch ".fsBox.message1 config $tmpMessageOpt"
+
+  frame .fsBox.frame1  -borderwidth 0  -relief raised
+  catch ".fsBox.frame1 config $tmpFrameOpt"
+
+  button .fsBox.frame1.ok  -text "OK"  -command "
+      global fsBox
+      set fsBox(name) \[.fsBox.file.file get\]
+      if {$fsBox(showPixmap)} {
+        set fsBox(path) @\[.fsBox.path.path get\]
+      } {
+        set fsBox(path) \[.fsBox.path.path get\]
+      }
+      set fsBox(internalPath) \[.fsBox.path.path get\]
+      $fsBoxActionOk
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy .fsBox}
+      } {
+        catch {destroy .fsBox}
+      }"
+  catch ".fsBox.frame1.ok config $tmpButtonOpt"
+
+  button .fsBox.frame1.rescan  -text "Rescan"  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  catch ".fsBox.frame1.rescan config $tmpButtonOpt"
+
+  button .fsBox.frame1.cancel  -text "Cancel"  -command "
+      global fsBox
+      set fsBox(name) {}
+      set fsBox(path) {}
+      $fsBoxActionCancel
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy .fsBox}
+      } {
+        catch {destroy .fsBox}
+      }"
+  catch ".fsBox.frame1.cancel config $tmpButtonOpt"
+
+  if {$fsBox(showPixmap)} {
+    frame .fsBox.frame2  -borderwidth 0  -relief raised
+    catch ".fsBox.frame2 config $tmpFrameOpt"
+
+    scrollbar .fsBox.frame2.scrollbar3  -command {.fsBox.frame2.canvas2 xview}  -orient {horizontal}  -relief {raised}
+    catch ".fsBox.frame2.scrollbar3 config $tmpScrollOpt"
+
+    scrollbar .fsBox.frame2.scrollbar1  -command {.fsBox.frame2.canvas2 yview}  -relief {raised}
+    catch ".fsBox.frame2.scrollbar1 config $tmpScrollOpt"
+
+    canvas .fsBox.frame2.canvas2  -confine {true}  -relief {raised}  -scrollregion {0c 0c 20c 20c}  -width {100}  -xscrollcommand {.fsBox.frame2.scrollbar3 set}  -yscrollcommand {.fsBox.frame2.scrollbar1 set}
+    catch ".fsBox.frame2.canvas2 config $tmpFrameOpt"
+
+    .fsBox.frame2.canvas2 addtag currentBitmap withtag [.fsBox.frame2.canvas2 create bitmap 5 5 -anchor nw]
+  }
+
+  frame .fsBox.path  -borderwidth 0  -relief raised
+  catch ".fsBox.path config $tmpFrameOpt"
+
+  frame .fsBox.path.paths  -borderwidth 2  -relief raised
+  catch ".fsBox.path.paths config $tmpFrameOpt"
+
+  menubutton .fsBox.path.paths.paths  -borderwidth 0  -menu ".fsBox.path.paths.paths.menu"  -relief flat  -text "Pathname:"
+  catch ".fsBox.path.paths.paths config $tmpButtonOpt"
+
+  menu .fsBox.path.paths.paths.menu
+  catch ".fsBox.path.paths.paths.menu config $tmpButtonOpt"
+
+  .fsBox.path.paths.paths.menu add command  -label "[string trimright $fsBox(internalPath) {/@}]"  -command "
+       global fsBox
+       FSBoxFSShow \[.fsBox.path.path get\]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+       .fsBox.path.path delete 0 end
+       .fsBox.path.path insert 0 [string trimright $fsBox(internalPath) {/@}]"
+
+  entry .fsBox.path.path  -relief raised
+  catch ".fsBox.path.path config $tmpMessageOpt"
+
+  if {![IsADir $fsBox(internalPath)]} {
+    set $fsBox(internalPath) [pwd]
+  }
+  .fsBox.path.path insert 0 $fsBox(internalPath)
+
+  frame .fsBox.pattern  -borderwidth 0  -relief raised
+  catch ".fsBox.pattern config $tmpFrameOpt"
+
+  frame .fsBox.pattern.patterns  -borderwidth 2  -relief raised
+  catch ".fsBox.pattern.patterns config $tmpFrameOpt"
+
+  menubutton .fsBox.pattern.patterns.patterns  -borderwidth 0  -menu ".fsBox.pattern.patterns.patterns.menu"  -relief flat  -text "Selection pattern:"
+  catch ".fsBox.pattern.patterns.patterns config $tmpButtonOpt"
+
+  menu .fsBox.pattern.patterns.patterns.menu
+  catch ".fsBox.pattern.patterns.patterns.menu config $tmpButtonOpt"
+
+  .fsBox.pattern.patterns.patterns.menu add checkbutton  -label "Scan extensions"  -variable fsBox(extensions)  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+
+  entry .fsBox.pattern.pattern  -relief raised
+  catch ".fsBox.pattern.pattern config $tmpMessageOpt"
+
+  .fsBox.pattern.pattern insert 0 $fsBox(pattern)
+  
+  frame .fsBox.files  -borderwidth 0  -relief raised
+  catch ".fsBox.files config $tmpFrameOpt"
+
+  scrollbar .fsBox.files.vscroll  -relief raised  -command ".fsBox.files.files yview"
+  catch ".fsBox.files.vscroll config $tmpScrollOpt"
+
+  scrollbar .fsBox.files.hscroll  -orient horiz  -relief raised  -command ".fsBox.files.files xview"
+  catch ".fsBox.files.hscroll config $tmpScrollOpt"
+
+  listbox .fsBox.files.files  -exportselection false  -relief raised  -xscrollcommand ".fsBox.files.hscroll set"  -yscrollcommand ".fsBox.files.vscroll set"
+  catch ".fsBox.files.files config $tmpMessageOpt"
+
+  frame .fsBox.file  -borderwidth 0  -relief raised
+  catch ".fsBox.file config $tmpFrameOpt"
+
+  label .fsBox.file.labelfile  -relief raised  -text "Filename:"
+  catch ".fsBox.file.labelfile config $tmpMessageOpt"
+
+  entry .fsBox.file.file  -relief raised
+  catch ".fsBox.file.file config $tmpMessageOpt"
+
+  .fsBox.file.file delete 0 end
+  .fsBox.file.file insert 0 $fsBox(name)
+  
+  checkbutton .fsBox.pattern.all  -offvalue 0  -onvalue 1  -text "Show all files"  -variable fsBox(all)  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  catch ".fsBox.pattern.all config $tmpButtonOpt"
+
+  FSBoxFSShow $fsBox(internalPath) $fsBox(pattern) $fsBox(all)
+
+  # bindings
+  bind .fsBox.files.files <Double-Button-1> "
+    FSBoxFSFileSelectDouble %W $fsBox(showPixmap) \{$fsBoxActionOk\} %y"
+  bind .fsBox.files.files <ButtonPress-1> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Button1-Motion> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Shift-Button1-Motion> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Shift-ButtonPress-1> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+
+  bind .fsBox.path.path <Tab> {
+    FSBoxFSNameComplete path}
+  bind .fsBox.path.path <Return> {
+    global tkVersion
+    global fsBox
+    FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)
+    FSBoxFSInsertPath
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+  catch "bind .fsBox.path.path <Up> {}"
+  bind .fsBox.path.path <Down> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+
+  bind .fsBox.file.file <Tab> {
+    FSBoxFSNameComplete file}
+  bind .fsBox.file.file <Return> "
+    global fsBox
+    set fsBox(name) \[.fsBox.file.file get\]
+    if {$fsBox(showPixmap)} {
+      set fsBox(path) @\[.fsBox.path.path get\]
+    } {
+      set fsBox(path) \[.fsBox.path.path get\]
+    }
+    set fsBox(internalPath) \[.fsBox.path.path get\]
+    $fsBoxActionOk
+    if {\"\[info commands XFDestroy\]\" != \"\"} {
+      catch {XFDestroy .fsBox}
+    } {
+      catch {destroy .fsBox}
+    }"
+  bind .fsBox.file.file <Up> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.path.path icursor end
+    } {
+      .fsBox.path.path cursor end
+    }
+    focus .fsBox.path.path}
+  bind .fsBox.file.file <Down> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.pattern.pattern icursor end
+    } {
+      .fsBox.pattern.pattern cursor end
+    }
+    focus .fsBox.pattern.pattern}
+
+  bind .fsBox.pattern.pattern <Return> {
+    global fsBox
+    FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  bind .fsBox.pattern.pattern <Up> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+  catch "bind .fsBox.pattern.pattern <Down> {}"
+
+  # packing
+  pack append .fsBox.files  .fsBox.files.vscroll "$fsBox(scrollSide) filly"  .fsBox.files.hscroll {bottom fillx}  .fsBox.files.files {left fill expand}
+  pack append .fsBox.file  .fsBox.file.labelfile {left}  .fsBox.file.file {left fill expand}
+  pack append .fsBox.frame1  .fsBox.frame1.ok {left fill expand}  .fsBox.frame1.rescan {left fill expand}  .fsBox.frame1.cancel {left fill expand}
+  pack append .fsBox.path.paths  .fsBox.path.paths.paths {left}
+  pack append .fsBox.pattern.patterns  .fsBox.pattern.patterns.patterns {left}
+  pack append .fsBox.path  .fsBox.path.paths {left}  .fsBox.path.path {left fill expand}
+  pack append .fsBox.pattern  .fsBox.pattern.patterns {left}  .fsBox.pattern.all {right fill}  .fsBox.pattern.pattern {left fill expand}
+  if {$fsBox(showPixmap)} {
+    pack append .fsBox.frame2  .fsBox.frame2.scrollbar1 {left filly}  .fsBox.frame2.canvas2 {top expand fill}  .fsBox.frame2.scrollbar3 {top fillx} 
+
+    pack append .fsBox  .fsBox.message1 {top fill}  .fsBox.frame1 {bottom fill}  .fsBox.pattern {bottom fill}  .fsBox.file {bottom fill}  .fsBox.path {bottom fill}  .fsBox.frame2 {right fill}  .fsBox.files {left fill expand}
+  } {
+    pack append .fsBox  .fsBox.message1 {top fill}  .fsBox.frame1 {bottom fill}  .fsBox.pattern {bottom fill}  .fsBox.file {bottom fill}  .fsBox.path {bottom fill}  .fsBox.files {left fill expand}
+  }
+
+  if {"$fsBoxActionOk" == "" && "$fsBoxActionCancel" == ""} {
+    # wait for the box to be destroyed
+    update idletask
+    grab .fsBox
+    tkwait window .fsBox
+
+    if {"[string trim $fsBox(path)]" != "" ||
+        "[string trim $fsBox(name)]" != ""} {
+      if {"[string trimleft [string trim $fsBox(name)] /]" == ""} {
+        return [string trimright [string trim $fsBox(path)] /]
+      } {
+        return [string trimright [string trim $fsBox(path)] /]/[string trimleft [string trim $fsBox(name)] /]
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxBindSelectOne
+proc FSBoxBindSelectOne { fsBoxW fsBoxY} {
+# xf ignore me 6
+
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    $fsBoxW select from $fsBoxNearest
+    $fsBoxW select to $fsBoxNearest
+  }
+}
+
+
+# Procedure: FSBoxFSFileSelect
+proc FSBoxFSFileSelect { fsBoxW fsBoxShowPixmap fsBoxY} {
+# xf ignore me 6
+  global fsBox
+
+  FSBoxBindSelectOne $fsBoxW $fsBoxY
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    set fsBoxTmpEntry [$fsBoxW get $fsBoxNearest]
+    if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "/" ||
+        "[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "@"} {
+      set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+      if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]] &&
+          ![IsASymlink [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+        set fsBoxFileName $fsBoxTmpEntry
+      }
+    } {
+      if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "*"} {
+        set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+        if {![file executable $fsBox(internalPath)/$fsBoxFileName]} {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      } {
+        set fsBoxFileName $fsBoxTmpEntry
+      }
+    }
+    if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+      set fsBox(name) $fsBoxFileName
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 $fsBox(name)
+      if {$fsBoxShowPixmap} {
+        catch ".fsBox.frame2.canvas2 itemconfigure currentBitmap -bitmap \"@$fsBox(internalPath)/$fsBox(name)\""
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSFileSelectDouble
+proc FSBoxFSFileSelectDouble { fsBoxW fsBoxShowPixmap fsBoxAction fsBoxY} {
+# xf ignore me 6
+  global fsBox
+
+  FSBoxBindSelectOne $fsBoxW $fsBoxY
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    set fsBoxTmpEntry [$fsBoxW get $fsBoxNearest]
+    if {"$fsBoxTmpEntry" == "../"} {
+      set fsBoxTmpEntry [string trimright [string trim $fsBox(internalPath)] "@/"]
+      if {"$fsBoxTmpEntry" == ""} {
+        return
+      }
+      FSBoxFSShow [file dirname $fsBoxTmpEntry]  [.fsBox.pattern.pattern get] $fsBox(all)
+      .fsBox.path.path delete 0 end
+      .fsBox.path.path insert 0 $fsBox(internalPath)
+    } {
+      if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "/" ||
+          "[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "@"} {
+        set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+        if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]] &&
+            ![IsASymlink [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      } {
+        if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "*"} {
+          set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+          if {![file executable $fsBox(internalPath)/$fsBoxFileName]} {
+            set fsBoxFileName $fsBoxTmpEntry
+          }
+        } {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      }
+      if {[IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+        set fsBox(internalPath) "[string trimright $fsBox(internalPath) {/@}]/$fsBoxFileName"
+        FSBoxFSShow $fsBox(internalPath)  [.fsBox.pattern.pattern get] $fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBox(internalPath)
+      } {
+        set fsBox(name) $fsBoxFileName
+        if {$fsBoxShowPixmap} {
+          set fsBox(path) @$fsBox(internalPath)
+        } {
+          set fsBox(path) $fsBox(internalPath)
+        }
+        if {"$fsBoxAction" != ""} {
+          eval "global fsBox; $fsBoxAction"
+        }
+        if {"[info commands XFDestroy]" != ""} {
+          catch {XFDestroy .fsBox}
+        } {
+          catch {destroy .fsBox}
+        }
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSInsertPath
+proc FSBoxFSInsertPath {} {
+# xf ignore me 6
+  global fsBox
+
+  set fsBoxLast [.fsBox.path.paths.paths.menu index last]
+  set fsBoxNewEntry [string trimright [.fsBox.path.path get] "/@"]
+  for {set fsBoxCounter 0} {$fsBoxCounter <= $fsBoxLast} {incr fsBoxCounter 1} {
+    if {"$fsBoxNewEntry" ==  "[lindex [.fsBox.path.paths.paths.menu entryconfigure  $fsBoxCounter -label] 4]"} {
+      return
+    }
+  }
+  if {$fsBoxLast < 9} {
+    .fsBox.path.paths.paths.menu add command  -label "$fsBoxNewEntry"  -command "
+        global fsBox
+        FSBoxFSShow $fsBoxNewEntry  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBoxNewEntry"
+  } {
+    for {set fsBoxCounter 0} {$fsBoxCounter < $fsBoxLast} {incr fsBoxCounter 1} {
+      .fsBox.path.paths.paths.menu entryconfigure  $fsBoxCounter -label  [lindex [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]
+      .fsBox.path.paths.paths.menu entryconfigure $fsBoxCounter  -command "
+          global fsBox
+          FSBoxFSShow [lindex [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 [lindex  [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]"
+    }
+    .fsBox.path.paths.paths.menu entryconfigure $fsBoxLast  -label "$fsBoxNewEntry"
+    .fsBox.path.paths.paths.menu entryconfigure $fsBoxCounter  -command "
+        global fsBox
+        FSBoxFSShow \[.fsBox.path.path get\]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBoxNewEntry"
+  }
+}
+
+
+# Procedure: FSBoxFSNameComplete
+proc FSBoxFSNameComplete { fsBoxType} {
+# xf ignore me 6
+  global tkVersion
+  global fsBox
+
+  set fsBoxNewFile ""
+  if {"$fsBoxType" == "path"} {
+    set fsBoxDirName [file dirname [.fsBox.path.path get]]
+    set fsBoxFileName [file tail [.fsBox.path.path get]]
+  } {
+    set fsBoxDirName [file dirname [.fsBox.path.path get]/]
+    set fsBoxFileName [file tail [.fsBox.file.file get]]
+  }
+
+  set fsBoxNewFile ""
+  if {[IsADir [string trimright $fsBoxDirName @]]} {
+    catch "glob -nocomplain $fsBoxDirName/${fsBoxFileName}*" fsBoxResult
+    foreach fsBoxCounter $fsBoxResult {
+      if {"$fsBoxNewFile" == ""} {
+        set fsBoxNewFile [file tail $fsBoxCounter]
+      } {
+        if {"[string index [file tail $fsBoxCounter] 0]" !=
+            "[string index $fsBoxNewFile 0]"} {
+          set fsBoxNewFile ""
+          break
+        }
+        set fsBoxCounter1 0
+        set fsBoxTmpFile1 $fsBoxNewFile
+        set fsBoxTmpFile2 [file tail $fsBoxCounter]
+        set fsBoxLength1 [string length $fsBoxTmpFile1]
+        set fsBoxLength2 [string length $fsBoxTmpFile2]
+        set fsBoxNewFile ""
+        if {$fsBoxLength1 > $fsBoxLength2} {
+          set fsBoxLength1 $fsBoxLength2
+        }
+        while {$fsBoxCounter1 < $fsBoxLength1} {
+          if {"[string index $fsBoxTmpFile1 $fsBoxCounter1]" ==  "[string index $fsBoxTmpFile2 $fsBoxCounter1]"} {
+            append fsBoxNewFile [string index $fsBoxTmpFile1 $fsBoxCounter1]
+          } {
+            break
+          }
+          incr fsBoxCounter1 1
+        }
+      }
+    }
+  }
+  if {"$fsBoxNewFile" != ""} {
+    if {[IsADir [string trimright $fsBoxDirName/$fsBoxNewFile @]] ||
+        ![IsAFile [string trimright $fsBoxDirName/$fsBoxNewFile @]]} {
+      if {[IsADir [string trimright $fsBoxDirName/$fsBoxNewFile @]]} {
+        if {"$fsBoxDirName" == "/"} {
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 "/[string trimright [string trim $fsBoxNewFile /] @]/"
+        } {
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 "[string trimright $fsBoxDirName /]/[string trimright [string trim $fsBoxNewFile /] @]/"
+        }
+        FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)
+        FSBoxFSInsertPath
+      } {
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 "[string trimright $fsBoxDirName /]/[string trimright [string trim $fsBoxNewFile /] @]"
+      }
+    } {
+      .fsBox.path.path delete 0 end
+      .fsBox.path.path insert 0 "[string trimright $fsBoxDirName {@/}]/"
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 $fsBoxNewFile
+      if {$tkVersion >= 3.0} {
+        .fsBox.file.file icursor end
+      } {
+        .fsBox.file.file cursor end
+      }
+      focus .fsBox.file.file
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSShow
+proc FSBoxFSShow { fsBoxPath fsBoxPattern fsBoxAll} {
+# xf ignore me 6
+  global fsBox
+
+  set tmpButtonOpt ""
+  if {"$fsBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" "
+  }
+  if {"$fsBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$fsBox(background)\" "
+  }
+  if {"$fsBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$fsBox(font)\" "
+  }
+
+  set fsBox(pattern) $fsBoxPattern
+  if {[file exists $fsBoxPath] && [file readable $fsBoxPath] &&
+      [IsADir $fsBoxPath]} {
+    set fsBox(internalPath) $fsBoxPath
+  } {
+    if {[file exists $fsBoxPath] && [file readable $fsBoxPath] &&
+        [IsAFile $fsBoxPath]} {
+      set fsBox(internalPath) [file dirname $fsBoxPath]
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 [file tail $fsBoxPath]
+      set fsBoxPath $fsBox(internalPath)
+    } {
+      while {"$fsBoxPath" != "" && "$fsBoxPath" != "/" &&
+             ![file isdirectory $fsBoxPath]} {
+        set fsBox(internalPath) [file dirname $fsBoxPath]
+         set fsBoxPath $fsBox(internalPath)
+      }
+    }
+  }
+  if {"$fsBoxPath" == ""} {
+    set fsBoxPath "/"
+    set fsBox(internalPath) "/"
+  }
+  .fsBox.path.path delete 0 end
+  .fsBox.path.path insert 0 $fsBox(internalPath)
+
+  if {[.fsBox.files.files size] > 0} {
+    .fsBox.files.files delete 0 end
+  }
+  if {$fsBoxAll} {
+    if {[catch "exec ls -F -a $fsBoxPath" fsBoxResult]} {
+      puts stderr "$fsBoxResult"
+    }
+  } {
+    if {[catch "exec ls -F $fsBoxPath" fsBoxResult]} {
+      puts stderr "$fsBoxResult"
+    }
+  }
+  set fsBoxElementList [lsort $fsBoxResult]
+
+  foreach fsBoxCounter [winfo children .fsBox.pattern.patterns.patterns] {
+    if {[string length [info commands XFDestroy]] > 0} {
+      catch {XFDestroy $fsBoxCounter}
+    } {
+      catch {destroy $fsBoxCounter}
+    }
+  }
+  menu .fsBox.pattern.patterns.patterns.menu
+  catch ".fsBox.pattern.patterns.patterns.menu config $tmpButtonOpt"
+
+  if {$fsBox(extensions)} {
+    .fsBox.pattern.patterns.patterns.menu add command  -label "*"  -command {
+        global fsBox
+        set fsBox(pattern) "*"
+        .fsBox.pattern.pattern delete 0 end
+        .fsBox.pattern.pattern insert 0 $fsBox(pattern)
+        FSBoxFSShow [.fsBox.path.path get] $fsBox(pattern)  $fsBox(all)}
+  }
+
+  if {"$fsBoxPath" != "/"} {
+    .fsBox.files.files insert end "../"
+  }
+  foreach fsBoxCounter $fsBoxElementList {
+    if {[string match $fsBoxPattern $fsBoxCounter] ||
+        [IsADir [string trimright $fsBoxPath/$fsBoxCounter "/@"]]} {
+      if {"$fsBoxCounter" != "../" &&
+          "$fsBoxCounter" != "./"} {
+        .fsBox.files.files insert end $fsBoxCounter
+      }
+    }
+
+    if {$fsBox(extensions)} {
+      catch "file rootname $fsBoxCounter" fsBoxRootName
+      catch "file extension $fsBoxCounter" fsBoxExtension
+      set fsBoxExtension [string trimright $fsBoxExtension "/*@"]
+      if {"$fsBoxExtension" != "" && "$fsBoxRootName" != ""} {
+        set fsBoxInsert 1
+        set fsBoxLast [.fsBox.pattern.patterns.patterns.menu index last]
+        for {set fsBoxCounter1 0} {$fsBoxCounter1 <= $fsBoxLast} {incr fsBoxCounter1 1} {
+          if {"*$fsBoxExtension" ==  "[lindex [.fsBox.pattern.patterns.patterns.menu entryconfigure  $fsBoxCounter1 -label] 4]"} {
+            set fsBoxInsert 0
+          }
+        }
+	if {$fsBoxInsert} {
+          .fsBox.pattern.patterns.patterns.menu add command  -label "*$fsBoxExtension"  -command "
+              global fsBox
+              set fsBox(pattern) \"*$fsBoxExtension\"
+              .fsBox.pattern.pattern delete 0 end
+              .fsBox.pattern.pattern insert 0 \$fsBox(pattern)
+              FSBoxFSShow \[.fsBox.path.path get\] \$fsBox(pattern)  \$fsBox(all)"
+        }
+      }
+    }
+  }
+  if {$fsBox(extensions)} {
+    .fsBox.pattern.patterns.patterns.menu add separator
+  }
+  if {$fsBox(extensions) || 
+      "[.fsBox.pattern.patterns.patterns.menu index last]" == "none"} {
+    .fsBox.pattern.patterns.patterns.menu add checkbutton  -label "Scan extensions"  -variable "fsBox(extensions)"  -command {
+        global fsBox
+        FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  }
+}
+
+
+# Procedure: InputBoxInternal
+proc InputBoxInternal { inputBoxMessage inputBoxCommandOk inputBoxCommandCancel inputBoxGeometry inputBoxTitle lineNum} {
+# xf ignore me 6
+  global inputBox
+
+  set tmpButtonOpt ""
+  set tmpFrameOpt ""
+  set tmpMessageOpt ""
+  set tmpScaleOpt ""
+  set tmpScrollOpt ""
+  if {"$inputBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$inputBox(activeBackground)\" "
+  }
+  if {"$inputBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$inputBox(background)\" "
+    append tmpFrameOpt "-background \"$inputBox(background)\" "
+    append tmpMessageOpt "-background \"$inputBox(background)\" "
+  }
+  if {"$inputBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$inputBox(font)\" "
+    append tmpMessageOpt "-font \"$inputBox(font)\" "
+  }
+  if {"$inputBox(scrollBackground)" != ""} {
+    append tmpScrollOpt "-background \"$inputBox(scrollBackground)\" "
+  }
+
+  # start build of toplevel
+  if {"[info commands XFDestroy]" != ""} {
+    catch {XFDestroy $inputBox(toplevelName)}
+  } {
+    catch {destroy $inputBox(toplevelName)}
+  }
+  toplevel $inputBox(toplevelName)  -borderwidth 0
+  catch "$inputBox(toplevelName) config $tmpFrameOpt"
+  if {[catch "wm geometry $inputBox(toplevelName) $inputBoxGeometry"]} {
+    wm geometry $inputBox(toplevelName) 350x150
+  }
+  wm title $inputBox(toplevelName) $inputBoxTitle
+  wm maxsize $inputBox(toplevelName) 1000 1000
+  wm minsize $inputBox(toplevelName) 100 100
+  # end build of toplevel
+
+  message $inputBox(toplevelName).message1  -anchor "$inputBox(anchor)"  -justify "$inputBox(justify)"  -relief raised  -text "$inputBoxMessage"
+  catch "$inputBox(toplevelName).message1 config $tmpMessageOpt"
+
+  set xfTmpWidth  [string range $inputBoxGeometry 0 [expr [string first x $inputBoxGeometry]-1]]
+  if {"$xfTmpWidth" != ""} {
+    # set message size
+    catch "$inputBox(toplevelName).message1 configure  -width [expr $xfTmpWidth-10]"
+  } {
+    $inputBox(toplevelName).message1 configure  -aspect 1500
+  }
+
+  frame $inputBox(toplevelName).frame0  -borderwidth 0  -relief raised
+  catch "$inputBox(toplevelName).frame0 config $tmpFrameOpt"
+
+  frame $inputBox(toplevelName).frame1  -borderwidth 0  -relief raised
+  catch "$inputBox(toplevelName).frame1 config $tmpFrameOpt"
+
+  if {$lineNum == 1} {
+    scrollbar $inputBox(toplevelName).frame1.hscroll  -orient "horizontal"  -relief raised  -command "$inputBox(toplevelName).frame1.input view"
+    catch "$inputBox(toplevelName).frame1.hscroll config $tmpScrollOpt"
+
+    entry $inputBox(toplevelName).frame1.input  -relief raised  -scrollcommand "$inputBox(toplevelName).frame1.hscroll set"
+    catch "$inputBox(toplevelName).frame1.input config $tmpMessageOpt"
+
+    $inputBox(toplevelName).frame1.input insert 0  $inputBox($inputBox(toplevelName),inputOne)
+    
+    # bindings
+    bind $inputBox(toplevelName).frame1.input <Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputOne) \[$inputBox(toplevelName).frame1.input get\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+    
+    # packing
+    pack append $inputBox(toplevelName).frame1  $inputBox(toplevelName).frame1.hscroll {bottom fill}  $inputBox(toplevelName).frame1.input {top fill expand}
+  } {
+    text $inputBox(toplevelName).frame1.input  -relief raised  -wrap none  -borderwidth 2  -yscrollcommand "$inputBox(toplevelName).frame1.vscroll set"
+    catch "$inputBox(toplevelName).frame1.input config $tmpMessageOpt"
+
+    scrollbar $inputBox(toplevelName).frame1.vscroll  -relief raised  -command "$inputBox(toplevelName).frame1.input yview"
+    catch "$inputBox(toplevelName).frame1.vscroll config $tmpScrollOpt"
+
+    $inputBox(toplevelName).frame1.input insert 1.0  $inputBox($inputBox(toplevelName),inputMulti)
+
+    # bindings
+    bind $inputBox(toplevelName).frame1.input <Control-Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+    bind $inputBox(toplevelName).frame1.input <Meta-Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+
+    # packing
+    pack append $inputBox(toplevelName).frame1  $inputBox(toplevelName).frame1.vscroll "$inputBox(scrollSide) filly"  $inputBox(toplevelName).frame1.input {left fill expand}
+  }
+  
+  button $inputBox(toplevelName).frame0.button0  -text "OK"  -command "
+      global inputBox
+      if {$lineNum == 1} {
+        set inputBox($inputBox(toplevelName),inputOne) \[$inputBox(toplevelName).frame1.input get\]
+      } {
+        set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      }
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+  catch "$inputBox(toplevelName).frame0.button0 config $tmpButtonOpt"
+
+  button $inputBox(toplevelName).frame0.button1  -text "Cancel"  -command "
+      global inputBox
+      if {$lineNum == 1} {
+        set inputBox($inputBox(toplevelName),inputOne) \"\"
+      } {
+        set inputBox($inputBox(toplevelName),inputMulti) \"\"
+      }
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandCancel"
+  catch "$inputBox(toplevelName).frame0.button1 config $tmpButtonOpt"
+
+  pack append $inputBox(toplevelName).frame0  $inputBox(toplevelName).frame0.button0 {left fill expand}  $inputBox(toplevelName).frame0.button1 {left fill expand}
+
+  pack append $inputBox(toplevelName)  $inputBox(toplevelName).frame0 {bottom fill}  $inputBox(toplevelName).frame1 {bottom fill expand}  $inputBox(toplevelName).message1 {top fill}
+}
+
+
+# Procedure: InputBoxMulti
+proc InputBoxMulti { {inputBoxMessage "Input box:"} {inputBoxCommandOk ""} {inputBoxCommandCancel ""} {inputBoxGeometry "350x150"} {inputBoxTitle "Input box"}} {
+# xf ignore me 5
+##########
+# Procedure: InputBoxMulti
+# Description: show input box with one text line
+# Arguments: {inputBoxMessage} - message to display
+#            {inputBoxCommandOk} - the command to call after ok
+#            {inputBoxCommandCancel} - the command to call after cancel
+#            {inputBoxGeometry} - the geometry for the window
+#            {inputBoxTitle} - the title for the window
+# Returns: The entered text
+# Sideeffects: none
+# Notes: there exist also a function called:
+#          InputBoxOne - to enter one line text
+##########
+#
+# global inputBox(activeBackground) - active background color
+# global inputBox(activeForeground) - active foreground color
+# global inputBox(anchor) - anchor for message box
+# global inputBox(background) - background color
+# global inputBox(erase) - erase previous text
+# global inputBox(font) - message font
+# global inputBox(foreground) - foreground color
+# global inputBox(justify) - justify for message box
+# global inputBox(scrollActiveForeground) - scrollbar active background color
+# global inputBox(scrollBackground) - scrollbar background color
+# global inputBox(scrollForeground) - scrollbar foreground color
+# global inputBox(scrollSide) - side where scrollbar is located
+# global inputBox(toplevelName) - the toplevel name
+# global inputBox(toplevelName,inputMulti) - the text in the text widget
+
+  global inputBox
+
+  if {"$inputBoxGeometry" == ""} {
+    set inputBoxGeometry 350x150
+  }
+  if {$inputBox(erase)} {
+    set inputBox($inputBox(toplevelName),inputMulti) ""
+  } {
+    if {![info exists inputBox($inputBox(toplevelName),inputMulti)]} {
+      set inputBox($inputBox(toplevelName),inputMulti) ""
+    }
+  }
+  InputBoxInternal $inputBoxMessage $inputBoxCommandOk $inputBoxCommandCancel $inputBoxGeometry $inputBoxTitle 2
+
+  # wait for the box to be destroyed
+  update idletask
+  grab $inputBox(toplevelName)
+  tkwait window $inputBox(toplevelName)
+
+  return $inputBox($inputBox(toplevelName),inputMulti)
+}
+
+
+# Procedure: InputBoxOne
+proc InputBoxOne { {inputBoxMessage "Input box:"} {inputBoxCommandOk ""} {inputBoxCommandCancel ""} {inputBoxGeometry "350x150"} {inputBoxTitle "Input box"}} {
+# xf ignore me 5
+##########
+# Procedure: InputBoxOne
+# Description: show input box with one text line
+# Arguments: {inputBoxMessage} - message to display
+#            {inputBoxCommandOk} - the command to call after ok
+#            {inputBoxCommandCancel} - the command to call after cancel
+#            {inputBoxGeometry} - the geometry for the window
+#            {inputBoxTitle} - the title for the window
+# Returns: The entered text
+# Sideeffects: none
+# Notes: there exist also a function called:
+#          InputBoxMulti - to enter multiline text
+##########
+#
+# global inputBox(activeBackground) - active background color
+# global inputBox(activeForeground) - active foreground color
+# global inputBox(anchor) - anchor for message box
+# global inputBox(background) - background color
+# global inputBox(erase) - erase previous text
+# global inputBox(font) - message font
+# global inputBox(foreground) - foreground color
+# global inputBox(justify) - justify for message box
+# global inputBox(scrollActiveForeground) - scrollbar active background color
+# global inputBox(scrollBackground) - scrollbar background color
+# global inputBox(scrollForeground) - scrollbar foreground color
+# global inputBox(scrollSide) - side where scrollbar is located
+# global inputBox(toplevelName) - the toplevel name
+# global inputBox(toplevelName,inputOne) - the text in the entry widget
+
+  global inputBox
+
+  if {$inputBox(erase)} {
+    set inputBox($inputBox(toplevelName),inputOne) ""
+  } {
+    if {![info exists inputBox($inputBox(toplevelName),inputOne)]} {
+      set inputBox($inputBox(toplevelName),inputOne) ""
+    }
+  }
+  InputBoxInternal $inputBoxMessage $inputBoxCommandOk $inputBoxCommandCancel $inputBoxGeometry $inputBoxTitle 1
+
+  # wait for the box to be destroyed
+  update idletask
+  grab $inputBox(toplevelName)
+  tkwait window $inputBox(toplevelName)
+
+  return $inputBox($inputBox(toplevelName),inputOne)
+}
+
+
+# Procedure: IsADir
+proc IsADir { pathName} {
+# xf ignore me 5
+##########
+# Procedure: IsADir
+# Description: check if name is a directory (including symbolic links)
+# Arguments: pathName - the path to check
+# Returns: 1 if its a directory, otherwise 0
+# Sideeffects: none
+##########
+
+  if {[file isdirectory $pathName]} {
+    return 1
+  } {
+    catch "file type $pathName" fileType
+    if {"$fileType" == "link"} {
+      if {[catch "file readlink $pathName" linkName]} {
+        return 0
+      }
+      catch "file type $linkName" fileType
+      while {"$fileType" == "link"} {
+        if {[catch "file readlink $linkName" linkName]} {
+          return 0
+        }
+        catch "file type $linkName" fileType
+      }
+      return [file isdirectory $linkName]
+    }
+  }
+  return 0
+}
+
+
+# Procedure: IsAFile
+proc IsAFile { fileName} {
+# xf ignore me 5
+##########
+# Procedure: IsAFile
+# Description: check if filename is a file (including symbolic links)
+# Arguments: fileName - the filename to check
+# Returns: 1 if its a file, otherwise 0
+# Sideeffects: none
+##########
+
+  if {[file isfile $fileName]} {
+    return 1
+  } {
+    catch "file type $fileName" fileType
+    if {"$fileType" == "link"} {
+      if {[catch "file readlink $fileName" linkName]} {
+        return 0
+      }
+      catch "file type $linkName" fileType
+      while {"$fileType" == "link"} {
+        if {[catch "file readlink $linkName" linkName]} {
+          return 0
+        }
+        catch "file type $linkName" fileType
+      }
+      return [file isfile $linkName]
+    }
+  }
+  return 0
+}
+
+
+# Procedure: IsASymlink
+proc IsASymlink { fileName} {
+# xf ignore me 5
+##########
+# Procedure: IsASymlink
+# Description: check if filename is a symbolic link
+# Arguments: fileName - the path/filename to check
+# Returns: none
+# Sideeffects: none
+##########
+
+  catch "file type $fileName" fileType
+  if {"$fileType" == "link"} {
+    return 1
+  }
+  return 0
+}
+
+
+# Procedure: PrologCommand
+proc PrologCommand {} {
+    lite prolog_call \
+       [ InputBoxMulti {Prolog Command:} {} {} {350x150} {Prolog} ]
+}
+
+# Procedure: TokioCommand
+proc TokioCommand {} {
+    lite tokio_call \
+       [ InputBoxMulti {Tokio Command:} {} {} {350x150} {Tokio} ]
+}
+
+# Procedure: canvaswh
+proc canvaswh { c scale} {
+global scalex scaley
+if {! $scalex && ! $scaley } {
+   regexp {([0-9]+)x([0-9]+)} [wm geometry .] dm w h
+   set h [$c canvasy [expr $h/2]]
+   set w [$c canvasx [expr $w/2]]
+} else {
+   set h $scaley
+   set w $scalex 
+}
+$c scale all $w $h $scale $scale
+}
+
+
+# Procedure: crosshair
+proc crosshair { c x y} {
+global scalex scaley
+if {[$c find withtag cursol] != {}} {
+   $c delete cursol
+}
+set cs  5
+set x [$c canvasx $x]
+set y [$c canvasy $y]
+$c create line $x [expr $y - $cs] $x [expr $y + $cs]  -tags cursol
+$c create line [expr $x - $cs] $y [expr $x + $cs] $y  -tags cursol
+set scalex $x
+set scaley $y
+}
+
+
+# Procedure: event
+proc event { args now} {
+prolog "tokio:tokio_event($args,$now)" 
+# tokio
+}
+
+
+# Procedure: filehandling
+proc filehandling { t mode file} {
+if {[string compare $mode "load"] == 0} {
+   if [file isfile $file] {
+       $t  delete 0.0 end
+       set F [open $file r]
+       while {[gets $F string] != -1} {
+             $t insert end "$string\n"
+       }
+       close $F
+  }
+} else {
+    set line [$t get 0.0 end]
+#    if [file writable $dir] {
+        if [expr [llength $line] > 0] {
+            set F [open $file w]
+            puts $F $line
+            close $F
+        }
+#    }
+}
+}
+
+
+# Procedure: lite
+proc lite { a b} {
+prolog "lite:event($a,$b)" 
+# lite
+}
+
+
+# Procedure: text_clear
+proc text_clear { t} {
+$t delete 0.0 end
+}
+
+
+# Internal procedures
+
+
+# Procedure: Alias
+if {"[info procs Alias]" == ""} {
+proc Alias { args} {
+# xf ignore me 7
+##########
+# Procedure: Alias
+# Description: establish an alias for a procedure
+# Arguments: args - no argument means that a list of all aliases
+#                   is returned. Otherwise the first parameter is
+#                   the alias name, and the second parameter is
+#                   the procedure that is aliased.
+# Returns: nothing, the command that is bound to the alias or a
+#          list of all aliases - command pairs. 
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is inserted
+##########
+  global internalAliasList
+
+  if {[llength $args] == 0} {
+    return $internalAliasList
+  } {
+    if {[llength $args] == 1} {
+      set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+      if {$xfTmpIndex != -1} {
+        return [lindex [lindex $internalAliasList $xfTmpIndex] 1]
+      }
+    } {
+      if {[llength $args] == 2} {
+        eval "proc [lindex $args 0] {args} {#xf ignore me 4
+return \[eval \"[lindex $args 1] \$args\"\]}"
+        set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+        if {$xfTmpIndex != -1} {
+          set internalAliasList [lreplace $internalAliasList $xfTmpIndex $xfTmpIndex "[lindex $args 0] [lindex $args 1]"]
+        } {
+          lappend internalAliasList "[lindex $args 0] [lindex $args 1]"
+        }
+      } {
+        error "Alias: wrong number or args: $args"
+      }
+    }
+  }
+}
+}
+
+
+# Procedure: GetSelection
+if {"[info procs GetSelection]" == ""} {
+proc GetSelection {} {
+# xf ignore me 7
+##########
+# Procedure: GetSelection
+# Description: get current selection
+# Arguments: none
+# Returns: none
+# Sideeffects: none
+##########
+
+  # the save way
+  set xfSelection ""
+  catch "selection get" xfSelection
+  if {"$xfSelection" == "selection doesn't exist or form \"STRING\" not defined"} {
+    return ""
+  } {
+    return $xfSelection
+  }
+}
+}
+
+
+# Procedure: MenuPopupAdd
+if {"[info procs MenuPopupAdd]" == ""} {
+proc MenuPopupAdd { xfW xfButton xfMenu {xfModifier ""} {xfCanvasTag ""}} {
+# xf ignore me 7
+# the popup menu handling is from (I already gave up with popup handling :-):
+#
+# Copyright 1991,1992 by James Noble.
+# Everyone is granted permission to copy, modify and redistribute.
+# This notice must be preserved on all copies or derivates.
+#
+##########
+# Procedure: MenuPopupAdd
+# Description: attach a popup menu to widget
+# Arguments: xfW - the widget
+#            xfButton - the button we use
+#            xfMenu - the menu to attach
+#            {xfModifier} - a optional modifier
+#            {xfCanvasTag} - a canvas tagOrId
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  set tk_popupPriv($xfMenu,focus) ""
+  set tk_popupPriv($xfMenu,grab) ""
+  if {"$xfModifier" != ""} {
+    set press "$xfModifier-"
+    set motion "$xfModifier-"
+    set release "Any-"
+  } {
+    set press ""
+    set motion ""
+    set release ""
+  }
+
+  bind $xfMenu "<${motion}B${xfButton}-Motion>"  "MenuPopupMotion $xfMenu %W %X %Y"
+  bind $xfMenu "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  if {"$xfCanvasTag" == ""} {
+    bind $xfW "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    bind $xfW "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  } {
+    $xfW bind $xfCanvasTag "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    $xfW bind $xfCanvasTag "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  }
+}
+}
+
+
+# Procedure: MenuPopupMotion
+if {"[info procs MenuPopupMotion]" == ""} {
+proc MenuPopupMotion { xfMenu xfW xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupMotion
+# Description: handle the popup menu motion
+# Arguments: xfMenu - the topmost menu
+#            xfW - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    set xfPopMinX [winfo rootx $xfW]
+    set xfPopMaxX [expr $xfPopMinX+[winfo width $xfW]]
+    if {$xfX >= $xfPopMinX && $xfX <= $xfPopMaxX} {
+      $xfW activate @[expr $xfY-[winfo rooty $xfW]]
+      if {![catch "$xfW entryconfig @[expr $xfY-[winfo rooty $xfW]] -menu" result]} {
+        if {"[lindex $result 4]" != ""} {
+          foreach binding [bind $xfMenu] {
+            bind [lindex $result 4] $binding [bind $xfMenu $binding]
+          }
+        }
+      }
+    } {
+      $xfW activate none
+    }
+  }
+}
+}
+
+
+# Procedure: MenuPopupPost
+if {"[info procs MenuPopupPost]" == ""} {
+proc MenuPopupPost { xfMenu xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupPost
+# Description: post the popup menu
+# Arguments: xfMenu - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfMenu]" != ""} {
+    if {![info exists tk_popupPriv($xfMenu,focus)]} {
+      set tk_popupPriv($xfMenu,focus) [focus]
+    } {
+      if {"$tk_popupPriv($xfMenu,focus)" == ""} {
+        set tk_popupPriv($xfMenu,focus) [focus]
+      }
+    }
+    set tk_popupPriv($xfMenu,grab) $xfMenu
+
+    catch "$xfMenu activate none"
+    catch "$xfMenu post $xfX $xfY"
+    catch "focus $xfMenu"
+    catch "grab -global $xfMenu"
+  }
+}
+}
+
+
+# Procedure: MenuPopupRelease
+if {"[info procs MenuPopupRelease]" == ""} {
+proc MenuPopupRelease { xfMenu xfW} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupRelease
+# Description: remove the popup menu
+# Arguments: xfMenu - the topmost menu widget
+#            xfW - the menu widget
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+  global tkVersion
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    if {$tkVersion >= 3.0} {
+      catch "grab release $tk_popupPriv($xfMenu,grab)"
+    } {
+      catch "grab none"
+    }
+    catch "focus $tk_popupPriv($xfMenu,focus)"
+    set tk_popupPriv($xfMenu,focus) ""
+    set tk_popupPriv($xfMenu,grab) ""
+    if {"[$xfW index active]" != "none"} {
+      $xfW invoke active; catch "$xfMenu unpost"
+    }
+  }
+  catch "$xfMenu unpost"
+}
+}
+
+
+# Procedure: NoFunction
+if {"[info procs NoFunction]" == ""} {
+proc NoFunction { args} {
+# xf ignore me 7
+##########
+# Procedure: NoFunction
+# Description: do nothing (especially with scales and scrollbars)
+# Arguments: args - a number of ignored parameters
+# Returns: none
+# Sideeffects: none
+##########
+}
+}
+
+
+# Procedure: SN
+if {"[info procs SN]" == ""} {
+proc SN { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SN
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  SymbolicName $xfName
+}
+}
+
+
+# Procedure: SymbolicName
+if {"[info procs SymbolicName]" == ""} {
+proc SymbolicName { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SymbolicName
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  global symbolicName
+
+  if {"$xfName" != ""} {
+    set xfArrayName ""
+    append xfArrayName symbolicName ( $xfName )
+    if {![catch "set \"$xfArrayName\"" xfValue]} {
+      return $xfValue
+    } {
+      if {"[info commands XFProcError]" != ""} {
+        XFProcError "Unknown symbolic name:\n$xfName"
+      } {
+        puts stderr "XF error: unknown symbolic name:\n$xfName"
+      }
+    }
+  }
+  return ""
+}
+}
+
+
+# Procedure: Unalias
+if {"[info procs Unalias]" == ""} {
+proc Unalias { aliasName} {
+# xf ignore me 7
+##########
+# Procedure: Unalias
+# Description: remove an alias for a procedure
+# Arguments: aliasName - the alias name to remove
+# Returns: none
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is removed
+##########
+  global internalAliasList
+
+  set xfIndex [lsearch $internalAliasList "$aliasName *"]
+  if {$xfIndex != -1} {
+    rename $aliasName ""
+    set internalAliasList [lreplace $internalAliasList $xfIndex $xfIndex]
+  }
+}
+}
+
+
+
+# application parsing procedure
+proc XFLocalParseAppDefs {xfAppDefFile} {
+  global xfAppDefaults
+
+  # basically from: Michael Moore
+  if {[file exists $xfAppDefFile] &&
+      [file readable $xfAppDefFile] &&
+      "[file type $xfAppDefFile]" == "link"} {
+    catch "file type $xfAppDefFile" xfType
+    while {"$xfType" == "link"} {
+      if {[catch "file readlink $xfAppDefFile" xfAppDefFile]} {
+        return
+      }
+      catch "file type $xfAppDefFile" xfType
+    }
+  }
+  if {!("$xfAppDefFile" != "" &&
+        [file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        "[file type $xfAppDefFile]" == "file")} {
+    return
+  }
+  if {![catch "open $xfAppDefFile r" xfResult]} {
+    set xfAppFileContents [read $xfResult]
+    close $xfResult
+    foreach line [split $xfAppFileContents "\n"] {
+      # backup indicates how far to backup.  It applies to the
+      # situation where a resource name ends in . and when it
+      # ends in *.  In the second case you want to keep the *
+      # in the widget name for pattern matching, but you want
+      # to get rid of the . if it is the end of the name. 
+      set backup -2  
+      set line [string trim $line]
+      if {[string index $line 0] == "#" || "$line" == ""} {
+        # skip comments and empty lines
+        continue
+      }
+      set list [split $line ":"]
+      set resource [string trim [lindex $list 0]]
+      set i [string last "." $resource]
+      set j [string last "*" $resource]
+      if {$j > $i} { 
+        set i $j
+        set backup -1
+      }
+      incr i
+      set name [string range $resource $i end]
+      incr i $backup
+      set widname [string range $resource 0 $i]
+      set value [string trim [lindex $list 1]]
+      if {"$widname" != "" && "$widname" != "*"} {
+        # insert the widget and resourcename to the application
+        # defaults list.
+        if {![info exists xfAppDefaults]} {
+          set xfAppDefaults ""
+        }
+        lappend xfAppDefaults [list $widname [string tolower $name] $value]
+      }
+    }
+  }
+}
+
+# application loading procedure
+proc XFLocalLoadAppDefs {{xfClasses ""} {xfPriority "startupFile"} {xfAppDefFile ""}} {
+  global env
+
+  if {"$xfAppDefFile" == ""} {
+    set xfFileList ""
+    if {[info exists env(XUSERFILESEARCHPATH)]} {
+      append xfFileList [split $env(XUSERFILESEARCHPATH) :]
+    }
+    if {[info exists env(XAPPLRESDIR)]} {
+      append xfFileList [split $env(XAPPLRESDIR) :]
+    }
+    if {[info exists env(XFILESEARCHPATH)]} {
+      append xfFileList [split $env(XFILESEARCHPATH) :]
+    }
+    append xfFileList " /usr/lib/X11/app-defaults"
+    append xfFileList " /usr/X11/lib/X11/app-defaults"
+
+    foreach xfCounter1 $xfClasses {
+      foreach xfCounter2 $xfFileList {
+        set xfPathName $xfCounter2
+        if {[regsub -all "%N" "$xfPathName" "$xfCounter1" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%T" "$xfPathName" "app-defaults" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%S" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%C" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[file exists $xfPathName] &&
+            [file readable $xfPathName] &&
+            ("[file type $xfPathName]" == "file" ||
+             "[file type $xfPathName]" == "link")} {
+          catch "option readfile $xfPathName $xfPriority"
+          if {"[info commands XFParseAppDefs]" != ""} {
+            XFParseAppDefs $xfPathName
+          } {
+            if {"[info commands XFLocalParseAppDefs]" != ""} {
+              XFLocalParseAppDefs $xfPathName
+            }
+          }
+        } {
+          if {[file exists $xfCounter2/$xfCounter1] &&
+              [file readable $xfCounter2/$xfCounter1] &&
+              ("[file type $xfCounter2/$xfCounter1]" == "file" ||
+               "[file type $xfCounter2/$xfCounter1]" == "link")} {
+            catch "option readfile $xfCounter2/$xfCounter1 $xfPriority"
+            if {"[info commands XFParseAppDefs]" != ""} {
+              XFParseAppDefs $xfCounter2/$xfCounter1
+            } {
+              if {"[info commands XFLocalParseAppDefs]" != ""} {
+                XFLocalParseAppDefs $xfCounter2/$xfCounter1
+              }
+            }
+          }
+        }
+      }
+    }
+  } {
+    # load a specific application defaults file
+    if {[file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        ("[file type $xfAppDefFile]" == "file" ||
+         "[file type $xfAppDefFile]" == "link")} {
+      catch "option readfile $xfAppDefFile $xfPriority"
+      if {"[info commands XFParseAppDefs]" != ""} {
+        XFParseAppDefs $xfAppDefFile
+      } {
+        if {"[info commands XFLocalParseAppDefs]" != ""} {
+          XFLocalParseAppDefs $xfAppDefFile
+        }
+      }
+    }
+  }
+}
+
+# application setting procedure
+proc XFLocalSetAppDefs {{xfWidgetPath "."}} {
+  global xfAppDefaults
+
+  if {![info exists xfAppDefaults]} {
+    return
+  }
+  foreach xfCounter $xfAppDefaults {
+    if {"$xfCounter" == ""} {
+      break
+    }
+    set widname [lindex $xfCounter 0]
+    if {[string match $widname ${xfWidgetPath}] ||
+        [string match "${xfWidgetPath}*" $widname]} {
+      set name [string tolower [lindex $xfCounter 1]]
+      set value [lindex $xfCounter 2]
+      # Now lets see how many tcl commands match the name
+      # pattern specified.
+      set widlist [info command $widname]
+      if {"$widlist" != ""} {
+        foreach widget $widlist {
+          # make sure this command is a widget.
+          if {![catch "winfo id $widget"] &&
+              [string match "${xfWidgetPath}*" $widget]} {
+            catch "$widget configure -$name $value" 
+          }
+        }
+      }
+    }
+  }
+}
+
+
+# prepare auto loading
+global auto_path
+global tk_library
+global xfLoadPath
+foreach xfElement [eval list [split $xfLoadPath :] $auto_path] {
+  if {[file exists $xfElement/tclIndex]} {
+    lappend auto_path $xfElement
+  }
+}
+catch "unset auto_index"
+
+catch "unset auto_oldpath"
+
+catch "unset auto_execs"
+
+
+# initialize global variables
+proc InitGlobals {} {
+  global {checkbutton5}
+  set {checkbutton5} {0}
+  global {fsBox}
+  set {fsBox(activeBackground)} {}
+  set {fsBox(activeForeground)} {}
+  set {fsBox(all)} {0}
+  set {fsBox(background)} {}
+  set {fsBox(button)} {0}
+  set {fsBox(extensions)} {0}
+  set {fsBox(font)} {}
+  set {fsBox(internalPath)} {/user/kono/ITL/demo}
+  set {fsBox(name)} {ahoaho}
+  set {fsBox(path)} {/user/kono/ITL/demo}
+  set {fsBox(pattern)} {*}
+  set {fsBox(scrollActiveForeground)} {}
+  set {fsBox(scrollBackground)} {}
+  set {fsBox(scrollForeground)} {}
+  set {fsBox(scrollSide)} {left}
+  set {fsBox(showPixmap)} {0}
+  global {inputBox}
+  set {inputBox(activeBackground)} {}
+  set {inputBox(activeForeground)} {}
+  set {inputBox(anchor)} {n}
+  set {inputBox(background)} {}
+  set {inputBox(erase)} {1}
+  set {inputBox(font)} {}
+  set {inputBox(justify)} {center}
+  set {inputBox(scrollActiveForeground)} {}
+  set {inputBox(scrollBackground)} {}
+  set {inputBox(scrollForeground)} {}
+  set {inputBox(scrollSide)} {left}
+  set {inputBox(toplevelName)} {.inputBox}
+  global {scalex}
+  set {scalex} {326}
+  global {scaley}
+  set {scaley} {194}
+  global {verbose}
+  set {verbose} {0}
+
+  # please don't modify the following
+  # variables. They are needed by xf.
+  global {autoLoadList}
+  set {autoLoadList(xf-disp)} {0}
+  global {internalAliasList}
+  set {internalAliasList} {}
+  global {moduleList}
+  set {moduleList(xf-disp)} {}
+  global {preloadList}
+  set {preloadList(xfInternal)} {}
+  global {symbolicName}
+  set {symbolicName(canvas)} {.top0.frame0.canvas2}
+  set {symbolicName(diag)} {.top0.frame6.button8}
+  set {symbolicName(entry)} {.frame.frame4.text0}
+  set {symbolicName(execute)} {.top0.frame6.button10}
+  set {symbolicName(map)} {.top0.frame1.button13}
+  set {symbolicName(root)} {.}
+  set {symbolicName(states)} {.top0.frame1.label6}
+  set {symbolicName(verbose)} {.frame3.checkbutton5}
+  set {symbolicName(verify)} {.frame3.button7}
+  global {xfWmSetPosition}
+  set {xfWmSetPosition} {}
+  global {xfWmSetSize}
+  set {xfWmSetSize} {}
+  global {xfAppDefToplevels}
+  set {xfAppDefToplevels} {}
+}
+
+# initialize global variables
+InitGlobals
+
+# display/remove toplevel windows.
+ShowWindow.
+
+global xfShowWindow.top0
+set xfShowWindow.top0 1
+ShowWindow.top0
+
+# load default bindings.
+if {[info exists env(XF_BIND_FILE)] &&
+    "[info procs XFShowHelp]" == ""} {
+  source $env(XF_BIND_FILE)
+}
+
+# parse and apply application defaults.
+XFLocalLoadAppDefs Xf-disp
+XFLocalSetAppDefs
+
+# eof
+#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tk/xf-disp.pro	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,2238 @@
+#!/usr/local/bin/wish -f
+# Program: xf-disp
+# Tcl version: 7.3 (Tcl/Tk/XF)
+# Tk version: 3.6
+# XF version: 2.2
+#
+
+# module inclusion
+global env
+global xfLoadPath
+global xfLoadInfo
+set xfLoadInfo 0
+if {[info exists env(XF_LOAD_PATH)]} {
+  if {[string first $env(XF_LOAD_PATH) /usr/local/lib/] == -1} {
+    set xfLoadPath $env(XF_LOAD_PATH):/usr/local/lib/
+  } {
+    set xfLoadPath /usr/local/lib/
+  }
+} {
+  set xfLoadPath /usr/local/lib/
+}
+
+global argc
+global argv
+global tkVersion
+set tmpArgv ""
+for {set counter 0} {$counter < $argc} {incr counter 1} {
+  case [string tolower [lindex $argv $counter]] in {
+    {-xfloadpath} {
+      incr counter 1
+      set xfLoadPath "[lindex $argv $counter]:$xfLoadPath"
+    }
+    {-xfstartup} {
+      incr counter 1
+      source [lindex $argv $counter]
+    }
+    {-xfbindfile} {
+      incr counter 1
+      set env(XF_BIND_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcolorfile} {
+      incr counter 1
+      set env(XF_COLOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcursorfile} {
+      incr counter 1
+      set env(XF_CURSOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xffontfile} {
+      incr counter 1
+      set env(XF_FONT_FILE) "[lindex $argv $counter]"
+    }
+    {-xfmodelmono} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . monochrome
+      }
+    }
+    {-xfmodelcolor} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . color
+      }
+    }
+    {-xfloading} {
+      set xfLoadInfo 1
+    }
+    {-xfnoloading} {
+      set xfLoadInfo 0
+    }
+    {default} {
+      lappend tmpArgv [lindex $argv $counter]
+    }
+  }
+}
+set argv $tmpArgv
+set argc [llength $tmpArgv]
+unset counter
+unset tmpArgv
+
+
+# procedure to show window .top0
+proc ShowWindow.top0 {args} {# xf ignore me 7
+
+  # build widget .top0
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFDestroy .top0"
+  } {
+    catch "destroy .top0"
+  }
+  toplevel .top0  \
+    -background {Cornsilk2}
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom .top0 ""
+  wm sizefrom .top0 ""
+  wm maxsize .top0 1000 1000
+  wm minsize .top0 10 10
+  wm title .top0 {Execution}
+
+
+  # build widget .top0.frame0
+  frame .top0.frame0 \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # build widget .top0.frame0.scrollbar3
+  scrollbar .top0.frame0.scrollbar3 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {.top0.frame0.canvas2 xview} \
+    -foreground {#ffe4c4} \
+    -orient {horizontal} \
+    -relief {raised}
+
+  # build widget .top0.frame0.scrollbar1
+  scrollbar .top0.frame0.scrollbar1 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {.top0.frame0.canvas2 yview} \
+    -foreground {#ffe4c4} \
+    -relief {raised}
+
+  # build widget .top0.frame0.canvas2
+  canvas .top0.frame0.canvas2 \
+    -background {Cornsilk2} \
+    -confine {0} \
+    -height {384} \
+    -insertofftime {600} \
+    -relief {raised} \
+    -scrollregion {-1c -1c 20c 20c} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -selectforeground {CornSilk2} \
+    -width {394} \
+    -xscrollcommand {.top0.frame0.scrollbar3 set} \
+    -yscrollcommand {.top0.frame0.scrollbar1 set}
+  # bindings
+  bind .top0.frame0.canvas2 <Button-1> {crosshair .top0.frame0.canvas2 %x %y}
+
+  # pack widget .top0.frame0
+  pack append .top0.frame0 \
+    .top0.frame0.scrollbar1 {right frame center filly} \
+    .top0.frame0.canvas2 {top frame center expand fill} \
+    .top0.frame0.scrollbar3 {top frame center fillx}
+
+  # build widget .top0.frame1
+  frame .top0.frame1 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .top0.frame1.label6
+  label .top0.frame1.label6 \
+    -anchor {w} \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -relief {raised} \
+    -text {States:}
+
+  # build widget .top0.frame1.button13
+  button .top0.frame1.button13 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {      regexp {([0-9]+)x([0-9]+)} [wm geometry .top0] dm width height
+     set height [expr $height-150]
+     lite map $height
+#      lite map 300
+} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text {Map}
+
+  # pack widget .top0.frame1
+  pack append .top0.frame1 \
+    .top0.frame1.label6 {left frame center expand fillx} \
+    .top0.frame1.button13 {left frame center}
+
+  # build widget .top0.frame6
+  frame .top0.frame6 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .top0.frame6.button8
+  button .top0.frame6.button8 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite counter a} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text {Counter Example}
+
+  # build widget .top0.frame6.button10
+  button .top0.frame6.button10 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite execute a} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text {Execute}
+
+  # build widget .top0.frame6.button9
+  button .top0.frame6.button9 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {canvaswh .top0.frame0.canvas2 1.6} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text {Enlarge}
+
+  # build widget .top0.frame6.button11
+  button .top0.frame6.button11 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {canvaswh .top0.frame0.canvas2 0.625} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text { Shrink}
+
+  # pack widget .top0.frame6
+  pack append .top0.frame6 \
+    .top0.frame6.button8 {right frame center fillx} \
+    .top0.frame6.button10 {right frame center expand fillx} \
+    .top0.frame6.button9 {left frame center} \
+    .top0.frame6.button11 {left frame center}
+
+  # pack widget .top0
+  pack append .top0 \
+    .top0.frame0 {bottom frame center expand fill} \
+    .top0.frame1 {bottom frame center fill} \
+    .top0.frame6 {top frame center fillx}
+
+  # build canvas items .top0.frame0.canvas2
+  set xfTmpTag [.top0.frame0.canvas2 create window -2480.03 -2615.93]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -anchor {nw}
+  set xfTmpTag [.top0.frame0.canvas2 create line 326 189 326 199]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -tags {cursol}
+  set xfTmpTag [.top0.frame0.canvas2 create line 321 194 331 194]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -tags {cursol}
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree .top0"
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+proc DestroyWindow.top0 {} {# xf ignore me 7
+  if {"[info procs XFEdit]" != ""} {
+    if {"[info commands .top0]" != ""} {
+      global xfShowWindow.top0
+      set xfShowWindow.top0 0
+      XFEditSetPath .
+      after 2 "XFSaveAsProc .top0; XFEditSetShowWindows"
+    }
+  } {
+    catch "destroy .top0"
+    update
+  }
+}
+
+
+# procedure to show window .
+proc ShowWindow. {args} {# xf ignore me 7
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom . user
+  wm sizefrom . user
+  wm maxsize . 1280 1024
+  wm title . {Lite}
+
+
+  # build widget .frame
+  frame .frame \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # build widget .frame.frame0
+  frame .frame.frame0 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame.frame0.label4
+  label .frame.frame0.label4 \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -padx {2} \
+    -relief {raised} \
+    -text {ITL Formula:}
+
+  # build widget .frame.frame0.button3
+  button .frame.frame0.button3 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {text_clear .frame.frame4.text0} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {*-fixed-*-normal--14-*-jisx0208.1983-*} \
+    -text {clear}
+
+  # build widget .frame.frame0.menubutton0
+  menubutton .frame.frame0.menubutton0 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -kanjifont {*-fixed-*-normal--14-*-jisx0208.1983-*} \
+    -relief {raised} \
+    -menu {.frame.frame0.menubutton0.m} \
+    -text {File}
+  # bindings
+  bind .frame.frame0.menubutton0 <Button-1> {MenuPopupPost .frame.frame0.menubutton0.m %X %Y}
+  bind .frame.frame0.menubutton0 <ButtonRelease-1> {MenuPopupRelease .frame.frame0.menubutton0.m %W}
+
+  # build widget .frame.frame0.menubutton0.m
+  menu .frame.frame0.menubutton0.m \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -kanjifont {*-fixed-*-normal--14-*-jisx0208.1983-*}
+  .frame.frame0.menubutton0.m add command \
+    -command {filehandling .frame.frame4.text0 load [FSBox "load"]} \
+    -label {Load}
+  .frame.frame0.menubutton0.m add command \
+    -command {filehandling .frame.frame4.text0 save [FSBox "save"]} \
+    -label {Save}
+  .frame.frame0.menubutton0.m add command \
+    -command {lite generate a} \
+    -label {Generate}
+  .frame.frame0.menubutton0.m add command \
+    -command {TokioCommand} \
+    -label {Tokio}
+  .frame.frame0.menubutton0.m add command \
+    -command {PrologCommand} \
+    -label {Prolog}
+  # bindings
+  bind .frame.frame0.menubutton0.m <Any-ButtonRelease-1> {MenuPopupRelease .frame.frame0.menubutton0.m %W}
+  bind .frame.frame0.menubutton0.m <Shift-Button-1> {MenuPopupPost .frame.frame0.menubutton0.m %X %Y}
+
+  # pack widget .frame.frame0
+  pack append .frame.frame0 \
+    .frame.frame0.label4 {left frame center expand fillx} \
+    .frame.frame0.button3 {right frame center} \
+    .frame.frame0.menubutton0 {left frame center fillx}
+
+  # build widget .frame.frame4
+  frame .frame.frame4 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame.frame4.scrollbar1
+  scrollbar .frame.frame4.scrollbar1 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {.frame.frame4.text0 yview} \
+    -foreground {#ffe4c4}
+
+  # build widget .frame.frame4.text0
+  text .frame.frame4.text0 \
+    -background {Cornsilk2} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -height {10} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -selectforeground {CornSilk2} \
+    -width {61} \
+    -yscrollcommand {.frame.frame4.scrollbar1 set}
+  # bindings
+  bind .frame.frame4.text0 <Button-2> {%W mark set insert @%x,%y
+        %W insert insert [selection get]
+        %W yview -pickplace insert}
+  bind .frame.frame4.text0 <Button-3> {%W mark set anchor insert
+        %W tag add sel insert @%x,%y}
+  bind .frame.frame4.text0 <Control-Key-a> {%W mark set insert {insert linestart}}
+  bind .frame.frame4.text0 <Control-Key-b> {%W mark set insert {insert -1char}}
+  bind .frame.frame4.text0 <Control-Key-d> {%W delete insert}
+  bind .frame.frame4.text0 <Control-Key-e> {%W mark set insert {insert lineend}}
+  bind .frame.frame4.text0 <Control-Key-f> {%W mark set insert {insert +1char}}
+  bind .frame.frame4.text0 <Control-Key-k> {if ![string compare [%W get insert] "\n"] {
+            %W delete insert} else {
+            %W delete insert {insert lineend}
+        }}
+  bind .frame.frame4.text0 <Control-Key-n> {%W mark set insert {insert +1line}}
+  bind .frame.frame4.text0 <Control-Key-p> {%W mark set insert {insert -1line}}
+  bind .frame.frame4.text0 <Control-Key-w> {if [llength [%W tag ranges sel]] {
+            %W delete sel.first sel.last
+        }}
+
+  # pack widget .frame.frame4
+  pack append .frame.frame4 \
+    .frame.frame4.text0 {left frame center expand fill} \
+    .frame.frame4.scrollbar1 {right frame center filly}
+
+  # pack widget .frame
+  pack append .frame \
+    .frame.frame0 {top frame center fillx} \
+    .frame.frame4 {left frame center expand fill}
+
+  # build widget .frame3
+  frame .frame3 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame3.button4
+  button .frame3.button4 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite quit 0} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text {Quit}
+
+  # build widget .frame3.checkbutton5
+  checkbutton .frame3.checkbutton5 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite verbose "$verbose"} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -selector {#b03060} \
+    -text {verbose} \
+    -variable {verbose}
+
+  # build widget .frame3.button7
+  button .frame3.button7 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite verify "{[$symbolicName(entry) get 0.0 end]}"} \
+    -disabledforeground {#b0b0b0} \
+    -font {7x14} \
+    -kanjifont {k14} \
+    -text {Verify}
+
+  # pack widget .frame3
+  pack append .frame3 \
+    .frame3.button4 {left frame center} \
+    .frame3.checkbutton5 {right frame center} \
+    .frame3.button7 {top frame n fillx}
+
+  # pack widget .
+  pack append . \
+    .frame {top frame center expand fill} \
+    .frame3 {top frame center fill}
+
+  .frame.frame4.text0 insert end {}
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree ."
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+
+# User defined procedures
+
+
+# Procedure: FSBox
+proc FSBox { {fsBoxMessage "Select file:"} {fsBoxFileName ""} {fsBoxActionOk ""} {fsBoxActionCancel ""}} {
+# xf ignore me 5
+##########
+# Procedure: FSBox
+# Description: show file selector box
+# Arguments: fsBoxMessage - the text to display
+#            fsBoxFileName - a file name that should be selected
+#            fsBoxActionOk - the action that should be performed on ok
+#            fsBoxActionCancel - the action that should be performed on cancel
+# Returns: the filename that was selected, or nothing
+# Sideeffects: none
+##########
+# 
+# global fsBox(activeBackground) - active background color
+# global fsBox(activeForeground) - active foreground color
+# global fsBox(background) - background color
+# global fsBox(font) - text font
+# global fsBox(foreground) - foreground color
+# global fsBox(extensions) - scan directory for extensions
+# global fsBox(scrollActiveForeground) - scrollbar active background color
+# global fsBox(scrollBackground) - scrollbar background color
+# global fsBox(scrollForeground) - scrollbar foreground color
+# global fsBox(scrollSide) - side where scrollbar is located
+
+  global fsBox
+
+  set tmpButtonOpt ""
+  set tmpFrameOpt ""
+  set tmpMessageOpt ""
+  set tmpScaleOpt ""
+  set tmpScrollOpt ""
+  if {"$fsBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" "
+  }
+  if {"$fsBox(activeForeground)" != ""} {
+    append tmpButtonOpt "-activeforeground \"$fsBox(activeForeground)\" "
+  }
+  if {"$fsBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$fsBox(background)\" "
+    append tmpFrameOpt "-background \"$fsBox(background)\" "
+    append tmpMessageOpt "-background \"$fsBox(background)\" "
+  }
+  if {"$fsBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$fsBox(font)\" "
+    append tmpMessageOpt "-font \"$fsBox(font)\" "
+  }
+  if {"$fsBox(foreground)" != ""} {
+    append tmpButtonOpt "-foreground \"$fsBox(foreground)\" "
+    append tmpMessageOpt "-foreground \"$fsBox(foreground)\" "
+  }
+  if {"$fsBox(scrollActiveForeground)" != ""} {
+    append tmpScrollOpt "-activeforeground \"$fsBox(scrollActiveForeground)\" "
+  }
+  if {"$fsBox(scrollBackground)" != ""} {
+    append tmpScrollOpt "-background \"$fsBox(scrollBackground)\" "
+  }
+  if {"$fsBox(scrollForeground)" != ""} {
+    append tmpScrollOpt "-foreground \"$fsBox(scrollForeground)\" "
+  }
+
+  if {[file exists [file tail $fsBoxFileName]] &&
+      [IsAFile [file tail $fsBoxFileName]]} {
+    set fsBox(name) [file tail $fsBoxFileName]
+  } {
+    set fsBox(name) ""
+  }
+  if {[file exists $fsBoxFileName] && [IsADir $fsBoxFileName]} {
+    set fsBox(path) $fsBoxFileName
+  } {
+    if {"[file rootname $fsBoxFileName]" != "."} {
+      set fsBox(path) [file rootname $fsBoxFileName]
+    }
+  }
+  if {$fsBox(showPixmap)} {
+    set fsBox(path) [string trimleft $fsBox(path) @]
+  }
+  if {"$fsBox(path)" != "" && [file exists $fsBox(path)] &&
+      [IsADir $fsBox(path)]} {
+    set fsBox(internalPath) $fsBox(path)
+  } {
+    if {"$fsBox(internalPath)" == "" ||
+        ![file exists $fsBox(internalPath)]} {
+      set fsBox(internalPath) [pwd]
+    }
+  }
+  # build widget structure
+
+  # start build of toplevel
+  if {"[info commands XFDestroy]" != ""} {
+    catch {XFDestroy .fsBox}
+  } {
+    catch {destroy .fsBox}
+  }
+  toplevel .fsBox  -borderwidth 0
+  catch ".fsBox config $tmpFrameOpt"
+  wm geometry .fsBox 350x300 
+  wm title .fsBox {File select box}
+  wm maxsize .fsBox 1000 1000
+  wm minsize .fsBox 100 100
+  # end build of toplevel
+
+  label .fsBox.message1  -anchor c  -relief raised  -text "$fsBoxMessage"
+  catch ".fsBox.message1 config $tmpMessageOpt"
+
+  frame .fsBox.frame1  -borderwidth 0  -relief raised
+  catch ".fsBox.frame1 config $tmpFrameOpt"
+
+  button .fsBox.frame1.ok  -text "OK"  -command "
+      global fsBox
+      set fsBox(name) \[.fsBox.file.file get\]
+      if {$fsBox(showPixmap)} {
+        set fsBox(path) @\[.fsBox.path.path get\]
+      } {
+        set fsBox(path) \[.fsBox.path.path get\]
+      }
+      set fsBox(internalPath) \[.fsBox.path.path get\]
+      $fsBoxActionOk
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy .fsBox}
+      } {
+        catch {destroy .fsBox}
+      }"
+  catch ".fsBox.frame1.ok config $tmpButtonOpt"
+
+  button .fsBox.frame1.rescan  -text "Rescan"  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  catch ".fsBox.frame1.rescan config $tmpButtonOpt"
+
+  button .fsBox.frame1.cancel  -text "Cancel"  -command "
+      global fsBox
+      set fsBox(name) {}
+      set fsBox(path) {}
+      $fsBoxActionCancel
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy .fsBox}
+      } {
+        catch {destroy .fsBox}
+      }"
+  catch ".fsBox.frame1.cancel config $tmpButtonOpt"
+
+  if {$fsBox(showPixmap)} {
+    frame .fsBox.frame2  -borderwidth 0  -relief raised
+    catch ".fsBox.frame2 config $tmpFrameOpt"
+
+    scrollbar .fsBox.frame2.scrollbar3  -command {.fsBox.frame2.canvas2 xview}  -orient {horizontal}  -relief {raised}
+    catch ".fsBox.frame2.scrollbar3 config $tmpScrollOpt"
+
+    scrollbar .fsBox.frame2.scrollbar1  -command {.fsBox.frame2.canvas2 yview}  -relief {raised}
+    catch ".fsBox.frame2.scrollbar1 config $tmpScrollOpt"
+
+    canvas .fsBox.frame2.canvas2  -confine {true}  -relief {raised}  -scrollregion {0c 0c 20c 20c}  -width {100}  -xscrollcommand {.fsBox.frame2.scrollbar3 set}  -yscrollcommand {.fsBox.frame2.scrollbar1 set}
+    catch ".fsBox.frame2.canvas2 config $tmpFrameOpt"
+
+    .fsBox.frame2.canvas2 addtag currentBitmap withtag [.fsBox.frame2.canvas2 create bitmap 5 5 -anchor nw]
+  }
+
+  frame .fsBox.path  -borderwidth 0  -relief raised
+  catch ".fsBox.path config $tmpFrameOpt"
+
+  frame .fsBox.path.paths  -borderwidth 2  -relief raised
+  catch ".fsBox.path.paths config $tmpFrameOpt"
+
+  menubutton .fsBox.path.paths.paths  -borderwidth 0  -menu ".fsBox.path.paths.paths.menu"  -relief flat  -text "Pathname:"
+  catch ".fsBox.path.paths.paths config $tmpButtonOpt"
+
+  menu .fsBox.path.paths.paths.menu
+  catch ".fsBox.path.paths.paths.menu config $tmpButtonOpt"
+
+  .fsBox.path.paths.paths.menu add command  -label "[string trimright $fsBox(internalPath) {/@}]"  -command "
+       global fsBox
+       FSBoxFSShow \[.fsBox.path.path get\]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+       .fsBox.path.path delete 0 end
+       .fsBox.path.path insert 0 [string trimright $fsBox(internalPath) {/@}]"
+
+  entry .fsBox.path.path  -relief raised
+  catch ".fsBox.path.path config $tmpMessageOpt"
+
+  if {![IsADir $fsBox(internalPath)]} {
+    set $fsBox(internalPath) [pwd]
+  }
+  .fsBox.path.path insert 0 $fsBox(internalPath)
+
+  frame .fsBox.pattern  -borderwidth 0  -relief raised
+  catch ".fsBox.pattern config $tmpFrameOpt"
+
+  frame .fsBox.pattern.patterns  -borderwidth 2  -relief raised
+  catch ".fsBox.pattern.patterns config $tmpFrameOpt"
+
+  menubutton .fsBox.pattern.patterns.patterns  -borderwidth 0  -menu ".fsBox.pattern.patterns.patterns.menu"  -relief flat  -text "Selection pattern:"
+  catch ".fsBox.pattern.patterns.patterns config $tmpButtonOpt"
+
+  menu .fsBox.pattern.patterns.patterns.menu
+  catch ".fsBox.pattern.patterns.patterns.menu config $tmpButtonOpt"
+
+  .fsBox.pattern.patterns.patterns.menu add checkbutton  -label "Scan extensions"  -variable fsBox(extensions)  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+
+  entry .fsBox.pattern.pattern  -relief raised
+  catch ".fsBox.pattern.pattern config $tmpMessageOpt"
+
+  .fsBox.pattern.pattern insert 0 $fsBox(pattern)
+  
+  frame .fsBox.files  -borderwidth 0  -relief raised
+  catch ".fsBox.files config $tmpFrameOpt"
+
+  scrollbar .fsBox.files.vscroll  -relief raised  -command ".fsBox.files.files yview"
+  catch ".fsBox.files.vscroll config $tmpScrollOpt"
+
+  scrollbar .fsBox.files.hscroll  -orient horiz  -relief raised  -command ".fsBox.files.files xview"
+  catch ".fsBox.files.hscroll config $tmpScrollOpt"
+
+  listbox .fsBox.files.files  -exportselection false  -relief raised  -xscrollcommand ".fsBox.files.hscroll set"  -yscrollcommand ".fsBox.files.vscroll set"
+  catch ".fsBox.files.files config $tmpMessageOpt"
+
+  frame .fsBox.file  -borderwidth 0  -relief raised
+  catch ".fsBox.file config $tmpFrameOpt"
+
+  label .fsBox.file.labelfile  -relief raised  -text "Filename:"
+  catch ".fsBox.file.labelfile config $tmpMessageOpt"
+
+  entry .fsBox.file.file  -relief raised
+  catch ".fsBox.file.file config $tmpMessageOpt"
+
+  .fsBox.file.file delete 0 end
+  .fsBox.file.file insert 0 $fsBox(name)
+  
+  checkbutton .fsBox.pattern.all  -offvalue 0  -onvalue 1  -text "Show all files"  -variable fsBox(all)  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  catch ".fsBox.pattern.all config $tmpButtonOpt"
+
+  FSBoxFSShow $fsBox(internalPath) $fsBox(pattern) $fsBox(all)
+
+  # bindings
+  bind .fsBox.files.files <Double-Button-1> "
+    FSBoxFSFileSelectDouble %W $fsBox(showPixmap) \{$fsBoxActionOk\} %y"
+  bind .fsBox.files.files <ButtonPress-1> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Button1-Motion> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Shift-Button1-Motion> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Shift-ButtonPress-1> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+
+  bind .fsBox.path.path <Tab> {
+    FSBoxFSNameComplete path}
+  bind .fsBox.path.path <Return> {
+    global tkVersion
+    global fsBox
+    FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)
+    FSBoxFSInsertPath
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+  catch "bind .fsBox.path.path <Up> {}"
+  bind .fsBox.path.path <Down> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+
+  bind .fsBox.file.file <Tab> {
+    FSBoxFSNameComplete file}
+  bind .fsBox.file.file <Return> "
+    global fsBox
+    set fsBox(name) \[.fsBox.file.file get\]
+    if {$fsBox(showPixmap)} {
+      set fsBox(path) @\[.fsBox.path.path get\]
+    } {
+      set fsBox(path) \[.fsBox.path.path get\]
+    }
+    set fsBox(internalPath) \[.fsBox.path.path get\]
+    $fsBoxActionOk
+    if {\"\[info commands XFDestroy\]\" != \"\"} {
+      catch {XFDestroy .fsBox}
+    } {
+      catch {destroy .fsBox}
+    }"
+  bind .fsBox.file.file <Up> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.path.path icursor end
+    } {
+      .fsBox.path.path cursor end
+    }
+    focus .fsBox.path.path}
+  bind .fsBox.file.file <Down> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.pattern.pattern icursor end
+    } {
+      .fsBox.pattern.pattern cursor end
+    }
+    focus .fsBox.pattern.pattern}
+
+  bind .fsBox.pattern.pattern <Return> {
+    global fsBox
+    FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  bind .fsBox.pattern.pattern <Up> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+  catch "bind .fsBox.pattern.pattern <Down> {}"
+
+  # packing
+  pack append .fsBox.files  .fsBox.files.vscroll "$fsBox(scrollSide) filly"  .fsBox.files.hscroll {bottom fillx}  .fsBox.files.files {left fill expand}
+  pack append .fsBox.file  .fsBox.file.labelfile {left}  .fsBox.file.file {left fill expand}
+  pack append .fsBox.frame1  .fsBox.frame1.ok {left fill expand}  .fsBox.frame1.rescan {left fill expand}  .fsBox.frame1.cancel {left fill expand}
+  pack append .fsBox.path.paths  .fsBox.path.paths.paths {left}
+  pack append .fsBox.pattern.patterns  .fsBox.pattern.patterns.patterns {left}
+  pack append .fsBox.path  .fsBox.path.paths {left}  .fsBox.path.path {left fill expand}
+  pack append .fsBox.pattern  .fsBox.pattern.patterns {left}  .fsBox.pattern.all {right fill}  .fsBox.pattern.pattern {left fill expand}
+  if {$fsBox(showPixmap)} {
+    pack append .fsBox.frame2  .fsBox.frame2.scrollbar1 {left filly}  .fsBox.frame2.canvas2 {top expand fill}  .fsBox.frame2.scrollbar3 {top fillx} 
+
+    pack append .fsBox  .fsBox.message1 {top fill}  .fsBox.frame1 {bottom fill}  .fsBox.pattern {bottom fill}  .fsBox.file {bottom fill}  .fsBox.path {bottom fill}  .fsBox.frame2 {right fill}  .fsBox.files {left fill expand}
+  } {
+    pack append .fsBox  .fsBox.message1 {top fill}  .fsBox.frame1 {bottom fill}  .fsBox.pattern {bottom fill}  .fsBox.file {bottom fill}  .fsBox.path {bottom fill}  .fsBox.files {left fill expand}
+  }
+
+  if {"$fsBoxActionOk" == "" && "$fsBoxActionCancel" == ""} {
+    # wait for the box to be destroyed
+    update idletask
+    grab .fsBox
+    tkwait window .fsBox
+
+    if {"[string trim $fsBox(path)]" != "" ||
+        "[string trim $fsBox(name)]" != ""} {
+      if {"[string trimleft [string trim $fsBox(name)] /]" == ""} {
+        return [string trimright [string trim $fsBox(path)] /]
+      } {
+        return [string trimright [string trim $fsBox(path)] /]/[string trimleft [string trim $fsBox(name)] /]
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxBindSelectOne
+proc FSBoxBindSelectOne { fsBoxW fsBoxY} {
+# xf ignore me 6
+
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    $fsBoxW select from $fsBoxNearest
+    $fsBoxW select to $fsBoxNearest
+  }
+}
+
+
+# Procedure: FSBoxFSFileSelect
+proc FSBoxFSFileSelect { fsBoxW fsBoxShowPixmap fsBoxY} {
+# xf ignore me 6
+  global fsBox
+
+  FSBoxBindSelectOne $fsBoxW $fsBoxY
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    set fsBoxTmpEntry [$fsBoxW get $fsBoxNearest]
+    if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "/" ||
+        "[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "@"} {
+      set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+      if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]] &&
+          ![IsASymlink [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+        set fsBoxFileName $fsBoxTmpEntry
+      }
+    } {
+      if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "*"} {
+        set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+        if {![file executable $fsBox(internalPath)/$fsBoxFileName]} {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      } {
+        set fsBoxFileName $fsBoxTmpEntry
+      }
+    }
+    if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+      set fsBox(name) $fsBoxFileName
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 $fsBox(name)
+      if {$fsBoxShowPixmap} {
+        catch ".fsBox.frame2.canvas2 itemconfigure currentBitmap -bitmap \"@$fsBox(internalPath)/$fsBox(name)\""
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSFileSelectDouble
+proc FSBoxFSFileSelectDouble { fsBoxW fsBoxShowPixmap fsBoxAction fsBoxY} {
+# xf ignore me 6
+  global fsBox
+
+  FSBoxBindSelectOne $fsBoxW $fsBoxY
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    set fsBoxTmpEntry [$fsBoxW get $fsBoxNearest]
+    if {"$fsBoxTmpEntry" == "../"} {
+      set fsBoxTmpEntry [string trimright [string trim $fsBox(internalPath)] "@/"]
+      if {"$fsBoxTmpEntry" == ""} {
+        return
+      }
+      FSBoxFSShow [file dirname $fsBoxTmpEntry]  [.fsBox.pattern.pattern get] $fsBox(all)
+      .fsBox.path.path delete 0 end
+      .fsBox.path.path insert 0 $fsBox(internalPath)
+    } {
+      if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "/" ||
+          "[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "@"} {
+        set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+        if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]] &&
+            ![IsASymlink [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      } {
+        if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "*"} {
+          set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+          if {![file executable $fsBox(internalPath)/$fsBoxFileName]} {
+            set fsBoxFileName $fsBoxTmpEntry
+          }
+        } {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      }
+      if {[IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+        set fsBox(internalPath) "[string trimright $fsBox(internalPath) {/@}]/$fsBoxFileName"
+        FSBoxFSShow $fsBox(internalPath)  [.fsBox.pattern.pattern get] $fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBox(internalPath)
+      } {
+        set fsBox(name) $fsBoxFileName
+        if {$fsBoxShowPixmap} {
+          set fsBox(path) @$fsBox(internalPath)
+        } {
+          set fsBox(path) $fsBox(internalPath)
+        }
+        if {"$fsBoxAction" != ""} {
+          eval "global fsBox; $fsBoxAction"
+        }
+        if {"[info commands XFDestroy]" != ""} {
+          catch {XFDestroy .fsBox}
+        } {
+          catch {destroy .fsBox}
+        }
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSInsertPath
+proc FSBoxFSInsertPath {} {
+# xf ignore me 6
+  global fsBox
+
+  set fsBoxLast [.fsBox.path.paths.paths.menu index last]
+  set fsBoxNewEntry [string trimright [.fsBox.path.path get] "/@"]
+  for {set fsBoxCounter 0} {$fsBoxCounter <= $fsBoxLast} {incr fsBoxCounter 1} {
+    if {"$fsBoxNewEntry" ==  "[lindex [.fsBox.path.paths.paths.menu entryconfigure  $fsBoxCounter -label] 4]"} {
+      return
+    }
+  }
+  if {$fsBoxLast < 9} {
+    .fsBox.path.paths.paths.menu add command  -label "$fsBoxNewEntry"  -command "
+        global fsBox
+        FSBoxFSShow $fsBoxNewEntry  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBoxNewEntry"
+  } {
+    for {set fsBoxCounter 0} {$fsBoxCounter < $fsBoxLast} {incr fsBoxCounter 1} {
+      .fsBox.path.paths.paths.menu entryconfigure  $fsBoxCounter -label  [lindex [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]
+      .fsBox.path.paths.paths.menu entryconfigure $fsBoxCounter  -command "
+          global fsBox
+          FSBoxFSShow [lindex [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 [lindex  [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]"
+    }
+    .fsBox.path.paths.paths.menu entryconfigure $fsBoxLast  -label "$fsBoxNewEntry"
+    .fsBox.path.paths.paths.menu entryconfigure $fsBoxCounter  -command "
+        global fsBox
+        FSBoxFSShow \[.fsBox.path.path get\]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBoxNewEntry"
+  }
+}
+
+
+# Procedure: FSBoxFSNameComplete
+proc FSBoxFSNameComplete { fsBoxType} {
+# xf ignore me 6
+  global tkVersion
+  global fsBox
+
+  set fsBoxNewFile ""
+  if {"$fsBoxType" == "path"} {
+    set fsBoxDirName [file dirname [.fsBox.path.path get]]
+    set fsBoxFileName [file tail [.fsBox.path.path get]]
+  } {
+    set fsBoxDirName [file dirname [.fsBox.path.path get]/]
+    set fsBoxFileName [file tail [.fsBox.file.file get]]
+  }
+
+  set fsBoxNewFile ""
+  if {[IsADir [string trimright $fsBoxDirName @]]} {
+    catch "glob -nocomplain $fsBoxDirName/${fsBoxFileName}*" fsBoxResult
+    foreach fsBoxCounter $fsBoxResult {
+      if {"$fsBoxNewFile" == ""} {
+        set fsBoxNewFile [file tail $fsBoxCounter]
+      } {
+        if {"[string index [file tail $fsBoxCounter] 0]" !=
+            "[string index $fsBoxNewFile 0]"} {
+          set fsBoxNewFile ""
+          break
+        }
+        set fsBoxCounter1 0
+        set fsBoxTmpFile1 $fsBoxNewFile
+        set fsBoxTmpFile2 [file tail $fsBoxCounter]
+        set fsBoxLength1 [string length $fsBoxTmpFile1]
+        set fsBoxLength2 [string length $fsBoxTmpFile2]
+        set fsBoxNewFile ""
+        if {$fsBoxLength1 > $fsBoxLength2} {
+          set fsBoxLength1 $fsBoxLength2
+        }
+        while {$fsBoxCounter1 < $fsBoxLength1} {
+          if {"[string index $fsBoxTmpFile1 $fsBoxCounter1]" ==  "[string index $fsBoxTmpFile2 $fsBoxCounter1]"} {
+            append fsBoxNewFile [string index $fsBoxTmpFile1 $fsBoxCounter1]
+          } {
+            break
+          }
+          incr fsBoxCounter1 1
+        }
+      }
+    }
+  }
+  if {"$fsBoxNewFile" != ""} {
+    if {[IsADir [string trimright $fsBoxDirName/$fsBoxNewFile @]] ||
+        ![IsAFile [string trimright $fsBoxDirName/$fsBoxNewFile @]]} {
+      if {[IsADir [string trimright $fsBoxDirName/$fsBoxNewFile @]]} {
+        if {"$fsBoxDirName" == "/"} {
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 "/[string trimright [string trim $fsBoxNewFile /] @]/"
+        } {
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 "[string trimright $fsBoxDirName /]/[string trimright [string trim $fsBoxNewFile /] @]/"
+        }
+        FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)
+        FSBoxFSInsertPath
+      } {
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 "[string trimright $fsBoxDirName /]/[string trimright [string trim $fsBoxNewFile /] @]"
+      }
+    } {
+      .fsBox.path.path delete 0 end
+      .fsBox.path.path insert 0 "[string trimright $fsBoxDirName {@/}]/"
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 $fsBoxNewFile
+      if {$tkVersion >= 3.0} {
+        .fsBox.file.file icursor end
+      } {
+        .fsBox.file.file cursor end
+      }
+      focus .fsBox.file.file
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSShow
+proc FSBoxFSShow { fsBoxPath fsBoxPattern fsBoxAll} {
+# xf ignore me 6
+  global fsBox
+
+  set tmpButtonOpt ""
+  if {"$fsBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" "
+  }
+  if {"$fsBox(activeForeground)" != ""} {
+    append tmpButtonOpt "-activeforeground \"$fsBox(activeForeground)\" "
+  }
+  if {"$fsBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$fsBox(background)\" "
+  }
+  if {"$fsBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$fsBox(font)\" "
+  }
+  if {"$fsBox(foreground)" != ""} {
+    append tmpButtonOpt "-foreground \"$fsBox(foreground)\" "
+  }
+
+  set fsBox(pattern) $fsBoxPattern
+  if {[file exists $fsBoxPath] && [file readable $fsBoxPath] &&
+      [IsADir $fsBoxPath]} {
+    set fsBox(internalPath) $fsBoxPath
+  } {
+    if {[file exists $fsBoxPath] && [file readable $fsBoxPath] &&
+        [IsAFile $fsBoxPath]} {
+      set fsBox(internalPath) [file dirname $fsBoxPath]
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 [file tail $fsBoxPath]
+      set fsBoxPath $fsBox(internalPath)
+    } {
+      while {"$fsBoxPath" != "" && "$fsBoxPath" != "/" &&
+             ![file isdirectory $fsBoxPath]} {
+        set fsBox(internalPath) [file dirname $fsBoxPath]
+         set fsBoxPath $fsBox(internalPath)
+      }
+    }
+  }
+  if {"$fsBoxPath" == ""} {
+    set fsBoxPath "/"
+    set fsBox(internalPath) "/"
+  }
+  .fsBox.path.path delete 0 end
+  .fsBox.path.path insert 0 $fsBox(internalPath)
+
+  if {[.fsBox.files.files size] > 0} {
+    .fsBox.files.files delete 0 end
+  }
+  if {$fsBoxAll} {
+    if {[catch "exec ls -F -a $fsBoxPath" fsBoxResult]} {
+      puts stderr "$fsBoxResult"
+    }
+  } {
+    if {[catch "exec ls -F $fsBoxPath" fsBoxResult]} {
+      puts stderr "$fsBoxResult"
+    }
+  }
+  set fsBoxElementList [lsort $fsBoxResult]
+
+  foreach fsBoxCounter [winfo children .fsBox.pattern.patterns.patterns] {
+    if {[string length [info commands XFDestroy]] > 0} {
+      catch {XFDestroy $fsBoxCounter}
+    } {
+      catch {destroy $fsBoxCounter}
+    }
+  }
+  menu .fsBox.pattern.patterns.patterns.menu
+  catch ".fsBox.pattern.patterns.patterns.menu config $tmpButtonOpt"
+
+  if {$fsBox(extensions)} {
+    .fsBox.pattern.patterns.patterns.menu add command  -label "*"  -command {
+        global fsBox
+        set fsBox(pattern) "*"
+        .fsBox.pattern.pattern delete 0 end
+        .fsBox.pattern.pattern insert 0 $fsBox(pattern)
+        FSBoxFSShow [.fsBox.path.path get] $fsBox(pattern)  $fsBox(all)}
+  }
+
+  if {"$fsBoxPath" != "/"} {
+    .fsBox.files.files insert end "../"
+  }
+  foreach fsBoxCounter $fsBoxElementList {
+    if {[string match $fsBoxPattern $fsBoxCounter] ||
+        [IsADir [string trimright $fsBoxPath/$fsBoxCounter "/@"]]} {
+      if {"$fsBoxCounter" != "../" &&
+          "$fsBoxCounter" != "./"} {
+        .fsBox.files.files insert end $fsBoxCounter
+      }
+    }
+
+    if {$fsBox(extensions)} {
+      catch "file rootname $fsBoxCounter" fsBoxRootName
+      catch "file extension $fsBoxCounter" fsBoxExtension
+      set fsBoxExtension [string trimright $fsBoxExtension "/*@"]
+      if {"$fsBoxExtension" != "" && "$fsBoxRootName" != ""} {
+        set fsBoxInsert 1
+        set fsBoxLast [.fsBox.pattern.patterns.patterns.menu index last]
+        for {set fsBoxCounter1 0} {$fsBoxCounter1 <= $fsBoxLast} {incr fsBoxCounter1 1} {
+          if {"*$fsBoxExtension" ==  "[lindex [.fsBox.pattern.patterns.patterns.menu entryconfigure  $fsBoxCounter1 -label] 4]"} {
+            set fsBoxInsert 0
+          }
+        }
+	if {$fsBoxInsert} {
+          .fsBox.pattern.patterns.patterns.menu add command  -label "*$fsBoxExtension"  -command "
+              global fsBox
+              set fsBox(pattern) \"*$fsBoxExtension\"
+              .fsBox.pattern.pattern delete 0 end
+              .fsBox.pattern.pattern insert 0 \$fsBox(pattern)
+              FSBoxFSShow \[.fsBox.path.path get\] \$fsBox(pattern)  \$fsBox(all)"
+        }
+      }
+    }
+  }
+  if {$fsBox(extensions)} {
+    .fsBox.pattern.patterns.patterns.menu add separator
+  }
+  if {$fsBox(extensions) || 
+      "[.fsBox.pattern.patterns.patterns.menu index last]" == "none"} {
+    .fsBox.pattern.patterns.patterns.menu add checkbutton  -label "Scan extensions"  -variable "fsBox(extensions)"  -command {
+        global fsBox
+        FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  }
+}
+
+
+# Procedure: InputBoxInternal
+proc InputBoxInternal { inputBoxMessage inputBoxCommandOk inputBoxCommandCancel inputBoxGeometry inputBoxTitle lineNum} {
+# xf ignore me 6
+  global inputBox
+
+  set tmpButtonOpt ""
+  set tmpFrameOpt ""
+  set tmpMessageOpt ""
+  set tmpScaleOpt ""
+  set tmpScrollOpt ""
+  if {"$inputBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$inputBox(activeBackground)\" "
+  }
+  if {"$inputBox(activeForeground)" != ""} {
+    append tmpButtonOpt "-activeforeground \"$inputBox(activeForeground)\" "
+  }
+  if {"$inputBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$inputBox(background)\" "
+    append tmpFrameOpt "-background \"$inputBox(background)\" "
+    append tmpMessageOpt "-background \"$inputBox(background)\" "
+  }
+  if {"$inputBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$inputBox(font)\" "
+    append tmpMessageOpt "-font \"$inputBox(font)\" "
+  }
+  if {"$inputBox(foreground)" != ""} {
+    append tmpButtonOpt "-foreground \"$inputBox(foreground)\" "
+    append tmpMessageOpt "-foreground \"$inputBox(foreground)\" "
+  }
+  if {"$inputBox(scrollActiveForeground)" != ""} {
+    append tmpScrollOpt "-activeforeground \"$inputBox(scrollActiveForeground)\" "
+  }
+  if {"$inputBox(scrollBackground)" != ""} {
+    append tmpScrollOpt "-background \"$inputBox(scrollBackground)\" "
+  }
+  if {"$inputBox(scrollForeground)" != ""} {
+    append tmpScrollOpt "-foreground \"$inputBox(scrollForeground)\" "
+  }
+
+  # start build of toplevel
+  if {"[info commands XFDestroy]" != ""} {
+    catch {XFDestroy $inputBox(toplevelName)}
+  } {
+    catch {destroy $inputBox(toplevelName)}
+  }
+  toplevel $inputBox(toplevelName)  -borderwidth 0
+  catch "$inputBox(toplevelName) config $tmpFrameOpt"
+  if {[catch "wm geometry $inputBox(toplevelName) $inputBoxGeometry"]} {
+    wm geometry $inputBox(toplevelName) 350x150
+  }
+  wm title $inputBox(toplevelName) $inputBoxTitle
+  wm maxsize $inputBox(toplevelName) 1000 1000
+  wm minsize $inputBox(toplevelName) 100 100
+  # end build of toplevel
+
+  message $inputBox(toplevelName).message1  -anchor "$inputBox(anchor)"  -justify "$inputBox(justify)"  -relief raised  -text "$inputBoxMessage"
+  catch "$inputBox(toplevelName).message1 config $tmpMessageOpt"
+
+  set xfTmpWidth  [string range $inputBoxGeometry 0 [expr [string first x $inputBoxGeometry]-1]]
+  if {"$xfTmpWidth" != ""} {
+    # set message size
+    catch "$inputBox(toplevelName).message1 configure  -width [expr $xfTmpWidth-10]"
+  } {
+    $inputBox(toplevelName).message1 configure  -aspect 1500
+  }
+
+  frame $inputBox(toplevelName).frame0  -borderwidth 0  -relief raised
+  catch "$inputBox(toplevelName).frame0 config $tmpFrameOpt"
+
+  frame $inputBox(toplevelName).frame1  -borderwidth 0  -relief raised
+  catch "$inputBox(toplevelName).frame1 config $tmpFrameOpt"
+
+  if {$lineNum == 1} {
+    scrollbar $inputBox(toplevelName).frame1.hscroll  -orient "horizontal"  -relief raised  -command "$inputBox(toplevelName).frame1.input view"
+    catch "$inputBox(toplevelName).frame1.hscroll config $tmpScrollOpt"
+
+    entry $inputBox(toplevelName).frame1.input  -relief raised  -scrollcommand "$inputBox(toplevelName).frame1.hscroll set"
+    catch "$inputBox(toplevelName).frame1.input config $tmpMessageOpt"
+
+    $inputBox(toplevelName).frame1.input insert 0  $inputBox($inputBox(toplevelName),inputOne)
+    
+    # bindings
+    bind $inputBox(toplevelName).frame1.input <Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputOne) \[$inputBox(toplevelName).frame1.input get\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+    
+    # packing
+    pack append $inputBox(toplevelName).frame1  $inputBox(toplevelName).frame1.hscroll {bottom fill}  $inputBox(toplevelName).frame1.input {top fill expand}
+  } {
+    text $inputBox(toplevelName).frame1.input  -relief raised  -wrap none  -borderwidth 2  -yscrollcommand "$inputBox(toplevelName).frame1.vscroll set"
+    catch "$inputBox(toplevelName).frame1.input config $tmpMessageOpt"
+
+    scrollbar $inputBox(toplevelName).frame1.vscroll  -relief raised  -command "$inputBox(toplevelName).frame1.input yview"
+    catch "$inputBox(toplevelName).frame1.vscroll config $tmpScrollOpt"
+
+    $inputBox(toplevelName).frame1.input insert 1.0  $inputBox($inputBox(toplevelName),inputMulti)
+
+    # bindings
+    bind $inputBox(toplevelName).frame1.input <Control-Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+    bind $inputBox(toplevelName).frame1.input <Meta-Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+
+    # packing
+    pack append $inputBox(toplevelName).frame1  $inputBox(toplevelName).frame1.vscroll "$inputBox(scrollSide) filly"  $inputBox(toplevelName).frame1.input {left fill expand}
+  }
+  
+  button $inputBox(toplevelName).frame0.button0  -text "OK"  -command "
+      global inputBox
+      if {$lineNum == 1} {
+        set inputBox($inputBox(toplevelName),inputOne) \[$inputBox(toplevelName).frame1.input get\]
+      } {
+        set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      }
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+  catch "$inputBox(toplevelName).frame0.button0 config $tmpButtonOpt"
+
+  button $inputBox(toplevelName).frame0.button1  -text "Cancel"  -command "
+      global inputBox
+      if {$lineNum == 1} {
+        set inputBox($inputBox(toplevelName),inputOne) \"\"
+      } {
+        set inputBox($inputBox(toplevelName),inputMulti) \"\"
+      }
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandCancel"
+  catch "$inputBox(toplevelName).frame0.button1 config $tmpButtonOpt"
+
+  pack append $inputBox(toplevelName).frame0  $inputBox(toplevelName).frame0.button0 {left fill expand}  $inputBox(toplevelName).frame0.button1 {left fill expand}
+
+  pack append $inputBox(toplevelName)  $inputBox(toplevelName).frame0 {bottom fill}  $inputBox(toplevelName).frame1 {bottom fill expand}  $inputBox(toplevelName).message1 {top fill}
+}
+
+
+# Procedure: InputBoxMulti
+proc InputBoxMulti { {inputBoxMessage "Input box:"} {inputBoxCommandOk ""} {inputBoxCommandCancel ""} {inputBoxGeometry "350x150"} {inputBoxTitle "Input box"}} {
+# xf ignore me 5
+##########
+# Procedure: InputBoxMulti
+# Description: show input box with one text line
+# Arguments: {inputBoxMessage} - message to display
+#            {inputBoxCommandOk} - the command to call after ok
+#            {inputBoxCommandCancel} - the command to call after cancel
+#            {inputBoxGeometry} - the geometry for the window
+#            {inputBoxTitle} - the title for the window
+# Returns: The entered text
+# Sideeffects: none
+# Notes: there exist also a function called:
+#          InputBoxOne - to enter one line text
+##########
+#
+# global inputBox(activeBackground) - active background color
+# global inputBox(activeForeground) - active foreground color
+# global inputBox(anchor) - anchor for message box
+# global inputBox(background) - background color
+# global inputBox(erase) - erase previous text
+# global inputBox(font) - message font
+# global inputBox(foreground) - foreground color
+# global inputBox(justify) - justify for message box
+# global inputBox(scrollActiveForeground) - scrollbar active background color
+# global inputBox(scrollBackground) - scrollbar background color
+# global inputBox(scrollForeground) - scrollbar foreground color
+# global inputBox(scrollSide) - side where scrollbar is located
+# global inputBox(toplevelName) - the toplevel name
+# global inputBox(toplevelName,inputMulti) - the text in the text widget
+
+  global inputBox
+
+  if {"$inputBoxGeometry" == ""} {
+    set inputBoxGeometry 350x150
+  }
+  if {$inputBox(erase)} {
+    set inputBox($inputBox(toplevelName),inputMulti) ""
+  } {
+    if {![info exists inputBox($inputBox(toplevelName),inputMulti)]} {
+      set inputBox($inputBox(toplevelName),inputMulti) ""
+    }
+  }
+  InputBoxInternal $inputBoxMessage $inputBoxCommandOk $inputBoxCommandCancel $inputBoxGeometry $inputBoxTitle 2
+
+  # wait for the box to be destroyed
+  update idletask
+  grab $inputBox(toplevelName)
+  tkwait window $inputBox(toplevelName)
+
+  return $inputBox($inputBox(toplevelName),inputMulti)
+}
+
+
+# Procedure: InputBoxOne
+proc InputBoxOne { {inputBoxMessage "Input box:"} {inputBoxCommandOk ""} {inputBoxCommandCancel ""} {inputBoxGeometry "350x150"} {inputBoxTitle "Input box"}} {
+# xf ignore me 5
+##########
+# Procedure: InputBoxOne
+# Description: show input box with one text line
+# Arguments: {inputBoxMessage} - message to display
+#            {inputBoxCommandOk} - the command to call after ok
+#            {inputBoxCommandCancel} - the command to call after cancel
+#            {inputBoxGeometry} - the geometry for the window
+#            {inputBoxTitle} - the title for the window
+# Returns: The entered text
+# Sideeffects: none
+# Notes: there exist also a function called:
+#          InputBoxMulti - to enter multiline text
+##########
+#
+# global inputBox(activeBackground) - active background color
+# global inputBox(activeForeground) - active foreground color
+# global inputBox(anchor) - anchor for message box
+# global inputBox(background) - background color
+# global inputBox(erase) - erase previous text
+# global inputBox(font) - message font
+# global inputBox(foreground) - foreground color
+# global inputBox(justify) - justify for message box
+# global inputBox(scrollActiveForeground) - scrollbar active background color
+# global inputBox(scrollBackground) - scrollbar background color
+# global inputBox(scrollForeground) - scrollbar foreground color
+# global inputBox(scrollSide) - side where scrollbar is located
+# global inputBox(toplevelName) - the toplevel name
+# global inputBox(toplevelName,inputOne) - the text in the entry widget
+
+  global inputBox
+
+  if {$inputBox(erase)} {
+    set inputBox($inputBox(toplevelName),inputOne) ""
+  } {
+    if {![info exists inputBox($inputBox(toplevelName),inputOne)]} {
+      set inputBox($inputBox(toplevelName),inputOne) ""
+    }
+  }
+  InputBoxInternal $inputBoxMessage $inputBoxCommandOk $inputBoxCommandCancel $inputBoxGeometry $inputBoxTitle 1
+
+  # wait for the box to be destroyed
+  update idletask
+  grab $inputBox(toplevelName)
+  tkwait window $inputBox(toplevelName)
+
+  return $inputBox($inputBox(toplevelName),inputOne)
+}
+
+
+# Procedure: IsADir
+proc IsADir { pathName} {
+# xf ignore me 5
+##########
+# Procedure: IsADir
+# Description: check if name is a directory (including symbolic links)
+# Arguments: pathName - the path to check
+# Returns: 1 if its a directory, otherwise 0
+# Sideeffects: none
+##########
+
+  if {[file isdirectory $pathName]} {
+    return 1
+  } {
+    catch "file type $pathName" fileType
+    if {"$fileType" == "link"} {
+      if {[catch "file readlink $pathName" linkName]} {
+        return 0
+      }
+      catch "file type $linkName" fileType
+      while {"$fileType" == "link"} {
+        if {[catch "file readlink $linkName" linkName]} {
+          return 0
+        }
+        catch "file type $linkName" fileType
+      }
+      return [file isdirectory $linkName]
+    }
+  }
+  return 0
+}
+
+
+# Procedure: IsAFile
+proc IsAFile { fileName} {
+# xf ignore me 5
+##########
+# Procedure: IsAFile
+# Description: check if filename is a file (including symbolic links)
+# Arguments: fileName - the filename to check
+# Returns: 1 if its a file, otherwise 0
+# Sideeffects: none
+##########
+
+  if {[file isfile $fileName]} {
+    return 1
+  } {
+    catch "file type $fileName" fileType
+    if {"$fileType" == "link"} {
+      if {[catch "file readlink $fileName" linkName]} {
+        return 0
+      }
+      catch "file type $linkName" fileType
+      while {"$fileType" == "link"} {
+        if {[catch "file readlink $linkName" linkName]} {
+          return 0
+        }
+        catch "file type $linkName" fileType
+      }
+      return [file isfile $linkName]
+    }
+  }
+  return 0
+}
+
+
+# Procedure: IsASymlink
+proc IsASymlink { fileName} {
+# xf ignore me 5
+##########
+# Procedure: IsASymlink
+# Description: check if filename is a symbolic link
+# Arguments: fileName - the path/filename to check
+# Returns: none
+# Sideeffects: none
+##########
+
+  catch "file type $fileName" fileType
+  if {"$fileType" == "link"} {
+    return 1
+  }
+  return 0
+}
+
+
+# Procedure: PrologCommand
+proc PrologCommand {} {
+    lite prolog_call \
+       [ InputBoxMulti {Prolog Command:} {} {} {350x150} {Prolog} ]
+}
+
+# Procedure: TokioCommand
+proc TokioCommand {} {
+    lite tokio_call \
+       [ InputBoxMulti {Tokio Command:} {} {} {350x150} {Tokio} ]
+}
+
+# Procedure: canvaswh
+proc canvaswh { c scale} {
+global scalex scaley
+if {! $scalex && ! $scaley } {
+   regexp {([0-9]+)x([0-9]+)} [wm geometry .] dm w h
+   set h [$c canvasy [expr $h/2]]
+   set w [$c canvasx [expr $w/2]]
+} else {
+   set h $scaley
+   set w $scalex 
+}
+$c scale all $w $h $scale $scale
+}
+
+
+# Procedure: crosshair
+proc crosshair { c x y} {
+global scalex scaley
+if {[$c find withtag cursol] != {}} {
+   $c delete cursol
+}
+set cs  5
+set x [$c canvasx $x]
+set y [$c canvasy $y]
+$c create line $x [expr $y - $cs] $x [expr $y + $cs]  -tags cursol
+$c create line [expr $x - $cs] $y [expr $x + $cs] $y  -tags cursol
+set scalex $x
+set scaley $y
+}
+
+
+# Procedure: event
+proc event { args now} {
+prolog "tokio_event $args $now" tokio
+}
+
+
+# Procedure: filehandling
+proc filehandling { t mode file} {
+if {[string compare $mode "load"] == 0} {
+   if [file isfile $file] {
+       $t  delete 0.0 end
+       set F [open $file r]
+       while {[gets $F string] != -1} {
+             $t insert end "$string\n"
+       }
+       close $F
+  }
+} else {
+    set line [$t get 0.0 end]
+#    if [file writable $dir] {
+        if [expr [llength $line] > 0] {
+            set F [open $file w]
+            puts $F $line
+            close $F
+        }
+#    }
+}
+}
+
+
+# Procedure: lite
+proc lite { a b} {
+prolog "event $a $b" lite
+}
+
+
+# Procedure: text_clear
+proc text_clear { t} {
+$t delete 0.0 end
+}
+
+
+# Internal procedures
+
+
+# Procedure: Alias
+if {"[info procs Alias]" == ""} {
+proc Alias { args} {
+# xf ignore me 7
+##########
+# Procedure: Alias
+# Description: establish an alias for a procedure
+# Arguments: args - no argument means that a list of all aliases
+#                   is returned. Otherwise the first parameter is
+#                   the alias name, and the second parameter is
+#                   the procedure that is aliased.
+# Returns: nothing, the command that is bound to the alias or a
+#          list of all aliases - command pairs. 
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is inserted
+##########
+  global internalAliasList
+
+  if {[llength $args] == 0} {
+    return $internalAliasList
+  } {
+    if {[llength $args] == 1} {
+      set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+      if {$xfTmpIndex != -1} {
+        return [lindex [lindex $internalAliasList $xfTmpIndex] 1]
+      }
+    } {
+      if {[llength $args] == 2} {
+        eval "proc [lindex $args 0] {args} {#xf ignore me 4
+return \[eval \"[lindex $args 1] \$args\"\]}"
+        set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+        if {$xfTmpIndex != -1} {
+          set internalAliasList [lreplace $internalAliasList $xfTmpIndex $xfTmpIndex "[lindex $args 0] [lindex $args 1]"]
+        } {
+          lappend internalAliasList "[lindex $args 0] [lindex $args 1]"
+        }
+      } {
+        error "Alias: wrong number or args: $args"
+      }
+    }
+  }
+}
+}
+
+
+# Procedure: GetSelection
+if {"[info procs GetSelection]" == ""} {
+proc GetSelection {} {
+# xf ignore me 7
+##########
+# Procedure: GetSelection
+# Description: get current selection
+# Arguments: none
+# Returns: none
+# Sideeffects: none
+##########
+
+  # the save way
+  set xfSelection ""
+  catch "selection get" xfSelection
+  if {"$xfSelection" == "selection doesn't exist or form \"STRING\" not defined"} {
+    return ""
+  } {
+    return $xfSelection
+  }
+}
+}
+
+
+# Procedure: MenuPopupAdd
+if {"[info procs MenuPopupAdd]" == ""} {
+proc MenuPopupAdd { xfW xfButton xfMenu {xfModifier ""} {xfCanvasTag ""}} {
+# xf ignore me 7
+# the popup menu handling is from (I already gave up with popup handling :-):
+#
+# Copyright 1991,1992 by James Noble.
+# Everyone is granted permission to copy, modify and redistribute.
+# This notice must be preserved on all copies or derivates.
+#
+##########
+# Procedure: MenuPopupAdd
+# Description: attach a popup menu to widget
+# Arguments: xfW - the widget
+#            xfButton - the button we use
+#            xfMenu - the menu to attach
+#            {xfModifier} - a optional modifier
+#            {xfCanvasTag} - a canvas tagOrId
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  set tk_popupPriv($xfMenu,focus) ""
+  set tk_popupPriv($xfMenu,grab) ""
+  if {"$xfModifier" != ""} {
+    set press "$xfModifier-"
+    set motion "$xfModifier-"
+    set release "Any-"
+  } {
+    set press ""
+    set motion ""
+    set release ""
+  }
+
+  bind $xfMenu "<${motion}B${xfButton}-Motion>"  "MenuPopupMotion $xfMenu %W %X %Y"
+  bind $xfMenu "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  if {"$xfCanvasTag" == ""} {
+    bind $xfW "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    bind $xfW "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  } {
+    $xfW bind $xfCanvasTag "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    $xfW bind $xfCanvasTag "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  }
+}
+}
+
+
+# Procedure: MenuPopupMotion
+if {"[info procs MenuPopupMotion]" == ""} {
+proc MenuPopupMotion { xfMenu xfW xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupMotion
+# Description: handle the popup menu motion
+# Arguments: xfMenu - the topmost menu
+#            xfW - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    set xfPopMinX [winfo rootx $xfW]
+    set xfPopMaxX [expr $xfPopMinX+[winfo width $xfW]]
+    if {$xfX >= $xfPopMinX && $xfX <= $xfPopMaxX} {
+      $xfW activate @[expr $xfY-[winfo rooty $xfW]]
+      if {![catch "$xfW entryconfig @[expr $xfY-[winfo rooty $xfW]] -menu" result]} {
+        if {"[lindex $result 4]" != ""} {
+          foreach binding [bind $xfMenu] {
+            bind [lindex $result 4] $binding [bind $xfMenu $binding]
+          }
+        }
+      }
+    } {
+      $xfW activate none
+    }
+  }
+}
+}
+
+
+# Procedure: MenuPopupPost
+if {"[info procs MenuPopupPost]" == ""} {
+proc MenuPopupPost { xfMenu xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupPost
+# Description: post the popup menu
+# Arguments: xfMenu - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfMenu]" != ""} {
+    if {![info exists tk_popupPriv($xfMenu,focus)]} {
+      set tk_popupPriv($xfMenu,focus) [focus]
+    } {
+      if {"$tk_popupPriv($xfMenu,focus)" == ""} {
+        set tk_popupPriv($xfMenu,focus) [focus]
+      }
+    }
+    set tk_popupPriv($xfMenu,grab) $xfMenu
+
+    catch "$xfMenu activate none"
+    catch "$xfMenu post $xfX $xfY"
+    catch "focus $xfMenu"
+    catch "grab -global $xfMenu"
+  }
+}
+}
+
+
+# Procedure: MenuPopupRelease
+if {"[info procs MenuPopupRelease]" == ""} {
+proc MenuPopupRelease { xfMenu xfW} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupRelease
+# Description: remove the popup menu
+# Arguments: xfMenu - the topmost menu widget
+#            xfW - the menu widget
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+  global tkVersion
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    if {$tkVersion >= 3.0} {
+      catch "grab release $tk_popupPriv($xfMenu,grab)"
+    } {
+      catch "grab none"
+    }
+    catch "focus $tk_popupPriv($xfMenu,focus)"
+    set tk_popupPriv($xfMenu,focus) ""
+    set tk_popupPriv($xfMenu,grab) ""
+    if {"[$xfW index active]" != "none"} {
+      $xfW invoke active; catch "$xfMenu unpost"
+    }
+  }
+  catch "$xfMenu unpost"
+}
+}
+
+
+# Procedure: NoFunction
+if {"[info procs NoFunction]" == ""} {
+proc NoFunction { args} {
+# xf ignore me 7
+##########
+# Procedure: NoFunction
+# Description: do nothing (especially with scales and scrollbars)
+# Arguments: args - a number of ignored parameters
+# Returns: none
+# Sideeffects: none
+##########
+}
+}
+
+
+# Procedure: SN
+if {"[info procs SN]" == ""} {
+proc SN { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SN
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  SymbolicName $xfName
+}
+}
+
+
+# Procedure: SymbolicName
+if {"[info procs SymbolicName]" == ""} {
+proc SymbolicName { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SymbolicName
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  global symbolicName
+
+  if {"$xfName" != ""} {
+    set xfArrayName ""
+    append xfArrayName symbolicName ( $xfName )
+    if {![catch "set \"$xfArrayName\"" xfValue]} {
+      return $xfValue
+    } {
+      if {"[info commands XFProcError]" != ""} {
+        XFProcError "Unknown symbolic name:\n$xfName"
+      } {
+        puts stderr "XF error: unknown symbolic name:\n$xfName"
+      }
+    }
+  }
+  return ""
+}
+}
+
+
+# Procedure: Unalias
+if {"[info procs Unalias]" == ""} {
+proc Unalias { aliasName} {
+# xf ignore me 7
+##########
+# Procedure: Unalias
+# Description: remove an alias for a procedure
+# Arguments: aliasName - the alias name to remove
+# Returns: none
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is removed
+##########
+  global internalAliasList
+
+  set xfIndex [lsearch $internalAliasList "$aliasName *"]
+  if {$xfIndex != -1} {
+    rename $aliasName ""
+    set internalAliasList [lreplace $internalAliasList $xfIndex $xfIndex]
+  }
+}
+}
+
+
+
+# application parsing procedure
+proc XFLocalParseAppDefs {xfAppDefFile} {
+  global xfAppDefaults
+
+  # basically from: Michael Moore
+  if {[file exists $xfAppDefFile] &&
+      [file readable $xfAppDefFile] &&
+      "[file type $xfAppDefFile]" == "link"} {
+    catch "file type $xfAppDefFile" xfType
+    while {"$xfType" == "link"} {
+      if {[catch "file readlink $xfAppDefFile" xfAppDefFile]} {
+        return
+      }
+      catch "file type $xfAppDefFile" xfType
+    }
+  }
+  if {!("$xfAppDefFile" != "" &&
+        [file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        "[file type $xfAppDefFile]" == "file")} {
+    return
+  }
+  if {![catch "open $xfAppDefFile r" xfResult]} {
+    set xfAppFileContents [read $xfResult]
+    close $xfResult
+    foreach line [split $xfAppFileContents "\n"] {
+      # backup indicates how far to backup.  It applies to the
+      # situation where a resource name ends in . and when it
+      # ends in *.  In the second case you want to keep the *
+      # in the widget name for pattern matching, but you want
+      # to get rid of the . if it is the end of the name. 
+      set backup -2  
+      set line [string trim $line]
+      if {[string index $line 0] == "#" || "$line" == ""} {
+        # skip comments and empty lines
+        continue
+      }
+      set list [split $line ":"]
+      set resource [string trim [lindex $list 0]]
+      set i [string last "." $resource]
+      set j [string last "*" $resource]
+      if {$j > $i} { 
+        set i $j
+        set backup -1
+      }
+      incr i
+      set name [string range $resource $i end]
+      incr i $backup
+      set widname [string range $resource 0 $i]
+      set value [string trim [lindex $list 1]]
+      if {"$widname" != "" && "$widname" != "*"} {
+        # insert the widget and resourcename to the application
+        # defaults list.
+        if {![info exists xfAppDefaults]} {
+          set xfAppDefaults ""
+        }
+        lappend xfAppDefaults [list $widname [string tolower $name] $value]
+      }
+    }
+  }
+}
+
+# application loading procedure
+proc XFLocalLoadAppDefs {{xfClasses ""} {xfPriority "startupFile"} {xfAppDefFile ""}} {
+  global env
+
+  if {"$xfAppDefFile" == ""} {
+    set xfFileList ""
+    if {[info exists env(XUSERFILESEARCHPATH)]} {
+      append xfFileList [split $env(XUSERFILESEARCHPATH) :]
+    }
+    if {[info exists env(XAPPLRESDIR)]} {
+      append xfFileList [split $env(XAPPLRESDIR) :]
+    }
+    if {[info exists env(XFILESEARCHPATH)]} {
+      append xfFileList [split $env(XFILESEARCHPATH) :]
+    }
+    append xfFileList " /usr/lib/X11/app-defaults"
+    append xfFileList " /usr/X11/lib/X11/app-defaults"
+
+    foreach xfCounter1 $xfClasses {
+      foreach xfCounter2 $xfFileList {
+        set xfPathName $xfCounter2
+        if {[regsub -all "%N" "$xfPathName" "$xfCounter1" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%T" "$xfPathName" "app-defaults" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%S" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%C" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[file exists $xfPathName] &&
+            [file readable $xfPathName] &&
+            ("[file type $xfPathName]" == "file" ||
+             "[file type $xfPathName]" == "link")} {
+          catch "option readfile $xfPathName $xfPriority"
+          if {"[info commands XFParseAppDefs]" != ""} {
+            XFParseAppDefs $xfPathName
+          } {
+            if {"[info commands XFLocalParseAppDefs]" != ""} {
+              XFLocalParseAppDefs $xfPathName
+            }
+          }
+        } {
+          if {[file exists $xfCounter2/$xfCounter1] &&
+              [file readable $xfCounter2/$xfCounter1] &&
+              ("[file type $xfCounter2/$xfCounter1]" == "file" ||
+               "[file type $xfCounter2/$xfCounter1]" == "link")} {
+            catch "option readfile $xfCounter2/$xfCounter1 $xfPriority"
+            if {"[info commands XFParseAppDefs]" != ""} {
+              XFParseAppDefs $xfCounter2/$xfCounter1
+            } {
+              if {"[info commands XFLocalParseAppDefs]" != ""} {
+                XFLocalParseAppDefs $xfCounter2/$xfCounter1
+              }
+            }
+          }
+        }
+      }
+    }
+  } {
+    # load a specific application defaults file
+    if {[file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        ("[file type $xfAppDefFile]" == "file" ||
+         "[file type $xfAppDefFile]" == "link")} {
+      catch "option readfile $xfAppDefFile $xfPriority"
+      if {"[info commands XFParseAppDefs]" != ""} {
+        XFParseAppDefs $xfAppDefFile
+      } {
+        if {"[info commands XFLocalParseAppDefs]" != ""} {
+          XFLocalParseAppDefs $xfAppDefFile
+        }
+      }
+    }
+  }
+}
+
+# application setting procedure
+proc XFLocalSetAppDefs {{xfWidgetPath "."}} {
+  global xfAppDefaults
+
+  if {![info exists xfAppDefaults]} {
+    return
+  }
+  foreach xfCounter $xfAppDefaults {
+    if {"$xfCounter" == ""} {
+      break
+    }
+    set widname [lindex $xfCounter 0]
+    if {[string match $widname ${xfWidgetPath}] ||
+        [string match "${xfWidgetPath}*" $widname]} {
+      set name [string tolower [lindex $xfCounter 1]]
+      set value [lindex $xfCounter 2]
+      # Now lets see how many tcl commands match the name
+      # pattern specified.
+      set widlist [info command $widname]
+      if {"$widlist" != ""} {
+        foreach widget $widlist {
+          # make sure this command is a widget.
+          if {![catch "winfo id $widget"] &&
+              [string match "${xfWidgetPath}*" $widget]} {
+            catch "$widget configure -$name $value" 
+          }
+        }
+      }
+    }
+  }
+}
+
+
+# prepare auto loading
+global auto_path
+global tk_library
+global xfLoadPath
+foreach xfElement [eval list [split $xfLoadPath :] $auto_path] {
+  if {[file exists $xfElement/tclIndex]} {
+    lappend auto_path $xfElement
+  }
+}
+catch "unset auto_index"
+
+catch "unset auto_oldpath"
+
+catch "unset auto_execs"
+
+
+# initialize global variables
+proc InitGlobals {} {
+  global {checkbutton5}
+  set {checkbutton5} {0}
+  global {fsBox}
+  set {fsBox(activeBackground)} {}
+  set {fsBox(activeForeground)} {}
+  set {fsBox(all)} {0}
+  set {fsBox(background)} {}
+  set {fsBox(button)} {0}
+  set {fsBox(extensions)} {0}
+  set {fsBox(font)} {}
+  set {fsBox(foreground)} {}
+  set {fsBox(internalPath)} {/user/kono/ITL/demo}
+  set {fsBox(name)} {ahoaho}
+  set {fsBox(path)} {/user/kono/ITL/demo}
+  set {fsBox(pattern)} {*}
+  set {fsBox(scrollActiveForeground)} {}
+  set {fsBox(scrollBackground)} {}
+  set {fsBox(scrollForeground)} {}
+  set {fsBox(scrollSide)} {left}
+  set {fsBox(showPixmap)} {0}
+  global {inputBox}
+  set {inputBox(activeBackground)} {}
+  set {inputBox(activeForeground)} {}
+  set {inputBox(anchor)} {n}
+  set {inputBox(background)} {}
+  set {inputBox(erase)} {1}
+  set {inputBox(font)} {}
+  set {inputBox(foreground)} {}
+  set {inputBox(justify)} {center}
+  set {inputBox(scrollActiveForeground)} {}
+  set {inputBox(scrollBackground)} {}
+  set {inputBox(scrollForeground)} {}
+  set {inputBox(scrollSide)} {left}
+  set {inputBox(toplevelName)} {.inputBox}
+  global {scalex}
+  set {scalex} {326}
+  global {scaley}
+  set {scaley} {194}
+  global {verbose}
+  set {verbose} {0}
+
+  # please don't modify the following
+  # variables. They are needed by xf.
+  global {autoLoadList}
+  set {autoLoadList(xf-disp)} {0}
+  global {internalAliasList}
+  set {internalAliasList} {}
+  global {moduleList}
+  set {moduleList(xf-disp)} {}
+  global {preloadList}
+  set {preloadList(xfInternal)} {}
+  global {symbolicName}
+  set {symbolicName(canvas)} {.top0.frame0.canvas2}
+  set {symbolicName(diag)} {.top0.frame6.button8}
+  set {symbolicName(entry)} {.frame.frame4.text0}
+  set {symbolicName(execute)} {.top0.frame6.button10}
+  set {symbolicName(map)} {.top0.frame1.button13}
+  set {symbolicName(root)} {.}
+  set {symbolicName(states)} {.top0.frame1.label6}
+  set {symbolicName(verbose)} {.frame3.checkbutton5}
+  set {symbolicName(verify)} {.frame3.button7}
+  global {xfWmSetPosition}
+  set {xfWmSetPosition} {}
+  global {xfWmSetSize}
+  set {xfWmSetSize} {}
+  global {xfAppDefToplevels}
+  set {xfAppDefToplevels} {}
+}
+
+# initialize global variables
+InitGlobals
+
+# display/remove toplevel windows.
+ShowWindow.
+
+global xfShowWindow.top0
+set xfShowWindow.top0 1
+ShowWindow.top0
+
+# load default bindings.
+if {[info exists env(XF_BIND_FILE)] &&
+    "[info procs XFShowHelp]" == ""} {
+  source $env(XF_BIND_FILE)
+}
+
+# parse and apply application defaults.
+XFLocalLoadAppDefs Xf-disp
+XFLocalSetAppDefs
+
+# eof
+#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tmp.pl	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,6 @@
+tmp((
+not(true& ?(^r,not(@ @ @ @empty),@ @ @ @empty)&true);
+?(r^1,
+   (not(true_false&true);not(r^2&true);not(r^1&true)),
+   (not(true_false&true);not(r^2&true);r^2 & ^r,not(r^1&true))))).
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xf-disp	Thu Jan 18 23:27:24 2001 +0900
@@ -0,0 +1,2246 @@
+#!/usr/local/bin/wish -f
+# Program: xf-disp
+# Tcl version: 7.3 (Tcl/Tk/XF)
+# Tk version: 3.6
+# XF version: 2.2
+#
+
+# module inclusion
+global env
+global xfLoadPath
+global xfLoadInfo
+set xfLoadInfo 0
+if {[info exists env(XF_LOAD_PATH)]} {
+  if {[string first $env(XF_LOAD_PATH) /usr/local/lib/] == -1} {
+    set xfLoadPath $env(XF_LOAD_PATH):/usr/local/lib/
+  } {
+    set xfLoadPath /usr/local/lib/
+  }
+} {
+  set xfLoadPath /usr/local/lib/
+}
+
+global argc
+global argv
+global tkVersion
+set tmpArgv ""
+for {set counter 0} {$counter < $argc} {incr counter 1} {
+  case [string tolower [lindex $argv $counter]] in {
+    {-xfloadpath} {
+      incr counter 1
+      set xfLoadPath "[lindex $argv $counter]:$xfLoadPath"
+    }
+    {-xfstartup} {
+      incr counter 1
+      source [lindex $argv $counter]
+    }
+    {-xfbindfile} {
+      incr counter 1
+      set env(XF_BIND_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcolorfile} {
+      incr counter 1
+      set env(XF_COLOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xfcursorfile} {
+      incr counter 1
+      set env(XF_CURSOR_FILE) "[lindex $argv $counter]"
+    }
+    {-xffontfile} {
+      incr counter 1
+      set env(XF_FONT_FILE) "[lindex $argv $counter]"
+    }
+    {-xfmodelmono} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . monochrome
+      }
+    }
+    {-xfmodelcolor} {
+      if {$tkVersion >= 3.0} {
+        tk colormodel . color
+      }
+    }
+    {-xfloading} {
+      set xfLoadInfo 1
+    }
+    {-xfnoloading} {
+      set xfLoadInfo 0
+    }
+    {default} {
+      lappend tmpArgv [lindex $argv $counter]
+    }
+  }
+}
+set argv $tmpArgv
+set argc [llength $tmpArgv]
+unset counter
+unset tmpArgv
+
+
+# procedure to show window .top0
+proc ShowWindow.top0 {args} {# xf ignore me 7
+
+  # build widget .top0
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFDestroy .top0"
+  } {
+    catch "destroy .top0"
+  }
+  toplevel .top0  \
+    -background {Cornsilk2}
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom .top0 ""
+  wm sizefrom .top0 ""
+  wm maxsize .top0 1000 1000
+  wm minsize .top0 10 10
+  wm title .top0 {Execution}
+
+
+  # build widget .top0.frame0
+  frame .top0.frame0 \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # build widget .top0.frame0.scrollbar3
+  scrollbar .top0.frame0.scrollbar3 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {.top0.frame0.canvas2 xview} \
+    -foreground {#ffe4c4} \
+    -orient {horizontal} \
+    -relief {raised}
+
+  # build widget .top0.frame0.scrollbar1
+  scrollbar .top0.frame0.scrollbar1 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {.top0.frame0.canvas2 yview} \
+    -foreground {#ffe4c4} \
+    -relief {raised}
+
+  # build widget .top0.frame0.canvas2
+  canvas .top0.frame0.canvas2 \
+    -background {Cornsilk2} \
+    -confine {0} \
+    -height {384} \
+    -insertofftime {600} \
+    -relief {raised} \
+    -scrollregion {-1c -1c 20c 20c} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -selectforeground {CornSilk2} \
+    -width {394} \
+    -xscrollcommand {.top0.frame0.scrollbar3 set} \
+    -yscrollcommand {.top0.frame0.scrollbar1 set}
+  # bindings
+  bind .top0.frame0.canvas2 <Button-1> {crosshair .top0.frame0.canvas2 %x %y}
+
+  # pack widget .top0.frame0
+  pack append .top0.frame0 \
+    .top0.frame0.scrollbar1 {right frame center filly} \
+    .top0.frame0.canvas2 {top frame center expand fill} \
+    .top0.frame0.scrollbar3 {top frame center fillx}
+
+  # build widget .top0.frame1
+  frame .top0.frame1 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .top0.frame1.label6
+  label .top0.frame1.label6 \
+    -anchor {w} \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -relief {raised} \
+    -text {States:}
+
+  # build widget .top0.frame1.button13
+  button .top0.frame1.button13 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {#      regexp {([0-9]+)x([0-9]+)} [wm geometry .] dm width height
+#      set height [expr $height-300]
+#      lite map $height
+     lite map 300
+} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text {Map}
+
+  # build widget .top0.frame1.button0
+  button .top0.frame1.button0 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite generate a} \
+    -font {8x16} \
+    -kanjifont {*-fixed-*-normal--16-*-jisx0208.1983-*} \
+    -text {Generate}
+
+  # pack widget .top0.frame1
+  pack append .top0.frame1 \
+    .top0.frame1.label6 {left frame center expand fillx} \
+    .top0.frame1.button13 {left frame center} \
+    .top0.frame1.button0 {left frame center fillx}
+
+  # build widget .top0.frame6
+  frame .top0.frame6 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .top0.frame6.button8
+  button .top0.frame6.button8 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite counter a} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text {Counter Example}
+
+  # build widget .top0.frame6.button10
+  button .top0.frame6.button10 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite execute a} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text {Execute}
+
+  # build widget .top0.frame6.button9
+  button .top0.frame6.button9 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {canvaswh .top0.frame0.canvas2 1.6} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text {Enlarge}
+
+  # build widget .top0.frame6.button11
+  button .top0.frame6.button11 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {canvaswh .top0.frame0.canvas2 0.625} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text { Shrink}
+
+  # pack widget .top0.frame6
+  pack append .top0.frame6 \
+    .top0.frame6.button8 {right frame center fillx} \
+    .top0.frame6.button10 {right frame center expand fillx} \
+    .top0.frame6.button9 {left frame center} \
+    .top0.frame6.button11 {left frame center}
+
+  # pack widget .top0
+  pack append .top0 \
+    .top0.frame0 {bottom frame center expand fill} \
+    .top0.frame1 {bottom frame center fill} \
+    .top0.frame6 {top frame center fillx}
+
+  # build canvas items .top0.frame0.canvas2
+  set xfTmpTag [.top0.frame0.canvas2 create window -2480.03 -2615.93]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -anchor {nw}
+  set xfTmpTag [.top0.frame0.canvas2 create line 326 189 326 199]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -tags {cursol}
+  set xfTmpTag [.top0.frame0.canvas2 create line 321 194 331 194]
+  .top0.frame0.canvas2 itemconfigure $xfTmpTag \
+    -tags {cursol}
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree .top0"
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+proc DestroyWindow.top0 {} {# xf ignore me 7
+  if {"[info procs XFEdit]" != ""} {
+    if {"[info commands .top0]" != ""} {
+      global xfShowWindow.top0
+      set xfShowWindow.top0 0
+      XFEditSetPath .
+      after 2 "XFSaveAsProc .top0; XFEditSetShowWindows"
+    }
+  } {
+    catch "destroy .top0"
+    update
+  }
+}
+
+
+# procedure to show window .
+proc ShowWindow. {args} {# xf ignore me 7
+
+  # Window manager configurations
+  global tkVersion
+  wm positionfrom . user
+  wm sizefrom . user
+  wm maxsize . 1280 1024
+  wm title . {Lite}
+
+
+  # build widget .frame
+  frame .frame \
+    -background {Cornsilk2} \
+    -relief {raised}
+
+  # build widget .frame.frame0
+  frame .frame.frame0 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame.frame0.label4
+  label .frame.frame0.label4 \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -padx {2} \
+    -relief {raised} \
+    -text {ITL Formula:}
+
+  # build widget .frame.frame0.button3
+  button .frame.frame0.button3 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {text_clear .frame.frame4.text0} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {*-fixed-*-normal--16-*-jisx0208.1983-*} \
+    -text {clear}
+
+  # build widget .frame.frame0.menubutton0
+  menubutton .frame.frame0.menubutton0 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -kanjifont {*-fixed-*-normal--16-*-jisx0208.1983-*} \
+    -menu {.frame.frame0.menubutton0.m} \
+    -text {file}
+  # bindings
+  bind .frame.frame0.menubutton0 <Button-1> {MenuPopupPost .frame.frame0.menubutton0.m %X %Y}
+  bind .frame.frame0.menubutton0 <ButtonRelease-1> {MenuPopupRelease .frame.frame0.menubutton0.m %W}
+
+  # build widget .frame.frame0.menubutton0.m
+  menu .frame.frame0.menubutton0.m \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -kanjifont {*-fixed-*-normal--16-*-jisx0208.1983-*}
+  .frame.frame0.menubutton0.m add command \
+    -command {filehandling .frame.frame4.text0 load [FSBox "load"]} \
+    -label {load}
+  .frame.frame0.menubutton0.m add command \
+    -command {filehandling .frame.frame4.text0 save [FSBox "save"]} \
+    -label {save}
+  .frame.frame0.menubutton0.m add command \
+    -command {TokioCommand} \
+    -label {Tokio}
+  .frame.frame0.menubutton0.m add command \
+    -command {PrologCommand} \
+    -label {Prolog}
+  # bindings
+  bind .frame.frame0.menubutton0.m <Any-ButtonRelease-1> {MenuPopupRelease .frame.frame0.menubutton0.m %W}
+  bind .frame.frame0.menubutton0.m <Shift-Button-1> {MenuPopupPost .frame.frame0.menubutton0.m %X %Y}
+
+  # pack widget .frame.frame0
+  pack append .frame.frame0 \
+    .frame.frame0.label4 {left frame center expand fillx} \
+    .frame.frame0.button3 {right frame center} \
+    .frame.frame0.menubutton0 {left frame center fillx}
+
+  # build widget .frame.frame4
+  frame .frame.frame4 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame.frame4.scrollbar1
+  scrollbar .frame.frame4.scrollbar1 \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {.frame.frame4.text0 yview} \
+    -foreground {#ffe4c4}
+
+  # build widget .frame.frame4.text0
+  text .frame.frame4.text0 \
+    -background {Cornsilk2} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -height {10} \
+    -selectbackground {#b2dfee} \
+    -selectborderwidth {1} \
+    -selectforeground {CornSilk2} \
+    -width {61} \
+    -yscrollcommand {.frame.frame4.scrollbar1 set}
+  # bindings
+  bind .frame.frame4.text0 <Button-2> {%W mark set insert @%x,%y
+        %W insert insert [selection get]
+        %W yview -pickplace insert}
+  bind .frame.frame4.text0 <Button-3> {%W mark set anchor insert
+        %W tag add sel insert @%x,%y}
+  bind .frame.frame4.text0 <Control-Key-a> {%W mark set insert {insert linestart}}
+  bind .frame.frame4.text0 <Control-Key-b> {%W mark set insert {insert -1char}}
+  bind .frame.frame4.text0 <Control-Key-d> {%W delete insert}
+  bind .frame.frame4.text0 <Control-Key-e> {%W mark set insert {insert lineend}}
+  bind .frame.frame4.text0 <Control-Key-f> {%W mark set insert {insert +1char}}
+  bind .frame.frame4.text0 <Control-Key-k> {if ![string compare [%W get insert] "\n"] {
+            %W delete insert} else {
+            %W delete insert {insert lineend}
+        }}
+  bind .frame.frame4.text0 <Control-Key-n> {%W mark set insert {insert +1line}}
+  bind .frame.frame4.text0 <Control-Key-p> {%W mark set insert {insert -1line}}
+  bind .frame.frame4.text0 <Control-Key-w> {if [llength [%W tag ranges sel]] {
+            %W delete sel.first sel.last
+        }}
+
+  # pack widget .frame.frame4
+  pack append .frame.frame4 \
+    .frame.frame4.text0 {left frame center expand fill} \
+    .frame.frame4.scrollbar1 {right frame center filly}
+
+  # pack widget .frame
+  pack append .frame \
+    .frame.frame0 {top frame center fillx} \
+    .frame.frame4 {left frame center expand fill}
+
+  # build widget .frame3
+  frame .frame3 \
+    -background {Cornsilk2} \
+    -borderwidth {2} \
+    -relief {raised}
+
+  # build widget .frame3.button4
+  button .frame3.button4 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite quit 0
+destroy .} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text {Quit}
+
+  # build widget .frame3.checkbutton5
+  checkbutton .frame3.checkbutton5 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite verbose "$verbose"} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -selector {#b03060} \
+    -text {verbose} \
+    -variable {verbose}
+
+  # build widget .frame3.button7
+  button .frame3.button7 \
+    -activebackground {#eed5b7} \
+    -activeforeground {CornSilk2} \
+    -background {Cornsilk2} \
+    -command {lite verify "{[$symbolicName(entry) get 0.0 end]}"} \
+    -disabledforeground {#b0b0b0} \
+    -font {8x16} \
+    -kanjifont {kanji16} \
+    -text {Verify}
+
+  # pack widget .frame3
+  pack append .frame3 \
+    .frame3.button4 {left frame center} \
+    .frame3.checkbutton5 {right frame center} \
+    .frame3.button7 {top frame n fillx}
+
+  # pack widget .
+  pack append . \
+    .frame {top frame center expand fill} \
+    .frame3 {top frame center fill}
+
+  .frame.frame4.text0 insert end {}
+
+
+
+  if {"[info procs XFEdit]" != ""} {
+    catch "XFMiscBindWidgetTree ."
+    after 2 "catch {XFEditSetShowWindows}"
+  }
+}
+
+
+# User defined procedures
+
+
+# Procedure: FSBox
+proc FSBox { {fsBoxMessage "Select file:"} {fsBoxFileName ""} {fsBoxActionOk ""} {fsBoxActionCancel ""}} {
+# xf ignore me 5
+##########
+# Procedure: FSBox
+# Description: show file selector box
+# Arguments: fsBoxMessage - the text to display
+#            fsBoxFileName - a file name that should be selected
+#            fsBoxActionOk - the action that should be performed on ok
+#            fsBoxActionCancel - the action that should be performed on cancel
+# Returns: the filename that was selected, or nothing
+# Sideeffects: none
+##########
+# 
+# global fsBox(activeBackground) - active background color
+# global fsBox(activeForeground) - active foreground color
+# global fsBox(background) - background color
+# global fsBox(font) - text font
+# global fsBox(foreground) - foreground color
+# global fsBox(extensions) - scan directory for extensions
+# global fsBox(scrollActiveForeground) - scrollbar active background color
+# global fsBox(scrollBackground) - scrollbar background color
+# global fsBox(scrollForeground) - scrollbar foreground color
+# global fsBox(scrollSide) - side where scrollbar is located
+
+  global fsBox
+
+  set tmpButtonOpt ""
+  set tmpFrameOpt ""
+  set tmpMessageOpt ""
+  set tmpScaleOpt ""
+  set tmpScrollOpt ""
+  if {"$fsBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" "
+  }
+  if {"$fsBox(activeForeground)" != ""} {
+    append tmpButtonOpt "-activeforeground \"$fsBox(activeForeground)\" "
+  }
+  if {"$fsBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$fsBox(background)\" "
+    append tmpFrameOpt "-background \"$fsBox(background)\" "
+    append tmpMessageOpt "-background \"$fsBox(background)\" "
+  }
+  if {"$fsBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$fsBox(font)\" "
+    append tmpMessageOpt "-font \"$fsBox(font)\" "
+  }
+  if {"$fsBox(foreground)" != ""} {
+    append tmpButtonOpt "-foreground \"$fsBox(foreground)\" "
+    append tmpMessageOpt "-foreground \"$fsBox(foreground)\" "
+  }
+  if {"$fsBox(scrollActiveForeground)" != ""} {
+    append tmpScrollOpt "-activeforeground \"$fsBox(scrollActiveForeground)\" "
+  }
+  if {"$fsBox(scrollBackground)" != ""} {
+    append tmpScrollOpt "-background \"$fsBox(scrollBackground)\" "
+  }
+  if {"$fsBox(scrollForeground)" != ""} {
+    append tmpScrollOpt "-foreground \"$fsBox(scrollForeground)\" "
+  }
+
+  if {[file exists [file tail $fsBoxFileName]] &&
+      [IsAFile [file tail $fsBoxFileName]]} {
+    set fsBox(name) [file tail $fsBoxFileName]
+  } {
+    set fsBox(name) ""
+  }
+  if {[file exists $fsBoxFileName] && [IsADir $fsBoxFileName]} {
+    set fsBox(path) $fsBoxFileName
+  } {
+    if {"[file rootname $fsBoxFileName]" != "."} {
+      set fsBox(path) [file rootname $fsBoxFileName]
+    }
+  }
+  if {$fsBox(showPixmap)} {
+    set fsBox(path) [string trimleft $fsBox(path) @]
+  }
+  if {"$fsBox(path)" != "" && [file exists $fsBox(path)] &&
+      [IsADir $fsBox(path)]} {
+    set fsBox(internalPath) $fsBox(path)
+  } {
+    if {"$fsBox(internalPath)" == "" ||
+        ![file exists $fsBox(internalPath)]} {
+      set fsBox(internalPath) [pwd]
+    }
+  }
+  # build widget structure
+
+  # start build of toplevel
+  if {"[info commands XFDestroy]" != ""} {
+    catch {XFDestroy .fsBox}
+  } {
+    catch {destroy .fsBox}
+  }
+  toplevel .fsBox  -borderwidth 0
+  catch ".fsBox config $tmpFrameOpt"
+  wm geometry .fsBox 350x300 
+  wm title .fsBox {File select box}
+  wm maxsize .fsBox 1000 1000
+  wm minsize .fsBox 100 100
+  # end build of toplevel
+
+  label .fsBox.message1  -anchor c  -relief raised  -text "$fsBoxMessage"
+  catch ".fsBox.message1 config $tmpMessageOpt"
+
+  frame .fsBox.frame1  -borderwidth 0  -relief raised
+  catch ".fsBox.frame1 config $tmpFrameOpt"
+
+  button .fsBox.frame1.ok  -text "OK"  -command "
+      global fsBox
+      set fsBox(name) \[.fsBox.file.file get\]
+      if {$fsBox(showPixmap)} {
+        set fsBox(path) @\[.fsBox.path.path get\]
+      } {
+        set fsBox(path) \[.fsBox.path.path get\]
+      }
+      set fsBox(internalPath) \[.fsBox.path.path get\]
+      $fsBoxActionOk
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy .fsBox}
+      } {
+        catch {destroy .fsBox}
+      }"
+  catch ".fsBox.frame1.ok config $tmpButtonOpt"
+
+  button .fsBox.frame1.rescan  -text "Rescan"  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  catch ".fsBox.frame1.rescan config $tmpButtonOpt"
+
+  button .fsBox.frame1.cancel  -text "Cancel"  -command "
+      global fsBox
+      set fsBox(name) {}
+      set fsBox(path) {}
+      $fsBoxActionCancel
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy .fsBox}
+      } {
+        catch {destroy .fsBox}
+      }"
+  catch ".fsBox.frame1.cancel config $tmpButtonOpt"
+
+  if {$fsBox(showPixmap)} {
+    frame .fsBox.frame2  -borderwidth 0  -relief raised
+    catch ".fsBox.frame2 config $tmpFrameOpt"
+
+    scrollbar .fsBox.frame2.scrollbar3  -command {.fsBox.frame2.canvas2 xview}  -orient {horizontal}  -relief {raised}
+    catch ".fsBox.frame2.scrollbar3 config $tmpScrollOpt"
+
+    scrollbar .fsBox.frame2.scrollbar1  -command {.fsBox.frame2.canvas2 yview}  -relief {raised}
+    catch ".fsBox.frame2.scrollbar1 config $tmpScrollOpt"
+
+    canvas .fsBox.frame2.canvas2  -confine {true}  -relief {raised}  -scrollregion {0c 0c 20c 20c}  -width {100}  -xscrollcommand {.fsBox.frame2.scrollbar3 set}  -yscrollcommand {.fsBox.frame2.scrollbar1 set}
+    catch ".fsBox.frame2.canvas2 config $tmpFrameOpt"
+
+    .fsBox.frame2.canvas2 addtag currentBitmap withtag [.fsBox.frame2.canvas2 create bitmap 5 5 -anchor nw]
+  }
+
+  frame .fsBox.path  -borderwidth 0  -relief raised
+  catch ".fsBox.path config $tmpFrameOpt"
+
+  frame .fsBox.path.paths  -borderwidth 2  -relief raised
+  catch ".fsBox.path.paths config $tmpFrameOpt"
+
+  menubutton .fsBox.path.paths.paths  -borderwidth 0  -menu ".fsBox.path.paths.paths.menu"  -relief flat  -text "Pathname:"
+  catch ".fsBox.path.paths.paths config $tmpButtonOpt"
+
+  menu .fsBox.path.paths.paths.menu
+  catch ".fsBox.path.paths.paths.menu config $tmpButtonOpt"
+
+  .fsBox.path.paths.paths.menu add command  -label "[string trimright $fsBox(internalPath) {/@}]"  -command "
+       global fsBox
+       FSBoxFSShow \[.fsBox.path.path get\]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+       .fsBox.path.path delete 0 end
+       .fsBox.path.path insert 0 [string trimright $fsBox(internalPath) {/@}]"
+
+  entry .fsBox.path.path  -relief raised
+  catch ".fsBox.path.path config $tmpMessageOpt"
+
+  if {![IsADir $fsBox(internalPath)]} {
+    set $fsBox(internalPath) [pwd]
+  }
+  .fsBox.path.path insert 0 $fsBox(internalPath)
+
+  frame .fsBox.pattern  -borderwidth 0  -relief raised
+  catch ".fsBox.pattern config $tmpFrameOpt"
+
+  frame .fsBox.pattern.patterns  -borderwidth 2  -relief raised
+  catch ".fsBox.pattern.patterns config $tmpFrameOpt"
+
+  menubutton .fsBox.pattern.patterns.patterns  -borderwidth 0  -menu ".fsBox.pattern.patterns.patterns.menu"  -relief flat  -text "Selection pattern:"
+  catch ".fsBox.pattern.patterns.patterns config $tmpButtonOpt"
+
+  menu .fsBox.pattern.patterns.patterns.menu
+  catch ".fsBox.pattern.patterns.patterns.menu config $tmpButtonOpt"
+
+  .fsBox.pattern.patterns.patterns.menu add checkbutton  -label "Scan extensions"  -variable fsBox(extensions)  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+
+  entry .fsBox.pattern.pattern  -relief raised
+  catch ".fsBox.pattern.pattern config $tmpMessageOpt"
+
+  .fsBox.pattern.pattern insert 0 $fsBox(pattern)
+  
+  frame .fsBox.files  -borderwidth 0  -relief raised
+  catch ".fsBox.files config $tmpFrameOpt"
+
+  scrollbar .fsBox.files.vscroll  -relief raised  -command ".fsBox.files.files yview"
+  catch ".fsBox.files.vscroll config $tmpScrollOpt"
+
+  scrollbar .fsBox.files.hscroll  -orient horiz  -relief raised  -command ".fsBox.files.files xview"
+  catch ".fsBox.files.hscroll config $tmpScrollOpt"
+
+  listbox .fsBox.files.files  -exportselection false  -relief raised  -xscrollcommand ".fsBox.files.hscroll set"  -yscrollcommand ".fsBox.files.vscroll set"
+  catch ".fsBox.files.files config $tmpMessageOpt"
+
+  frame .fsBox.file  -borderwidth 0  -relief raised
+  catch ".fsBox.file config $tmpFrameOpt"
+
+  label .fsBox.file.labelfile  -relief raised  -text "Filename:"
+  catch ".fsBox.file.labelfile config $tmpMessageOpt"
+
+  entry .fsBox.file.file  -relief raised
+  catch ".fsBox.file.file config $tmpMessageOpt"
+
+  .fsBox.file.file delete 0 end
+  .fsBox.file.file insert 0 $fsBox(name)
+  
+  checkbutton .fsBox.pattern.all  -offvalue 0  -onvalue 1  -text "Show all files"  -variable fsBox(all)  -command {
+      global fsBox
+      FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  catch ".fsBox.pattern.all config $tmpButtonOpt"
+
+  FSBoxFSShow $fsBox(internalPath) $fsBox(pattern) $fsBox(all)
+
+  # bindings
+  bind .fsBox.files.files <Double-Button-1> "
+    FSBoxFSFileSelectDouble %W $fsBox(showPixmap) \{$fsBoxActionOk\} %y"
+  bind .fsBox.files.files <ButtonPress-1> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Button1-Motion> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Shift-Button1-Motion> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+  bind .fsBox.files.files <Shift-ButtonPress-1> "
+    FSBoxFSFileSelect %W $fsBox(showPixmap) %y"
+
+  bind .fsBox.path.path <Tab> {
+    FSBoxFSNameComplete path}
+  bind .fsBox.path.path <Return> {
+    global tkVersion
+    global fsBox
+    FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)
+    FSBoxFSInsertPath
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+  catch "bind .fsBox.path.path <Up> {}"
+  bind .fsBox.path.path <Down> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+
+  bind .fsBox.file.file <Tab> {
+    FSBoxFSNameComplete file}
+  bind .fsBox.file.file <Return> "
+    global fsBox
+    set fsBox(name) \[.fsBox.file.file get\]
+    if {$fsBox(showPixmap)} {
+      set fsBox(path) @\[.fsBox.path.path get\]
+    } {
+      set fsBox(path) \[.fsBox.path.path get\]
+    }
+    set fsBox(internalPath) \[.fsBox.path.path get\]
+    $fsBoxActionOk
+    if {\"\[info commands XFDestroy\]\" != \"\"} {
+      catch {XFDestroy .fsBox}
+    } {
+      catch {destroy .fsBox}
+    }"
+  bind .fsBox.file.file <Up> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.path.path icursor end
+    } {
+      .fsBox.path.path cursor end
+    }
+    focus .fsBox.path.path}
+  bind .fsBox.file.file <Down> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.pattern.pattern icursor end
+    } {
+      .fsBox.pattern.pattern cursor end
+    }
+    focus .fsBox.pattern.pattern}
+
+  bind .fsBox.pattern.pattern <Return> {
+    global fsBox
+    FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  bind .fsBox.pattern.pattern <Up> {
+    global tkVersion
+    if {$tkVersion >= 3.0} {
+      .fsBox.file.file icursor end
+    } {
+      .fsBox.file.file cursor end
+    }
+    focus .fsBox.file.file}
+  catch "bind .fsBox.pattern.pattern <Down> {}"
+
+  # packing
+  pack append .fsBox.files  .fsBox.files.vscroll "$fsBox(scrollSide) filly"  .fsBox.files.hscroll {bottom fillx}  .fsBox.files.files {left fill expand}
+  pack append .fsBox.file  .fsBox.file.labelfile {left}  .fsBox.file.file {left fill expand}
+  pack append .fsBox.frame1  .fsBox.frame1.ok {left fill expand}  .fsBox.frame1.rescan {left fill expand}  .fsBox.frame1.cancel {left fill expand}
+  pack append .fsBox.path.paths  .fsBox.path.paths.paths {left}
+  pack append .fsBox.pattern.patterns  .fsBox.pattern.patterns.patterns {left}
+  pack append .fsBox.path  .fsBox.path.paths {left}  .fsBox.path.path {left fill expand}
+  pack append .fsBox.pattern  .fsBox.pattern.patterns {left}  .fsBox.pattern.all {right fill}  .fsBox.pattern.pattern {left fill expand}
+  if {$fsBox(showPixmap)} {
+    pack append .fsBox.frame2  .fsBox.frame2.scrollbar1 {left filly}  .fsBox.frame2.canvas2 {top expand fill}  .fsBox.frame2.scrollbar3 {top fillx} 
+
+    pack append .fsBox  .fsBox.message1 {top fill}  .fsBox.frame1 {bottom fill}  .fsBox.pattern {bottom fill}  .fsBox.file {bottom fill}  .fsBox.path {bottom fill}  .fsBox.frame2 {right fill}  .fsBox.files {left fill expand}
+  } {
+    pack append .fsBox  .fsBox.message1 {top fill}  .fsBox.frame1 {bottom fill}  .fsBox.pattern {bottom fill}  .fsBox.file {bottom fill}  .fsBox.path {bottom fill}  .fsBox.files {left fill expand}
+  }
+
+  if {"$fsBoxActionOk" == "" && "$fsBoxActionCancel" == ""} {
+    # wait for the box to be destroyed
+    update idletask
+    grab .fsBox
+    tkwait window .fsBox
+
+    if {"[string trim $fsBox(path)]" != "" ||
+        "[string trim $fsBox(name)]" != ""} {
+      if {"[string trimleft [string trim $fsBox(name)] /]" == ""} {
+        return [string trimright [string trim $fsBox(path)] /]
+      } {
+        return [string trimright [string trim $fsBox(path)] /]/[string trimleft [string trim $fsBox(name)] /]
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxBindSelectOne
+proc FSBoxBindSelectOne { fsBoxW fsBoxY} {
+# xf ignore me 6
+
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    $fsBoxW select from $fsBoxNearest
+    $fsBoxW select to $fsBoxNearest
+  }
+}
+
+
+# Procedure: FSBoxFSFileSelect
+proc FSBoxFSFileSelect { fsBoxW fsBoxShowPixmap fsBoxY} {
+# xf ignore me 6
+  global fsBox
+
+  FSBoxBindSelectOne $fsBoxW $fsBoxY
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    set fsBoxTmpEntry [$fsBoxW get $fsBoxNearest]
+    if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "/" ||
+        "[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "@"} {
+      set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+      if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]] &&
+          ![IsASymlink [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+        set fsBoxFileName $fsBoxTmpEntry
+      }
+    } {
+      if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "*"} {
+        set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+        if {![file executable $fsBox(internalPath)/$fsBoxFileName]} {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      } {
+        set fsBoxFileName $fsBoxTmpEntry
+      }
+    }
+    if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+      set fsBox(name) $fsBoxFileName
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 $fsBox(name)
+      if {$fsBoxShowPixmap} {
+        catch ".fsBox.frame2.canvas2 itemconfigure currentBitmap -bitmap \"@$fsBox(internalPath)/$fsBox(name)\""
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSFileSelectDouble
+proc FSBoxFSFileSelectDouble { fsBoxW fsBoxShowPixmap fsBoxAction fsBoxY} {
+# xf ignore me 6
+  global fsBox
+
+  FSBoxBindSelectOne $fsBoxW $fsBoxY
+  set fsBoxNearest [$fsBoxW nearest $fsBoxY]
+  if {$fsBoxNearest >= 0} {
+    set fsBoxTmpEntry [$fsBoxW get $fsBoxNearest]
+    if {"$fsBoxTmpEntry" == "../"} {
+      set fsBoxTmpEntry [string trimright [string trim $fsBox(internalPath)] "@/"]
+      if {"$fsBoxTmpEntry" == ""} {
+        return
+      }
+      FSBoxFSShow [file dirname $fsBoxTmpEntry]  [.fsBox.pattern.pattern get] $fsBox(all)
+      .fsBox.path.path delete 0 end
+      .fsBox.path.path insert 0 $fsBox(internalPath)
+    } {
+      if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "/" ||
+          "[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "@"} {
+        set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+        if {![IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]] &&
+            ![IsASymlink [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      } {
+        if {"[string index $fsBoxTmpEntry  [expr [string length $fsBoxTmpEntry]-1]]" == "*"} {
+          set fsBoxFileName [string range $fsBoxTmpEntry 0  [expr [string length $fsBoxTmpEntry]-2]]
+          if {![file executable $fsBox(internalPath)/$fsBoxFileName]} {
+            set fsBoxFileName $fsBoxTmpEntry
+          }
+        } {
+          set fsBoxFileName $fsBoxTmpEntry
+        }
+      }
+      if {[IsADir [string trimright $fsBox(internalPath)/$fsBoxFileName @]]} {
+        set fsBox(internalPath) "[string trimright $fsBox(internalPath) {/@}]/$fsBoxFileName"
+        FSBoxFSShow $fsBox(internalPath)  [.fsBox.pattern.pattern get] $fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBox(internalPath)
+      } {
+        set fsBox(name) $fsBoxFileName
+        if {$fsBoxShowPixmap} {
+          set fsBox(path) @$fsBox(internalPath)
+        } {
+          set fsBox(path) $fsBox(internalPath)
+        }
+        if {"$fsBoxAction" != ""} {
+          eval "global fsBox; $fsBoxAction"
+        }
+        if {"[info commands XFDestroy]" != ""} {
+          catch {XFDestroy .fsBox}
+        } {
+          catch {destroy .fsBox}
+        }
+      }
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSInsertPath
+proc FSBoxFSInsertPath {} {
+# xf ignore me 6
+  global fsBox
+
+  set fsBoxLast [.fsBox.path.paths.paths.menu index last]
+  set fsBoxNewEntry [string trimright [.fsBox.path.path get] "/@"]
+  for {set fsBoxCounter 0} {$fsBoxCounter <= $fsBoxLast} {incr fsBoxCounter 1} {
+    if {"$fsBoxNewEntry" ==  "[lindex [.fsBox.path.paths.paths.menu entryconfigure  $fsBoxCounter -label] 4]"} {
+      return
+    }
+  }
+  if {$fsBoxLast < 9} {
+    .fsBox.path.paths.paths.menu add command  -label "$fsBoxNewEntry"  -command "
+        global fsBox
+        FSBoxFSShow $fsBoxNewEntry  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBoxNewEntry"
+  } {
+    for {set fsBoxCounter 0} {$fsBoxCounter < $fsBoxLast} {incr fsBoxCounter 1} {
+      .fsBox.path.paths.paths.menu entryconfigure  $fsBoxCounter -label  [lindex [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]
+      .fsBox.path.paths.paths.menu entryconfigure $fsBoxCounter  -command "
+          global fsBox
+          FSBoxFSShow [lindex [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 [lindex  [.fsBox.path.paths.paths.menu entryconfigure  [expr $fsBoxCounter+1] -label] 4]"
+    }
+    .fsBox.path.paths.paths.menu entryconfigure $fsBoxLast  -label "$fsBoxNewEntry"
+    .fsBox.path.paths.paths.menu entryconfigure $fsBoxCounter  -command "
+        global fsBox
+        FSBoxFSShow \[.fsBox.path.path get\]  \[.fsBox.pattern.pattern get\] \$fsBox(all)
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 $fsBoxNewEntry"
+  }
+}
+
+
+# Procedure: FSBoxFSNameComplete
+proc FSBoxFSNameComplete { fsBoxType} {
+# xf ignore me 6
+  global tkVersion
+  global fsBox
+
+  set fsBoxNewFile ""
+  if {"$fsBoxType" == "path"} {
+    set fsBoxDirName [file dirname [.fsBox.path.path get]]
+    set fsBoxFileName [file tail [.fsBox.path.path get]]
+  } {
+    set fsBoxDirName [file dirname [.fsBox.path.path get]/]
+    set fsBoxFileName [file tail [.fsBox.file.file get]]
+  }
+
+  set fsBoxNewFile ""
+  if {[IsADir [string trimright $fsBoxDirName @]]} {
+    catch "glob -nocomplain $fsBoxDirName/${fsBoxFileName}*" fsBoxResult
+    foreach fsBoxCounter $fsBoxResult {
+      if {"$fsBoxNewFile" == ""} {
+        set fsBoxNewFile [file tail $fsBoxCounter]
+      } {
+        if {"[string index [file tail $fsBoxCounter] 0]" !=
+            "[string index $fsBoxNewFile 0]"} {
+          set fsBoxNewFile ""
+          break
+        }
+        set fsBoxCounter1 0
+        set fsBoxTmpFile1 $fsBoxNewFile
+        set fsBoxTmpFile2 [file tail $fsBoxCounter]
+        set fsBoxLength1 [string length $fsBoxTmpFile1]
+        set fsBoxLength2 [string length $fsBoxTmpFile2]
+        set fsBoxNewFile ""
+        if {$fsBoxLength1 > $fsBoxLength2} {
+          set fsBoxLength1 $fsBoxLength2
+        }
+        while {$fsBoxCounter1 < $fsBoxLength1} {
+          if {"[string index $fsBoxTmpFile1 $fsBoxCounter1]" ==  "[string index $fsBoxTmpFile2 $fsBoxCounter1]"} {
+            append fsBoxNewFile [string index $fsBoxTmpFile1 $fsBoxCounter1]
+          } {
+            break
+          }
+          incr fsBoxCounter1 1
+        }
+      }
+    }
+  }
+  if {"$fsBoxNewFile" != ""} {
+    if {[IsADir [string trimright $fsBoxDirName/$fsBoxNewFile @]] ||
+        ![IsAFile [string trimright $fsBoxDirName/$fsBoxNewFile @]]} {
+      if {[IsADir [string trimright $fsBoxDirName/$fsBoxNewFile @]]} {
+        if {"$fsBoxDirName" == "/"} {
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 "/[string trimright [string trim $fsBoxNewFile /] @]/"
+        } {
+          .fsBox.path.path delete 0 end
+          .fsBox.path.path insert 0 "[string trimright $fsBoxDirName /]/[string trimright [string trim $fsBoxNewFile /] @]/"
+        }
+        FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)
+        FSBoxFSInsertPath
+      } {
+        .fsBox.path.path delete 0 end
+        .fsBox.path.path insert 0 "[string trimright $fsBoxDirName /]/[string trimright [string trim $fsBoxNewFile /] @]"
+      }
+    } {
+      .fsBox.path.path delete 0 end
+      .fsBox.path.path insert 0 "[string trimright $fsBoxDirName {@/}]/"
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 $fsBoxNewFile
+      if {$tkVersion >= 3.0} {
+        .fsBox.file.file icursor end
+      } {
+        .fsBox.file.file cursor end
+      }
+      focus .fsBox.file.file
+    }
+  }
+}
+
+
+# Procedure: FSBoxFSShow
+proc FSBoxFSShow { fsBoxPath fsBoxPattern fsBoxAll} {
+# xf ignore me 6
+  global fsBox
+
+  set tmpButtonOpt ""
+  if {"$fsBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" "
+  }
+  if {"$fsBox(activeForeground)" != ""} {
+    append tmpButtonOpt "-activeforeground \"$fsBox(activeForeground)\" "
+  }
+  if {"$fsBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$fsBox(background)\" "
+  }
+  if {"$fsBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$fsBox(font)\" "
+  }
+  if {"$fsBox(foreground)" != ""} {
+    append tmpButtonOpt "-foreground \"$fsBox(foreground)\" "
+  }
+
+  set fsBox(pattern) $fsBoxPattern
+  if {[file exists $fsBoxPath] && [file readable $fsBoxPath] &&
+      [IsADir $fsBoxPath]} {
+    set fsBox(internalPath) $fsBoxPath
+  } {
+    if {[file exists $fsBoxPath] && [file readable $fsBoxPath] &&
+        [IsAFile $fsBoxPath]} {
+      set fsBox(internalPath) [file dirname $fsBoxPath]
+      .fsBox.file.file delete 0 end
+      .fsBox.file.file insert 0 [file tail $fsBoxPath]
+      set fsBoxPath $fsBox(internalPath)
+    } {
+      while {"$fsBoxPath" != "" && "$fsBoxPath" != "/" &&
+             ![file isdirectory $fsBoxPath]} {
+        set fsBox(internalPath) [file dirname $fsBoxPath]
+         set fsBoxPath $fsBox(internalPath)
+      }
+    }
+  }
+  if {"$fsBoxPath" == ""} {
+    set fsBoxPath "/"
+    set fsBox(internalPath) "/"
+  }
+  .fsBox.path.path delete 0 end
+  .fsBox.path.path insert 0 $fsBox(internalPath)
+
+  if {[.fsBox.files.files size] > 0} {
+    .fsBox.files.files delete 0 end
+  }
+  if {$fsBoxAll} {
+    if {[catch "exec ls -F -a $fsBoxPath" fsBoxResult]} {
+      puts stderr "$fsBoxResult"
+    }
+  } {
+    if {[catch "exec ls -F $fsBoxPath" fsBoxResult]} {
+      puts stderr "$fsBoxResult"
+    }
+  }
+  set fsBoxElementList [lsort $fsBoxResult]
+
+  foreach fsBoxCounter [winfo children .fsBox.pattern.patterns.patterns] {
+    if {[string length [info commands XFDestroy]] > 0} {
+      catch {XFDestroy $fsBoxCounter}
+    } {
+      catch {destroy $fsBoxCounter}
+    }
+  }
+  menu .fsBox.pattern.patterns.patterns.menu
+  catch ".fsBox.pattern.patterns.patterns.menu config $tmpButtonOpt"
+
+  if {$fsBox(extensions)} {
+    .fsBox.pattern.patterns.patterns.menu add command  -label "*"  -command {
+        global fsBox
+        set fsBox(pattern) "*"
+        .fsBox.pattern.pattern delete 0 end
+        .fsBox.pattern.pattern insert 0 $fsBox(pattern)
+        FSBoxFSShow [.fsBox.path.path get] $fsBox(pattern)  $fsBox(all)}
+  }
+
+  if {"$fsBoxPath" != "/"} {
+    .fsBox.files.files insert end "../"
+  }
+  foreach fsBoxCounter $fsBoxElementList {
+    if {[string match $fsBoxPattern $fsBoxCounter] ||
+        [IsADir [string trimright $fsBoxPath/$fsBoxCounter "/@"]]} {
+      if {"$fsBoxCounter" != "../" &&
+          "$fsBoxCounter" != "./"} {
+        .fsBox.files.files insert end $fsBoxCounter
+      }
+    }
+
+    if {$fsBox(extensions)} {
+      catch "file rootname $fsBoxCounter" fsBoxRootName
+      catch "file extension $fsBoxCounter" fsBoxExtension
+      set fsBoxExtension [string trimright $fsBoxExtension "/*@"]
+      if {"$fsBoxExtension" != "" && "$fsBoxRootName" != ""} {
+        set fsBoxInsert 1
+        set fsBoxLast [.fsBox.pattern.patterns.patterns.menu index last]
+        for {set fsBoxCounter1 0} {$fsBoxCounter1 <= $fsBoxLast} {incr fsBoxCounter1 1} {
+          if {"*$fsBoxExtension" ==  "[lindex [.fsBox.pattern.patterns.patterns.menu entryconfigure  $fsBoxCounter1 -label] 4]"} {
+            set fsBoxInsert 0
+          }
+        }
+	if {$fsBoxInsert} {
+          .fsBox.pattern.patterns.patterns.menu add command  -label "*$fsBoxExtension"  -command "
+              global fsBox
+              set fsBox(pattern) \"*$fsBoxExtension\"
+              .fsBox.pattern.pattern delete 0 end
+              .fsBox.pattern.pattern insert 0 \$fsBox(pattern)
+              FSBoxFSShow \[.fsBox.path.path get\] \$fsBox(pattern)  \$fsBox(all)"
+        }
+      }
+    }
+  }
+  if {$fsBox(extensions)} {
+    .fsBox.pattern.patterns.patterns.menu add separator
+  }
+  if {$fsBox(extensions) || 
+      "[.fsBox.pattern.patterns.patterns.menu index last]" == "none"} {
+    .fsBox.pattern.patterns.patterns.menu add checkbutton  -label "Scan extensions"  -variable "fsBox(extensions)"  -command {
+        global fsBox
+        FSBoxFSShow [.fsBox.path.path get]  [.fsBox.pattern.pattern get] $fsBox(all)}
+  }
+}
+
+
+# Procedure: InputBoxInternal
+proc InputBoxInternal { inputBoxMessage inputBoxCommandOk inputBoxCommandCancel inputBoxGeometry inputBoxTitle lineNum} {
+# xf ignore me 6
+  global inputBox
+
+  set tmpButtonOpt ""
+  set tmpFrameOpt ""
+  set tmpMessageOpt ""
+  set tmpScaleOpt ""
+  set tmpScrollOpt ""
+  if {"$inputBox(activeBackground)" != ""} {
+    append tmpButtonOpt "-activebackground \"$inputBox(activeBackground)\" "
+  }
+  if {"$inputBox(activeForeground)" != ""} {
+    append tmpButtonOpt "-activeforeground \"$inputBox(activeForeground)\" "
+  }
+  if {"$inputBox(background)" != ""} {
+    append tmpButtonOpt "-background \"$inputBox(background)\" "
+    append tmpFrameOpt "-background \"$inputBox(background)\" "
+    append tmpMessageOpt "-background \"$inputBox(background)\" "
+  }
+  if {"$inputBox(font)" != ""} {
+    append tmpButtonOpt "-font \"$inputBox(font)\" "
+    append tmpMessageOpt "-font \"$inputBox(font)\" "
+  }
+  if {"$inputBox(foreground)" != ""} {
+    append tmpButtonOpt "-foreground \"$inputBox(foreground)\" "
+    append tmpMessageOpt "-foreground \"$inputBox(foreground)\" "
+  }
+  if {"$inputBox(scrollActiveForeground)" != ""} {
+    append tmpScrollOpt "-activeforeground \"$inputBox(scrollActiveForeground)\" "
+  }
+  if {"$inputBox(scrollBackground)" != ""} {
+    append tmpScrollOpt "-background \"$inputBox(scrollBackground)\" "
+  }
+  if {"$inputBox(scrollForeground)" != ""} {
+    append tmpScrollOpt "-foreground \"$inputBox(scrollForeground)\" "
+  }
+
+  # start build of toplevel
+  if {"[info commands XFDestroy]" != ""} {
+    catch {XFDestroy $inputBox(toplevelName)}
+  } {
+    catch {destroy $inputBox(toplevelName)}
+  }
+  toplevel $inputBox(toplevelName)  -borderwidth 0
+  catch "$inputBox(toplevelName) config $tmpFrameOpt"
+  if {[catch "wm geometry $inputBox(toplevelName) $inputBoxGeometry"]} {
+    wm geometry $inputBox(toplevelName) 350x150
+  }
+  wm title $inputBox(toplevelName) $inputBoxTitle
+  wm maxsize $inputBox(toplevelName) 1000 1000
+  wm minsize $inputBox(toplevelName) 100 100
+  # end build of toplevel
+
+  message $inputBox(toplevelName).message1  -anchor "$inputBox(anchor)"  -justify "$inputBox(justify)"  -relief raised  -text "$inputBoxMessage"
+  catch "$inputBox(toplevelName).message1 config $tmpMessageOpt"
+
+  set xfTmpWidth  [string range $inputBoxGeometry 0 [expr [string first x $inputBoxGeometry]-1]]
+  if {"$xfTmpWidth" != ""} {
+    # set message size
+    catch "$inputBox(toplevelName).message1 configure  -width [expr $xfTmpWidth-10]"
+  } {
+    $inputBox(toplevelName).message1 configure  -aspect 1500
+  }
+
+  frame $inputBox(toplevelName).frame0  -borderwidth 0  -relief raised
+  catch "$inputBox(toplevelName).frame0 config $tmpFrameOpt"
+
+  frame $inputBox(toplevelName).frame1  -borderwidth 0  -relief raised
+  catch "$inputBox(toplevelName).frame1 config $tmpFrameOpt"
+
+  if {$lineNum == 1} {
+    scrollbar $inputBox(toplevelName).frame1.hscroll  -orient "horizontal"  -relief raised  -command "$inputBox(toplevelName).frame1.input view"
+    catch "$inputBox(toplevelName).frame1.hscroll config $tmpScrollOpt"
+
+    entry $inputBox(toplevelName).frame1.input  -relief raised  -scrollcommand "$inputBox(toplevelName).frame1.hscroll set"
+    catch "$inputBox(toplevelName).frame1.input config $tmpMessageOpt"
+
+    $inputBox(toplevelName).frame1.input insert 0  $inputBox($inputBox(toplevelName),inputOne)
+    
+    # bindings
+    bind $inputBox(toplevelName).frame1.input <Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputOne) \[$inputBox(toplevelName).frame1.input get\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+    
+    # packing
+    pack append $inputBox(toplevelName).frame1  $inputBox(toplevelName).frame1.hscroll {bottom fill}  $inputBox(toplevelName).frame1.input {top fill expand}
+  } {
+    text $inputBox(toplevelName).frame1.input  -relief raised  -wrap none  -borderwidth 2  -yscrollcommand "$inputBox(toplevelName).frame1.vscroll set"
+    catch "$inputBox(toplevelName).frame1.input config $tmpMessageOpt"
+
+    scrollbar $inputBox(toplevelName).frame1.vscroll  -relief raised  -command "$inputBox(toplevelName).frame1.input yview"
+    catch "$inputBox(toplevelName).frame1.vscroll config $tmpScrollOpt"
+
+    $inputBox(toplevelName).frame1.input insert 1.0  $inputBox($inputBox(toplevelName),inputMulti)
+
+    # bindings
+    bind $inputBox(toplevelName).frame1.input <Control-Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+    bind $inputBox(toplevelName).frame1.input <Meta-Return> "
+      global inputBox
+      set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+
+    # packing
+    pack append $inputBox(toplevelName).frame1  $inputBox(toplevelName).frame1.vscroll "$inputBox(scrollSide) filly"  $inputBox(toplevelName).frame1.input {left fill expand}
+  }
+  
+  button $inputBox(toplevelName).frame0.button0  -text "OK"  -command "
+      global inputBox
+      if {$lineNum == 1} {
+        set inputBox($inputBox(toplevelName),inputOne) \[$inputBox(toplevelName).frame1.input get\]
+      } {
+        set inputBox($inputBox(toplevelName),inputMulti) \[$inputBox(toplevelName).frame1.input get 1.0 end\]
+      }
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandOk"
+  catch "$inputBox(toplevelName).frame0.button0 config $tmpButtonOpt"
+
+  button $inputBox(toplevelName).frame0.button1  -text "Cancel"  -command "
+      global inputBox
+      if {$lineNum == 1} {
+        set inputBox($inputBox(toplevelName),inputOne) \"\"
+      } {
+        set inputBox($inputBox(toplevelName),inputMulti) \"\"
+      }
+      if {\"\[info commands XFDestroy\]\" != \"\"} {
+        catch {XFDestroy $inputBox(toplevelName)}
+      } {
+        catch {destroy $inputBox(toplevelName)}
+      }
+      $inputBoxCommandCancel"
+  catch "$inputBox(toplevelName).frame0.button1 config $tmpButtonOpt"
+
+  pack append $inputBox(toplevelName).frame0  $inputBox(toplevelName).frame0.button0 {left fill expand}  $inputBox(toplevelName).frame0.button1 {left fill expand}
+
+  pack append $inputBox(toplevelName)  $inputBox(toplevelName).frame0 {bottom fill}  $inputBox(toplevelName).frame1 {bottom fill expand}  $inputBox(toplevelName).message1 {top fill}
+}
+
+
+# Procedure: InputBoxMulti
+proc InputBoxMulti { {inputBoxMessage "Input box:"} {inputBoxCommandOk ""} {inputBoxCommandCancel ""} {inputBoxGeometry "350x150"} {inputBoxTitle "Input box"}} {
+# xf ignore me 5
+##########
+# Procedure: InputBoxMulti
+# Description: show input box with one text line
+# Arguments: {inputBoxMessage} - message to display
+#            {inputBoxCommandOk} - the command to call after ok
+#            {inputBoxCommandCancel} - the command to call after cancel
+#            {inputBoxGeometry} - the geometry for the window
+#            {inputBoxTitle} - the title for the window
+# Returns: The entered text
+# Sideeffects: none
+# Notes: there exist also a function called:
+#          InputBoxOne - to enter one line text
+##########
+#
+# global inputBox(activeBackground) - active background color
+# global inputBox(activeForeground) - active foreground color
+# global inputBox(anchor) - anchor for message box
+# global inputBox(background) - background color
+# global inputBox(erase) - erase previous text
+# global inputBox(font) - message font
+# global inputBox(foreground) - foreground color
+# global inputBox(justify) - justify for message box
+# global inputBox(scrollActiveForeground) - scrollbar active background color
+# global inputBox(scrollBackground) - scrollbar background color
+# global inputBox(scrollForeground) - scrollbar foreground color
+# global inputBox(scrollSide) - side where scrollbar is located
+# global inputBox(toplevelName) - the toplevel name
+# global inputBox(toplevelName,inputMulti) - the text in the text widget
+
+  global inputBox
+
+  if {"$inputBoxGeometry" == ""} {
+    set inputBoxGeometry 350x150
+  }
+  if {$inputBox(erase)} {
+    set inputBox($inputBox(toplevelName),inputMulti) ""
+  } {
+    if {![info exists inputBox($inputBox(toplevelName),inputMulti)]} {
+      set inputBox($inputBox(toplevelName),inputMulti) ""
+    }
+  }
+  InputBoxInternal $inputBoxMessage $inputBoxCommandOk $inputBoxCommandCancel $inputBoxGeometry $inputBoxTitle 2
+
+  # wait for the box to be destroyed
+  update idletask
+  grab $inputBox(toplevelName)
+  tkwait window $inputBox(toplevelName)
+
+  return $inputBox($inputBox(toplevelName),inputMulti)
+}
+
+
+# Procedure: InputBoxOne
+proc InputBoxOne { {inputBoxMessage "Input box:"} {inputBoxCommandOk ""} {inputBoxCommandCancel ""} {inputBoxGeometry "350x150"} {inputBoxTitle "Input box"}} {
+# xf ignore me 5
+##########
+# Procedure: InputBoxOne
+# Description: show input box with one text line
+# Arguments: {inputBoxMessage} - message to display
+#            {inputBoxCommandOk} - the command to call after ok
+#            {inputBoxCommandCancel} - the command to call after cancel
+#            {inputBoxGeometry} - the geometry for the window
+#            {inputBoxTitle} - the title for the window
+# Returns: The entered text
+# Sideeffects: none
+# Notes: there exist also a function called:
+#          InputBoxMulti - to enter multiline text
+##########
+#
+# global inputBox(activeBackground) - active background color
+# global inputBox(activeForeground) - active foreground color
+# global inputBox(anchor) - anchor for message box
+# global inputBox(background) - background color
+# global inputBox(erase) - erase previous text
+# global inputBox(font) - message font
+# global inputBox(foreground) - foreground color
+# global inputBox(justify) - justify for message box
+# global inputBox(scrollActiveForeground) - scrollbar active background color
+# global inputBox(scrollBackground) - scrollbar background color
+# global inputBox(scrollForeground) - scrollbar foreground color
+# global inputBox(scrollSide) - side where scrollbar is located
+# global inputBox(toplevelName) - the toplevel name
+# global inputBox(toplevelName,inputOne) - the text in the entry widget
+
+  global inputBox
+
+  if {$inputBox(erase)} {
+    set inputBox($inputBox(toplevelName),inputOne) ""
+  } {
+    if {![info exists inputBox($inputBox(toplevelName),inputOne)]} {
+      set inputBox($inputBox(toplevelName),inputOne) ""
+    }
+  }
+  InputBoxInternal $inputBoxMessage $inputBoxCommandOk $inputBoxCommandCancel $inputBoxGeometry $inputBoxTitle 1
+
+  # wait for the box to be destroyed
+  update idletask
+  grab $inputBox(toplevelName)
+  tkwait window $inputBox(toplevelName)
+
+  return $inputBox($inputBox(toplevelName),inputOne)
+}
+
+
+# Procedure: IsADir
+proc IsADir { pathName} {
+# xf ignore me 5
+##########
+# Procedure: IsADir
+# Description: check if name is a directory (including symbolic links)
+# Arguments: pathName - the path to check
+# Returns: 1 if its a directory, otherwise 0
+# Sideeffects: none
+##########
+
+  if {[file isdirectory $pathName]} {
+    return 1
+  } {
+    catch "file type $pathName" fileType
+    if {"$fileType" == "link"} {
+      if {[catch "file readlink $pathName" linkName]} {
+        return 0
+      }
+      catch "file type $linkName" fileType
+      while {"$fileType" == "link"} {
+        if {[catch "file readlink $linkName" linkName]} {
+          return 0
+        }
+        catch "file type $linkName" fileType
+      }
+      return [file isdirectory $linkName]
+    }
+  }
+  return 0
+}
+
+
+# Procedure: IsAFile
+proc IsAFile { fileName} {
+# xf ignore me 5
+##########
+# Procedure: IsAFile
+# Description: check if filename is a file (including symbolic links)
+# Arguments: fileName - the filename to check
+# Returns: 1 if its a file, otherwise 0
+# Sideeffects: none
+##########
+
+  if {[file isfile $fileName]} {
+    return 1
+  } {
+    catch "file type $fileName" fileType
+    if {"$fileType" == "link"} {
+      if {[catch "file readlink $fileName" linkName]} {
+        return 0
+      }
+      catch "file type $linkName" fileType
+      while {"$fileType" == "link"} {
+        if {[catch "file readlink $linkName" linkName]} {
+          return 0
+        }
+        catch "file type $linkName" fileType
+      }
+      return [file isfile $linkName]
+    }
+  }
+  return 0
+}
+
+
+# Procedure: IsASymlink
+proc IsASymlink { fileName} {
+# xf ignore me 5
+##########
+# Procedure: IsASymlink
+# Description: check if filename is a symbolic link
+# Arguments: fileName - the path/filename to check
+# Returns: none
+# Sideeffects: none
+##########
+
+  catch "file type $fileName" fileType
+  if {"$fileType" == "link"} {
+    return 1
+  }
+  return 0
+}
+
+
+# Procedure: PrologCommand
+proc PrologCommand {} {
+prolog {prolog_call [InputBoxOne "Prolog Command:"]} lite
+}
+
+
+# Procedure: TokioCommand
+proc TokioCommand {} {
+prolog {tokio_call [InputBoxOne "Tokio Command:"]} lite
+}
+
+
+# Procedure: canvaswh
+proc canvaswh { c scale} {
+global scalex scaley
+if {! $scalex && ! $scaley } {
+   regexp {([0-9]+)x([0-9]+)} [wm geometry .] dm w h
+   set h [$c canvasy [expr $h/2]]
+   set w [$c canvasx [expr $w/2]]
+} else {
+   set h $scaley
+   set w $scalex 
+}
+$c scale all $w $h $scale $scale
+}
+
+
+# Procedure: crosshair
+proc crosshair { c x y} {
+global scalex scaley
+if {[$c find withtag cursol] != {}} {
+   $c delete cursol
+}
+set cs  5
+set x [$c canvasx $x]
+set y [$c canvasy $y]
+$c create line $x [expr $y - $cs] $x [expr $y + $cs]  -tags cursol
+$c create line [expr $x - $cs] $y [expr $x + $cs] $y  -tags cursol
+set scalex $x
+set scaley $y
+}
+
+
+# Procedure: event
+proc event { args now} {
+prolog "tokio_event $args $now" tokio
+}
+
+
+# Procedure: filehandling
+proc filehandling { t mode file} {
+if {[string compare $mode "load"] == 0} {
+   if [file isfile $file] {
+       $t  delete 0.0 end
+       set F [open $file r]
+       while {[gets $F string] != -1} {
+             $t insert end "$string\n"
+       }
+       close $F
+  }
+} else {
+    set line [$t get 0.0 end]
+#    if [file writable $dir] {
+        if [expr [llength $line] > 0] {
+            set F [open $file w]
+            puts $F $line
+            close $F
+        }
+#    }
+}
+}
+
+
+# Procedure: lite
+proc lite { a b} {
+prolog "event $a $b" lite
+}
+
+
+# Procedure: text_clear
+proc text_clear { t} {
+$t delete 0.0 end
+}
+
+
+# Internal procedures
+
+
+# Procedure: Alias
+if {"[info procs Alias]" == ""} {
+proc Alias { args} {
+# xf ignore me 7
+##########
+# Procedure: Alias
+# Description: establish an alias for a procedure
+# Arguments: args - no argument means that a list of all aliases
+#                   is returned. Otherwise the first parameter is
+#                   the alias name, and the second parameter is
+#                   the procedure that is aliased.
+# Returns: nothing, the command that is bound to the alias or a
+#          list of all aliases - command pairs. 
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is inserted
+##########
+  global internalAliasList
+
+  if {[llength $args] == 0} {
+    return $internalAliasList
+  } {
+    if {[llength $args] == 1} {
+      set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+      if {$xfTmpIndex != -1} {
+        return [lindex [lindex $internalAliasList $xfTmpIndex] 1]
+      }
+    } {
+      if {[llength $args] == 2} {
+        eval "proc [lindex $args 0] {args} {#xf ignore me 4
+return \[eval \"[lindex $args 1] \$args\"\]}"
+        set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+        if {$xfTmpIndex != -1} {
+          set internalAliasList [lreplace $internalAliasList $xfTmpIndex $xfTmpIndex "[lindex $args 0] [lindex $args 1]"]
+        } {
+          lappend internalAliasList "[lindex $args 0] [lindex $args 1]"
+        }
+      } {
+        error "Alias: wrong number or args: $args"
+      }
+    }
+  }
+}
+}
+
+
+# Procedure: GetSelection
+if {"[info procs GetSelection]" == ""} {
+proc GetSelection {} {
+# xf ignore me 7
+##########
+# Procedure: GetSelection
+# Description: get current selection
+# Arguments: none
+# Returns: none
+# Sideeffects: none
+##########
+
+  # the save way
+  set xfSelection ""
+  catch "selection get" xfSelection
+  if {"$xfSelection" == "selection doesn't exist or form \"STRING\" not defined"} {
+    return ""
+  } {
+    return $xfSelection
+  }
+}
+}
+
+
+# Procedure: MenuPopupAdd
+if {"[info procs MenuPopupAdd]" == ""} {
+proc MenuPopupAdd { xfW xfButton xfMenu {xfModifier ""} {xfCanvasTag ""}} {
+# xf ignore me 7
+# the popup menu handling is from (I already gave up with popup handling :-):
+#
+# Copyright 1991,1992 by James Noble.
+# Everyone is granted permission to copy, modify and redistribute.
+# This notice must be preserved on all copies or derivates.
+#
+##########
+# Procedure: MenuPopupAdd
+# Description: attach a popup menu to widget
+# Arguments: xfW - the widget
+#            xfButton - the button we use
+#            xfMenu - the menu to attach
+#            {xfModifier} - a optional modifier
+#            {xfCanvasTag} - a canvas tagOrId
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  set tk_popupPriv($xfMenu,focus) ""
+  set tk_popupPriv($xfMenu,grab) ""
+  if {"$xfModifier" != ""} {
+    set press "$xfModifier-"
+    set motion "$xfModifier-"
+    set release "Any-"
+  } {
+    set press ""
+    set motion ""
+    set release ""
+  }
+
+  bind $xfMenu "<${motion}B${xfButton}-Motion>"  "MenuPopupMotion $xfMenu %W %X %Y"
+  bind $xfMenu "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  if {"$xfCanvasTag" == ""} {
+    bind $xfW "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    bind $xfW "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  } {
+    $xfW bind $xfCanvasTag "<${press}ButtonPress-${xfButton}>"  "MenuPopupPost $xfMenu %X %Y"
+    $xfW bind $xfCanvasTag "<${release}ButtonRelease-${xfButton}>"  "MenuPopupRelease $xfMenu %W"
+  }
+}
+}
+
+
+# Procedure: MenuPopupMotion
+if {"[info procs MenuPopupMotion]" == ""} {
+proc MenuPopupMotion { xfMenu xfW xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupMotion
+# Description: handle the popup menu motion
+# Arguments: xfMenu - the topmost menu
+#            xfW - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    set xfPopMinX [winfo rootx $xfW]
+    set xfPopMaxX [expr $xfPopMinX+[winfo width $xfW]]
+    if {$xfX >= $xfPopMinX && $xfX <= $xfPopMaxX} {
+      $xfW activate @[expr $xfY-[winfo rooty $xfW]]
+      if {![catch "$xfW entryconfig @[expr $xfY-[winfo rooty $xfW]] -menu" result]} {
+        if {"[lindex $result 4]" != ""} {
+          foreach binding [bind $xfMenu] {
+            bind [lindex $result 4] $binding [bind $xfMenu $binding]
+          }
+        }
+      }
+    } {
+      $xfW activate none
+    }
+  }
+}
+}
+
+
+# Procedure: MenuPopupPost
+if {"[info procs MenuPopupPost]" == ""} {
+proc MenuPopupPost { xfMenu xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupPost
+# Description: post the popup menu
+# Arguments: xfMenu - the menu
+#            xfX - the root x coordinate
+#            xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+
+  if {"[info commands $xfMenu]" != ""} {
+    if {![info exists tk_popupPriv($xfMenu,focus)]} {
+      set tk_popupPriv($xfMenu,focus) [focus]
+    } {
+      if {"$tk_popupPriv($xfMenu,focus)" == ""} {
+        set tk_popupPriv($xfMenu,focus) [focus]
+      }
+    }
+    set tk_popupPriv($xfMenu,grab) $xfMenu
+
+    catch "$xfMenu activate none"
+    catch "$xfMenu post $xfX $xfY"
+    catch "focus $xfMenu"
+    catch "grab -global $xfMenu"
+  }
+}
+}
+
+
+# Procedure: MenuPopupRelease
+if {"[info procs MenuPopupRelease]" == ""} {
+proc MenuPopupRelease { xfMenu xfW} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupRelease
+# Description: remove the popup menu
+# Arguments: xfMenu - the topmost menu widget
+#            xfW - the menu widget
+# Returns: none
+# Sideeffects: none
+##########
+  global tk_popupPriv
+  global tkVersion
+
+  if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+      "[winfo class $xfW]" == "Menu" &&
+      [info exists tk_popupPriv($xfMenu,focus)] &&
+      "$tk_popupPriv($xfMenu,focus)" != "" &&
+      [info exists tk_popupPriv($xfMenu,grab)] &&
+      "$tk_popupPriv($xfMenu,grab)" != ""} {
+    if {$tkVersion >= 3.0} {
+      catch "grab release $tk_popupPriv($xfMenu,grab)"
+    } {
+      catch "grab none"
+    }
+    catch "focus $tk_popupPriv($xfMenu,focus)"
+    set tk_popupPriv($xfMenu,focus) ""
+    set tk_popupPriv($xfMenu,grab) ""
+    if {"[$xfW index active]" != "none"} {
+      $xfW invoke active; catch "$xfMenu unpost"
+    }
+  }
+  catch "$xfMenu unpost"
+}
+}
+
+
+# Procedure: NoFunction
+if {"[info procs NoFunction]" == ""} {
+proc NoFunction { args} {
+# xf ignore me 7
+##########
+# Procedure: NoFunction
+# Description: do nothing (especially with scales and scrollbars)
+# Arguments: args - a number of ignored parameters
+# Returns: none
+# Sideeffects: none
+##########
+}
+}
+
+
+# Procedure: SN
+if {"[info procs SN]" == ""} {
+proc SN { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SN
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  SymbolicName $xfName
+}
+}
+
+
+# Procedure: SymbolicName
+if {"[info procs SymbolicName]" == ""} {
+proc SymbolicName { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SymbolicName
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+  global symbolicName
+
+  if {"$xfName" != ""} {
+    set xfArrayName ""
+    append xfArrayName symbolicName ( $xfName )
+    if {![catch "set \"$xfArrayName\"" xfValue]} {
+      return $xfValue
+    } {
+      if {"[info commands XFProcError]" != ""} {
+        XFProcError "Unknown symbolic name:\n$xfName"
+      } {
+        puts stderr "XF error: unknown symbolic name:\n$xfName"
+      }
+    }
+  }
+  return ""
+}
+}
+
+
+# Procedure: Unalias
+if {"[info procs Unalias]" == ""} {
+proc Unalias { aliasName} {
+# xf ignore me 7
+##########
+# Procedure: Unalias
+# Description: remove an alias for a procedure
+# Arguments: aliasName - the alias name to remove
+# Returns: none
+# Sideeffects: internalAliasList is updated, and the alias
+#              proc is removed
+##########
+  global internalAliasList
+
+  set xfIndex [lsearch $internalAliasList "$aliasName *"]
+  if {$xfIndex != -1} {
+    rename $aliasName ""
+    set internalAliasList [lreplace $internalAliasList $xfIndex $xfIndex]
+  }
+}
+}
+
+
+
+# application parsing procedure
+proc XFLocalParseAppDefs {xfAppDefFile} {
+  global xfAppDefaults
+
+  # basically from: Michael Moore
+  if {[file exists $xfAppDefFile] &&
+      [file readable $xfAppDefFile] &&
+      "[file type $xfAppDefFile]" == "link"} {
+    catch "file type $xfAppDefFile" xfType
+    while {"$xfType" == "link"} {
+      if {[catch "file readlink $xfAppDefFile" xfAppDefFile]} {
+        return
+      }
+      catch "file type $xfAppDefFile" xfType
+    }
+  }
+  if {!("$xfAppDefFile" != "" &&
+        [file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        "[file type $xfAppDefFile]" == "file")} {
+    return
+  }
+  if {![catch "open $xfAppDefFile r" xfResult]} {
+    set xfAppFileContents [read $xfResult]
+    close $xfResult
+    foreach line [split $xfAppFileContents "\n"] {
+      # backup indicates how far to backup.  It applies to the
+      # situation where a resource name ends in . and when it
+      # ends in *.  In the second case you want to keep the *
+      # in the widget name for pattern matching, but you want
+      # to get rid of the . if it is the end of the name. 
+      set backup -2  
+      set line [string trim $line]
+      if {[string index $line 0] == "#" || "$line" == ""} {
+        # skip comments and empty lines
+        continue
+      }
+      set list [split $line ":"]
+      set resource [string trim [lindex $list 0]]
+      set i [string last "." $resource]
+      set j [string last "*" $resource]
+      if {$j > $i} { 
+        set i $j
+        set backup -1
+      }
+      incr i
+      set name [string range $resource $i end]
+      incr i $backup
+      set widname [string range $resource 0 $i]
+      set value [string trim [lindex $list 1]]
+      if {"$widname" != "" && "$widname" != "*"} {
+        # insert the widget and resourcename to the application
+        # defaults list.
+        if {![info exists xfAppDefaults]} {
+          set xfAppDefaults ""
+        }
+        lappend xfAppDefaults [list $widname [string tolower $name] $value]
+      }
+    }
+  }
+}
+
+# application loading procedure
+proc XFLocalLoadAppDefs {{xfClasses ""} {xfPriority "startupFile"} {xfAppDefFile ""}} {
+  global env
+
+  if {"$xfAppDefFile" == ""} {
+    set xfFileList ""
+    if {[info exists env(XUSERFILESEARCHPATH)]} {
+      append xfFileList [split $env(XUSERFILESEARCHPATH) :]
+    }
+    if {[info exists env(XAPPLRESDIR)]} {
+      append xfFileList [split $env(XAPPLRESDIR) :]
+    }
+    if {[info exists env(XFILESEARCHPATH)]} {
+      append xfFileList [split $env(XFILESEARCHPATH) :]
+    }
+    append xfFileList " /usr/lib/X11/app-defaults"
+    append xfFileList " /usr/X11/lib/X11/app-defaults"
+
+    foreach xfCounter1 $xfClasses {
+      foreach xfCounter2 $xfFileList {
+        set xfPathName $xfCounter2
+        if {[regsub -all "%N" "$xfPathName" "$xfCounter1" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%T" "$xfPathName" "app-defaults" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%S" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[regsub -all "%C" "$xfPathName" "" xfResult]} {
+          set xfPathName $xfResult
+        }
+        if {[file exists $xfPathName] &&
+            [file readable $xfPathName] &&
+            ("[file type $xfPathName]" == "file" ||
+             "[file type $xfPathName]" == "link")} {
+          catch "option readfile $xfPathName $xfPriority"
+          if {"[info commands XFParseAppDefs]" != ""} {
+            XFParseAppDefs $xfPathName
+          } {
+            if {"[info commands XFLocalParseAppDefs]" != ""} {
+              XFLocalParseAppDefs $xfPathName
+            }
+          }
+        } {
+          if {[file exists $xfCounter2/$xfCounter1] &&
+              [file readable $xfCounter2/$xfCounter1] &&
+              ("[file type $xfCounter2/$xfCounter1]" == "file" ||
+               "[file type $xfCounter2/$xfCounter1]" == "link")} {
+            catch "option readfile $xfCounter2/$xfCounter1 $xfPriority"
+            if {"[info commands XFParseAppDefs]" != ""} {
+              XFParseAppDefs $xfCounter2/$xfCounter1
+            } {
+              if {"[info commands XFLocalParseAppDefs]" != ""} {
+                XFLocalParseAppDefs $xfCounter2/$xfCounter1
+              }
+            }
+          }
+        }
+      }
+    }
+  } {
+    # load a specific application defaults file
+    if {[file exists $xfAppDefFile] &&
+        [file readable $xfAppDefFile] &&
+        ("[file type $xfAppDefFile]" == "file" ||
+         "[file type $xfAppDefFile]" == "link")} {
+      catch "option readfile $xfAppDefFile $xfPriority"
+      if {"[info commands XFParseAppDefs]" != ""} {
+        XFParseAppDefs $xfAppDefFile
+      } {
+        if {"[info commands XFLocalParseAppDefs]" != ""} {
+          XFLocalParseAppDefs $xfAppDefFile
+        }
+      }
+    }
+  }
+}
+
+# application setting procedure
+proc XFLocalSetAppDefs {{xfWidgetPath "."}} {
+  global xfAppDefaults
+
+  if {![info exists xfAppDefaults]} {
+    return
+  }
+  foreach xfCounter $xfAppDefaults {
+    if {"$xfCounter" == ""} {
+      break
+    }
+    set widname [lindex $xfCounter 0]
+    if {[string match $widname ${xfWidgetPath}] ||
+        [string match "${xfWidgetPath}*" $widname]} {
+      set name [string tolower [lindex $xfCounter 1]]
+      set value [lindex $xfCounter 2]
+      # Now lets see how many tcl commands match the name
+      # pattern specified.
+      set widlist [info command $widname]
+      if {"$widlist" != ""} {
+        foreach widget $widlist {
+          # make sure this command is a widget.
+          if {![catch "winfo id $widget"] &&
+              [string match "${xfWidgetPath}*" $widget]} {
+            catch "$widget configure -$name $value" 
+          }
+        }
+      }
+    }
+  }
+}
+
+
+# prepare auto loading
+global auto_path
+global tk_library
+global xfLoadPath
+foreach xfElement [eval list [split $xfLoadPath :] $auto_path] {
+  if {[file exists $xfElement/tclIndex]} {
+    lappend auto_path $xfElement
+  }
+}
+catch "unset auto_index"
+
+catch "unset auto_oldpath"
+
+catch "unset auto_execs"
+
+
+# initialize global variables
+proc InitGlobals {} {
+  global {checkbutton5}
+  set {checkbutton5} {0}
+  global {fsBox}
+  set {fsBox(activeBackground)} {}
+  set {fsBox(activeForeground)} {}
+  set {fsBox(all)} {0}
+  set {fsBox(background)} {}
+  set {fsBox(button)} {0}
+  set {fsBox(extensions)} {0}
+  set {fsBox(font)} {}
+  set {fsBox(foreground)} {}
+  set {fsBox(internalPath)} {/user/kono/ITL/demo}
+  set {fsBox(name)} {ahoaho}
+  set {fsBox(path)} {/user/kono/ITL/demo}
+  set {fsBox(pattern)} {*}
+  set {fsBox(scrollActiveForeground)} {}
+  set {fsBox(scrollBackground)} {}
+  set {fsBox(scrollForeground)} {}
+  set {fsBox(scrollSide)} {left}
+  set {fsBox(showPixmap)} {0}
+  global {inputBox}
+  set {inputBox(activeBackground)} {}
+  set {inputBox(activeForeground)} {}
+  set {inputBox(anchor)} {n}
+  set {inputBox(background)} {}
+  set {inputBox(erase)} {1}
+  set {inputBox(font)} {}
+  set {inputBox(foreground)} {}
+  set {inputBox(justify)} {center}
+  set {inputBox(scrollActiveForeground)} {}
+  set {inputBox(scrollBackground)} {}
+  set {inputBox(scrollForeground)} {}
+  set {inputBox(scrollSide)} {left}
+  set {inputBox(toplevelName)} {.inputBox}
+  global {scalex}
+  set {scalex} {326}
+  global {scaley}
+  set {scaley} {194}
+  global {verbose}
+  set {verbose} {0}
+
+  # please don't modify the following
+  # variables. They are needed by xf.
+  global {autoLoadList}
+  set {autoLoadList(xf-disp)} {0}
+  global {internalAliasList}
+  set {internalAliasList} {}
+  global {moduleList}
+  set {moduleList(xf-disp)} {}
+  global {preloadList}
+  set {preloadList(xfInternal)} {}
+  global {symbolicName}
+  set {symbolicName(canvas)} {.top0.frame0.canvas2}
+  set {symbolicName(diag)} {.top0.frame6.button8}
+  set {symbolicName(entry)} {.frame.frame4.text0}
+  set {symbolicName(execute)} {.top0.frame6.button10}
+  set {symbolicName(generate)} {.top0.frame1.button0}
+  set {symbolicName(map)} {.top0.frame1.button13}
+  set {symbolicName(root)} {.}
+  set {symbolicName(states)} {.top0.frame1.label6}
+  set {symbolicName(verbose)} {.frame3.checkbutton5}
+  set {symbolicName(verify)} {.frame3.button7}
+  global {xfWmSetPosition}
+  set {xfWmSetPosition} {}
+  global {xfWmSetSize}
+  set {xfWmSetSize} {}
+  global {xfAppDefToplevels}
+  set {xfAppDefToplevels} {}
+}
+
+# initialize global variables
+InitGlobals
+
+# display/remove toplevel windows.
+ShowWindow.
+
+global xfShowWindow.top0
+set xfShowWindow.top0 1
+ShowWindow.top0
+
+# load default bindings.
+if {[info exists env(XF_BIND_FILE)] &&
+    "[info procs XFShowHelp]" == ""} {
+  source $env(XF_BIND_FILE)
+}
+
+# parse and apply application defaults.
+XFLocalLoadAppDefs Xf-disp
+XFLocalSetAppDefs
+
+# eof
+#
+