You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running mettalog in Docker built from the latest HEAD d75836d gives the assert error:
$ docker run -it mettalog bash -l
PYTHONPATH=/home/user/metta-wam/tests/python_compat/metta-motto:/home/user/metta-wam/src
root@3cbdfab0f57e:~/metta-wam# mettalog
/home/user/metta-wam/mettalog: line 80: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
ERROR: Assertion failed: user:metta_atom('&corelib',[:,'Any','Type'])
[29] prolog_stack:backtrace(10) at /usr/local/lib/swipl/library/prolog_stack.pl:494
[28] prolog_debug:assertion_failed(fail,user:metta_atom('&corelib',[:,'Any','Type'])) at /usr/local/lib/swipl/library/debug.pl:393
[27] prolog_debug:assertion(user:metta_atom('&corelib',[:,'Any','Type'])) at /usr/local/lib/swipl/library/debug.pl:379
[26] load_corelib_file at /home/user/metta-wam/src/canary/metta_loader.pl:3672
[25] really_use_corelib_file at /home/user/metta-wam/src/canary/metta_loader.pl:3614
[24] use_corelib_file at /home/user/metta-wam/src/canary/metta_loader.pl:3603
[23] '$run_init_goal'('<garbage_collected>') at /usr/local/lib/swipl/boot/init.pl:826
[22] catch(system:'$run_init_goal'(user:use_corelib_file),_71852,system:'$initialization_error'(_71920,user:use_corelib_file,'/home/user/metta-wam/src/canary/metta_interp.pl':2226)) at /usr/local/lib/swipl/boot/init.pl:565
[21] catch_with_backtrace('<garbage_collected>','<garbage_collected>','<garbage_collected>') at /usr/local/lib/swipl/boot/init.pl:645
[20] '$run_init_goal'(user:use_corelib_file,'/home/user/metta-wam/src/canary/metta_interp.pl':2226) at /usr/local/lib/swipl/boot/init.pl:815
ERROR: /home/user/metta-wam/src/canary/metta_interp.pl:2226: Initialization goal raised exception:
ERROR: Unknown error term: assertion_error(fail,user:metta_atom('&corelib',[:,'Any','Type']))
ERROR: In:
ERROR: [29] throw(error(assertion_error(fail,user:metta_atom('&corelib',[:,'Any','Type'])),_186986))
ERROR: [27] prolog_debug:assertion(user:metta_atom('&corelib',[:,'Any','Type'])) at /usr/local/lib/swipl/library/debug.pl:379
ERROR: [26] load_corelib_file at /home/user/metta-wam/src/canary/metta_loader.pl:3672
ERROR: [25] really_use_corelib_file at /home/user/metta-wam/src/canary/metta_loader.pl:3614
ERROR: [24] use_corelib_file at /home/user/metta-wam/src/canary/metta_loader.pl:3603
ERROR: [23] '$run_init_goal'('<garbage_collected>') at /usr/local/lib/swipl/boot/init.pl:826
ERROR: [22] catch(system:'$run_init_goal'(user:use_corelib_file),_187228,system:'$initialization_error'(_187256,user:use_corelib_file,'/home/user/metta-wam/src/canary/metta_interp.pl':2226)) at /usr/local/lib/swipl/boot/init.pl:565
ERROR: [21] catch_with_backtrace('<garbage_collected>','<garbage_collected>','<garbage_collected>') at /usr/local/lib/swipl/boot/init.pl:645
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
% 23,758 inferences, 0.008 CPU in 0.008 seconds (100% CPU, 3124193 Lips)
Manual search for (: Any Type) in &corelib after the error also doesn't return results:
metta+>!(match &corelib (: Any Type) Ok)
[]
metta+>!(match &self (: Any Type) Ok)
[]
At the same time &corelib atom exists but it is empty:
If I comment two last lines in load_corelib_file on src/canary/metta_loader.pl:3672
load_corelib_file:-% Load the standard Metta logic file from the source directory.
is_metta_src_dir(Dir), really_use_corelib_file(Dir, 'stdlib_mettalog.metta'), !.%assertion(metta_atom('&corelib', [':', 'Any', 'Type'])),%really_use_corelib_file(Dir, 'corelib.metta').
then it loads stdlib_mettalog successfully and corelib is loaded as well:
root@3cbdfab0f57e:~/metta-wam# mettalog
/home/user/metta-wam/mettalog: line 80: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
% 36,789 inferences, 0.262 CPU in 0.262 seconds (100% CPU, 140537 Lips)
metta+>!(match &corelib (: Any Type) Ok)
[Ok]
Moreover after first successful start the error is gone and now both stdlib_mettalog.metta and corelib.metta are loaded successfully on start:
root@3cbdfab0f57e:~/metta-wam# mettalog
/home/user/metta-wam/mettalog: line 80: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Info: File /home/user/metta-wam/src/canary/stdlib_mettalog.metta is 87.0K bytes (2.30K lines)
Info: File /home/user/metta-wam/src/canary/corelib.metta is 34 bytes (1 lines)
% 36,586 inferences, 0.266 CPU in 0.266 seconds (100% CPU, 137608 Lips)
metta+>Info: Processing progress: 100% [4] current_output closed; set to user_output
- Stopping reporting on /home/user/metta-wam/src/canary/stdlib_mettalog.metta progress.
Info: Processing progress: 100% [5] current_output closed; set to user_output
- Stopping reporting on /home/user/metta-wam/src/canary/corelib.metta progress.
metta+>!(match &corelib (: Any Type) Ok)
[Ok]
The text was updated successfully, but these errors were encountered:
I did notice your running from /home/user/metta-wam/src/canary/metta_loader.pl
Recently we had to switch to a new branch master since we had to perform GIT surgery to move large testing files into their own repository. At that time we started using more standarized paths choosen by the SWI-Prolog package manager.
So all the files have moved.. For exmaple that file is now at /home/user/metta-wam/prolog/metta_lang/metta_loader.pl
So make sure you checkout master . hrrm I wonder if docker is going to be happy with new paths
Ah ok, one issue I see with my local code is that I used main branch instead and it looks like it is removed already, so I built docker from incorrect commit. Let me check whether it works in master branch then.
Running
mettalog
in Docker built from the latest HEAD d75836d gives the assert error:Manual search for
(: Any Type)
in&corelib
after the error also doesn't return results:At the same time
&corelib
atom exists but it is empty:This behaviour repeats if
mettalog
is restarted.If I comment two last lines in
load_corelib_file
onsrc/canary/metta_loader.pl:3672
then it loads
stdlib_mettalog
successfully andcorelib
is loaded as well:Moreover after first successful start the error is gone and now both
stdlib_mettalog.metta
andcorelib.metta
are loaded successfully on start:The text was updated successfully, but these errors were encountered: