Fixing minor portability issues

This commit is contained in:
Paulo Moura 2010-09-25 13:51:03 +01:00
parent d994175e2f
commit 889e14b46b
3 changed files with 8 additions and 8 deletions

View File

@ -310,7 +310,7 @@
% general yap modules
:- use_module(library(system)).
:- use_module(library(system), [delete_file/2, shell/2]).
:- initialization((
problog_define_flag(optimization, problog_flag_validate_atom, 'optimization algorithm [local/global]', global, dtproblog),

View File

@ -338,7 +338,7 @@
:- dynamic(tunable_fact/2).
:- dynamic(non_ground_fact/1).
:- dynamic(continuous_fact/1).
%:- dynamic problog_dir/1.
%:- dynamic(problog_dir/1).
% global, manipulated via problog_control/2
:- dynamic(up/0).
:- dynamic(limit/0).
@ -1147,7 +1147,7 @@ get_fact(ID,OutsideTerm) :-
ProblogTerm =.. [_Functor,ID|Args],
atomic_concat('problog_',OutsideFunctor,ProblogName),
Last is ProblogArity-1,
nth(Last,Args,_LogProb,OutsideArgs),
nth(Last,Args,_LogProb,OutsideArgs), % PM avoid nth/3; use nth0/3 or nth1/3 instead
OutsideTerm =.. [OutsideFunctor|OutsideArgs].
% ID of instance of non-ground fact: get fact from grounding table
get_fact(ID,OutsideTerm) :-
@ -2698,7 +2698,7 @@ build_trie(Goal, Trie) :-
throw(error('Flag settings not supported by build_trie/2.'))
).
build_trie_supported :- problog_flag(inference,exact).
build_trie_supported :- problog_flag(inference,exact). % PM this can easily be written to avoid creating choice-points
build_trie_supported :- problog_flag(inference,low(_)).
build_trie_supported :- problog_flag(inference,atleast-_-best).
build_trie_supported :- problog_flag(inference,_-best).
@ -2991,7 +2991,7 @@ write_global_bdd_file_line(I,Max) :-
).
write_global_bdd_file_query(I,Max) :-
(I=Max ->
(I=Max -> % PM shouldn't this be instead I =:= Max ?
format("L~q~n",[I])
;
format("L~q,",[I]),

View File

@ -1056,9 +1056,9 @@ spacy_print(Msg, Level, Space):-
% Theo Naive method works with Nested Trie to BDD Script
:-dynamic(get_used_vars/2).
:-dynamic(generated_trie/2).
:-dynamic(next_intermediate_step/1).
:- dynamic(get_used_vars/2).
:- dynamic(generated_trie/2).
:- dynamic(next_intermediate_step/1).
%
% This needs to be modified