From eaf02af5ea0bc3fe199fdaa48b608ab1e1f75b37 Mon Sep 17 00:00:00 2001 From: logicmoo Date: Thu, 16 Jan 2025 03:07:20 -0800 Subject: [PATCH] Refactor and optimize metta_interp.pl - 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. --- prolog/metta_lang/metta_interp.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/prolog/metta_lang/metta_interp.pl b/prolog/metta_lang/metta_interp.pl index fd86e8d054d..950915e1b21 100755 --- a/prolog/metta_lang/metta_interp.pl +++ b/prolog/metta_lang/metta_interp.pl @@ -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. @@ -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).