%*****************************************************************************
%
%       Metis COMMAND
%               Multi-PSI version
%
%               created by      : ???
%               version         : 1.0
%               revision        : 0.0
%               date created    : 9-3-91
%               date changed    : ???
%               comments
%*****************************************************************************

class metis_command has

:metis_command(_,Top,Mode,Com,Usg,Help,Next) :- !,
        command(Top,Mode,Com,Usg,Help,Next);
:metis_default_command(_,Mode,Com) :- !,
        default_command(Mode,Com);
:metis_cpc_mode_and_id(_,Mode,ID) :- !,
        cpc_mode_and_id(Mode,ID) ;

local

%--------------------------------------------------%
%       cpc_mode                                   %
%--------------------------------------------------%

cpc_mode('KB'):- ! ;
cpc_mode('S-STRA'):- ! ;
cpc_mode('INDUCTION'):- ! ;

cpc_mode_and_id('KB',kb):- ! ;
cpc_mode_and_id('S-STRA',ss):- ! ;
cpc_mode_and_id('INDUCTION',ii):- ! ;

%--------------------------------------------------%
%       top_mode                                   %
%--------------------------------------------------%

top_mode('METIS') :- ! ;
top_mode('MPSI') :- ! ;


%--------------------------------------------------%
%       Command                                    %
%--------------------------------------------------%

command( '',top(A),[], '(<CR>)', '$SILENT',call(true, A, '', '')) :- top_mode(A) ;

command(65,top(A),[65,66,79,82,84], '(<CR>)', 'aborts the METIS execution',call(abort_Metis,A, 'Please call "continue." to resume execution.', '')) ;

command(65, 'top_WRITE_file name'(A,B,C),[65,76,76], '(<CR>)', 'writes all to a file',call(write_to_file(data,C),A, '<< write data to a file >>', '')) ;

command(65,top_SET_MONITOR(A),[65,76,76], '(ITEM or <CR>)', 'to display', 'top_SET_MONITOR_all'(A)) ;

command(65, 'top_SET_MONITOR_graph'(A),[65,76,76], '(<CR>)', 'monitors all',call(set(on( '{FLG}monitor'(graph,all))),A, '', '[ monitor graph all on. ]')) ;

command(65,top_LIST(A),[65,76,76], '(<CR>)', 'displays all',call(list_state(data,existing,normal),A, '<< state listing >>', '')) ;

command(65,top_INITIALIZE(A),[65,76,76], '(<CR>)', 'initializes all',call(init(data),A, '', '[ system initialized ]')) ;

command(65, 'top_READ_file name'( 'METIS',A,B),[65,80,80,69,78,68], '(<CR>)', 'appends data to the current system',call(append_from_file(B), 'METIS', '<< append data from a file >>', '')) ;

command(65,top_NARROWING(A),[65,83,83,69,82,84], '(<CR>)', 'asserts narrowed inequations',call(find_narrowed_INEQs(assert,B,C),A, '<< assert narrowed inequations >>',[ '[ ',C, ' narrowed inequations are asserted. ]'])) ;

command(65,top_CRITICALPAIRS(A),[65,83,83,69,82,84], '(<CR>)', 'asserts divergentr critical pairs',call(find_CPs(ss,assert,B,C),A, '<< assert divergent critical pairs >>',[ '[ ','??', ' divergent criticalpairs are asserted. ]'])) ;

command(65,top_REDUCE(A),[65,85,84,79,77,65,84,73,67], '(<CR>)', 'reduces terms in automatic mode',call(term_rewrite(automatic),A, '<< reduce a term (in automatic mode) >>', '')) ;

command(65,top(A),[65,85,84,79,77,65,84,73,67], '(<CR>)', 'changes the mode to automatic',call(cpc_continue(B,fullautomatic,C),C, '<< automatic executecution >>', '')):-cpc_mode_and_id(A,B) ;

command(65,top_SSTRATEGY( 'METIS'),[65,85,84,79,77,65,84,73,67], '(<CR>)', ['executes the S-strategy in',{nl},{space(22)},'automatic mode'],call(cpc_start(ss,fullautomatic,A),A, '<< S-strategy (automatic execution) >>', '')) ;

command(65,top_KB( 'METIS'),[65,85,84,79,77,65,84,73,67], '(<CR>)', 'executes the KB in automatic mode',call(cpc_start(kb,fullautomatic,A),A, '<< Knuth - Bendix (automatic execution) >>', '')) ;

command(65,top_INDUCTION( 'METIS'),[65,85,84,79,77,65,84,73,67], '(<CR>)', ['executes the inductionless',{nl},{space(22)},'induction in automatic mode'],call(cpc_start(ii,fullautomatic,A),A, '<< inductionless induction (automatic execution) >>', '')) ;

command(65,top_SET_node(A),[65,76,76],'(ITEM or <CR>)', 'sets all node',top_SET_node_ALL_S(A)) ;

command(65, 'top_READ_file name'( 'MPSI',A,B),[65,80,80,69,78,68], '(<CR>)', 'appends data to the current system',call(append_from_file(B), 'MPSI', '<< append data from a file >>', '')) ;

command(65,top_KB( 'MPSI'),[65,85,84,79,77,65,84,73,67], '(<CR>)', 'executes the KB in automatic mode',call(cpc_start(kb,fullautomatic,'??'),A, '<< Knuth - Bendix (automatic execution) >>', '')) ;

command(65,top_INDUCTION( 'MPSI'),[65,85,84,79,77,65,84,73,67], '(<CR>)', ['executes the inductionless',{nl},{space(22)},'induction in automatic mode'],call(cpc_start(ii,fullautomatic,'??'),A, '<< inductionless induction (automatic execution) >>', '')) ;

command(66,top_SET_TERMINAL(A),[66,65,83,73,67], '(<CR>)', 'sets type to basic',call(set(terminal(basic)),A, '', '[ basic terminal type. ]')) ;

command(66,top_SET(A),[66,69,76,76], '(<CR>)', 'sets bell flag',call(set(on( '{FLG}bell')),A, '', '[ bell on. ]')) ;

command(66,top_SET_NO(A),[66,69,76,76], '(<CR>)', 'resets bell flag',call(set(off( '{FLG}bell')),A, '', '[ bell off. ]')) ;

command(66,top_INFORMATION(A),[66,69,76,76], '(<CR>)', 'provides information about bell flag',call(inform(flag( '{FLG}bell')),A, '', '')) ;

command(66,top(A),[66,82,69,65,75], '(<CR>)', 'breaks the current METIS execution',call(break,A, '[ Type ^Z to resume. ]', '')) ;

command(67,top_SET_TERMINAL(A),[67,73,84,54,48,48], '(<CR>)', 'sets type to CIT600',call(set(terminal(cit600)),A, '', '[ new terminal type is "cit600" . ]')) ;

command(67,top_WINDOW(A),[67,76,79,83,69], '(<CR>)', 'close the window',call(window_control(close),A, '<< close the window >>', '')) ;

command(67,top(A),[67,79,77,77,65,78,68,70,73,76,69], '(FILE NAME)', 'executes a command file',top_COMMANDFILE(A)) ;

command(67,top(A),[67,79,77,80,73,76,69], '(ITEM or <CR>)', 'compiles the current states',top_COMPILE(A)) ;

command(67,top_SET(A),[67,79,77,80,76,69,84,73,79,78], '(<CR>)', 'sets command completion flag',call(set(on( '{FLG}completion')),A, '', '[ command completion on. ]')) ;

command(67,top_SET_NO(A),[67,79,77,80,76,69,84,73,79,78], '(<CR>)', 'resets command completion flag',call(set(off( '{FLG}completion')),A, '', '[ command completion off. ]')) ;

command(67,top_INFORMATION(A),[67,79,77,80,76,69,84,73,79,78], '(<CR>)', ['provides information about completion',{nl},{space(18)},'flag'],call(inform(flag( '{FLG}completion')),A, '', '')) ;

command(67,top_DELETE_operator_symbol(A,B),[67,79,78,83,84,82,85,67,84,79,82,83], '(<CR>)', 'deletes constructor definition',call(delete(operator_constructor,ambiguous(B)),A, '', '')) ;

command(67,top( 'METIS'),[67,79,78,86,69,82,84], '(ID)', 'converts data',top_CONVERT( 'METIS')) ;

command(67, 'top_COMMANDFILE_file name'(A,B,C),[67,79,80,89], '(<CR>)', 'displays an execution',call(exe_command_file(C,list),A, '<< command file execution (copy mode) >>', '')) ;

command(67,top(A),[67,82,73,84,73,67,65,76,80,65,73,82,83], '(Mode or <CR>)', 'gets divergent critical pairs',top_CRITICALPAIRS(A)) ;

command(67,top_SUGGESTION(A),[67,85,82,82,69,78,84], '(<CR>)', ['gives suggestion for the current',{nl},{space(20)},'equation'],call(suggestion_ordering(current,suggest),A, '<< suggestion for the current equation >>', '')) ;

command(67,top_ORIENT(A),[67,85,82,82,69,78,84], '(<CR>)', 'orients the current equation',call(suggestion_ordering(current,orient),A, '<< orient the current equation >>', '')) ;

