Merge branch 'master' of yap.dcc.fc.up.pt:yap-6
This commit is contained in:
commit
361c5ad78f
@ -2,8 +2,8 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2010-10-05 18:15:57 +0200 (Tue, 05 Oct 2010) $
|
||||
% $Revision: 4876 $
|
||||
% $Date: 2010-10-06 12:56:13 +0200 (Wed, 06 Oct 2010) $
|
||||
% $Revision: 4877 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
@ -249,6 +249,7 @@
|
||||
non_ground_fact/1,
|
||||
export_facts/1,
|
||||
problog_help/0,
|
||||
problog_version/0,
|
||||
show_inference/0,
|
||||
problog_dir/1,
|
||||
set_problog_flag/2,
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2010-10-05 18:15:57 +0200 (Tue, 05 Oct 2010) $
|
||||
% $Revision: 4876 $
|
||||
% $Date: 2010-10-06 12:56:13 +0200 (Wed, 06 Oct 2010) $
|
||||
% $Revision: 4877 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
@ -212,6 +212,7 @@
|
||||
convert_filename_to_working_path/2,
|
||||
convert_filename_to_problog_path/2,
|
||||
concat_path_with_filename/3,
|
||||
concat_path_with_filename2/3,
|
||||
split_path_file/3,
|
||||
check_existance/1,
|
||||
calc_md5/2]).
|
||||
@ -249,6 +250,13 @@ concat_path_with_filename(Path, File_Name, Result):-
|
||||
path_seperator(Path_Seperator),
|
||||
atomic_concat([Path_Absolute, Path_Seperator, File_Name], Result).
|
||||
|
||||
concat_path_with_filename2(Path, File_Name, Result):-
|
||||
nonvar(File_Name),
|
||||
nonvar(Path),
|
||||
path_seperator(Path_Seperator),
|
||||
(atomic_concat(Path_Absolute, Path_Seperator, Path) ; Path_Absolute = Path),
|
||||
atomic_concat([Path_Absolute, Path_Seperator, File_Name], Result).
|
||||
|
||||
%========================================================================
|
||||
%= Calculate the MD5 checksum of +Filename by calling md5sum
|
||||
%= in case m5sum is not installed, try md5, otherwise fail
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2010-10-05 18:15:57 +0200 (Tue, 05 Oct 2010) $
|
||||
% $Revision: 4876 $
|
||||
% $Date: 2010-10-06 12:56:13 +0200 (Wed, 06 Oct 2010) $
|
||||
% $Revision: 4877 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
@ -222,7 +222,8 @@
|
||||
show_inference/0,
|
||||
problog_flags/0,
|
||||
problog_flags/1,
|
||||
problog_help/0]).
|
||||
problog_help/0,
|
||||
problog_version/0]).
|
||||
|
||||
% load library modules
|
||||
:- use_module(library(lists), [member/2]).
|
||||
@ -231,7 +232,7 @@
|
||||
% load our own modules
|
||||
:- use_module(flags).
|
||||
:- use_module(variables).
|
||||
:- use_module(os, [check_existance/1, convert_filename_to_problog_path/2]).
|
||||
:- use_module(os, [check_existance/1, convert_filename_to_problog_path/2, concat_path_with_filename2/3]).
|
||||
:- use_module(version_control, [get_version/3]).
|
||||
|
||||
|
||||
@ -299,8 +300,7 @@ make_column_format([HC|TC], [HS|TS], Format, Acc):-
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
problog_help :-
|
||||
print_version,
|
||||
format('~nProbLog inference currently offers the following inference methods:~n',[]),
|
||||
format('~2nProbLog inference currently offers the following inference methods:~n',[]),
|
||||
show_inference,
|
||||
problog:problog_path(PD),
|
||||
format('~nProbLog directory: ~q~n',[PD]),
|
||||
@ -314,28 +314,33 @@ problog_help :-
|
||||
nl,
|
||||
flush_output.
|
||||
|
||||
print_version :-
|
||||
problog_version :-
|
||||
MainProblogFiles = ['problog.yap', 'problog_learning.yap', 'dtproblog.yap'],
|
||||
nl,
|
||||
print_group_line('Version Information'),
|
||||
check_existance('problog.yap'),
|
||||
convert_filename_to_problog_path('problog.yap', Path),
|
||||
get_version(Path, Version, Revision),
|
||||
format('~w~35+ Last Modified at:~w~65+Revision:~w~n', ['problog.yap', Version, Revision]),
|
||||
print_group_line_bold('Version Information'),
|
||||
print_version(MainProblogFiles, ''),
|
||||
print_sep_line,
|
||||
convert_filename_to_problog_path('problog', ProblogPath),
|
||||
directory_files(ProblogPath, ProblogFiles),
|
||||
print_version(ProblogFiles),
|
||||
print_sep_line.
|
||||
sort(ProblogFiles, ProblogFilesS),
|
||||
print_version(ProblogFilesS, 'problog'),
|
||||
print_sep_line_bold.
|
||||
|
||||
print_version([]).
|
||||
print_version([H|T]):-
|
||||
atom_concat('.', _, H), !,
|
||||
print_version(T).
|
||||
print_version([H|T]):-
|
||||
atom_concat('problog/', H, FileName),
|
||||
print_version([], _Path).
|
||||
print_version([H|T], Path):-
|
||||
atom_concat(_, '.yap', H), !,
|
||||
(Path == '' ->
|
||||
FileName = H
|
||||
;
|
||||
concat_path_with_filename2(Path, H, FileName)
|
||||
),
|
||||
check_existance(FileName),
|
||||
convert_filename_to_problog_path(FileName, FilePath),
|
||||
get_version(FilePath, Version, Revision),
|
||||
format('~w~35+ Last Modified at:~w~65+Revision:~w~n', [FileName, Version, Revision]),
|
||||
print_version(T).
|
||||
print_version(T, Path).
|
||||
print_version([_H|T], Path):-
|
||||
print_version(T, Path).
|
||||
|
||||
|
||||
show_inference :-
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2010-09-28 21:04:43 +0200 (Tue, 28 Sep 2010) $
|
||||
% $Revision: 4838 $
|
||||
% $Date: 2010-10-06 12:56:13 +0200 (Wed, 06 Oct 2010) $
|
||||
% $Revision: 4877 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
@ -328,8 +328,9 @@ problog_table(Name/Arity, Module) :-
|
||||
atom_concat(['problog_', Name, '_tabled'], ExactName),
|
||||
|
||||
% Monte carlo tabling
|
||||
table(Module:MCName/Arity),
|
||||
assertz(problog_tabled(Module:Name/Arity)),
|
||||
catch((table(Module:MCName/Arity),
|
||||
assertz(problog_tabled(Module:Name/Arity))), _,
|
||||
(format(user_error, 'Warning: Tabling was not enabled over compilation, montecarlo tabling is disabled!~nPredicate: ~q~n', [Module:MCName/Arity]))),
|
||||
|
||||
findall(_,(
|
||||
OriginalPred =.. [OriginalName|Args],
|
||||
|
@ -7,6 +7,8 @@
|
||||
* *
|
||||
* Author: Theofrastos Mantadelis *
|
||||
* File: general.c *
|
||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4880 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
|
@ -7,6 +7,8 @@
|
||||
* *
|
||||
* Author: Theofrastos Mantadelis *
|
||||
* File: general.h *
|
||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4880 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
|
@ -7,6 +7,8 @@
|
||||
* *
|
||||
* Author: Theofrastos Mantadelis, Angelika Kimmig, Bernd Gutmann *
|
||||
* File: problogbdd.c *
|
||||
* $Date:: 2010-10-06 18:06:08 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4883 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
@ -345,6 +347,7 @@ int main(int argc, char **arg) {
|
||||
MyManager.f = LOW(MyManager.manager);
|
||||
MyManager.varmap = InitNamedVars(1, 0);
|
||||
bdd = OnlineGenerateBDD(MyManager.manager, &MyManager.varmap);
|
||||
bakbdd = bdd;
|
||||
ivarcnt = GetVarCount(MyManager.manager);
|
||||
} else if(params.independent_forest>0){
|
||||
// the flag to create a forest of independent bdds is set
|
||||
|
@ -7,6 +7,8 @@
|
||||
* *
|
||||
* Author: Bernd Gutmann *
|
||||
* File: problogmath.c *
|
||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4880 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
|
@ -7,8 +7,8 @@
|
||||
* *
|
||||
* Author: Bernd Gutmann *
|
||||
* File: problogmath.h *
|
||||
* $Date:: 2010-02-18 18:04:54 +0100 (Thu, 18 Feb 2010) $ *
|
||||
* $Revision:: 3623 $ *
|
||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4880 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
|
@ -7,6 +7,8 @@
|
||||
* *
|
||||
* Author: Theofrastos Mantadelis *
|
||||
* File: simplecudd.c *
|
||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4880 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
@ -1710,7 +1712,16 @@ void onlinetraverse(DdManager *manager, namedvars varmap, hisqueue *HisQueue, Dd
|
||||
switch(inputline[1]) {
|
||||
case '?':
|
||||
printf("Available instructions:\n\t@c : current node\n\t@n,[BFS, DFS] : expand and go to next node\n\t@t,[BFS, DFS] : throw and go to next node\n");
|
||||
printf("\t@h : high node of current\n\t@l : low node of current\n\t@v,[variable] : variable values\n\t@e terminates\n");
|
||||
printf("\t@h : high node of current\n\t@l : low node of current\n\t@v,[variable] : variable values\n\t@r restart traverse from parent node\n\t@e terminates\n");
|
||||
break;
|
||||
case 'r':
|
||||
curnode = bdd;
|
||||
iQsize = 0;
|
||||
iRoot = 1;
|
||||
free(Q);
|
||||
Q = (DdNode **) malloc(sizeof(DdNode *) * iQsize);
|
||||
Q2 = NULL;
|
||||
ReInitHistory(his, varmap.varcnt);
|
||||
break;
|
||||
case 'c':
|
||||
if (iRoot) {
|
||||
|
@ -7,6 +7,8 @@
|
||||
* *
|
||||
* Author: Theofrastos Mantadelis *
|
||||
* File: simplecudd.h *
|
||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
||||
* $Revision:: 4880 $ *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
|
Reference in New Issue
Block a user