ProbLog Versioning System
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2010-09-28 21:04:43 +0200 (Tue, 28 Sep 2010) $
|
||||
% $Revision: 4838 $
|
||||
% $Date: 2010-10-05 18:15:57 +0200 (Tue, 05 Oct 2010) $
|
||||
% $Revision: 4876 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
@@ -226,10 +226,13 @@
|
||||
|
||||
% load library modules
|
||||
:- use_module(library(lists), [member/2]).
|
||||
:- use_module(library(system), [directory_files/2]).
|
||||
|
||||
% load our own modules
|
||||
:- use_module(flags).
|
||||
:- use_module(variables).
|
||||
:- use_module(os, [check_existance/1, convert_filename_to_problog_path/2]).
|
||||
:- use_module(version_control, [get_version/3]).
|
||||
|
||||
|
||||
% size, line_char, line_char_bold
|
||||
@@ -296,10 +299,11 @@ make_column_format([HC|TC], [HS|TS], Format, Acc):-
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
problog_help :-
|
||||
format('~2nProbLog inference currently offers the following inference methods:~n',[]),
|
||||
print_version,
|
||||
format('~nProbLog inference currently offers the following inference methods:~n',[]),
|
||||
show_inference,
|
||||
problog:problog_path(PD),
|
||||
format('~nProblog directory: ~q~n',[PD]),
|
||||
format('~nProbLog directory: ~q~n',[PD]),
|
||||
format('~nThe following global parameters are available:~n',[]),
|
||||
problog_flags,
|
||||
print_sep_line,
|
||||
@@ -310,6 +314,30 @@ problog_help :-
|
||||
nl,
|
||||
flush_output.
|
||||
|
||||
print_version :-
|
||||
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]),
|
||||
convert_filename_to_problog_path('problog', ProblogPath),
|
||||
directory_files(ProblogPath, ProblogFiles),
|
||||
print_version(ProblogFiles),
|
||||
print_sep_line.
|
||||
|
||||
print_version([]).
|
||||
print_version([H|T]):-
|
||||
atom_concat('.', _, H), !,
|
||||
print_version(T).
|
||||
print_version([H|T]):-
|
||||
atom_concat('problog/', H, 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).
|
||||
|
||||
|
||||
show_inference :-
|
||||
format('~n',[]),
|
||||
print_sep_line,
|
||||
|
Reference in New Issue
Block a user