Skip to content

Commit

Permalink
metta_NotReducible
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Jan 5, 2025
1 parent 92dfc51 commit 96b73a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .Attic/metta_lang/metta_eval.pl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

eval_reducable(Eq,RetType,Depth,Self,X,G,Y,O):- catch_metta_return(G,Y), return_x_g_y(Eq,RetType,Depth,Self,X,X,Y,O).

return_x_g_y(_Eq,_RetType,_Depth,_Self,X,_,Y,R):- Y == 'NotReducable',!,R=X.
return_x_g_y(_Eq,_RetType,_Depth,_Self,X,_,Y,R):- Y == 'NotReducible',!,R=X.
return_x_g_y(Eq,RetType,Depth, Self,X,M,Y,R):- M\=@=Y, !, eval_args(Eq,RetType,Depth,Self,Y,Z), return_x_g_y(Eq,RetType,Depth,Self,X,Y,Z,R).
return_x_g_y(_Eq,_RetType,_Depth,_Self,_X,_M,R,R).

Expand Down Expand Up @@ -2862,7 +2862,7 @@
((eval_args(Eq,RetType,Depth,Self,Funcall,E))
*-> is_returned(E);(fail,E=Funcall)).

is_returned(E):- notrace( \+ is_empty(E)), nop(assertion(E \== 'NotReducable')).
is_returned(E):- notrace( \+ is_empty(E)), nop(assertion(E \== 'NotReducible')).
is_empty(E):- notrace(( nonvar(E), sub_var('Empty',E))),!.


Expand Down
6 changes: 3 additions & 3 deletions prolog/metta_lang/metta_eval.pl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
self_eval0('Empty').
self_eval0([]).
self_eval0('%Undefined%').
self_eval0(X):- atom(X),!, X\=='NotReducable', \+ nb_bound(X,_),!.
self_eval0(X):- atom(X),!, X\=='NotReducible', \+ nb_bound(X,_),!.

nb_bound(Name,X):- atom(Name), % atom_concat('&', _, Name),
nb_current(Name, X), compound(X). % spaces and states are stored as compounds
Expand Down Expand Up @@ -307,7 +307,7 @@

eval_20(Eq,RetType,_Dpth,_Slf,Name,Y):-
atom(Name), !,
(Name=='NotReducable'->throw(metta_NotReducable);
(Name=='NotReducible'->throw(metta_NotReducible);
(nb_bound(Name,X)->do_expander(Eq,RetType,X,Y);
Y = Name)).

Expand Down Expand Up @@ -2807,7 +2807,7 @@

eval_defn_choose_candidates(Eq,RetType,Depth,Self,X,Y):-
findall((XX->B0),get_defn_expansions(Eq,RetType,Depth,Self,X,XX,B0),XXB0L),!,
catch(eval_defn_bodies(Eq,RetType,Depth,Self,X,Y,XXB0L),metta_NotReducable,X=Y).
catch(eval_defn_bodies(Eq,RetType,Depth,Self,X,Y,XXB0L),metta_NotReducible,X=Y).
eval_defn_choose_candidates(Eq,RetType,Depth,Self,X,Y):-
eval_defn_bodies(Eq,RetType,Depth,Self,X,Y,[]),!.

Expand Down

0 comments on commit 96b73a7

Please sign in to comment.