Skip to content

Commit

Permalink
top-self
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Dec 22, 2024
1 parent afb6d79 commit ad2b381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions prolog/metta_lang/metta_eval.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2287,13 +2287,7 @@
%eval_40(Eq,RetType,_Dpth,_Slf,['==',X,Y],Res):- !, subst_args(Eq,RetType,_Dpth,_Slf,['==',X,Y],Res).

eval_20(Eq,RetType,Depth,Self,['==', X,Y],Res):-
suggest_type(RetType,'Bool'),
eval_until_unify_self([h_e,'=='],Eq,_SharedType,Depth,Self,X,Y, Res),
(Res=='False' -> (!, fail) ; fail).

%eval_40(Eq,RetType,_Depth,Self,[EQ,X,Y],TF):- fail, EQ=='==', !,
% suggest_type(RetType,'Bool'),
% as_tf(eval_until_unify(Eq,_SharedType, X, Y), TF).
(var(X);var(Y)),!,X\==Y,!, Res='False',suggest_type(RetType,'Bool').
eval_40(Eq,RetType,Depth,Self,['==',X,Y],TF):- !,
suggest_type(RetType,'Bool'),
as_tf(eval_until_eq(Eq,_SharedType, Depth,Self, X, Y), TF).
Expand Down
4 changes: 2 additions & 2 deletions prolog/metta_lang/metta_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@
option_value_name_default_type_help('answer-format', 'show', ['rust', 'silent', 'detailed'], "Control how results are displayed", 'Output and Logging').
option_value_name_default_type_help('repeats', true, [true, false], "false to avoid repeated results", 'Miscellaneous').
option_value_name_default_type_help('time', true, [false, true], "Enable or disable timing for operations (in Rust compatibility mode, this is false)", 'Miscellaneous').
option_value_name_default_type_help('vn', auto, [auto, true, false], "Enable or disable, (auto = enable but not if it breaks stuff) EXPERIMENTAL BUG-FIX where variable names are preserved (see https://github.com/trueagi-io/metta-wam/issues/221)", 'Miscellaneous').
option_value_name_default_type_help('top-self', false, [true, false, auto], "When set, stop pretending &self==&top", 'Miscellaneous').
option_value_name_default_type_help('vn', true, [true, auto, false], "Enable or disable, (auto = enable but not if it breaks stuff) EXPERIMENTAL BUG-FIX where variable names are preserved (see https://github.com/trueagi-io/metta-wam/issues/221)", 'Miscellaneous').
option_value_name_default_type_help('top-self', true, [true, false, auto], "When set, stop pretending &self==&top", 'Miscellaneous').

% Testing and Validation
option_value_name_default_type_help('synth-unit-tests', false, [false, true], "Synthesize unit tests", 'Testing and Validation').
Expand Down

0 comments on commit ad2b381

Please sign in to comment.