From: Terrance S. <ts...@us...> - 2013-02-14 22:00:34
|
Update of /cvsroot/xsb/XSB/syslib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14087 Modified Files: curr_sym.P curr_sym.xwam tables.P tables.xwam Log Message: Updates for optional error handling via restraint in arithmetic computations. Index: curr_sym.P =================================================================== RCS file: /cvsroot/xsb/XSB/syslib/curr_sym.P,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- curr_sym.P 25 Jul 2012 23:19:12 -0000 1.81 +++ curr_sym.P 14 Feb 2013 22:00:27 -0000 1.82 @@ -876,10 +876,15 @@ xsb_flag(max_memory, Max) :- stat_flag(MAX_MEMORY, Max). xsb_flag(exception_pre_action, Mode) :- - stat_flag(ABORT_PRE_ACTION, Flag), + stat_flag(EXCEPTION_PRE_ACTION, Flag), ( Flag =:= PRINT_INCOMPLETE_ON_ABORT -> Mode = print_incomplete_tables ; Mode = none ). +xsb_flag(exception_action, Mode) :- + stat_flag(EXCEPTION_ACTION, Flag), + ( Flag =:= UNDEFINED_TRUTH_VALUE -> + Mode = undefined_truth_value + ; Mode = iso ). set_xsb_flag(Type,Val):- @@ -1059,11 +1064,19 @@ ; domain_error(positive_integer,Max,set_prolog_flag/2,2,max_memory_clause) ). set_xsb_flag_1(exception_pre_action, Mode) :- !, (Mode = print_incomplete_tables-> - stat_set_flag(ABORT_PRE_ACTION, PRINT_INCOMPLETE_ON_ABORT) + stat_set_flag(EXCEPTION_PRE_ACTION, PRINT_INCOMPLETE_ON_ABORT) ; (Mode = none -> - stat_set_flag(ABORT_PRE_ACTION, 0) + stat_set_flag(EXCEPTION_PRE_ACTION, 0) ; domain_error([print_incomplete_tables,none], Mode,set_prolog_flag/2,2,'exception_pre_action clause') ) ). +set_xsb_flag_1(exception_action, Mode) :- !, + (Mode = undefined_truth_value-> + stat_set_flag(EXCEPTION_ACTION, UNDEFINED_TRUTH_VALUE), + ensure_loaded(tables) + ; (Mode = iso -> + stat_set_flag(EXCEPTION_ACTION, 0) + ; domain_error([iso,undefined_truth_value], + Mode,set_prolog_flag/2,2,'exception_action clause') ) ). set_xsb_flag_1(max_tab_usage, OnOff) :-!, (OnOff == on -> stat_set_flag(MAX_USAGE, 1) Index: curr_sym.xwam =================================================================== RCS file: /cvsroot/xsb/XSB/syslib/curr_sym.xwam,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 Binary files /tmp/cvsMxQ23k and /tmp/cvskq4vAs differ Index: tables.P =================================================================== RCS file: /cvsroot/xsb/XSB/syslib/tables.P,v retrieving revision 1.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- tables.P 7 Feb 2013 18:13:56 -0000 1.89 +++ tables.P 14 Feb 2013 22:00:30 -0000 1.90 @@ -319,6 +319,7 @@ %:- table floundered_undefined/0. %floundered_undefined :- tnot(floundered_undefined). +?- floundered_undefined(a). /*----------------------------------------------------------------------*/ /* Predicates to retrieve information out of tables. */ /*----------------------------------------------------------------------*/ @@ -1317,6 +1318,7 @@ subgoal_scc_member(Subgoal,[_|R],Index):- subgoal_scc_member(Subgoal,R,Index). +%------------------------------------------------------------------------------ end_of_file. :- export explain_u_val/4. Index: tables.xwam =================================================================== RCS file: /cvsroot/xsb/XSB/syslib/tables.xwam,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 Binary files /tmp/cvsnmxJNm and /tmp/cvsYQgyou differ |