command(67,top_SET_node(A),[67,80,67],'(ITEM or <CR>)', 'sets superposible node',top_SET_node_CPC_S(A)) ;

command(68, 'top_SET_MONITOR_list'(A),[68,65,84,65], '(<CR>)', 'monitors all',call(set(on( '{FLG}monitor'(list,data))),A, '', '[ monitor list data on. ]')) ;

command(68, 'top_SET_MONITOR_graph'(A),[68,65,84,65], '(<CR>)', 'monitors all',call(set(on( '{FLG}monitor'(graph,data))),A, '', '[ monitor graph data on. ]')) ;

command(68, 'top_SET_MONITOR_all'(A),[68,65,84,65], '(<CR>)', 'monitors all',call(set(on( '{FLG}monitor'(all,data))),A, '', '[ monitor all data on. ]')) ;

command(68,top_SET(A),[68,69,66,85,71], '(<CR>)', 'sets debug flag',call(trace,A, '', '[ debugging on. ]')) ;

command(68,top_INFORMATION(A),[68,69,66,85,71], '(<CR>)', 'provides information about debugging',call(debugging,A, '', '')) ;

command(68,top_SET_TRACE(A),[68,69,70,65,85,76,84], '(<CR>)', 'sets priority to default trace mode',call(trace_on([]),A, '', '[ trace on (default trace mode). ]')) ;

command(68,top_SET(A),[68,69,70,65,85,76,84], '(ITEM)', 'sets default value',top_SET_DEFAULT(A)) ;

command(68,top_INFORMATION(A),[68,69,70,65,85,76,84], '(ITEM)', ['provides information about default',{nl},{space(18)},'value'],top_INFORMATION_DEFAULT(A)) ;

command(68,top(A),[68,69,76,69,84,69], '(ID)', 'deletes data',top_DELETE(A)) ;

command(68,top_LIST_RULES(A),[68,69,76,69,84,69,68], '(<CR>)', 'displays deleted rules',call(list_state(rules,deleted,normal),A, '<< rules listing (deleted data) >>', '')) ;

command(68,top_LIST_EQUATIONS(A),[68,69,76,69,84,69,68], '(<CR>)', 'displays deleted equations',call(list_state(equations,deleted,normal),A, '<< equations listing (deleted data) >>', '')) ;

command(68,top_LIST(A),[68,69,76,69,84,69,68], '(<CR>)', 'displays deleted data',call(list_state(data,deleted,normal),A, '<< state listing (deleted data ) >>', '')) ;

command(68,top_LIST_EQUATIONS(A),[68,73,82,69,67,84,73,79,78], '(<CR>)', 'with direction information',call(list_state(equations,existing,direction),A, '<< equations listing (with direction) >>', '')) ;

command(68,top_LIST(A),[68,73,82,69,67,84,73,79,78], '(<CR>)', ['displays all with direction',{nl},{space(18)},'infomation'],call(list_state(data,existing,direction),A, '<< equations listing (with direction) >>', '')) ;


