diff --git a/packages/ProbLog/problog/os.yap b/packages/ProbLog/problog/os.yap index 8fe4459c6..c00c2447f 100644 --- a/packages/ProbLog/problog/os.yap +++ b/packages/ProbLog/problog/os.yap @@ -237,11 +237,15 @@ %======================================================================== set_problog_path( _Path):- - retractall(problog_path(_)), + retractall(problog_path(_)), + current_prolog_flag( executable, YAP ), + file_directory_name(YAP, P1), + current_prolog_flag( home, ROOT ), + atom_concat(ROOT, '/bin', P2), getenv('PATH',Dirs), path_grouping( PathSep ), atomic_list_concat( LPaths, PathSep, Dirs), - set_problog_paths( LPaths ), + set_problog_paths( [P1,P2| LPaths] ), fail. diff --git a/packages/ProbLog/problog_learning.yap b/packages/ProbLog/problog_learning.yap index ea5c42add..b1127bf13 100644 --- a/packages/ProbLog/problog_learning.yap +++ b/packages/ProbLog/problog_learning.yap @@ -1,4 +1,4 @@ -1%%% -*- Mode: Prolog; -*- +%%% -*- Mode: Prolog; -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -567,6 +567,8 @@ init_learning :- set_problog_flag(alpha,Alpha) ) ) + ; + true ), %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%