diff --git a/packages/ProbLog/aproblog.yap b/packages/ProbLog/aproblog.yap index d30b2b0ba..a3122d705 100644 --- a/packages/ProbLog/aproblog.yap +++ b/packages/ProbLog/aproblog.yap @@ -269,8 +269,9 @@ problog_define_flag(compensate_unused, problog_flag_validate_boolean, 'compensate non-neutral sum for unused facts', false, aproblog) )). -% directory where problogbdd executable is located +% directory where simplecudd executable is located % automatically set during loading -- assumes it is in same place as this file (problog.yap) +%:- PD = /usr/local/bin, set_problog_path(PD). :- getcwd(PD), set_problog_path(PD). aproblog_flag(F,V) :- diff --git a/packages/ProbLog/dtproblog.yap b/packages/ProbLog/dtproblog.yap index 8ec1f3a14..5aceedbb5 100644 --- a/packages/ProbLog/dtproblog.yap +++ b/packages/ProbLog/dtproblog.yap @@ -698,7 +698,7 @@ bdd_optimization(N,EV,Decisions,Status) :- ; Param = ParamD ), - convert_filename_to_problog_path('problogbdd', ProblogBDD), + convert_filename_to_problog_path('simplecudd', ProblogBDD), problog_flag(bdd_result,ResultFileFlag), convert_filename_to_working_path(ResultFileFlag, ResultFile), bdd_util_file(UtilFile), diff --git a/packages/ProbLog/problog.yap b/packages/ProbLog/problog.yap index 05ae6389c..f6be35c4d 100644 --- a/packages/ProbLog/problog.yap +++ b/packages/ProbLog/problog.yap @@ -287,7 +287,7 @@ Instead of probabilities every fact has a t( ) prefix. The t stands for tunable ~~~~ t(0.5)::heads(_). ~~~~ -*/ +* /** @defgroup ProbLogPredicates ProbLog Predicates @ingroup ProbLog1 @@ -301,7 +301,6 @@ In the description of the arguments of functors the following notation will be u + an argument with no preceding symbol can be used in both ways @{ -*/ /** * @pred problog_max(+G, -Prob, -FactsUsed) @@ -900,12 +899,16 @@ The possible values for this flag are any number greater than zero. :- multifile(user:term_expansion/1). -% directory where problogbdd executable is located -% automatically set during loading -- assumes it is in same place as this file (problog.yap) +% directory where simplecudd executable is located +% automatically set during loading -- assumes it is in /usr/local/bin or same place where YAP has +% been installed.) :- getcwd(PD0), atom_concat(PD0, '../../bin', PD), set_problog_path(PD). +:- PD = '/usr/local/bin', + set_problog_path(PD). + %%%%%%%%%%%% @@ -949,7 +952,7 @@ The possible values for this flag are any number greater than zero. %%%%%%%%%%%% :- initialization(( -% problog_define_flag(bdd_path, problog_flag_validate_directory, 'problogbdd directory', '.',bdd), +% problog_define_flag(bdd_path, problog_flag_validate_directory, 'simplecudd directory', '.',bdd), problog_define_flag(bdd_time, problog_flag_validate_posint, 'BDD computation timeout in seconds', 60, bdd), problog_define_flag(save_bdd, problog_flag_validate_boolean, 'save BDD files for (last) lower bound', false, bdd), problog_define_flag(dynamic_reorder, problog_flag_validate_boolean, 'use dynamic re-ordering for BDD', true, bdd), diff --git a/packages/ProbLog/problog/ad_converter.yap b/packages/ProbLog/problog/ad_converter.yap index aaf2116f3..8b3cb1667 100644 --- a/packages/ProbLog/problog/ad_converter.yap +++ b/packages/ProbLog/problog/ad_converter.yap @@ -302,7 +302,7 @@ term_expansion_intern_ad((Head<--Body), Module, Mode, [user:ad_intern((Head<--Bo ). term_expansion_intern_ad( (Head<--Body),_,_) :- - format(chars(Error), 'Error at compiling the annotated disjunction ~q<--Body.',[Head,Body]), + format(chars(Error), 'Error at compiling the annotated disjunction ~q<--~qb.',[Head,Body]), print_message(error,Error), fail. diff --git a/packages/ProbLog/problog/bdd.yap b/packages/ProbLog/problog/bdd.yap index 96970022e..995690692 100644 --- a/packages/ProbLog/problog/bdd.yap +++ b/packages/ProbLog/problog/bdd.yap @@ -204,7 +204,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Prolog interface for problogbdd +% Prolog interface for simplecudd %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :-use_module(library(system)). @@ -212,14 +212,14 @@ bdd_init(FDO, PID):- pid(MYPID), - convert_filename_to_problog_path('problogbdd', ProblogBDD), - atomic_concat([ProblogBDD, ' -o -pid ', MYPID], C), + convert_filename_to_problog_path('simplecudd', Simplecudd), + atomic_concat([Simplecudd, ' -o -pid ', MYPID], C), exec(C, [pipe(FDO), std, std], PID). bdd_init(FDO, FDI, PID):- pid(MYPID), - convert_filename_to_problog_path('problogbdd', ProblogBDD), - atomic_concat([ProblogBDD, ' -o -m o -pid ', MYPID], C), + convert_filename_to_problog_path('simplecudd', Simplecudd), + atomic_concat([Simplecudd, ' -o -m o -pid ', MYPID], C), exec(C, [pipe(FDO), pipe(FDI), std], PID). bdd_commit(FDO, LINE):- diff --git a/packages/ProbLog/problog/os.yap b/packages/ProbLog/problog/os.yap index 56f21d755..8fe4459c6 100644 --- a/packages/ProbLog/problog/os.yap +++ b/packages/ProbLog/problog/os.yap @@ -321,7 +321,7 @@ get_codes(_, LF, LF). %======================================================================== -check_existance(FileName):- +check_existance(FileName):- convert_filename_to_problog_path(FileName, Path), catch(file_exists(Path), _, fail), !. check_existance(FileName):- @@ -334,5 +334,6 @@ path_grouping(PathSep) :- path_separator('\\') :- current_prolog_flag( windows, true ). - path_separator('/'). +path_separator('/'). + \ No newline at end of file diff --git a/packages/ProbLog/problog_learning.yap b/packages/ProbLog/problog_learning.yap index 41b7a4e6a..476e17e4b 100644 --- a/packages/ProbLog/problog_learning.yap +++ b/packages/ProbLog/problog_learning.yap @@ -538,9 +538,9 @@ init_learning :- format_learning(3,'~q training examples~n',[TrainingExampleCount]), - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set learning rate and alpha - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ( problog_flag(learning_rate,examples) -> @@ -552,7 +552,9 @@ init_learning :- problog_flag(alpha,auto) -> ( - (user:example(_,_,P,_),P<1,P>0) + user:example(_,_,P,_), + P<1, + P>0 -> set_problog_flag(alpha,1.0); ( @@ -603,8 +605,7 @@ init_one_query(QueryID,Query,Type) :- atomic_concat(['query_',QueryID],Filename1), concat_path_with_filename(Query_Directory,Filename1,Filename), - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % if BDD file does not exist, call ProbLog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ( @@ -618,7 +619,7 @@ init_one_query(QueryID,Query,Type) :- ) ), - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % check wether this BDD is similar to another BDD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ( @@ -728,9 +729,8 @@ update_query(QueryID,Symbol,What_To_Update) :- format_learning(4,'#',[]); ( problog_flag(sigmoid_slope,Slope), - problog_dir(PD), ((What_To_Update=all;query_is_similar(_,QueryID)) -> Method='g' ; Method='l'), - convert_filename_to_problog_path('problogbdd', Simplecudd), + convert_filename_to_problog_path('simplecudd', Simplecudd), atomic_concat([Simplecudd, ' -i "', Probabilities_File, '"', ' -l "', Query_Directory,'/query_',QueryID, '"', diff --git a/packages/ProbLog/problog_lfi.yap b/packages/ProbLog/problog_lfi.yap index 7949b2227..ef5f85829 100644 --- a/packages/ProbLog/problog_lfi.yap +++ b/packages/ProbLog/problog_lfi.yap @@ -409,14 +409,14 @@ init_learning :- learning_initialized, !. init_learning :- - convert_filename_to_problog_path('problogbdd_lfi', Path), + convert_filename_to_problog_path('simplecudd_lfi', Path), ( file_exists(Path) -> true; ( problog_path(PD), - format(user_error, 'WARNING: Can not find file: problogbdd_lfi. Please place file in problog path: ~q~n',[PD]), + format(user_error, 'WARNING: Can not find file: simplecudd_lfi. Please place file in problog path: ~q~n',[PD]), fail ) ),