command(68,top_SET_node_ALL_S(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets all (default) node', call(set(distribution(2,15,3)),A, '','[ all (default) node on. ]') ) ;

command(var,top_SET_node_ALL_S(A),'VAR'(B,C,c_node(0,B),[115,116,97,114,116,32,110,111,100,101]), '(NUMBER or <CR>)', '', 'top_SET_node_ALL_S_E'(A,C)) ;

command(var,top_SET_node_ALL_S_E(A,B),'VAR'(C,D,c_node(B,C),[101,110,100,32,110,111,100,101]), '(NUMBER  or <CR>)', '', 'top_SET_node_ALL_S_E_B'(A,B,D)) ;

command(var,top_SET_node_ALL_S_E_B(A,B,C),'VAR'(D,E,c_value(0,D,'*'),[98,111,116,116,111,109,32,108,105,110,101]), '(NUMBER  or <CR>)', '', call(set(distribution(B,C,E)),A, '','[ all node on. ]') ) ;

command(68,top_SET_node_CPC_S(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets superposible (default) node', call(set(on('{CPC}cpc_node'(2,15,3))),A, '','[ superposible (default) node on. ]') ) ;

command(var,top_SET_node_CPC_S(A),'VAR'(B,C,c_node(0,B),[115,116,97,114,116,32,110,111,100,101]), '(NUMBER or <CR>)', '', 'top_SET_node_CPC_S_E'(A,C)) ;

command(var,top_SET_node_CPC_S_E(A,B),'VAR'(C,D,c_node(B,C),[101,110,100,32,110,111,100,101]), '(NUMBER  or <CR>)', '', 'top_SET_node_CPC_S_E_B'(A,B,D)) ;

command(var,top_SET_node_CPC_S_E_B(A,B,C),'VAR'(D,E,c_value(0,D,'*'),[98,111,116,116,111,109,32,108,105,110,101]), '(NUMBER  or <CR>)', '', call(set(on( '{CPC}cpc_node'(B,C,E))),A, '','[ superposible node on. ]') ) ;

command(68,top_SET_node_EQUATIONS_S(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets reduced equations (default) node', call(set(on('{CPC}reduceE_node'(2,15,3))),A, '','[ reduced equations (default) node on. ]') ) ;

command(var,top_SET_node_EQUATIONS_S(A),'VAR'(B,C,c_node(0,B),[115,116,97,114,116,32,110,111,100,101]), '(NUMBER or <CR>)', '', 'top_SET_node_EQUATIONS_S_E'(A,C)) ;

command(var,top_SET_node_EQUATIONS_S_E(A,B),'VAR'(C,D,c_node(B,C),[101,110,100,32,110,111,100,101]), '(NUMBER  or <CR>)', '', 'top_SET_node_EQUATIONS_S_E_B'(A,B,D)) ;

command(var,top_SET_node_EQUATIONS_S_E_B(A,B,C),'VAR'(D,E,c_value(0,D,'*'),[98,111,116,116,111,109,32,108,105,110,101]), '(NUMBER  or <CR>)', '', call(set(on('{CPC}reduceE_node'(B,C,E))),A, '','[ reduce equations node on. ]') ) ;

command(68,top_SET_node_RULES_S(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets reduced rules (default) node', call(set(on('{CPC}reduceR_node'(2,15,3))),A, '','[ reduced rules (default) node on. ]') ) ;

command(var,top_SET_node_RULES_S(A),'VAR'(B,C,c_node(0,B),[115,116,97,114,116,32,110,111,100,101]), '(NUMBER or <CR>)', '', 'top_SET_node_RULES_S_E'(A,C)) ;

command(var,top_SET_node_RULES_S_E(A,B),'VAR'(C,D,c_node(B,C),[101,110,100,32,110,111,100,101]), '(NUMBER  or <CR>)', '', 'top_SET_node_RULES_S_E_B'(A,B,D)) ;

command(var,top_SET_node_RULES_S_E_B(A,B,C),'VAR'(D,E,c_value(0,D,'*'),[98,111,116,116,111,109,32,108,105,110,101]), '(NUMBER  or <CR>)', '', call(set(on('{CPC}reduceR_node'(B,C,E))),A, '','[ reduce rules node on. ]') ) ;

command(68,top_SET_node_REPLACE_S(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets replace constructors (default) node', call(set(on('{CPC}replace_node'(2,15,3))),A, '','[ replace constructors (default) node on. ]') ) ;

command(var,top_SET_node_REPLACE_S(A),'VAR'(B,C,c_node(0,B),[115,116,97,114,116,32,110,111,100,101]), '(NUMBER or <CR>)', '', 'top_SET_node_REPLACE_S_E'(A,C)) ;

command(var,top_SET_node_REPLACE_S_E(A,B),'VAR'(C,D,c_node(B,C),[101,110,100,32,110,111,100,101]), '(NUMBER  or <CR>)', '', 'top_SET_node_REPLACE_S_E_B'(A,B,D)) ;

command(var,top_SET_node_REPLACE_S_E_B(A,B,C),'VAR'(D,E,c_value(0,D,'*'),[98,111,116,116,111,109,32,108,105,110,101]), '(NUMBER  or <CR>)', '', call(set(on('{CPC}replace_node'(B,C,E))),A, '','[ replace constructors node on. ]') ) ;

command(68,top_SET_node_INDUCTION_S(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets induction (default) node', call(set(on('{CPC}induction_node'(2,15,3))),A, '','[ induction (default) node on. ]') ) ;

command(var,top_SET_node_INDUCTION_S(A),'VAR'(B,C,c_node(0,B),[115,116,97,114,116,32,110,111,100,101]), '(NUMBER or <CR>)', '', 'top_SET_node_INDUCTION_S_E'(A,C)) ;

command(var,top_SET_node_INDUCTION_S_E(A,B),'VAR'(C,D,c_node(B,C),[101,110,100,32,110,111,100,101]), '(NUMBER  or <CR>)', '', 'top_SET_node_INDUCTION_S_E_B'(A,B,D)) ;

command(var,top_SET_node_INDUCTION_S_E_B(A,B,C),'VAR'(D,E,c_value(0,D,'*'),[98,111,116,116,111,109,32,108,105,110,101]), '(NUMBER  or <CR>)', '', call(set(on('{CPC}induction_node'(B,C,E))),A, '','[ induction node on. ]') ) ;

command(68,top_SET_node_SUBSUME(A),[68,69,70,65,85,76,84],'(NUMBER or <CR>)', 'sets subsumed equations (default) node', call(set(on('{CPC}subsume_node'(1))),A, '','[ subsumed equstions (default) node on. ]') ) ;

command(var,top_SET_node_SUBSUME(A),'VAR'(B,C,c_node(0,B),[110,111,100,101,32,110,117,109,98,101,114]), '(NUMBER  or <CR>)', '', call(set(on('{CPC}subsume_node'(C))),A, '','[ subsumed equations node on. ]') ) ;

command(68,top_SET(A),[68,73,82,69,67,84,79,82,89],'(<CR>)', 'sets directory',top_SET_directory(A)) ;

command(var,top_SET_directory(A),'VAR'(B,C,c_directory(B),[100,114,101,99,116,111,114,121,32,110,97,109,101]), '(DIRECTORY NAME or <CR>)', '',call(set(current_directory(C)),A, '','' )) ;


command(68,top_SET_GRAPH_MARGIN(A),[68,69,70,65,85,76,84], '(NUMBER or <CR>)', 'sets graph margin to default options', call(set(graph_option(margin([]))),A, '','[ set graph margin (default options).]')) ;

command(var,top_SET_GRAPH_MARGIN(A),'VAR'(B,C,c_value(60,B,200),[109,97,114,103,105,110]), '(NUMBER or <CR>)', 'sets graph margin options', call(set(graph_option(margin(C))),A, '','[ set graph margin options.]')) ;

command(68,top_SET_GRAPH_Xaxis(A),[68,69,70,65,85,76,84], '(NUMBER or <CR>)', 'sets graph X-axis default options', call(set(graph_option('X-axis'([]))),A, '','[ set graph X-axis (default options).]')) ;

command(var,top_SET_GRAPH_Xaxis(A),'VAR'(B,C,c_integer(B),[109,105,110]), '(NUMBER or <CR>)', 'sets graph X-axis min options',top_SET_GRAPH_Xaxis_MIN(A,C)) ;

command(68,top_SET_GRAPH_Yaxis(A),[68,69,70,65,85,76,84], '(NUMBER or <CR>)', 'sets graph Y-axis default options', call(set(graph_option('Y-axis'([]))),A, '','[ set graph Y-axis (default options).]')) ;

command(var,top_SET_GRAPH_Yaxis(A),'VAR'(B,C,c_integer(B),[109,105,110]), '(NUMBER or <CR>)', 'sets graph Y-axis min options',top_SET_GRAPH_Yaxis_MIN(A,C)) ;

command(var,top_SET_GRAPH_Xaxis_MIN(A,B),'VAR'(C,D,c_less(B,C),[109,97,120]), '(NUMBER or <CR>)', 'sets graph X-axis max options',top_SET_GRAPH_Xaxis_MIN_MAX(A,B,D)) ;

command(var,top_SET_GRAPH_Yaxis_MIN(A,B),'VAR'(C,D,c_less(B,C),[109,97,120]), '(NUMBER or <CR>)', 'sets graph Y-axis max options',top_SET_GRAPH_Yaxis_MIN_MAX(A,B,D)) ;

command(var,top_SET_GRAPH_Xaxis_MIN_MAX(A,B,C),'VAR'(D,E,c_not_less(C,D),[105,110,116,101,114,118,97,108,101]), '(NUMBER or <CR>)', 'sets graph X-axis intervale options', top_SET_GRAPH_Xaxis_MIN_MAX_INTERVALE(A,B,C,E));

command(var,top_SET_GRAPH_Yaxis_MIN_MAX(A,B,C),'VAR'(D,E,c_not_less(C,D),[105,110,116,101,114,118,97,108,101]), '(NUMBER or <CR>)', 'sets graph Y-axis intervale options', top_SET_GRAPH_Yaxis_MIN_MAX_INTERVALE(A,B,C,E));
command(var,top_SET_GRAPH_Xaxis_MIN_MAX_INTERVALE(A,B,C,D),'VAR'(E,F,c_value(10,E,100),[115,99,114,111,108,108]), '(NUMBER or <CR>)','sets graph X-axis scroll options', call(set(graph_option('X-axis'((B,C,D,F)))),A, '','[ set graph X-axis options.]')) ;

command(var,top_SET_GRAPH_Yaxis_MIN_MAX_INTERVALE(A,B,C,D),'VAR'(E,F,c_value(10,E,100),[115,99,114,111,108,108]), '(NUMBER or <CR>)','sets graph X-axis scroll options', call(set(graph_option('Y-axis'((B,C,D,F)))),A, '','[ set graph Y-axis options.]')) ;

command(69,top(A),[69,78,68,95,79,70,95,70,73,76,69], '', '$SILENT',call(exit_command_file,A, '', '')):-cpc_mode(A) ;

command(69,top( 'METIS'),[69,78,68,95,79,70,95,70,73,76,69], '', '$SILENT',call(exit_command_file, 'METIS', '', '')) ;

command(69, 'top_WRITE_file name'(A,B,C),[69,81,85,65,73,79,78,83], '(<CR>)', 'writes the equations to a file',call(write_to_file(equations,C),A, '<< write equations to a file >>', '')) ;

command(69, 'top_SET_MONITOR_list'(A),[69,81,85,65,84,73,79,78,83], '(<CR>)', 'monitors equations',call(set(on( '{FLG}monitor'(list,equations))),A, '', '[ monitor list equations on. ]')) ;

command(69, 'top_SET_MONITOR_graph'(A),[69,81,85,65,84,73,79,78,83], '(<CR>)', 'monitors equations',call(set(on( '{FLG}monitor'(graph,equations))),A, '', '[ monitor graph equations on. ]')) ;

command(69, 'top_SET_MONITOR_all'(A),[69,81,85,65,84,73,79,78,83], '(<CR>)', 'monitors equations',call(set(on( '{FLG}monitor'(all,equations))),A, '', '[ monitor all equations on. ]')) ;

command(69,top_REDUCE(A),[69,81,85,65,84,73,79,78,83], '(<CR>)', 'reduces equations',call(reduce_EQs(ss),A, '<< reduce equations >>', '')) ;

command(69,top_LIST(A),[69,81,85,65,84,73,79,78,83], '(FORMAT or <CR>)', 'displays the equations',top_LIST_EQUATIONS(A)) ;

command(69,top_INITIALIZE(A),[69,81,85,65,84,73,79,78,83], '(<CR>)', 'initializes the equations',call(init(equations),A, '', '[ equations initialized ]')) ;

command(var,top_SELECT(A), 'VAR'(B,B,c_exist(equations,existing,B),[101,113,117,97,116,105,111,110,115,32,105,100]), '(<CR>)', 'selects by the equation ID',call(select_EQ(B),A, '<< select formula >>', '')):-cpc_mode(A) ;

command(var,top_UNDELETE(A), 'VAR'(B,B,c_exist(equations,deleted,B),[101,113,117,97,116,105,111,110,95,105,100]), '(<CR>)', ['undeletes equations',{nl},{space(18)},'(* is wildcard character)'],call(undelete(equations,ambiguous(B)),A, '', '')) ;

command(var,top_SUGGESTION(A), 'VAR'(B,B,c_exist(equations,existing,B),[101,113,117,97,116,105,111,110,95,105,100]), '(<CR>)', 'gives suggestion for the equation',call(suggestion_ordering(B,suggest),A, '<< suggestion for the equation >>', '')) ;

command(var,top_SHOW(A), 'VAR'(B,B,c_exist(equations,all,B),[101,113,117,97,116,105,111,110,95,105,100]), '(<CR>)', 'shows origin of the equation',call(show_path(B),A, '<< show origin (equation) >>', '')) ;

command(var,top_ORIENT(A), 'VAR'(B,B,c_exist(equations,existing,B),[101,113,117,97,116,105,111,110,95,105,100]), '(<CR>)', 'orients the equation',call(suggestion_ordering(B,orient),A, '<< orient the equation >>', '')) ;

command(var,top_DELETE(A), 'VAR'(B,B,c_exist(equations,existing,B),[101,113,117,97,116,105,111,110,95,105,100]), '(<CR>)', ['deletes equations',{nl},{space(18)},'(* is wildcard character)'],call(delete(equations,ambiguous(B)),A, '', '')) ;

command(var,top_CONVERT( 'METIS'), 'VAR'(A,A,c_exist(equations,existing,A),[101,113,117,97,116,105,111,110,95,105,100]), '(BY)', ['converts equations to rules',{nl},{space(18)},'(* is wildcard character)'],top_CONVERT_equation_id( 'METIS',A)) ;

command(69,top(A),[69,88,73,84], '(<CR>)', 'exits from the KB mode',call(true,exit, '',[ '[ exit ',A, ' ]'])):-cpc_mode(A) ;

command(69,top(A),[69,88,80,85,78,71,69], '(<CR>)', 'removes deleted data',call([abolish('{HIS}',1),trimcore],A, '', ''))  :- top_mode(A) ;

command(var,top_WRITE(A), 'VAR'(B,C,write_file_open(B,C),[102,105,108,101,32,110,97,109,101]), '(ITEM or FROM or <CR>)', 'to be written', 'top_WRITE_file name'(A,B,C)) ;

command(var,top_GENERATE_KL1(A), 'VAR'(B,C,can_file_open(write,B,io,kl1,C),[102,105,108,101,32,110,97,109,101]), '(<CR>)', 'file name',call(translate(C,kl1),A, '<< generate KL1 code >>', '[ KL1 code generated ]')) ;

command(var,top_GENERATE_MENDEL(A), 'VAR'(B,C,can_file_open(write,B,io,mdl,C),[102,105,108,101,32,110,97,109,101]), '(<CR>)', 'file name',call(translate(C,mendel),A, '<< generate MENDEL code >>', '[ MENDEL code generated ]')) ;

command(var,top_GENERATE_PROLOG(A), 'VAR'(B,C,can_file_open(write,B,io,pl,C),[102,105,108,101,32,110,97,109,101]), '(<CR>)', 'file name',call(translate(C,prolog),A, '<< generate PROLOG code >>', '[ PROLOG code generated ]')) ;

command(var,top_SAVE(A), 'VAR'(B,C,can_file_open(write,B,io, 'SAV',C),[102,105,108,101,32,110,97,109,101]), '(<CR>)', 'file name',call(data_save(C),A, '<< save the current status to a file >>', '[ save complete ]')) ;

command(var,top_RESTORE(A), 'VAR'(B,C,can_file_open(read,B,io,[ 'SAV', ''],C),[102,105,108,101,32,110,97,109,101]), '(<CR>)', 'file name',call(data_restore(C),cont, '<< restore the previous status from a file >>', '[ restore complete ]')) ;

command(var,top_COMMANDFILE(A), 'VAR'(B,C,command_file_open(B,C),[102,105,108,101,32,110,97,109,101]), '(MODE or <CR>)', 'to be executed', 'top_COMMANDFILE_file name'(A,B,C)) ;

command(var,top_READ( 'METIS'), 'VAR'(A,B,read_file_open(A,B),[102,105,108,101,32,110,97,109,101]), '(MODE or <CR>)', 'to be read', 'top_READ_file name'( 'METIS',A,B)) ;

command(var,top_READ( 'MPSI'), 'VAR'(A,B,read_file_open(A,B),[102,105,108,101,32,110,97,109,101]), '(MODE or <CR>)', 'to be read', 'top_READ_file name'( 'MPSI',A,B)) ;

command(69,top_SET_node(A),[69,81,85,65,84,73,79,78,83],'(NUMBER or <CR>)', 'sets reduced equations node',top_SET_node_EQUATIONS_S(A)) ;

command(69,top('MPSI'),[69,88,73,84], '(<CR>)', 'exits from the MPSI mode',call(true,exit, '',[ '[ exit "MPSI" . ]']));

command(70,top_INFORMATION(A),[70,73,76,69,83], '(<CR>)', ['provides information about current',{nl},{space(18)},'files'],call(inform(files),A, '', '')) ;

command(70,top_SET_DEFAULT_OPERATOR(A),[70,73,88,69,68], '(ORDERING)', 'sets fixed arity',top_SET_DEFAULT_OPERATOR_FIXED(A)) ;

command(70,top_NEW(A),[70,85,78,67,84,73,79,78], '(<CR>)', 'introduces a new function symbol',call(introduce_new_function,A, '<< introduce a new function >>', '')):-cpc_mode(A) ;

command(71,top_SET_MONITOR(A),[71,82,65,80,72], '(ITEM or <CR>)', 'to display', 'top_SET_MONITOR_graph'(A)) ;

command(71,top(A),[71,69,78,69,82,65,84,69], '(FILE NAME)', 'generates program code',top_GENERATE(A)) ;

command(71,top(A),[71,79], '(<CR>)', 'executes the next one step',call(cpc_continue(B,interactive,C),C, '', '')):-cpc_mode_and_id(A,B) ;

command(71,top_SET(A),[71,82,65,80,72], '(OPTION or <CR>)', 'sets graph options',top_SET_GRAPH(A)) ;

command(72,top_SET(A),[72,69,65,68,69,82], '(<CR>)', 'reprint header',call(print_header,A, '', '[ header is reprinted. ]')) ;

command(72,top(A),[72,69,76,80], '(<CR>)', 'gives you some information',call(help,A, '<< help >>', '')) ;

command(72, top_WINDOW(A),[72,73,68,69], '(<CR>)', 'hide the window',call(window_control(hide),A, '<< hide the window >>', '')) ;

command(72, 'top_WRITE_file name'(A,B,C),[72,73,83,84,79,82,73,69,83], '(<CR>)', 'writes the histories to a file',call(write_to_file(histories,C),A, '<< write histories to a file >>', '')) ;

command(72,top_LIST_RULES(A),[72,73,83,84,79,82,73,69,83], '(FORMAT or <CR>)', 'displays history',call(list_state(rules,all,normal),A, '<< rules listing (history) >>', '')) ;

command(72,top_LIST_EQUATIONS(A),[72,73,83,84,79,82,73,69,83], '(FORMAT or <CR>)', 'displays history',call(list_state(equations,all,normal),A, '<< equations listing (history) >>', '')) ;

command(72,top_LIST(A),[72,73,83,84,79,82,73,69,83], '(FORMAT or <CR>)', 'displays history',call(list_state(data,all,normal),A, '<< state listing (history) >>', '')) ;

command(72,top_SET(A),[72,73,83,84,79,82,89], '(<CR>)', 'sets history flag',call(set(on( '{FLG}history')),A, '', '[ history on. ]')) ;

command(72,top_SET_NO(A),[72,73,83,84,79,82,89], '(<CR>)', 'resets history flag',call(set(off( '{FLG}history')),A, '', '[ history off. ]')) ;

command(72,top_INFORMATION(A),[72,73,83,84,79,82,89], '(<CR>)', ['provides information about history',{nl},{space(18)},'flag'],call(inform(flag( '{FLG}history')),A, '', '')) ;

command(73,top_PROVE( 'METIS'),[73,78,68,85,67,84,73,79,78], '(<CR>)', ['proves formulas by inductionless',{nl},{space(18)},'induction'],call(prove_formulas(ii,A),A, '<< prove formulas by inductionless induction >>', '')) ;

command(73,top( 'METIS'),[73,78,68,85,67,84,73,79,78], '(EXE MODE or <CR>)', 'starts inductionless induction',top_INDUCTION( 'METIS')) ;

command(73,top_DELETE(A),[73,78,69,81,85,65,84,73,79,78,83], '(<CR>)', 'deletes inequations and inrules',call(delete_INEQs,A, '', '')) ;

command(73,top(A),[73,78,70,79,82,77,65,84,73,79,78], '(ABOUT)', 'provides information about system',top_INFORMATION(A)) ;

command(73,top(A),[73,78,73,84,73,65,76,73,90,69], '(ITEM or <CR>)', 'initializes the system',top_INITIALIZE(A)) ;

command(73, 'top_READ_file name'( 'METIS',A,B),[73,78,73,84,73,65,76,73,90,69], '(<CR>)', 'inserts data to a new system',call(read_from_file(B), 'METIS', '<< read data from a file >>', '')) ;

command(var,top_SET_TRACE(A), 'VAR'(B,B,c_value(0,B,9),[105,110,116,101,103,101,114,32,102,114,111,109,32,48,32,116,111,32,57]), '(<CR>)', 'sets priority',call(trace_on([B]),A, '',[ '[ trace on (trace mode is "',B, '"). ]'])) ;

command(var,top_SET_DEFAULT_TRACE(A), 'VAR'(B,B,c_value(0,B,9),[105,110,116,101,103,101,114,32,102,114,111,109,32,48,32,116,111,32,57]), '(<CR>)', 'default trace mode value',call(set(default(trace(B))),A, '',[ '[ set default trace mode to "',B, '" . ]'])) ;

command(73,top_REDUCE(A),[73,78,84,69,82,65,67,84,73,86,69], '(<CR>)', 'reduces terms in interactive mode',call(term_rewrite(interactive),A, '<< reduce a term (in interactive mode) >>', '')) ;

command(73,top_SSTRATEGY( 'METIS'),[73,78,84,69,82,65,67,84,73,86,69], '(<CR>)', ['executes the S-strategy in',{nl},{space(18)},'interactive mode'],call(cpc_start(ss,interactive,A),A, '<< S-strategy (interactive execution) >>', '')) ;

command(73,top_KB( 'METIS'),[73,78,84,69,82,65,67,84,73,86,69], '(<CR>)', 'executes the KB in interactive mode',call(cpc_start(kb,interactive,A),A, '<< Knuth - Bendix (interactive execution) >>', '')) ;

command(73,top_INDUCTION( 'METIS'),[73,78,84,69,82,65,67,84,73,86,69], '(<CR>)', ['executes the inductionless induction ',{nl},{space(18)},'in interactive mode'],call(cpc_start(ii,interactive,A),A, '<< inductionless induction (interactive execution) >>', '')) ;

command(73,top( 'MPSI'),[73,78,68,85,67,84,73,79,78], '(EXE MODE or <CR>)', 'starts inductionless induction',top_INDUCTION( 'MPSI')) ;

command(73, 'top_READ_file name'( 'MPSI',A,B),[73,78,73,84,73,65,76,73,90,69], '(<CR>)', 'inserts data to a new system',call(read_from_file(B), 'MPSI', '<< read data from a file >>', '')) ;

command(73,top_KB( 'MPSI'),[73,78,84,69,82,65,67,84,73,86,69], '(<CR>)', 'executes the KB in interactive mode',call(cpc_start(kb,interactive,'??'),A, '<< Knuth - Bendix (interactive execution) >>', '')) ;

command(73,top_INDUCTION( 'MPSI'),[73,78,84,69,82,65,67,84,73,86,69], '(<CR>)', ['executes the inductionless induction ',{nl},{space(18)},'in interactive mode'],call(cpc_start(ii,interactive,A),A, '<< inductionless induction (interactive execution) >>', '')) ;

command(73,top_SET_node(A),[73,78,68,85,67,84,73,79,78],'(ITEM)', 'sets induction node',top_SET_node_INDUCTION_S(A)) ;

command(73,top_PROVE('MPSI'),[73,78,68,85,67,84,73,79,78], '(<CR>)', ['proves formulas by inductionless',{nl},{space(18)},'induction'],call(prove_formulas(ii,'??'),A, '<< prove formulas by inductionless induction >>', '')) ;

command(73,top_SET_GRAPH(A),[73,78,73,84,73,65,76,73,90,69], '(OPTION or <CR>)', 'sets graph initialize options', call(set(graph_option(initialize)),A, '','[ set graph initialized. ]')) ;

command(75,top_SET_DEFAULT_OPERATOR_VARYADIC(A),[75,65,67,72,73,78,85,75,73], '(DIRECTION)', 'sets kachinuki ordering',top_SET_DEFAULT_OPERATOR_VARYADIC_KACHINUKI(A)) ;

command(75,top( 'METIS'),[75,66], '(EXE MODE or <CR>)', 'starts Knuth-Bendix procedure',top_KB( 'METIS')) ;

command(75,top( 'MPSI'),[75,66], '(EXE MODE or <CR>)', 'starts Knuth-Bendix procedure',top_KB( 'MPSI')) ;

command(75,top_GENERATE(A),[75,76,49], '(FILE NAME)', 'generates KL1 code',top_GENERATE_KL1(A)) ;

command(76,top_SET_DEFAULT_OPERATOR_VARYADIC_LEXICOGRAPHIC(A),[76,69,70,84,95,84,79,95,82,73,71,72,84], '(<CR>)', ['sets left to right',{nl},{space(26)},'lexicographic ordering'],call(set(default(op(B,varyadic,lex, 'L'))),A, '', '')) ;

command(76,top_SET_DEFAULT_OPERATOR_VARYADIC_KACHINUKI(A),[76,69,70,84,95,84,79,95,82,73,71,72,84], '(<CR>)', 'sets left to right kachinuki ordering',call(set(default(op(B,varyadic,kac, 'L'))),A, '', '')) ;

command(76,top_SET_DEFAULT_OPERATOR_FIXED_LEXICOGRAPHIC(A),[76,69,70,84,95,84,79,95,82,73,71,72,84], '(<CR>)', ['sets left to right',{nl},{space(18)},'lexicographic ordering'],call(set(default(op(B,fixed,lex, 'L'))),A, '', '')) ;

command(76,top_CONVERT_rule_id( 'METIS',A),[76,69,70,84,95,84,79,95,82,73,71,72,84], '(<CR>)', 'converts rules left to right',call(convert(rules,ambiguous(A),left), 'METIS', '', '')) ;

command(76,top_CONVERT_equation_id( 'METIS',A),[76,69,70,84,95,84,79,95,82,73,71,72,84], '(<CR>)', 'orients equations left to right',call(convert(equations,ambiguous(A),left), 'METIS', '', '')) ;

command(76,top_NEW(A),[76,69,77,77,65], '(<CR>)', 'introduces a new lemma',call(introduce_new_lemma(A),A, '<< introduce a new lemma >>', '')):-cpc_mode(A) ;

command(76,top_SET_DEFAULT_OPERATOR_VARYADIC(A),[76,69,88,73,67,79,71,82,65,80,72,73,67], '(DIRECTION)', 'sets lexicographic ordering',top_SET_DEFAULT_OPERATOR_VARYADIC_LEXICOGRAPHIC(A)) ;

command(76,top_SET_DEFAULT_OPERATOR_FIXED(A),[76,69,88,73,67,79,71,82,65,80,72,73,67], '(DIRECTION)', 'sets lexicographic ordering',top_SET_DEFAULT_OPERATOR_FIXED_LEXICOGRAPHIC(A)) ;

command(76,top_SET_MONITOR(A),[76,73,83,84], '(ITEM or <CR>)', 'to display', 'top_SET_MONITOR_list'(A)) ;

command(76,top_NARROWING(A),[76,73,83,84], '(<CR>)', 'displays narrowed inequations',call(find_narrowed_INEQs(refer,B,C),A, '<< list narrowed inequations >>',[ '[ ',B, ' narrowed inequations are listed. ]'])) ;

command(76,top(A),[76,73,83,84], '(ITEM or FORMAT or <CR>)', 'displays the current status',top_LIST(A)) ;

command(76,top_CRITICALPAIRS(A),[76,73,83,84], '(<CR>)', 'displays divergentr critical pairs',call(find_CPs(ss,refer,B,C),A, '<< list divergent critical pairs >>',[ '[ ','??', ' criticalpairs (','??', ' divergent ones) are listed. ]'])) ;

command(76,top_SET(A),[76,79,71,71,73,78,71], '(<CR>)', 'sets logging flag',call(set(on( '{FLG}log')),A, '', '[ logging on. ]')) ;

command(76,top_SET_NO(A),[76,79,71,71,73,78,71], '(<CR>)', 'resets logging flag',call(set(off( '{FLG}log')),A, '', '[ logging off. ]')) ;

command(76,top_INFORMATION(A),[76,79,71,71,73,78,71], '(<CR>)', ['provides information about logging',{nl},{space(18)},'flag'],call(inform(flag( '{FLG}log')),A, '', '')) ;

command(77,top_GENERATE(A),[77,69,78,68,69,76], '(FILE NAME)', 'generates MENDEL code',top_GENERATE_MENDEL(A)) ;

command(77,top_SELECT(A),[77,69,78,85], '(<CR>)', 'selects by the menu',call(select_EQ(B),A, '<< select formula (by the menu)>>', '')):-cpc_mode(A) ;

command(77,top_INITIALIZE(A),[77,69,84,73,83], '(<CR>)', 'initializes the Metis',call(init(metis),A, '<< reinitialize the system >>', '')) ;

command(77,top_SELECT(A),[77,73,78,73,77,85,77], '(<CR>)', 'selects the minimum formula',call(select_min_EQ,A, '<< select the minimum formula >>', '')):-cpc_mode(A) ;

command(77,top_SET(A),[77,79,78,73,84,79,82], '(LINESIZE or <CR>)', 'sets monitor flag',top_SET_MONITOR(A)) ;

command(77,top_SET_NO(A),[77,79,78,73,84,79,82], '(<CR>)', 'resets monitor flag',call(set(off( '{FLG}monitor'('B','C'))),A, '', '[ monitor off. ]')) ;

command(77,top_INFORMATION(A),[77,79,78,73,84,79,82], '(<CR>)', ['provides information about monitor',{nl},{space(18)},'flag'],call(inform(flag( '{FLG}monitor'(B,C))),A, '', '')) ;

command(77,top_SET_TERMINAL(A),[77,85,70], '(<CR>)', 'sets type for MUF control',call(set(terminal(muf)),A, '', '[ new terminal type for MUF. ]')) ;

command(77,top_SET_DEFAULT_OPERATOR_VARYADIC(A),[77,85,76,84,73,83,69,84], '(<CR>)', 'sets multiset ordering',call(set(default(op(B,varyadic,mul,[]))),A, '', '')) ;

command(77,top_SET_DEFAULT_OPERATOR_FIXED(A),[77,85,76,84,73,83,69,84], '(<CR>)', 'sets multiset ordering',call(set(default(op(B,fixed,mul,[]))),A, '', '')) ;

command(77,top_SET_GRAPH(A),[77,65,82,71,73,78], '(OPTION or <CR>)', 'sets graph margin options',top_SET_GRAPH_MARGIN(A)) ;

command(77,top_SET('METIS'),[77,80,83,73],'(<CR>)', 'sets command mode to MPSI',call(set(mpsi),'MPSI', '', '[ set command mode "MPSI" . ]')) ;

command(78,top(A),[78,65,82,82,79,87,73,78,71], '(Mode or <CR>)', 'gets narrowed inequations',top_NARROWING(A)) ;

command(78,top(A),[78,69,87], '(ITEM or <CR>)', 'introduces a new symbol or ordering',top_NEW(A)):-cpc_mode(A) ;

command(78,top_SELECT(A),[78,69,88,84], '(<CR>)', 'selects the next formula',call(try_next_EQ,A, '<< select the next formula >>', '')):-cpc_mode(A) ;

command(78,top_SET(A),[78,79], '(RESET ITEM)', 'resets the characteristics',top_SET_NO(A)) ;

command(78, 'top_COMMANDFILE_file name'(A,B,C),[78,79,67,79,80,89], '(<CR>)', 'nodisplays an execution',call(exe_command_file(C,nolist),A, '<< command file execution (nocopy mode) >>', '')) ;

command(78, 'top_WRITE_file name'(A,B,C),[78,79,72,73,83,84,79,82,73,69,83], '(<CR>)', ['writes all data except',{nl},{space(24)},'histories'],call(write_to_file(all_but_histories,C),A, '<< write all but histories to a file >>', '')) ;

command(78,top_CONVERT( 'METIS'),[78,79,78,95,84,69,82,77,73,78,65,84,73,78,71], '(<CR>)', ['converts not oriented rules',{nl},{space(27)},' to equations'],call(convert_no_terminating, 'METIS', '', '')) ;

command(78,top_LIST_RULES(A),[78,79,82,77,65,76], '(<CR>)', 'in normal format',call(list_state(rules,existing,normal),A, '<< rules listing >>', '')) ;

command(78,top_LIST_EQUATIONS(A),[78,79,82,77,65,76], '(<CR>)', 'in normal format',call(list_state(equations,existing,normal),A, '<< equations listing >>', '')) ;

command(78,top_SET_GRAPH_VIEW(A),[78,79,82,77,65,76], '(OPTION or <CR>)', 'sets graph normal mode', call(set(graph_option(view(normal))),A, '','[ set graph nomal mode. ]')) ;

command(79,top_SET_DEFAULT(A),[79,80,69,82,65,84,79,82], '(ARITY)', ['sets default',{nl},{space(18)},'operator information'],top_SET_DEFAULT_OPERATOR(A)) ;

command(79,top_INFORMATION_DEFAULT(A),[79,80,69,82,65,84,79,82], '(<CR>)', ['provides information about default',{nl},{space(18)},'operator'],call(inform(default(operator(B,C,D,E))),A, '', '')) ;

command(79, 'top_WRITE_file name'(A,B,C),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'writes the operators to a file',call(write_to_file(operators,C),A, '<< write operators to a file >>', '')) ;

command(79,top_UNDELETE_operator_symbol(A,B),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'undeletes operator information',call(undelete(operator_information,ambiguous(B)),A, '', '')) ;

command(79,top_UNCOMPILE(A),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'uncompiles the operators',call(uncmpl(operators),A, '<< uncompile operators >>', '')) ;

command(79,top_LIST(A),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'displays the operators',call(list_state(operators,existing,normal),A, '<< operators listing >>', '')) ;

command(79,top_INITIALIZE(A),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'initializes the operators',call(init(operators),A, '', '[ operators initialized ]')) ;

command(79,top_DELETE_operator_symbol(A,B),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'deletes operator information',call(delete(operator_information,ambiguous(B)),A, '', '')) ;

command(79,top_COMPILE(A),[79,80,69,82,65,84,79,82,83], '(<CR>)', 'compiles the operators',call(cmpl(operators),A, '<< compile operators >>', '')) ;

command(var,top_UNDELETE(A), 'VAR'(B,B,c_exist(operator_information,deleted,B),[111,112,101,114,97,116,111,114,95,115,121,109,98,111,108]), '(ITEM)', ['undeletes operators',{nl},{space(19)},' (* is wildcard character)'],top_UNDELETE_operator_symbol(A,B)) ;

command(var,top_DELETE(A), 'VAR'(B,B,c_exist(operator_information,existing,B),[111,112,101,114,97,116,111,114,95,115,121,109,98,111,108]), '(ITEM)', ['deletes operators',{nl},{space(19)},' (* is wildcard character)'],top_DELETE_operator_symbol(A,B)) ;

command(79,top_NEW(A),[79,82,68,69,82,73,78,71], '(<CR>)', 'introduces a new operator precedence',call(introduce_new_op_order,A, '<< introduce a new operator precedence >>', '')):-cpc_mode(A) ;

command(79, 'top_WRITE_file name'(A,B,C),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'writes the orderings to a file',call(write_to_file(orderings,C),A, '<< write orderings to a file >>', '')) ;

command(79,top_UNDELETE_operator_symbol(A,B),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'undeletes operator orderings',call(undelete(orderings,ambiguous(B)),A, '', '')) ;

command(79,top_UNCOMPILE(A),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'uncompiles the orderings',call(uncmpl(orderings),A, '<< uncompile orderings >>', '')) ;

command(79,top_LIST(A),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'displays the orderings',call(list_state(orderings,existing,normal),A, '<< orderings listing >>', '')) ;

command(79,top_INITIALIZE(A),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'initializes the orderings',call(init(orderings),A, '', '[ orderings initialized ]')) ;

command(79,top_DELETE_operator_symbol(A,B),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'deletes operator orderings',call(delete(orderings,ambiguous(B)),A, '', '')) ;

command(79,top_COMPILE(A),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'compiles the orderings',call(cmpl(orderings),A, '<< compile orderings >>', '')) ;

command(79,top_CONVERT_equation_id( 'METIS',A),[79,82,68,69,82,73,78,71,83], '(<CR>)', 'orients equations by the ordering',call(convert(equations,ambiguous(A),ordering), 'METIS', '', '')) ;

command(79,top(A),[79,82,73,69,78,84], '(FOR or <CR>)', 'orients the equations',top_ORIENT(A)) ;

command(79,top_SET_GRAPH_VIEW(A),[79,80,84,73,77,73,90,69], '(OPTION or <CR>)', 'sets graph optimize mode', call(set(graph_option(view(optimize))),A, '','[ set graph optimize mode. ]')) ;

command(80,top(A),[80,82,73,78,84], '(<CR>)', 'displays the current ruling formula',call(print_current_formula,A, '<< print the current ruling formula >>', '')):-cpc_mode(A) ;

command(80,top( 'METIS'),[80,82,79,86,69], '(By or <CR>)', 'proves formulas',top_PROVE( 'METIS')) ;

command(80,top_SET(A),[80,69,78,79,68,69],'(<CR>)', 'sets node',top_SET_node(A)) ;

command(80,top_GENERATE(A),[80,82,79,76,79,71], '(FILE NAME)', 'generates Prolog code',top_GENERATE_PROLOG(A)) ;

command(80,top('MPSI'),[80,82,79,86,69], '(By or <CR>)', 'proves formulas',top_PROVE('MPSI')) ;

command(81,top(A),[81,85,73,84], '(<CR>)', 'terminates the METIS',call(exit_Metis,B, '[ exit METIS ]', '')) ;

command(82,top( 'METIS'),[82,69,65,68], '(FILE NAME)', 'reads data from a file',top_READ( 'METIS')) ;

command(82,top(A),[82,69,68,85,67,69], '(MODE or <CR>)', 'reduces terms',top_REDUCE(A)) ;

command(82,top_PROVE( 'METIS'),[82,69,68,85,67,84,73,79,78], '(<CR>)', 'proves formulas by reduction',call(prove_formulas(reduction,A),A, '<< prove formulas by reduction >>', '')) ;

command(82,top(A),[82,69,80,76,65,67,69], '(<CR>)', 'decomposes constructor equations',call(replace_constructors(ii),A, '<< decompose constructor equations >>', '')) ;

command(82,top(A),[82,69,83,84,79,82,69], '(FILE NAME)', ['restores the previous status from a',{nl},{space(18)},'file'],top_RESTORE(A)) ;

command(82,top_SET_DEFAULT_OPERATOR_VARYADIC_LEXICOGRAPHIC(A),[82,73,71,72,84,95,84,79,95,76,69,70,84], '(<CR>)', ['sets right to left lexicographic',{nl},{space(18)},'ordering'],call(set(default(op(B,varyadic,lex, 'R'))),A, '', '')) ;

command(82,top_SET_DEFAULT_OPERATOR_VARYADIC_KACHINUKI(A),[82,73,71,72,84,95,84,79,95,76,69,70,84], '(<CR>)', 'sets right to left kachinuki ordering',call(set(default(op(B,varyadic,kac, 'R'))),A, '', '')) ;

command(82,top_SET_DEFAULT_OPERATOR_FIXED_LEXICOGRAPHIC(A),[82,73,71,72,84,95,84,79,95,76,69,70,84], '(<CR>)', ['sets right to left lexicographic',{nl},{space(18)},'ordering'],call(set(default(op(B,fixed,lex, 'R'))),A, '', '')) ;

command(82,top_CONVERT_rule_id( 'METIS',A),[82,73,71,72,84,95,84,79,95,76,69,70,84], '(<CR>)', 'converts rules right to left',call(convert(rules,ambiguous(A),right), 'METIS', '', '')) ;

command(82,top_CONVERT_equation_id( 'METIS',A),[82,73,71,72,84,95,84,79,95,76,69,70,84], '(<CR>)', 'orients equations right to left',call(convert(equations,ambiguous(A),right), 'METIS', '', '')) ;

command(82, 'top_WRITE_file name'(A,B,C),[82,85,76,69,83], '(<CR>)', 'writes the rules to a file',call(write_to_file(rules,C),A, '<< write rules to a file >>', '')) ;

command(82,top_UNCOMPILE(A),[82,85,76,69,83], '(<CR>)', 'uncompiles the rules',call(uncmpl(rules),A, '<< uncompile rules >>', '')) ;

command(82, 'top_SET_MONITOR_list'(A),[82,85,76,69,83], '(<CR>)', 'monitors rules',call(set(on( '{FLG}monitor'(list,rules))),A, '', '[ monitor list rules on. ]')) ;

command(82, 'top_SET_MONITOR_graph'(A),[82,85,76,69,83], '(<CR>)', 'monitors rules',call(set(on( '{FLG}monitor'(graph,rules))),A, '', '[ monitor graph rules on. ]')) ;

command(82, 'top_SET_MONITOR_all'(A),[82,85,76,69,83], '(<CR>)', 'monitors rules',call(set(on( '{FLG}monitor'(all,rules))),A, '', '[ monitor all rules on. ]')) ;

command(82,top_REDUCE(A),[82,85,76,69,83], '(<CR>)', 'reduces rules',call(reduce_RULs(ss),A, '<< reduce rules >>', '')) ;

command(82,top_LIST(A),[82,85,76,69,83], '(FORMAT or <CR>)', 'displays the rules',top_LIST_RULES(A)) ;

command(82,top_INITIALIZE(A),[82,85,76,69,83], '(<CR>)', 'initializes the rules',call(init(rules),A, '', '[ rules initialized ]')) ;

command(82,top_COMPILE(A),[82,85,76,69,83], '(<CR>)', 'compiles the rules',call(cmpl(rules),A, '<< compile rules >>', '')) ;

command(var,top_UNDELETE(A), 'VAR'(B,B,c_exist(rules,deleted,B),[114,117,108,101,95,105,100]), '(<CR>)', ['undeletes rules',{nl},{space(18)},'(* is wildcard character)'],call(undelete(rules,ambiguous(B)),A, '', '')) ;

command(var,top_SHOW(A), 'VAR'(B,B,c_exist(rules,all,B),[114,117,108,101,95,105,100]), '(<CR>)', 'shows origin of the rule',call(show_path(B),A, '<< show origin (rule) >>', '')) ;

command(var,top_DELETE(A), 'VAR'(B,B,c_exist(rules,existing,B),[114,117,108,101,95,105,100]), '(<CR>)', ['deletes rules',{nl},{space(18)},'(* is wildcard character)'],call(delete(rules,ambiguous(B)),A, '', '')) ;

command(var,top_CONVERT( 'METIS'), 'VAR'(A,A,c_exist(rules,existing,A),[114,117,108,101,95,105,100]), '(BY)', ['converts rules to equations',{nl},{space(18)},'(* is wildcard character)'],top_CONVERT_rule_id( 'METIS',A)) ;


command(82,top_SET(A),[82,69,83,84,82,73,67,84,69,68], '(<CR>)', 'sets restricted superposible flag',call(set(on( '{FLG}restricted')),A, '', '[ restricted superposible on. ]')) ;

command(82,top( 'MPSI'),[82,69,65,68], '(FILE NAME)', 'reads data from a file',top_READ( 'MPSI')) ;

command(82,top_SET_node(A),[82,69,80,76,65,67,69],'(ITEM)', 'sets replace constructors node',top_SET_node_REPLACE_S(A)) ;

command(82,top_SET_NO(A),[82,69,83,84,82,73,67,84,69,68], '(<CR>)', 'resets restricted superposible flag',call(set(off( '{FLG}restricted')),A, '', '[ restricted superposible off. ]')) ;

command(82,top_SET_node(A),[82,85,76,69,83],'(ITEM)', 'sets reduced rules node',top_SET_node_RULES_S(A)) ;

command(83,top(A),[83,65,86,69], '(FILE NAME)', 'saves the current status to a file',top_SAVE(A)) ;

command(83,top_INITIALIZE(A),[83,67,82,69,69,78], '(<CR>)', 'refreshes the screen',call(init(screen),A, '', '[ screen is refreshed ]')) ;

command(83,top(A),[83,69,76,69,67,84], '(By or <CR>)', 'selects other formulas',top_SELECT(A)):-cpc_mode(A) ;

command(83,top(A),[83,69,77,73,65,85,84,79,77,65,84,73,67], '(<CR>)', 'changes the mode to semiautomatic',call(cpc_continue(B,automatic,C),C, '<< semiautomatic executecution >>', '')):-cpc_mode_and_id(A,B) ;

command(83,top_SSTRATEGY( 'METIS'),[83,69,77,73,65,85,84,79,77,65,84,73,67], '(<CR>)', ['executes the S-strategy in',{nl},{space(18)},'semiautomatic mode'],call(cpc_start(ss,automatic,A),A, '<< S-strategy (semiautomatic execution) >>', '')) ;

command(83,top_KB( 'METIS'),[83,69,77,73,65,85,84,79,77,65,84,73,67], '(<CR>)', 'executes the KB in semiautomatic mode',call(cpc_start(kb,automatic,A),A, '<< Knuth - Bendix (semiautomatic execution) >>', '')) ;

command(83,top_INDUCTION( 'METIS'),[83,69,77,73,65,85,84,79,77,65,84,73,67], '(<CR>)', ['executes the inductionless induction ',{nl},{space(18)},'in semiautomatic mode'],call(cpc_start(ii,automatic,A),A, '<< inductionless induction (semiautomatic execution) >>', '')) ;

command(83,top(A),[83,69,84], '(ITEM)', ['declares or changes system',{nl},{space(18)},'characteristics'],top_SET(A)) ;

command(83,top_LIST_RULES(A),[83,69,88,80,82,69,83,83,73,79,78], '(<CR>)', 'in Sexpression',call(list_state(rules,existing,sform),A, '<< rules listing (in Sexpression) >>', '')) ;

command(83,top_LIST_EQUATIONS(A),[83,69,88,80,82,69,83,83,73,79,78], '(<CR>)', 'in Sexpression',call(list_state(equations,existing,sform),A, '<< equations listing (in Sexpression) >>', '')) ;

command(83,top_LIST(A),[83,69,88,80,82,69,83,83,73,79,78], '(<CR>)', 'displays all in Sexpression',call(list_state(data,existing,sform),A, '<< state listing (in Sexpression) >>', '')) ;

command(83,top(A),[83,72,79,87], '(ID)', 'shows origin of equations/rules',top_SHOW(A)) ;

command(83,top( 'METIS'),[83,83,84,82,65,84,69,71,89], '(EXE MODE or <CR>)', 'starts S-strategy',top_SSTRATEGY( 'METIS')) ;

command(83,top_PROVE( 'METIS'),[83,83,84,82,65,84,69,71,89], '(<CR>)', 'proves formulas by S-strategy',call(prove_formulas(ss,A),A, '<< prove formulas by S-strategy >>', '')) ;

command(83,top_INFORMATION(A),[83,84,65,84,73,83,84,73,67,83], '(<CR>)', 'provides information about statistics',call(statistics,A, '', '')) ;

command(83,top(A),[83,85,71,71,69,83,84,73,79,78], '(FOR or <CR>)', 'gives suggestion for ordering',top_SUGGESTION(A)) ;

command(83,top_SET_GRAPH_VIEW(A),[83,67,82,79,76,76], '(OPTION or <CR>)', 'sets graph scroll mode', call(set(graph_option(view(scroll))),A, '','[ set graph scroll mode. ]')) ;

command(83,top_SET_node(A),[83,85,66,83,85,77,69],'(ITEM)', 'sets subsumed equations node',top_SET_node_SUBSUME(A)) ;

command(84,top_INFORMATION(A),[84,69,77,80,79,82,65,82,89,70,73,76,69,83], '(<CR>)', ['provides information about temporary',{nl},{space(18)},' files'],call(inform(temp_files),A, '', '')) ;

command(84, 'top_WRITE_file name'(A,B,C),[84,69,82,77,73,78,65,76], '(<CR>)', 'writes data from terminal to file',call(write_to_file(terminal,C),A, '<< write data from terminal to a file >>', '')) ;

command(84,top_SET(A),[84,69,82,77,73,78,65,76], '(TERMINAL TYPE)', 'sets terminal type',top_SET_TERMINAL(A)) ;

command(84,top_INFORMATION(A),[84,69,82,77,73,78,65,76], '(<CR>)', ['provides information about terminal',{nl},{space(18)},'type'],call(inform(terminal_type),A, '', '')) ;

command(84,top( 'METIS'),[84,69,82,77,73,78,65,76], '(<CR>)', 'reads data from a terminal',call(read_from_terminal, 'METIS', '<< read data from a terminal >>', '')) ;

command(84,top_SET(A),[84,82,65,67,69], '(PRIORITY or <CR>)', 'sets trace flag',top_SET_TRACE(A)) ;

command(84,top_SET_DEFAULT(A),[84,82,65,67,69], '(VALUE)', 'sets default trace mode',top_SET_DEFAULT_TRACE(A)) ;

command(84,top_SET_NO(A),[84,82,65,67,69], '(<CR>)', 'resets trace flag',call(traceoff,A, '', '[ trace off. ]')) ;

command(84,top_REDUCE(A),[84,82,65,67,69], '(<CR>)', 'reduces terms with trace',call(term_rewrite(trace),A, '<< reduce a term (with trace) >>', '')) ;

command(84,top_INFORMATION(A),[84,82,65,67,69], '(<CR>)', 'provides information about trace flag',call(inform(flag( '{FLG}trace'(B))),A, '', '')) ;

command(84,top_INFORMATION_DEFAULT(A),[84,82,65,67,69], '(<CR>)', ['provides information about default',{nl},{space(18)},'trace'],call(inform(default(trace(B))),A, '', '')) ;

command(85,top(A),[85,78,67,79,77,80,73,76,69], '(ITEM or <CR>)', 'uncompiles the current states',top_UNCOMPILE(A)) ;

command(85,top_SET_DEFAULT_OPERATOR_VARYADIC_LEXICOGRAPHIC(A),[85,78,68,69,70,73,78,69,68], '(<CR>)', 'keeps it undefined',call(set(default(op(B,varyadic,lex,C))),A, '', '')) ;

command(85,top_SET_DEFAULT_OPERATOR_VARYADIC_KACHINUKI(A),[85,78,68,69,70,73,78,69,68], '(<CR>)', 'keeps it undefined',call(set(default(op(B,varyadic,kac,C))),A, '', '')) ;

command(85,top_SET_DEFAULT_OPERATOR_VARYADIC(A),[85,78,68,69,70,73,78,69,68], '(<CR>)', 'keeps it undefined',call(set(default(op(B,varyadic,C,D))),A, '', '')) ;

command(85,top_SET_DEFAULT_OPERATOR_FIXED_LEXICOGRAPHIC(A),[85,78,68,69,70,73,78,69,68], '(<CR>)', 'keeps it undefined',call(set(default(op(B,fixed,lex,C))),A, '', '')) ;

command(85,top_SET_DEFAULT_OPERATOR_FIXED(A),[85,78,68,69,70,73,78,69,68], '(<CR>)', 'keeps it undefined',call(set(default(op(B,fixed,C,D))),A, '', '')) ;

command(85,top(A),[85,78,68,69,76,69,84,69], '(ID)', 'undeletes data',top_UNDELETE(A)) ;

command(85,top(A),[85,78,68,79], '(<CR>)', 'undo the last interactive operation',call(command_undo,cont, '<< undo the last operation >>', '')) ;

command(86,top_SET_DEFAULT_OPERATOR(A),[86,65,82,89,65,68,73,67], '(ORDERING)', 'sets varyadic',top_SET_DEFAULT_OPERATOR_VARYADIC(A)) ;

command(86,top_INFORMATION(A),[86,69,82,83,73,79,78], '(<CR>)', ['provides information about the system',{nl},{space(18)},'version'],call(version,A, '<< version >>', '')) ;

command(86,top_SET_TERMINAL(A),[86,84,49,48,48], '(<CR>)', 'sets type to VT100',call(set(terminal(vt100)),A, '', '[ new terminal is "vt100" . ]')) ;

command(86,top_SET_GRAPH(A),[86,73,69,87], '(OPTION or <CR>)', 'sets graph view mode',top_SET_GRAPH_VIEW(A));

command(87,top(A),[87,73,78,68,79,87], '(OPTION or <CR>)', 'control the window', top_WINDOW(A)) ;

command(87,top(A),[87,82,73,84,69], '(FILE NAME)', 'writes data to a file',top_WRITE(A)) ;

command(88,top_SET_GRAPH(A),[88,65,88,73,83], '(OPTION or <CR>)', 'sets graph X-axis options',top_SET_GRAPH_Xaxis(A)) ;

command(89,top_SET_GRAPH(A),[89,65,88,73,83], '(OPTION or <CR>)', 'sets graph Y-axis options',top_SET_GRAPH_Yaxis(A)) ;


%--------------------------------------------------%
%       default command                            %
%--------------------------------------------------%

%-----< MPSI/default_command >--------------------------------------------------

default_command(top('MPSI'), '') ;
default_command(top_KB('MPSI'), 'AUTOMATIC') ;
default_command('top_READ_file name'('MPSI',A,B), 'INITIALIZE') ;
default_command(top_SET_node(A), 'ALL') ;
default_command(top_SET_node_ALL_S(A), 'DEFAULT') ;
default_command(top_SET_node_CPC_S(A), 'DEFAULT') ;
default_command(top_SET_node_EQUATIONS_S(A), 'DEFAULT') ;
default_command(top_SET_node_RULES_S(A), 'DEFAULT') ;
default_command(top_SET_node_SUBSUME(A), 'DEFAULT') ;
default_command(top_SET_node_REPLACE_S(A), 'DEFAULT') ;
default_command(top_SET_node_INDUCTION_S(A), 'DEFAULT') ;

%-----< FEP/default_command >--------------------------------------------------

default_command(top( 'METIS'), '') ;
default_command(top_CONVERT_equation_id( 'METIS',A), 'ORDERINGS') ;
default_command(top_CONVERT_rule_id( 'METIS',A), 'LEFT_TO_RIGHT') ;
default_command(top_CONVERT( 'METIS'), 'NON_TERMINATING') ;
default_command(top_GENERATE(A), 'KL1') ;
default_command(top_INDUCTION( 'METIS'), 'AUTOMATIC') ;
default_command(top_KB( 'METIS'), 'AUTOMATIC') ;
default_command(top_PROVE( 'METIS'), 'REDUCTION') ;
default_command('top_READ_file name'( 'METIS',A,B), 'INITIALIZE') ;
default_command(top_SSTRATEGY( 'METIS'), 'AUTOMATIC') ;
default_command(top(A), 'GO'):-cpc_mode_and_id(A,B) ;
default_command(top_NEW(A), 'FUNCTION'):-cpc_mode(A) ;
default_command(top_SELECT(A), 'NEXT'):-cpc_mode(A) ;
default_command('top_COMMANDFILE_file name'(A,B,C), 'COPY') ;
default_command(top_COMPILE(A), 'RULES') ;
default_command(top_CRITICALPAIRS(A), 'ASSERT') ;
default_command(top_DELETE_operator_symbol(A,B), 'OPERATORS') ;
default_command(top_INITIALIZE(A), 'ALL') ;
default_command(top_LIST(A), 'ALL') ;
default_command(top_LIST_EQUATIONS(A), 'NORMAL') ;
default_command(top_LIST_RULES(A), 'NORMAL') ;
default_command(top_NARROWING(A), 'ASSERT') ;
default_command(top_ORIENT(A), 'CURRENT') ;
default_command(top_REDUCE(A), 'AUTOMATIC') ;
default_command(top_SET_DEFAULT(A), 'TRACE') ;
default_command(top_SET_DEFAULT_OPERATOR(A), 'FIXED') ;
default_command(top_SET_DEFAULT_OPERATOR_FIXED(A), 'UNDEFINED') ;
default_command(top_SET_DEFAULT_OPERATOR_FIXED_LEXICOGRAPHIC(A), 'UNDEFINED') ;
default_command(top_SET_DEFAULT_OPERATOR_VARYADIC(A), 'UNDEFINED') ;
default_command(top_SET_DEFAULT_OPERATOR_VARYADIC_KACHINUKI(A), 'UNDEFINED') ;
default_command(top_SET_DEFAULT_OPERATOR_VARYADIC_LEXICOGRAPHIC(A), 'UNDEFINED') ;
default_command(top_SET_DEFAULT_OPERATOR_VARYADIC_LEXICOGRAPHIC(A), 'LEFT_TO_RIGHT') ;
default_command(top_SET_MONITOR(A), 'LIST') ;
default_command('top_SET_MONITOR_list'(A), 'DATA') ;
default_command('top_SET_MONITOR_graph'(A), 'DATA') ;
default_command('top_SET_MONITOR_all'(A), 'DATA') ;
default_command(top_SET_GRAPH(A), 'INITIALIZE') ;
default_command(top_SET_GRAPH_VIEW(A), 'NORMAL') ;
default_command(top_SET_GRAPH_MARGIN(A), 'DEFAULT') ;
default_command(top_SET_GRAPH_Xaxis(A), 'DEFAULT') ;
default_command(top_SET_GRAPH_Yaxis(A), 'DEFAULT') ;
default_command(top_SET_TERMINAL(A), 'CIT600') ;
default_command(top_SET_TRACE(A), 'DEFAULT') ;
default_command(top_SUGGESTION(A), 'CURRENT') ;
default_command(top_UNCOMPILE(A), 'RULES') ;
default_command(top_UNDELETE_operator_symbol(A,B), 'OPERATORS') ;
default_command(top_WINDOW(A), 'HIDE') ;
default_command('top_WRITE_file name'(A,B,C), 'NOHISTORIES') ;

end.