Skip to content

Commit

Permalink
Refactor and optimize metta_interp.pl
Browse files Browse the repository at this point in the history
- Adjusted  logic to simplify the inheritance rules.
- Improved  to ensure better memory and resource management.
- Enhanced debugging utilities for inheritance and atom assertion tracing, ensuring more informative outputs.
  • Loading branch information
TeamSPoon committed Jan 16, 2025
1 parent a769a30 commit eaf02af
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions prolog/metta_lang/metta_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4361,7 +4361,7 @@
should_not_inherit_from_corelib('&corelib').
should_not_inherit_from_corelib('&stdlib').
should_not_inherit_from_corelib('&self').
% should_not_inherit_from_corelib('&top').
%should_not_inherit_from_corelib('&top').
*/

%! should_inherit_from_corelib(+Atom) is nondet.
Expand Down Expand Up @@ -4459,9 +4459,10 @@
% % Retrieve the last asserted atom for a specific knowledge base:
% ?- metta_atom_asserted_last('&flybase', Atom).
% Atom = '&corelib'.
%
% metta_atom_asserted('&self','&corelib').
% metta_atom_asserted('&self','&stdlib').


%metta_atom_asserted('&self','&corelib').
%metta_atom_asserted('&self','&stdlib').
metta_atom_asserted_last(Top, '&corelib') :-
% Assert `&corelib` for the top-level context.
top_self(Top).
Expand Down

0 comments on commit eaf02af

Please sign in to comment.