Skip to content

Commit

Permalink
change how metta finds its files
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Aug 23, 2024
1 parent cf2024d commit 5e5ebee
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/canary/metta_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
metta_library_dir(Dir):- metta_root_dir(Value), absolute_file_name('./library/',Dir,[relative_to(Value)]).

metta_dir(Dir):- metta_library_dir(Value), absolute_file_name('./genome/',Dir,[relative_to(Value)]).
metta_dir(Dir):- is_metta_src_dir(Dir).
metta_dir(Dir):- is_metta_src_dir(Dir).
metta_dir(Dir):- metta_library_dir(Dir).
metta_dir(Dir):- metta_root_dir(Dir).
metta_dir(Dir):- is_metta_src_dir(Value), absolute_file_name('../flybase/',Dir,[relative_to(Value)]).
Expand Down Expand Up @@ -129,13 +129,6 @@
:-multifile(user:loaded_into_kb/2).
:-dynamic(user:loaded_into_kb/2).
:- dynamic(user:is_metta_dir/1).
:- dynamic user:file_search_path/2.
:- multifile user:file_search_path/2.
:- prolog_load_context(directory,Dir),
retractall(user:is_metta_dir(_)),asserta(user:is_metta_dir(Dir)).

user:file_search_path(library,Dir):- metta_dir(Dir).
user:file_search_path(mettalog,Dir):- metta_dir(Dir).

once_writeq_ln(_):- \+ clause(pfcTraceExecution,true),!.
once_writeq_ln(P):- nb_current('$once_writeq_ln',W),W=@=P,!.
Expand All @@ -148,13 +141,6 @@
pfcAdd_Now(P):- once_writeq_ln(asssert(P)),assert(P).
%:- endif.

metta_dir(Dir):- metta_dir0(Dir).
metta_dir(Dir):- metta_dir0(Value), absolute_file_name('../flybase/',Dir,[relative_to(Value)]).
metta_dir(Dir):- metta_dir0(Value), absolute_file_name('../../library/',Dir,[relative_to(Value)]).
metta_dir(Dir):- metta_dir0(Value), absolute_file_name('../../library/genome/',Dir,[relative_to(Value)]).
metta_dir0(Dir):- user:is_metta_dir(Dir).
metta_dir0(Dir):- getenv('METTA_DIR',Dir),!.

system:copy_term_g(I,O):- ground(I),!,I=O.
system:copy_term_g(I,O):- copy_term(I,O).

Expand Down

0 comments on commit 5e5ebee

Please sign in to comment.