upgrade to more recent version of ProbLog.
This commit is contained in:
parent
0343a1da5a
commit
69caa6d5df
@ -26,7 +26,7 @@ YAP_EXTRAS=@YAP_EXTRAS@
|
|||||||
|
|
||||||
PROGRAMS= \
|
PROGRAMS= \
|
||||||
$(srcdir)/problog.yap \
|
$(srcdir)/problog.yap \
|
||||||
$(srcdir)/problog_learning.yap
|
$(srcdir)/learning.yap
|
||||||
|
|
||||||
PROBLOG_PROGRAMS= \
|
PROBLOG_PROGRAMS= \
|
||||||
$(srcdir)/problog/flags.yap \
|
$(srcdir)/problog/flags.yap \
|
||||||
@ -34,19 +34,20 @@ PROBLOG_PROGRAMS= \
|
|||||||
$(srcdir)/problog/tptree.yap
|
$(srcdir)/problog/tptree.yap
|
||||||
|
|
||||||
LEARNING_PROGRAMS = \
|
LEARNING_PROGRAMS = \
|
||||||
$(srcdir)/problog_learning/flags_learning.yap \
|
$(srcdir)/learning/flags_learning.yap \
|
||||||
$(srcdir)/problog_learning/logger.yap
|
$(srcdir)/learning/logger.yap
|
||||||
|
|
||||||
EXAMPLES = \
|
EXAMPLES = \
|
||||||
$(srcdir)/problog_examples/graph.pl \
|
$(srcdir)/examples/graph.pl \
|
||||||
$(srcdir)/problog_examples/learn_graph.pl
|
$(srcdir)/examples/learn_graph.pl
|
||||||
|
|
||||||
install: $(PROGRAMS) $(LEARNING_PROGRAMS) $(EXAMPLE_PROGRAMS)
|
install: $(PROGRAMS) $(LEARNING_PROGRAMS) $(EXAMPLE_PROGRAMS)
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog_examples
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog_examples
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog_learning
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog_learning
|
||||||
for p in $(PROGRAMS); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap; done
|
$(INSTALL_DATA) $(srcdir)/problog.yap $(DESTDIR)$(SHAREDIR)/Yap; done
|
||||||
|
$(INSTALL_DATA) $(srcdir)/learning.yap $(DESTDIR)$(SHAREDIR)/Yap/problog_learning.yap; done
|
||||||
for p in $(PROBLOG_PROGRAMS); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap/problog; done
|
for p in $(PROBLOG_PROGRAMS); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap/problog; done
|
||||||
for p in $(LEARNING_PROGRAMS); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap/problog_learning; done
|
for p in $(LEARNING_PROGRAMS); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap/problog_learning; done
|
||||||
for p in $(EXAMPLES); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap/problog_examples; done
|
for p in $(EXAMPLES); do $(INSTALL_DATA) $$p $(DESTDIR)$(SHAREDIR)/Yap/problog_examples; done
|
||||||
|
@ -5,14 +5,3 @@ To clean the directory call
|
|||||||
|
|
||||||
The make file will recursively call the make file of SimpleCudd and Cudd.
|
The make file will recursively call the make file of SimpleCudd and Cudd.
|
||||||
And it will finally copy the binary executable ProblogBDD to the main directory.
|
And it will finally copy the binary executable ProblogBDD to the main directory.
|
||||||
|
|
||||||
Please, consult
|
|
||||||
|
|
||||||
http://dtai.cs.kuleuven.be/problog
|
|
||||||
|
|
||||||
and the examples directory
|
|
||||||
|
|
||||||
problog_examples
|
|
||||||
|
|
||||||
for more information
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% $Date: 2009-06-17 22:22:00 +0200 (Wed, 17 Jun 2009) $
|
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||||
% $Revision: 1550 $
|
% $Revision: 1550 $
|
||||||
%
|
%
|
||||||
% This file is part of ProbLog
|
% This file is part of ProbLog
|
||||||
% http://dtai.cs.kuleuven.be/problog
|
% http://dtai.cs.kuleuven.be/problog
|
||||||
%
|
%
|
||||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
% Copyright 2009 Katholieke Universiteit Leuven
|
||||||
|
%
|
||||||
|
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||||
|
% Vitor Santos Costa
|
||||||
%
|
%
|
||||||
% Copyright 2009
|
|
||||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
|
||||||
%
|
%
|
||||||
% Main authors of this file:
|
% Main authors of this file:
|
||||||
% Bernd Gutmann
|
% Bernd Gutmann
|
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% $Date: 2009-07-21 18:30:23 +0200 (Tue, 21 Jul 2009) $
|
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||||
% $Revision: 1805 $
|
% $Revision: 1550 $
|
||||||
%
|
%
|
||||||
% This file is part of ProbLog
|
% This file is part of ProbLog
|
||||||
% http://dtai.cs.kuleuven.be/problog
|
% http://dtai.cs.kuleuven.be/problog
|
||||||
%
|
%
|
||||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
% Copyright 2009 Katholieke Universiteit Leuven
|
||||||
|
%
|
||||||
|
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||||
|
% Vitor Santos Costa
|
||||||
%
|
%
|
||||||
% Copyright 2009
|
|
||||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
|
||||||
%
|
%
|
||||||
% Main authors of this file:
|
% Main authors of this file:
|
||||||
% Angelika Kimmig, Vitor Santos Costa,Bernd Gutmann
|
% Angelika Kimmig, Vitor Santos Costa,Bernd Gutmann
|
||||||
@ -231,7 +232,6 @@
|
|||||||
problog_exact/3,
|
problog_exact/3,
|
||||||
problog_montecarlo/3,
|
problog_montecarlo/3,
|
||||||
problog_answers/2,
|
problog_answers/2,
|
||||||
problog_table/1,
|
|
||||||
get_fact_probability/2,
|
get_fact_probability/2,
|
||||||
set_fact_probability/2,
|
set_fact_probability/2,
|
||||||
get_fact/2,
|
get_fact/2,
|
||||||
@ -243,7 +243,8 @@
|
|||||||
problog_dir/1,
|
problog_dir/1,
|
||||||
set_problog_flag/2,
|
set_problog_flag/2,
|
||||||
problog_flag/2,
|
problog_flag/2,
|
||||||
problog_flags/0]).
|
problog_flags/0,
|
||||||
|
op( 550, yfx, :: )]).
|
||||||
|
|
||||||
:- style_check(all).
|
:- style_check(all).
|
||||||
:- yap_flag(unknown,error).
|
:- yap_flag(unknown,error).
|
||||||
@ -272,12 +273,6 @@
|
|||||||
:- ensure_loaded(library(system)).
|
:- ensure_loaded(library(system)).
|
||||||
:- ensure_loaded(library(rbtrees)).
|
:- ensure_loaded(library(rbtrees)).
|
||||||
|
|
||||||
% op attaching probabilities to facts
|
|
||||||
:- op( 550, yfx, :: ).
|
|
||||||
:- op( 1150, fx, problog_table ).
|
|
||||||
|
|
||||||
:- meta_predicate problog_table(:).
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% control predicates on various levels
|
% control predicates on various levels
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -313,17 +308,14 @@
|
|||||||
:- dynamic dynamic_probability_fact/1.
|
:- dynamic dynamic_probability_fact/1.
|
||||||
:- dynamic dynamic_probability_fact_extract/2.
|
:- dynamic dynamic_probability_fact_extract/2.
|
||||||
|
|
||||||
% keep a tab on tabling
|
|
||||||
:- dynamic problog_tabled/1.
|
|
||||||
|
|
||||||
% directory where ProblogBDD executable is located
|
% directory where ProblogBDD executable is located
|
||||||
% automatically set during loading -- assumes it is in same place as this file (problog.yap)
|
% automatically set during loading -- assumes it is in same place as this file (problog.yap)
|
||||||
%:- getcwd(PD),retractall(problog_dir(_)),assert(problog_dir(PD)).
|
%:- getcwd(PD),retractall(problog_dir(_)),assert(problog_dir(PD)).
|
||||||
|
% yap-6 separates executables and prolog progams...
|
||||||
:- yap_flag(shared_object_search_path,PD),
|
:- yap_flag(shared_object_search_path,PD),
|
||||||
retractall(problog_dir(_)),
|
retractall(problog_dir(_)),
|
||||||
assert(problog_dir(PD)).
|
assert(problog_dir(PD)).
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% help
|
% help
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -371,7 +363,7 @@ init_global_params :-
|
|||||||
set_problog_flag(bdd_file,example_bdd),
|
set_problog_flag(bdd_file,example_bdd),
|
||||||
set_problog_flag(dir,output),
|
set_problog_flag(dir,output),
|
||||||
set_problog_flag(save_bdd,false),
|
set_problog_flag(save_bdd,false),
|
||||||
set_problog_flag(hacked_proofs,false),
|
set_problog_flag(fast_proofs,false),
|
||||||
set_problog_flag(verbose,true).
|
set_problog_flag(verbose,true).
|
||||||
% problog_flags,
|
% problog_flags,
|
||||||
% print_sep_line,
|
% print_sep_line,
|
||||||
@ -401,12 +393,10 @@ problog_control(off,X) :-
|
|||||||
problog_control(check,X) :-
|
problog_control(check,X) :-
|
||||||
call(X).
|
call(X).
|
||||||
|
|
||||||
reset_control :-
|
:- problog_control(off,up).
|
||||||
problog_control(off,up),
|
:- problog_control(off,mc).
|
||||||
problog_control(off,mc),
|
:- problog_control(off,limit).
|
||||||
problog_control(off,limit),
|
:- problog_control(off,remember).
|
||||||
problog_control(off,remember).
|
|
||||||
:- reset_control.
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% nice user syntax Prob::Fact
|
% nice user syntax Prob::Fact
|
||||||
@ -446,7 +436,7 @@ user:term_expansion(P::Goal, problog:ProbFact) :-
|
|||||||
probclause_id(ID),
|
probclause_id(ID),
|
||||||
ProbFact =.. [ProblogName,ID|L1],
|
ProbFact =.. [ProblogName,ID|L1],
|
||||||
(
|
(
|
||||||
(nonvar(P), P = t(TrueProb))
|
(\+ var(P), P = t(TrueProb))
|
||||||
->
|
->
|
||||||
(
|
(
|
||||||
assert(tunable_fact(ID,TrueProb)),
|
assert(tunable_fact(ID,TrueProb)),
|
||||||
@ -455,8 +445,6 @@ user:term_expansion(P::Goal, problog:ProbFact) :-
|
|||||||
(
|
(
|
||||||
ground(P)
|
ground(P)
|
||||||
->
|
->
|
||||||
EvalP is P, % allows one to use ground arithmetic expressions as probabilities
|
|
||||||
assert_static(prob_for_id(ID,EvalP)), % Prob is fixed -- assert it for quick retrieval
|
|
||||||
LProb is log(P);
|
LProb is log(P);
|
||||||
(
|
(
|
||||||
% Probability is a variable... check wether it appears in the term
|
% Probability is a variable... check wether it appears in the term
|
||||||
@ -496,6 +484,7 @@ problog_predicate(Name, Arity, ProblogName) :-
|
|||||||
ProbFact =.. [ProblogName,ID|L1],
|
ProbFact =.. [ProblogName,ID|L1],
|
||||||
prolog_load_context(module,Mod),
|
prolog_load_context(module,Mod),
|
||||||
make_add_to_proof(ID2,ProbEval,AddToProof),
|
make_add_to_proof(ID2,ProbEval,AddToProof),
|
||||||
|
|
||||||
assert( (Mod:OriginalGoal :- ProbFact,
|
assert( (Mod:OriginalGoal :- ProbFact,
|
||||||
(
|
(
|
||||||
non_ground_fact(ID)
|
non_ground_fact(ID)
|
||||||
@ -527,13 +516,11 @@ problog_predicate(Name, Arity, ProblogName) :-
|
|||||||
dynamic(problog:ProblogName/ArityPlus2).
|
dynamic(problog:ProblogName/ArityPlus2).
|
||||||
|
|
||||||
make_add_to_proof(ID2,ProbEval,O) :-
|
make_add_to_proof(ID2,ProbEval,O) :-
|
||||||
problog_flag(hacked_proofs,true), !,
|
problog_flag(fast_proofs,true), !,
|
||||||
O = hacked_add_to_proof(ID2,ProbEval).
|
O = fast_positive_add_to_proof(ID2,ProbEval).
|
||||||
make_add_to_proof(ID2,ProbEval,add_to_proof(ID2,ProbEval)).
|
make_add_to_proof(ID2,ProbEval,add_to_proof(ID2,ProbEval)).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% generate next global identifier
|
% generate next global identifier
|
||||||
probclause_id(ID) :-
|
probclause_id(ID) :-
|
||||||
nb_getval(probclause_counter,ID), !,
|
nb_getval(probclause_counter,ID), !,
|
||||||
@ -562,7 +549,7 @@ non_ground_fact_grounding_id(Goal,ID) :-
|
|||||||
nb_getval(non_ground_fact_grounding_id_counter,ID),
|
nb_getval(non_ground_fact_grounding_id_counter,ID),
|
||||||
ID2 is ID+1,
|
ID2 is ID+1,
|
||||||
nb_setval(non_ground_fact_grounding_id_counter,ID2),
|
nb_setval(non_ground_fact_grounding_id_counter,ID2),
|
||||||
once(assert(grounding_is_known(Goal,ID)))
|
assert(grounding_is_known(Goal,ID))
|
||||||
)
|
)
|
||||||
).
|
).
|
||||||
|
|
||||||
@ -572,16 +559,10 @@ reset_non_ground_facts :-
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% access/update the probability of ID's fact
|
% access/update the probability of ID's fact
|
||||||
% hardware-access version: naively scan all problog-predicates (except if prob is recorded in static database),
|
% hardware-access version: naively scan all problog-predicates,
|
||||||
% cut choice points if ID is ground (they'll all fail as ID is unique),
|
% cut choice points if ID is ground (they'll all fail as ID is unique),
|
||||||
% but not if it isn't (used to iterate over all facts when writing out probabilities for learning)
|
% but not if it isn't (used to iterate over all facts when writing out probabilities for learning)
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% using a dummy for the static prob database is more efficient than checking for current_predicate
|
|
||||||
prob_for_id(dummy,dummy).
|
|
||||||
get_fact_probability(ID,Prob) :-
|
|
||||||
ground(ID),
|
|
||||||
prob_for_id(ID,Prob),
|
|
||||||
!.
|
|
||||||
get_fact_probability(ID,Prob) :-
|
get_fact_probability(ID,Prob) :-
|
||||||
(
|
(
|
||||||
ground(ID) ->
|
ground(ID) ->
|
||||||
@ -726,8 +707,10 @@ add_to_proof(ID,Prob) :-
|
|||||||
)
|
)
|
||||||
).
|
).
|
||||||
|
|
||||||
% simpliciation
|
% this is a version for long proofs, it assumes we are using
|
||||||
hacked_add_to_proof(ID,Prob) :-
|
% tries, it assumes all our proofs never reuse ProbLog facts, and it assumes
|
||||||
|
% ground positive literals only.
|
||||||
|
fast_positive_add_to_proof(ID,Prob) :-
|
||||||
b_getval(problog_probability, CurrentP),
|
b_getval(problog_probability, CurrentP),
|
||||||
nb_getval(problog_threshold, CurrentThreshold),
|
nb_getval(problog_threshold, CurrentThreshold),
|
||||||
multiply_probabilities(CurrentP, Prob, NProb),
|
multiply_probabilities(CurrentP, Prob, NProb),
|
||||||
@ -822,16 +805,15 @@ multiply_probabilities(CurrentLogP, LogProb, NLogProb) :-
|
|||||||
|
|
||||||
% this is called by all inference methods before the actual ProbLog goal
|
% this is called by all inference methods before the actual ProbLog goal
|
||||||
% to set up environment for proving
|
% to set up environment for proving
|
||||||
% it resets control flags, method specific values to be set afterwards!
|
|
||||||
init_problog(Threshold) :-
|
init_problog(Threshold) :-
|
||||||
reset_non_ground_facts,
|
reset_non_ground_facts,
|
||||||
reset_control,
|
|
||||||
LT is log(Threshold),
|
LT is log(Threshold),
|
||||||
b_setval(problog_probability, 0.0),
|
b_setval(problog_probability, 0.0),
|
||||||
b_setval(problog_current_proof, []),
|
b_setval(problog_current_proof, []),
|
||||||
nb_setval(problog_threshold, LT),
|
nb_setval(problog_threshold, LT),
|
||||||
problog_flag(maxsteps,MaxS),
|
problog_flag(maxsteps,MaxS),
|
||||||
b_setval(problog_steps, MaxS).
|
b_setval(problog_steps, MaxS),
|
||||||
|
problog_control(off,limit).
|
||||||
|
|
||||||
% idea: proofs that are refinements of known proof can be pruned as they don't add probability mass
|
% idea: proofs that are refinements of known proof can be pruned as they don't add probability mass
|
||||||
% note that current ptree implementation doesn't provide the check as there's no efficient method known so far...
|
% note that current ptree implementation doesn't provide the check as there's no efficient method known so far...
|
||||||
@ -951,8 +933,8 @@ eval_dnf(ID,Prob,Status) :-
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
problog_threshold(Goal, Threshold, _, _, _) :-
|
problog_threshold(Goal, Threshold, _, _, _) :-
|
||||||
init_problog_threshold(Threshold),
|
|
||||||
problog_control(on,up),
|
problog_control(on,up),
|
||||||
|
init_problog_threshold(Threshold),
|
||||||
problog_call(Goal),
|
problog_call(Goal),
|
||||||
add_solution,
|
add_solution,
|
||||||
fail.
|
fail.
|
||||||
@ -988,8 +970,8 @@ compute_bounds(LP, UP, Status) :-
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
problog_low(Goal, Threshold, _, _) :-
|
problog_low(Goal, Threshold, _, _) :-
|
||||||
init_problog_low(Threshold),
|
|
||||||
problog_control(off,up),
|
problog_control(off,up),
|
||||||
|
init_problog_low(Threshold),
|
||||||
problog_call(Goal),
|
problog_call(Goal),
|
||||||
add_solution,
|
add_solution,
|
||||||
fail.
|
fail.
|
||||||
@ -1014,9 +996,9 @@ init_problog_low(Threshold) :-
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
problog_delta(Goal, Delta, Low, Up, Status) :-
|
problog_delta(Goal, Delta, Low, Up, Status) :-
|
||||||
|
problog_control(on,up),
|
||||||
problog_flag(first_threshold,InitT),
|
problog_flag(first_threshold,InitT),
|
||||||
init_problog_delta(InitT,Delta),
|
init_problog_delta(InitT,Delta),
|
||||||
problog_control(on,up),
|
|
||||||
problog_delta_id(Goal,Status),
|
problog_delta_id(Goal,Status),
|
||||||
delete_ptree(1),
|
delete_ptree(1),
|
||||||
delete_ptree(2),
|
delete_ptree(2),
|
||||||
@ -1142,9 +1124,9 @@ eval_upper(N,UpP,ok) :-
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
problog_max(Goal, Prob, Facts) :-
|
problog_max(Goal, Prob, Facts) :-
|
||||||
|
problog_control(off,up),
|
||||||
problog_flag(first_threshold,InitT),
|
problog_flag(first_threshold,InitT),
|
||||||
init_problog_max(InitT),
|
init_problog_max(InitT),
|
||||||
problog_control(off,up),
|
|
||||||
problog_max_id(Goal, Prob, FactIDs),
|
problog_max_id(Goal, Prob, FactIDs),
|
||||||
( FactIDs = [_|_] -> get_fact_list(FactIDs,Facts);
|
( FactIDs = [_|_] -> get_fact_list(FactIDs,Facts);
|
||||||
Facts = FactIDs).
|
Facts = FactIDs).
|
||||||
@ -1220,9 +1202,9 @@ problog_kbest_save(Goal, K, Prob, Status, BDDFile, ParamFile) :-
|
|||||||
true).
|
true).
|
||||||
|
|
||||||
problog_kbest(Goal, K, Prob, Status) :-
|
problog_kbest(Goal, K, Prob, Status) :-
|
||||||
|
problog_control(off,up),
|
||||||
problog_flag(first_threshold,InitT),
|
problog_flag(first_threshold,InitT),
|
||||||
init_problog_kbest(InitT),
|
init_problog_kbest(InitT),
|
||||||
problog_control(off,up),
|
|
||||||
problog_kbest_id(Goal, K),
|
problog_kbest_id(Goal, K),
|
||||||
retract(current_kbest(_,ListFound,_NumFound)),
|
retract(current_kbest(_,ListFound,_NumFound)),
|
||||||
build_prefixtree(ListFound),
|
build_prefixtree(ListFound),
|
||||||
@ -1273,17 +1255,13 @@ update_current_kbest(K,NewLogProb,Cl) :-
|
|||||||
(NewLength < K ->
|
(NewLength < K ->
|
||||||
assert(current_kbest(OldThres,NewList,NewLength))
|
assert(current_kbest(OldThres,NewList,NewLength))
|
||||||
;
|
;
|
||||||
(NewLength>K
|
(NewLength>K ->
|
||||||
->
|
|
||||||
First is NewLength-K+1,
|
First is NewLength-K+1,
|
||||||
cutoff(NewList,NewLength,First,FinalList,FinalLength)
|
cutoff(NewList,NewLength,First,FinalList,FinalLength)
|
||||||
;
|
; FinalList=NewList, FinalLength=NewLength),
|
||||||
FinalList=NewList, FinalLength=NewLength
|
|
||||||
),
|
|
||||||
FinalList=[NewThres-_|_],
|
FinalList=[NewThres-_|_],
|
||||||
nb_setval(problog_threshold,NewThres),
|
nb_setval(problog_threshold,NewThres),
|
||||||
assert(current_kbest(NewThres,FinalList,FinalLength))
|
assert(current_kbest(NewThres,FinalList,FinalLength))).
|
||||||
).
|
|
||||||
|
|
||||||
sorted_insert(A,[],[A]).
|
sorted_insert(A,[],[A]).
|
||||||
sorted_insert(A-LA,[B1-LB1|B], [A-LA,B1-LB1|B] ) :-
|
sorted_insert(A-LA,[B1-LB1|B], [A-LA,B1-LB1|B] ) :-
|
||||||
@ -1401,33 +1379,14 @@ mc_prove(A) :- !,
|
|||||||
|
|
||||||
clean_sample :-
|
clean_sample :-
|
||||||
reset_static_array(mc_sample),
|
reset_static_array(mc_sample),
|
||||||
problog_tabled(P),%show_table(P),table_statistics(P),get(_),
|
|
||||||
abolish_table(P),
|
|
||||||
fail.
|
fail.
|
||||||
clean_sample.
|
clean_sample.
|
||||||
|
|
||||||
% find new proof -- need to reset control after init
|
% find new proof
|
||||||
get_some_proof(Goal) :-
|
get_some_proof(Goal) :-
|
||||||
init_problog(0),
|
init_problog(0),
|
||||||
problog_control(on,mc),
|
|
||||||
problog_call(Goal).
|
problog_call(Goal).
|
||||||
|
|
||||||
problog_table(M:P) :- !,
|
|
||||||
problog_table(P,M).
|
|
||||||
problog_table(P) :-
|
|
||||||
prolog_load_context(module,M),
|
|
||||||
problog_table(P,M).
|
|
||||||
|
|
||||||
problog_table(M:P,_) :-
|
|
||||||
problog_table(P,M).
|
|
||||||
problog_table((P1,P2),M) :-
|
|
||||||
problog_table(P1,M),
|
|
||||||
problog_table(P2,M).
|
|
||||||
problog_table(P,M) :-
|
|
||||||
table(M:P),
|
|
||||||
assert(problog_tabled(M:P)).
|
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% exact probability of all ground instances of Goal
|
% exact probability of all ground instances of Goal
|
||||||
% output goes to File
|
% output goes to File
|
||||||
|
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% $Date: 2009-06-17 22:22:00 +0200 (Wed, 17 Jun 2009) $
|
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||||
% $Revision: 1550 $
|
% $Revision: 1550 $
|
||||||
%
|
%
|
||||||
% This file is part of ProbLog
|
% This file is part of ProbLog
|
||||||
% http://dtai.cs.kuleuven.be/problog
|
% http://dtai.cs.kuleuven.be/problog
|
||||||
%
|
%
|
||||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
% Copyright 2009 Katholieke Universiteit Leuven
|
||||||
|
%
|
||||||
|
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||||
|
% Vitor Santos Costa
|
||||||
%
|
%
|
||||||
% Copyright 2009
|
|
||||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
|
||||||
%
|
%
|
||||||
% Main authors of this file:
|
% Main authors of this file:
|
||||||
% Angelika Kimmig, Vitor Santos Costa
|
% Angelika Kimmig, Vitor Santos Costa
|
||||||
@ -216,7 +217,7 @@
|
|||||||
|
|
||||||
:- ensure_loaded(library(system)).
|
:- ensure_loaded(library(system)).
|
||||||
|
|
||||||
:- dynamic bdd_time/1, first_threshold/1, last_threshold/1, id_stepsize/1, prunecheck/1, maxsteps/1, mc_batchsize/1, mc_logfile/1, bdd_file/1, bdd_par_file/1, bdd_result/1, work_dir/1, save_bdd/1, problog_verbose/1, hacked_proofs/1.
|
:- dynamic bdd_time/1, first_threshold/1, last_threshold/1, id_stepsize/1, prunecheck/1, maxsteps/1, mc_batchsize/1, mc_logfile/1, bdd_file/1, bdd_par_file/1, bdd_result/1, work_dir/1, save_bdd/1, problog_verbose/1, fast_proofs/1.
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% global parameters that can be set using set_problog_flag/2
|
% global parameters that can be set using set_problog_flag/2
|
||||||
@ -258,8 +259,8 @@ get_problog_flag(save_bdd,X) :-
|
|||||||
save_bdd(X).
|
save_bdd(X).
|
||||||
get_problog_flag(verbose,X) :-
|
get_problog_flag(verbose,X) :-
|
||||||
problog_verbose(X).
|
problog_verbose(X).
|
||||||
get_problog_flag(hacked_proofs,X) :-
|
get_problog_flag(fast_proofs,X) :-
|
||||||
hacked_proofs(X).
|
fast_proofs(X).
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%
|
%%%%%%%%%%%%
|
||||||
@ -474,17 +475,18 @@ set_problog_flag(verbose,_) :-
|
|||||||
flush_output(user),
|
flush_output(user),
|
||||||
fail.
|
fail.
|
||||||
|
|
||||||
set_problog_flag(hacked_proofs,true) :-
|
set_problog_flag(fast_proofs,true) :-
|
||||||
retractall(hacked_proofs(_)),
|
retractall(fast_proofs(_)),
|
||||||
assert(hacked_proofs(true)).
|
assert(fast_proofs(true)).
|
||||||
set_problog_flag(hacked_proofs,false) :-
|
set_problog_flag(fast_proofs,false) :-
|
||||||
retractall(hacked_proofs(_)),
|
retractall(fast_proofs(_)),
|
||||||
assert(hacked_proofs(true)).
|
assert(fast_proofs(true)).
|
||||||
set_problog_flag(hacked_proofs,V) :-
|
set_problog_flag(fast_proofs,V) :-
|
||||||
format(user,'\% ERROR: value ~w should be \'true\' or \'false\'!~n',[V]),
|
format(user,'\% ERROR: value ~w should be \'true\' or \'false\'!~n',[V]),
|
||||||
flush_output(user),
|
flush_output(user),
|
||||||
fail.
|
fail.
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% show values
|
% show values
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% $Date: 2009-06-24 22:07:32 +0200 (Wed, 24 Jun 2009) $
|
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||||
% $Revision: 1669 $
|
% $Revision: 1550 $
|
||||||
%
|
%
|
||||||
% This file is part of ProbLog
|
% This file is part of ProbLog
|
||||||
% http://dtai.cs.kuleuven.be/problog
|
% http://dtai.cs.kuleuven.be/problog
|
||||||
%
|
%
|
||||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
% Copyright 2009 Katholieke Universiteit Leuven
|
||||||
|
%
|
||||||
|
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||||
|
% Vitor Santos Costa
|
||||||
%
|
%
|
||||||
% Copyright 2009
|
|
||||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
|
||||||
%
|
%
|
||||||
% Main authors of this file:
|
% Main authors of this file:
|
||||||
% Angelika Kimmig, Vitor Santos Costa
|
% Angelika Kimmig, Vitor Santos Costa
|
||||||
@ -212,16 +213,11 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
:- module(print, [print_param/4,
|
:- module(print, [print_param/4,
|
||||||
print_long_param/4,
|
|
||||||
print_sep_line/0,
|
print_sep_line/0,
|
||||||
print_inference/2]).
|
print_inference/2]).
|
||||||
|
|
||||||
print_param(Keyword,Value,Function,Legal) :-
|
print_param(Keyword,Value,Function,Legal) :-
|
||||||
format(user,'~w~55+~q~15+~w~30+~w~25+~n',[Keyword,Value,Function,Legal]).
|
format(user,'~w~55+~q~15+~w~30+~w~25+~n',[Keyword,Value,Function,Legal]).
|
||||||
print_long_param(Keyword,Value,Function,Legal) :-
|
|
||||||
format(user,'~w~55+~q~15+~w~30+~w~25+~n',[Keyword,Value,'','']),
|
|
||||||
format(user,'~w~55+~w~15+~w~30+~w~25+~n',['','',Function,Legal]).
|
|
||||||
|
|
||||||
print_sep_line :-
|
print_sep_line :-
|
||||||
sep_line(125).
|
sep_line(125).
|
||||||
sep_line(0) :-
|
sep_line(0) :-
|
||||||
|
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% $Date: 2009-06-29 17:10:57 +0200 (Mon, 29 Jun 2009) $
|
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||||
% $Revision: 1782 $
|
% $Revision: 1550 $
|
||||||
%
|
%
|
||||||
% This file is part of ProbLog
|
% This file is part of ProbLog
|
||||||
% http://dtai.cs.kuleuven.be/problog
|
% http://dtai.cs.kuleuven.be/problog
|
||||||
%
|
%
|
||||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
% Copyright 2009 Katholieke Universiteit Leuven
|
||||||
|
%
|
||||||
|
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||||
|
% Vitor Santos Costa
|
||||||
%
|
%
|
||||||
% Copyright 2009
|
|
||||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
|
||||||
%
|
%
|
||||||
% Main authors of this file:
|
% Main authors of this file:
|
||||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||||
@ -272,7 +273,9 @@ init_ptree(ID) :-
|
|||||||
delete_ptree(ID) :-
|
delete_ptree(ID) :-
|
||||||
sym(ID,Sym),
|
sym(ID,Sym),
|
||||||
nb_getval(Sym, Trie), !,
|
nb_getval(Sym, Trie), !,
|
||||||
trie_close(Trie).
|
trie_close(Trie),
|
||||||
|
trie_open(NewTrie),
|
||||||
|
nb_setval(Sym, NewTrie).
|
||||||
delete_ptree(_).
|
delete_ptree(_).
|
||||||
|
|
||||||
rename_ptree(OldID,NewID) :-
|
rename_ptree(OldID,NewID) :-
|
||||||
|
@ -3,139 +3,182 @@
|
|||||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||||
* *
|
* *
|
||||||
* Copyright T. Mantadelis and Katholieke Universiteit Leuven 2008 *
|
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis *
|
* Author: Theofrastos Mantadelis *
|
||||||
* File: Example.c *
|
* File: Example.c *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
* The "Artistic License" *
|
* Artistic License 2.0 *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||||
|
* *
|
||||||
|
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||||
|
* document, but changing it is not allowed. *
|
||||||
* *
|
* *
|
||||||
* Preamble *
|
* Preamble *
|
||||||
* *
|
* *
|
||||||
* The intent of this document is to state the conditions under which a *
|
* This license establishes the terms under which a given free software Package *
|
||||||
* Package may be copied, such that the Copyright Holder maintains some *
|
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||||
* semblance of artistic control over the development of the package, *
|
* that the Copyright Holder maintains some artistic control over the *
|
||||||
* while giving the users of the package the right to use and distribute *
|
* development of that Package while still keeping the Package available as *
|
||||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
* open source and free software. *
|
||||||
* reasonable modifications. *
|
|
||||||
* *
|
* *
|
||||||
* Definitions: *
|
* You are always permitted to make arrangements wholly outside of this license *
|
||||||
|
* directly with the Copyright Holder of a given Package. If the terms of this *
|
||||||
|
* license do not permit the full use that you propose to make of the Package, *
|
||||||
|
* you should contact the Copyright Holder and seek a different licensing *
|
||||||
|
* arrangement. *
|
||||||
|
* Definitions *
|
||||||
* *
|
* *
|
||||||
* "Package" refers to the collection of files distributed by the *
|
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||||
* Copyright Holder, and derivatives of that collection of files *
|
* copyright notice for the entire Package. *
|
||||||
* created through textual modification. *
|
|
||||||
* *
|
* *
|
||||||
* "Standard Version" refers to such a Package if it has not been *
|
* "Contributor" means any party that has contributed code or other material to *
|
||||||
* modified, or has been modified in accordance with the wishes *
|
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||||
* of the Copyright Holder as specified below. *
|
|
||||||
* *
|
* *
|
||||||
* "Copyright Holder" is whoever is named in the copyright or *
|
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||||
* copyrights for the package. *
|
* modify the Package. *
|
||||||
* *
|
* *
|
||||||
* "You" is you, if you're thinking about copying or distributing *
|
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||||
* this Package. *
|
* and derivatives of that collection and/or of those files. A given Package *
|
||||||
|
* may consist of either the Standard Version, or a Modified Version. *
|
||||||
* *
|
* *
|
||||||
* "Reasonable copying fee" is whatever you can justify on the *
|
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||||
* basis of media cost, duplication charges, time of people involved, *
|
* to anyone else, or in the case of a company or organization, to others *
|
||||||
* and so on. (You will not be required to justify it to the *
|
* outside of your company or organization. *
|
||||||
* Copyright Holder, but only to the computing community at large *
|
|
||||||
* as a market that must bear the fee.) *
|
|
||||||
* *
|
* *
|
||||||
* "Freely Available" means that no fee is charged for the item *
|
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||||
* itself, though there may be fees involved in handling the item. *
|
* Package or providing support for this Package to another party. It does not *
|
||||||
* It also means that recipients of the item may redistribute it *
|
* mean licensing fees. *
|
||||||
* under the same conditions they received it. *
|
|
||||||
* *
|
* *
|
||||||
* 1. You may make and give away verbatim copies of the source form of the *
|
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||||
* Standard Version of this Package without restriction, provided that you *
|
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
|
||||||
* *
|
* *
|
||||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
* "Modified Version" means the Package, if it has been changed, and such *
|
||||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
* changes were not explicitly requested by the Copyright Holder. *
|
||||||
* modified in such a way shall still be considered the Standard Version. *
|
|
||||||
* *
|
* *
|
||||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
* "Original License" means this Artistic License as Distributed with the *
|
||||||
* that you insert a prominent notice in each changed file stating how and *
|
* Standard Version of the Package, in its current version or as it may be *
|
||||||
* when you changed that file, and provided that you do at least ONE of the *
|
* modified by The Perl Foundation in the future. *
|
||||||
* following: *
|
|
||||||
* *
|
* *
|
||||||
* a) place your modifications in the Public Domain or otherwise make them *
|
* "Source" form means the source code, documentation source, and configuration *
|
||||||
* Freely Available, such as by posting said modifications to Usenet or *
|
* files for the Package. *
|
||||||
* an equivalent medium, or placing the modifications on a major archive *
|
|
||||||
* site such as uunet.uu.net, or by allowing the Copyright Holder to include *
|
|
||||||
* your modifications in the Standard Version of the Package. *
|
|
||||||
* *
|
* *
|
||||||
* b) use the modified Package only within your corporation or organization. *
|
* "Compiled" form means the compiled bytecode, object code, binary, or any *
|
||||||
|
* other form resulting from mechanical transformation or translation of the *
|
||||||
|
* Source form. *
|
||||||
|
* Permission for Use and Modification Without Distribution *
|
||||||
* *
|
* *
|
||||||
* c) rename any non-standard executables so the names do not conflict *
|
* (1) You are permitted to use the Standard Version and create and use *
|
||||||
* with standard executables, which must also be provided, and provide *
|
* Modified Versions for any purpose without restriction, provided that you do *
|
||||||
* a separate manual page for each non-standard executable that clearly *
|
* not Distribute the Modified Version. *
|
||||||
* documents how it differs from the Standard Version. *
|
* Permissions for Redistribution of the Standard Version *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (2) You may Distribute verbatim copies of the Source form of the Standard *
|
||||||
|
* Version of this Package in any medium without restriction, either gratis or *
|
||||||
|
* for a Distributor Fee, provided that you duplicate all of the original *
|
||||||
|
* copyright notices and associated disclaimers. At your discretion, such *
|
||||||
|
* verbatim copies may or may not include a Compiled form of the Package. *
|
||||||
* *
|
* *
|
||||||
* 4. You may distribute the programs of this Package in object code or *
|
* (3) You may apply any bug fixes, portability changes, and other *
|
||||||
* executable form, provided that you do at least ONE of the following: *
|
* modifications made available from the Copyright Holder. The resulting *
|
||||||
|
* Package will still be considered the Standard Version, and as such will be *
|
||||||
|
* subject to the Original License. *
|
||||||
|
* Distribution of Modified Versions of the Package as Source *
|
||||||
* *
|
* *
|
||||||
* a) distribute a Standard Version of the executables and library files, *
|
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||||
* together with instructions (in the manual page or equivalent) on where *
|
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||||
* to get the Standard Version. *
|
* Version) provided that you clearly document how it differs from the Standard *
|
||||||
|
* Version, including, but not limited to, documenting any non-standard *
|
||||||
|
* features, executables, or modules, and provided that you do at least ONE of *
|
||||||
|
* the following: *
|
||||||
* *
|
* *
|
||||||
* b) accompany the distribution with the machine-readable source of *
|
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||||
* the Package with your modifications. *
|
* Standard Version, under the Original License, so that the Copyright Holder *
|
||||||
|
* may include your modifications in the Standard Version. *
|
||||||
|
* (b) ensure that installation of your Modified Version does not prevent the *
|
||||||
|
* user installing or running the Standard Version. In addition, the Modified *
|
||||||
|
* Version must bear a name that is different from the name of the Standard *
|
||||||
|
* Version. *
|
||||||
|
* (c) allow anyone who receives a copy of the Modified Version to make the *
|
||||||
|
* Source form of the Modified Version available to others under *
|
||||||
|
* (i) the Original License or *
|
||||||
|
* (ii) a license that permits the licensee to freely copy, modify and *
|
||||||
|
* redistribute the Modified Version using the same licensing terms that apply *
|
||||||
|
* to the copy that the licensee received, and requires that the Source form of *
|
||||||
|
* the Modified Version, and of any works derived from it, be made freely *
|
||||||
|
* available in that license fees are prohibited but Distributor Fees are *
|
||||||
|
* allowed. *
|
||||||
|
* Distribution of Compiled Forms of the Standard Version or Modified Versions *
|
||||||
|
* without the Source *
|
||||||
* *
|
* *
|
||||||
* c) give non-standard executables non-standard names, and clearly *
|
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||||
* document the differences in manual pages (or equivalent), together *
|
* Source, provided that you include complete instructions on how to get the *
|
||||||
* with instructions on where to get the Standard Version. *
|
* Source of the Standard Version. Such instructions must be valid at the time *
|
||||||
|
* of your distribution. If these instructions, at any time while you are *
|
||||||
|
* carrying out such distribution, become invalid, you must provide new *
|
||||||
|
* instructions on demand or cease further distribution. If you provide valid *
|
||||||
|
* instructions or cease distribution within thirty days after you become aware *
|
||||||
|
* that the instructions are invalid, then you do not forfeit any of your *
|
||||||
|
* rights under this license. *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (6) You may Distribute a Modified Version in Compiled form without the *
|
||||||
|
* Source, provided that you comply with Section 4 with respect to the Source *
|
||||||
|
* of the Modified Version. *
|
||||||
|
* Aggregating or Linking the Package *
|
||||||
* *
|
* *
|
||||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||||
* Package. You may charge any fee you choose for support of this *
|
* Version) with other packages and Distribute the resulting aggregation *
|
||||||
* Package. You may not charge a fee for this Package itself. However, *
|
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||||
* you may distribute this Package in aggregate with other (possibly *
|
* Fees are permitted, and licensing fees for other components in the *
|
||||||
* commercial) programs as part of a larger (possibly commercial) software *
|
* aggregation are permitted. The terms of this license apply to the use and *
|
||||||
* distribution provided that you do not advertise this Package as a *
|
* Distribution of the Standard or Modified Versions as included in the *
|
||||||
* product of your own. You may embed this Package's interpreter within *
|
* aggregation. *
|
||||||
* an executable of yours (by linking); this shall be construed as a mere *
|
|
||||||
* form of aggregation, provided that the complete Standard Version of the *
|
|
||||||
* interpreter is so embedded. *
|
|
||||||
* *
|
* *
|
||||||
* 6. The scripts and library files supplied as input to or produced as *
|
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||||
* output from the programs of this Package do not automatically fall *
|
* works, to embed the Package in a larger work of your own, or to build *
|
||||||
* under the copyright of this Package, but belong to whoever generated *
|
* stand-alone binary or bytecode versions of applications that include the *
|
||||||
* them, and may be sold commercially, and may be aggregated with this *
|
* Package, and Distribute the result without restriction, provided the result *
|
||||||
* Package. If such scripts or library files are aggregated with this *
|
* does not expose a direct interface to the Package. *
|
||||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
* Items That are Not Considered Part of a Modified Version *
|
||||||
* binary executable image, then distribution of such an image shall *
|
|
||||||
* neither be construed as a distribution of this Package nor shall it *
|
|
||||||
* fall under the restrictions of Paragraphs 3 and 4, provided that you do *
|
|
||||||
* not represent such an executable image as a Standard Version of this *
|
|
||||||
* Package. *
|
|
||||||
* *
|
* *
|
||||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||||
* languages) supplied by you and linked into this Package in order to *
|
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||||
* emulate subroutines and variables of the language defined by this *
|
* to be a Modified Version. In addition, such works are not considered parts *
|
||||||
* Package shall not be considered part of this Package, but are the *
|
* of the Package itself, and are not subject to the terms of this license. *
|
||||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
* General Provisions *
|
||||||
* not change the language in any way that would cause it to fail the *
|
|
||||||
* regression tests for the language. *
|
|
||||||
* *
|
* *
|
||||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||||
* permitted provided that the use of this Package is embedded; that is, *
|
* Versions is governed by this Artistic License. By using, modifying or *
|
||||||
* when no overt attempt is made to make this Package's interfaces visible *
|
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||||
* to the end user of the commercial distribution. Such use shall not be *
|
* distribute the Package, if you do not accept this license. *
|
||||||
* construed as a distribution of this Package. *
|
|
||||||
* *
|
* *
|
||||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||||
* products derived from this software without specific prior written *
|
* by someone other than you, you are nevertheless required to ensure that your *
|
||||||
* permission. *
|
* Modified Version complies with the requirements of this license. *
|
||||||
* *
|
* *
|
||||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
* (12) This license does not grant you the right to use any trademark, service *
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
* mark, tradename, or logo of the Copyright Holder. *
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
* *
|
||||||
|
* (13) This license includes the non-exclusive, worldwide, free-of-charge *
|
||||||
|
* patent license to make, have made, use, offer to sell, sell, import and *
|
||||||
|
* otherwise transfer the Package with respect to any patent claims licensable *
|
||||||
|
* by the Copyright Holder that are necessarily infringed by the Package. If *
|
||||||
|
* you institute patent litigation (including a cross-claim or counterclaim) *
|
||||||
|
* against any party alleging that the Package constitutes direct or *
|
||||||
|
* contributory patent infringement, then this Artistic License to you shall *
|
||||||
|
* terminate on the date that such litigation is filed. *
|
||||||
|
* *
|
||||||
|
* (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER *
|
||||||
|
* AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE *
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR *
|
||||||
|
* NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. *
|
||||||
|
* UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE *
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN *
|
||||||
|
* ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF *
|
||||||
|
* SUCH DAMAGE. *
|
||||||
* *
|
* *
|
||||||
* The End *
|
* The End *
|
||||||
* *
|
* *
|
||||||
@ -228,7 +271,7 @@ void DFS(extmanager MyManager, DdNode *Current) {
|
|||||||
char *curnode;
|
char *curnode;
|
||||||
curnode = GetNodeVarNameDisp(MyManager.manager, MyManager.varmap, Current);
|
curnode = GetNodeVarNameDisp(MyManager.manager, MyManager.varmap, Current);
|
||||||
if (GetIndex(Current) < MyManager.varmap.varcnt) {
|
if (GetIndex(Current) < MyManager.varmap.varcnt) {
|
||||||
printf("%s(%f,%i,%s)\n", curnode, MyManager.varmap.dvalue[GetIndex(Current)], MyManager.varmap.ivalue[GetIndex(Current)], MyManager.varmap.dynvalue[GetIndex(Current)]);
|
printf("%s(%f,%i,%s)\n", curnode, MyManager.varmap.dvalue[GetIndex(Current)], MyManager.varmap.ivalue[GetIndex(Current)], (char *) MyManager.varmap.dynvalue[GetIndex(Current)]);
|
||||||
} else {
|
} else {
|
||||||
printf("%s\n", curnode);
|
printf("%s\n", curnode);
|
||||||
}
|
}
|
||||||
|
@ -3,140 +3,182 @@
|
|||||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||||
* *
|
* *
|
||||||
* Copyright T. Mantadelis, A. Kimmig, B. Gutmann *
|
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||||
* and Katholieke Universiteit Leuven 2008 *
|
|
||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis, Angelika Kimmig, Bernd Gutmann *
|
* Author: Theofrastos Mantadelis, Angelika Kimmig, Bernd Gutmann *
|
||||||
* File: ProblogBDD.c *
|
* File: ProblogBDD.c *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
* The "Artistic License" *
|
* Artistic License 2.0 *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||||
|
* *
|
||||||
|
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||||
|
* document, but changing it is not allowed. *
|
||||||
* *
|
* *
|
||||||
* Preamble *
|
* Preamble *
|
||||||
* *
|
* *
|
||||||
* The intent of this document is to state the conditions under which a *
|
* This license establishes the terms under which a given free software Package *
|
||||||
* Package may be copied, such that the Copyright Holder maintains some *
|
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||||
* semblance of artistic control over the development of the package, *
|
* that the Copyright Holder maintains some artistic control over the *
|
||||||
* while giving the users of the package the right to use and distribute *
|
* development of that Package while still keeping the Package available as *
|
||||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
* open source and free software. *
|
||||||
* reasonable modifications. *
|
|
||||||
* *
|
* *
|
||||||
* Definitions: *
|
* You are always permitted to make arrangements wholly outside of this license *
|
||||||
|
* directly with the Copyright Holder of a given Package. If the terms of this *
|
||||||
|
* license do not permit the full use that you propose to make of the Package, *
|
||||||
|
* you should contact the Copyright Holder and seek a different licensing *
|
||||||
|
* arrangement. *
|
||||||
|
* Definitions *
|
||||||
* *
|
* *
|
||||||
* "Package" refers to the collection of files distributed by the *
|
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||||
* Copyright Holder, and derivatives of that collection of files *
|
* copyright notice for the entire Package. *
|
||||||
* created through textual modification. *
|
|
||||||
* *
|
* *
|
||||||
* "Standard Version" refers to such a Package if it has not been *
|
* "Contributor" means any party that has contributed code or other material to *
|
||||||
* modified, or has been modified in accordance with the wishes *
|
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||||
* of the Copyright Holder as specified below. *
|
|
||||||
* *
|
* *
|
||||||
* "Copyright Holder" is whoever is named in the copyright or *
|
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||||
* copyrights for the package. *
|
* modify the Package. *
|
||||||
* *
|
* *
|
||||||
* "You" is you, if you're thinking about copying or distributing *
|
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||||
* this Package. *
|
* and derivatives of that collection and/or of those files. A given Package *
|
||||||
|
* may consist of either the Standard Version, or a Modified Version. *
|
||||||
* *
|
* *
|
||||||
* "Reasonable copying fee" is whatever you can justify on the *
|
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||||
* basis of media cost, duplication charges, time of people involved, *
|
* to anyone else, or in the case of a company or organization, to others *
|
||||||
* and so on. (You will not be required to justify it to the *
|
* outside of your company or organization. *
|
||||||
* Copyright Holder, but only to the computing community at large *
|
|
||||||
* as a market that must bear the fee.) *
|
|
||||||
* *
|
* *
|
||||||
* "Freely Available" means that no fee is charged for the item *
|
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||||
* itself, though there may be fees involved in handling the item. *
|
* Package or providing support for this Package to another party. It does not *
|
||||||
* It also means that recipients of the item may redistribute it *
|
* mean licensing fees. *
|
||||||
* under the same conditions they received it. *
|
|
||||||
* *
|
* *
|
||||||
* 1. You may make and give away verbatim copies of the source form of the *
|
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||||
* Standard Version of this Package without restriction, provided that you *
|
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
|
||||||
* *
|
* *
|
||||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
* "Modified Version" means the Package, if it has been changed, and such *
|
||||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
* changes were not explicitly requested by the Copyright Holder. *
|
||||||
* modified in such a way shall still be considered the Standard Version. *
|
|
||||||
* *
|
* *
|
||||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
* "Original License" means this Artistic License as Distributed with the *
|
||||||
* that you insert a prominent notice in each changed file stating how and *
|
* Standard Version of the Package, in its current version or as it may be *
|
||||||
* when you changed that file, and provided that you do at least ONE of the *
|
* modified by The Perl Foundation in the future. *
|
||||||
* following: *
|
|
||||||
* *
|
* *
|
||||||
* a) place your modifications in the Public Domain or otherwise make them *
|
* "Source" form means the source code, documentation source, and configuration *
|
||||||
* Freely Available, such as by posting said modifications to Usenet or *
|
* files for the Package. *
|
||||||
* an equivalent medium, or placing the modifications on a major archive *
|
|
||||||
* site such as uunet.uu.net, or by allowing the Copyright Holder to include *
|
|
||||||
* your modifications in the Standard Version of the Package. *
|
|
||||||
* *
|
* *
|
||||||
* b) use the modified Package only within your corporation or organization. *
|
* "Compiled" form means the compiled bytecode, object code, binary, or any *
|
||||||
|
* other form resulting from mechanical transformation or translation of the *
|
||||||
|
* Source form. *
|
||||||
|
* Permission for Use and Modification Without Distribution *
|
||||||
* *
|
* *
|
||||||
* c) rename any non-standard executables so the names do not conflict *
|
* (1) You are permitted to use the Standard Version and create and use *
|
||||||
* with standard executables, which must also be provided, and provide *
|
* Modified Versions for any purpose without restriction, provided that you do *
|
||||||
* a separate manual page for each non-standard executable that clearly *
|
* not Distribute the Modified Version. *
|
||||||
* documents how it differs from the Standard Version. *
|
* Permissions for Redistribution of the Standard Version *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (2) You may Distribute verbatim copies of the Source form of the Standard *
|
||||||
|
* Version of this Package in any medium without restriction, either gratis or *
|
||||||
|
* for a Distributor Fee, provided that you duplicate all of the original *
|
||||||
|
* copyright notices and associated disclaimers. At your discretion, such *
|
||||||
|
* verbatim copies may or may not include a Compiled form of the Package. *
|
||||||
* *
|
* *
|
||||||
* 4. You may distribute the programs of this Package in object code or *
|
* (3) You may apply any bug fixes, portability changes, and other *
|
||||||
* executable form, provided that you do at least ONE of the following: *
|
* modifications made available from the Copyright Holder. The resulting *
|
||||||
|
* Package will still be considered the Standard Version, and as such will be *
|
||||||
|
* subject to the Original License. *
|
||||||
|
* Distribution of Modified Versions of the Package as Source *
|
||||||
* *
|
* *
|
||||||
* a) distribute a Standard Version of the executables and library files, *
|
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||||
* together with instructions (in the manual page or equivalent) on where *
|
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||||
* to get the Standard Version. *
|
* Version) provided that you clearly document how it differs from the Standard *
|
||||||
|
* Version, including, but not limited to, documenting any non-standard *
|
||||||
|
* features, executables, or modules, and provided that you do at least ONE of *
|
||||||
|
* the following: *
|
||||||
* *
|
* *
|
||||||
* b) accompany the distribution with the machine-readable source of *
|
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||||
* the Package with your modifications. *
|
* Standard Version, under the Original License, so that the Copyright Holder *
|
||||||
|
* may include your modifications in the Standard Version. *
|
||||||
|
* (b) ensure that installation of your Modified Version does not prevent the *
|
||||||
|
* user installing or running the Standard Version. In addition, the Modified *
|
||||||
|
* Version must bear a name that is different from the name of the Standard *
|
||||||
|
* Version. *
|
||||||
|
* (c) allow anyone who receives a copy of the Modified Version to make the *
|
||||||
|
* Source form of the Modified Version available to others under *
|
||||||
|
* (i) the Original License or *
|
||||||
|
* (ii) a license that permits the licensee to freely copy, modify and *
|
||||||
|
* redistribute the Modified Version using the same licensing terms that apply *
|
||||||
|
* to the copy that the licensee received, and requires that the Source form of *
|
||||||
|
* the Modified Version, and of any works derived from it, be made freely *
|
||||||
|
* available in that license fees are prohibited but Distributor Fees are *
|
||||||
|
* allowed. *
|
||||||
|
* Distribution of Compiled Forms of the Standard Version or Modified Versions *
|
||||||
|
* without the Source *
|
||||||
* *
|
* *
|
||||||
* c) give non-standard executables non-standard names, and clearly *
|
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||||
* document the differences in manual pages (or equivalent), together *
|
* Source, provided that you include complete instructions on how to get the *
|
||||||
* with instructions on where to get the Standard Version. *
|
* Source of the Standard Version. Such instructions must be valid at the time *
|
||||||
|
* of your distribution. If these instructions, at any time while you are *
|
||||||
|
* carrying out such distribution, become invalid, you must provide new *
|
||||||
|
* instructions on demand or cease further distribution. If you provide valid *
|
||||||
|
* instructions or cease distribution within thirty days after you become aware *
|
||||||
|
* that the instructions are invalid, then you do not forfeit any of your *
|
||||||
|
* rights under this license. *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (6) You may Distribute a Modified Version in Compiled form without the *
|
||||||
|
* Source, provided that you comply with Section 4 with respect to the Source *
|
||||||
|
* of the Modified Version. *
|
||||||
|
* Aggregating or Linking the Package *
|
||||||
* *
|
* *
|
||||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||||
* Package. You may charge any fee you choose for support of this *
|
* Version) with other packages and Distribute the resulting aggregation *
|
||||||
* Package. You may not charge a fee for this Package itself. However, *
|
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||||
* you may distribute this Package in aggregate with other (possibly *
|
* Fees are permitted, and licensing fees for other components in the *
|
||||||
* commercial) programs as part of a larger (possibly commercial) software *
|
* aggregation are permitted. The terms of this license apply to the use and *
|
||||||
* distribution provided that you do not advertise this Package as a *
|
* Distribution of the Standard or Modified Versions as included in the *
|
||||||
* product of your own. You may embed this Package's interpreter within *
|
* aggregation. *
|
||||||
* an executable of yours (by linking); this shall be construed as a mere *
|
|
||||||
* form of aggregation, provided that the complete Standard Version of the *
|
|
||||||
* interpreter is so embedded. *
|
|
||||||
* *
|
* *
|
||||||
* 6. The scripts and library files supplied as input to or produced as *
|
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||||
* output from the programs of this Package do not automatically fall *
|
* works, to embed the Package in a larger work of your own, or to build *
|
||||||
* under the copyright of this Package, but belong to whoever generated *
|
* stand-alone binary or bytecode versions of applications that include the *
|
||||||
* them, and may be sold commercially, and may be aggregated with this *
|
* Package, and Distribute the result without restriction, provided the result *
|
||||||
* Package. If such scripts or library files are aggregated with this *
|
* does not expose a direct interface to the Package. *
|
||||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
* Items That are Not Considered Part of a Modified Version *
|
||||||
* binary executable image, then distribution of such an image shall *
|
|
||||||
* neither be construed as a distribution of this Package nor shall it *
|
|
||||||
* fall under the restrictions of Paragraphs 3 and 4, provided that you do *
|
|
||||||
* not represent such an executable image as a Standard Version of this *
|
|
||||||
* Package. *
|
|
||||||
* *
|
* *
|
||||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||||
* languages) supplied by you and linked into this Package in order to *
|
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||||
* emulate subroutines and variables of the language defined by this *
|
* to be a Modified Version. In addition, such works are not considered parts *
|
||||||
* Package shall not be considered part of this Package, but are the *
|
* of the Package itself, and are not subject to the terms of this license. *
|
||||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
* General Provisions *
|
||||||
* not change the language in any way that would cause it to fail the *
|
|
||||||
* regression tests for the language. *
|
|
||||||
* *
|
* *
|
||||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||||
* permitted provided that the use of this Package is embedded; that is, *
|
* Versions is governed by this Artistic License. By using, modifying or *
|
||||||
* when no overt attempt is made to make this Package's interfaces visible *
|
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||||
* to the end user of the commercial distribution. Such use shall not be *
|
* distribute the Package, if you do not accept this license. *
|
||||||
* construed as a distribution of this Package. *
|
|
||||||
* *
|
* *
|
||||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||||
* products derived from this software without specific prior written *
|
* by someone other than you, you are nevertheless required to ensure that your *
|
||||||
* permission. *
|
* Modified Version complies with the requirements of this license. *
|
||||||
* *
|
* *
|
||||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
* (12) This license does not grant you the right to use any trademark, service *
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
* mark, tradename, or logo of the Copyright Holder. *
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
* *
|
||||||
|
* (13) This license includes the non-exclusive, worldwide, free-of-charge *
|
||||||
|
* patent license to make, have made, use, offer to sell, sell, import and *
|
||||||
|
* otherwise transfer the Package with respect to any patent claims licensable *
|
||||||
|
* by the Copyright Holder that are necessarily infringed by the Package. If *
|
||||||
|
* you institute patent litigation (including a cross-claim or counterclaim) *
|
||||||
|
* against any party alleging that the Package constitutes direct or *
|
||||||
|
* contributory patent infringement, then this Artistic License to you shall *
|
||||||
|
* terminate on the date that such litigation is filed. *
|
||||||
|
* *
|
||||||
|
* (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER *
|
||||||
|
* AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE *
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR *
|
||||||
|
* NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. *
|
||||||
|
* UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE *
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN *
|
||||||
|
* ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF *
|
||||||
|
* SUCH DAMAGE. *
|
||||||
* *
|
* *
|
||||||
* The End *
|
* The End *
|
||||||
* *
|
* *
|
||||||
@ -296,10 +338,10 @@ int main(int argc, char **arg) {
|
|||||||
probability = tvalue.probability;
|
probability = tvalue.probability;
|
||||||
double factor = sigmoid(MyManager.varmap.dvalue[i], params.sigmoid_slope) * (1 - sigmoid(MyManager.varmap.dvalue[i], params.sigmoid_slope)) * params.sigmoid_slope;
|
double factor = sigmoid(MyManager.varmap.dvalue[i], params.sigmoid_slope) * (1 - sigmoid(MyManager.varmap.dvalue[i], params.sigmoid_slope)) * params.sigmoid_slope;
|
||||||
if (varpattern == NULL) {
|
if (varpattern == NULL) {
|
||||||
printf("query_gradient(%s,%s,%e).\n", arg[params.queryid], MyManager.varmap.vars[i], tvalue.gradient * factor);
|
printf("query_gradient(%s,%s,%1.12f).\n", arg[params.queryid], MyManager.varmap.vars[i], tvalue.gradient * factor);
|
||||||
} else {
|
} else {
|
||||||
varpattern[strlen(varpattern) - 2] = '\0';
|
varpattern[strlen(varpattern) - 2] = '\0';
|
||||||
printf("query_gradient(%s,%s,%e).\n", arg[params.queryid], varpattern, tvalue.gradient * factor);
|
printf("query_gradient(%s,%s,%1.12f).\n", arg[params.queryid], varpattern, tvalue.gradient * factor);
|
||||||
}
|
}
|
||||||
ReInitHistory(MyManager.his, MyManager.varmap.varcnt);
|
ReInitHistory(MyManager.his, MyManager.varmap.varcnt);
|
||||||
}
|
}
|
||||||
@ -313,15 +355,15 @@ int main(int argc, char **arg) {
|
|||||||
tvalue = CalcGradient(MyManager, bdd, 0 + MyManager.varmap.varstart, NULL);
|
tvalue = CalcGradient(MyManager, bdd, 0 + MyManager.varmap.varstart, NULL);
|
||||||
probability = tvalue.probability;
|
probability = tvalue.probability;
|
||||||
}
|
}
|
||||||
printf("query_probability(%s,%e).\n", arg[params.queryid], probability);
|
printf("query_probability(%s,%1.12f).\n", arg[params.queryid], probability);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
tvalue = CalcGradient(MyManager, bdd, 0 + MyManager.varmap.varstart, NULL);
|
tvalue = CalcGradient(MyManager, bdd, 0 + MyManager.varmap.varstart, NULL);
|
||||||
probability = tvalue.probability;
|
probability = tvalue.probability;
|
||||||
printf("query_probability(%s,%e).\n", arg[params.queryid], probability);
|
printf("query_probability(%s,%1.12f).\n", arg[params.queryid], probability);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
printf("probability(%e).\n", CalcProbability(MyManager, bdd));
|
printf("probability(%1.12f).\n", CalcProbability(MyManager, bdd));
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
onlinetraverse(MyManager.manager, MyManager.varmap, MyManager.his, bdd);
|
onlinetraverse(MyManager.manager, MyManager.varmap, MyManager.his, bdd);
|
||||||
|
@ -3,139 +3,182 @@
|
|||||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||||
* *
|
* *
|
||||||
* Copyright T. Mantadelis and Katholieke Universiteit Leuven 2008 *
|
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis *
|
* Author: Theofrastos Mantadelis *
|
||||||
* File: general.c *
|
* File: general.c *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
* The "Artistic License" *
|
* Artistic License 2.0 *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||||
|
* *
|
||||||
|
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||||
|
* document, but changing it is not allowed. *
|
||||||
* *
|
* *
|
||||||
* Preamble *
|
* Preamble *
|
||||||
* *
|
* *
|
||||||
* The intent of this document is to state the conditions under which a *
|
* This license establishes the terms under which a given free software Package *
|
||||||
* Package may be copied, such that the Copyright Holder maintains some *
|
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||||
* semblance of artistic control over the development of the package, *
|
* that the Copyright Holder maintains some artistic control over the *
|
||||||
* while giving the users of the package the right to use and distribute *
|
* development of that Package while still keeping the Package available as *
|
||||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
* open source and free software. *
|
||||||
* reasonable modifications. *
|
|
||||||
* *
|
* *
|
||||||
* Definitions: *
|
* You are always permitted to make arrangements wholly outside of this license *
|
||||||
|
* directly with the Copyright Holder of a given Package. If the terms of this *
|
||||||
|
* license do not permit the full use that you propose to make of the Package, *
|
||||||
|
* you should contact the Copyright Holder and seek a different licensing *
|
||||||
|
* arrangement. *
|
||||||
|
* Definitions *
|
||||||
* *
|
* *
|
||||||
* "Package" refers to the collection of files distributed by the *
|
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||||
* Copyright Holder, and derivatives of that collection of files *
|
* copyright notice for the entire Package. *
|
||||||
* created through textual modification. *
|
|
||||||
* *
|
* *
|
||||||
* "Standard Version" refers to such a Package if it has not been *
|
* "Contributor" means any party that has contributed code or other material to *
|
||||||
* modified, or has been modified in accordance with the wishes *
|
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||||
* of the Copyright Holder as specified below. *
|
|
||||||
* *
|
* *
|
||||||
* "Copyright Holder" is whoever is named in the copyright or *
|
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||||
* copyrights for the package. *
|
* modify the Package. *
|
||||||
* *
|
* *
|
||||||
* "You" is you, if you're thinking about copying or distributing *
|
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||||
* this Package. *
|
* and derivatives of that collection and/or of those files. A given Package *
|
||||||
|
* may consist of either the Standard Version, or a Modified Version. *
|
||||||
* *
|
* *
|
||||||
* "Reasonable copying fee" is whatever you can justify on the *
|
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||||
* basis of media cost, duplication charges, time of people involved, *
|
* to anyone else, or in the case of a company or organization, to others *
|
||||||
* and so on. (You will not be required to justify it to the *
|
* outside of your company or organization. *
|
||||||
* Copyright Holder, but only to the computing community at large *
|
|
||||||
* as a market that must bear the fee.) *
|
|
||||||
* *
|
* *
|
||||||
* "Freely Available" means that no fee is charged for the item *
|
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||||
* itself, though there may be fees involved in handling the item. *
|
* Package or providing support for this Package to another party. It does not *
|
||||||
* It also means that recipients of the item may redistribute it *
|
* mean licensing fees. *
|
||||||
* under the same conditions they received it. *
|
|
||||||
* *
|
* *
|
||||||
* 1. You may make and give away verbatim copies of the source form of the *
|
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||||
* Standard Version of this Package without restriction, provided that you *
|
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
|
||||||
* *
|
* *
|
||||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
* "Modified Version" means the Package, if it has been changed, and such *
|
||||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
* changes were not explicitly requested by the Copyright Holder. *
|
||||||
* modified in such a way shall still be considered the Standard Version. *
|
|
||||||
* *
|
* *
|
||||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
* "Original License" means this Artistic License as Distributed with the *
|
||||||
* that you insert a prominent notice in each changed file stating how and *
|
* Standard Version of the Package, in its current version or as it may be *
|
||||||
* when you changed that file, and provided that you do at least ONE of the *
|
* modified by The Perl Foundation in the future. *
|
||||||
* following: *
|
|
||||||
* *
|
* *
|
||||||
* a) place your modifications in the Public Domain or otherwise make them *
|
* "Source" form means the source code, documentation source, and configuration *
|
||||||
* Freely Available, such as by posting said modifications to Usenet or *
|
* files for the Package. *
|
||||||
* an equivalent medium, or placing the modifications on a major archive *
|
|
||||||
* site such as uunet.uu.net, or by allowing the Copyright Holder to include *
|
|
||||||
* your modifications in the Standard Version of the Package. *
|
|
||||||
* *
|
* *
|
||||||
* b) use the modified Package only within your corporation or organization. *
|
* "Compiled" form means the compiled bytecode, object code, binary, or any *
|
||||||
|
* other form resulting from mechanical transformation or translation of the *
|
||||||
|
* Source form. *
|
||||||
|
* Permission for Use and Modification Without Distribution *
|
||||||
* *
|
* *
|
||||||
* c) rename any non-standard executables so the names do not conflict *
|
* (1) You are permitted to use the Standard Version and create and use *
|
||||||
* with standard executables, which must also be provided, and provide *
|
* Modified Versions for any purpose without restriction, provided that you do *
|
||||||
* a separate manual page for each non-standard executable that clearly *
|
* not Distribute the Modified Version. *
|
||||||
* documents how it differs from the Standard Version. *
|
* Permissions for Redistribution of the Standard Version *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (2) You may Distribute verbatim copies of the Source form of the Standard *
|
||||||
|
* Version of this Package in any medium without restriction, either gratis or *
|
||||||
|
* for a Distributor Fee, provided that you duplicate all of the original *
|
||||||
|
* copyright notices and associated disclaimers. At your discretion, such *
|
||||||
|
* verbatim copies may or may not include a Compiled form of the Package. *
|
||||||
* *
|
* *
|
||||||
* 4. You may distribute the programs of this Package in object code or *
|
* (3) You may apply any bug fixes, portability changes, and other *
|
||||||
* executable form, provided that you do at least ONE of the following: *
|
* modifications made available from the Copyright Holder. The resulting *
|
||||||
|
* Package will still be considered the Standard Version, and as such will be *
|
||||||
|
* subject to the Original License. *
|
||||||
|
* Distribution of Modified Versions of the Package as Source *
|
||||||
* *
|
* *
|
||||||
* a) distribute a Standard Version of the executables and library files, *
|
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||||
* together with instructions (in the manual page or equivalent) on where *
|
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||||
* to get the Standard Version. *
|
* Version) provided that you clearly document how it differs from the Standard *
|
||||||
|
* Version, including, but not limited to, documenting any non-standard *
|
||||||
|
* features, executables, or modules, and provided that you do at least ONE of *
|
||||||
|
* the following: *
|
||||||
* *
|
* *
|
||||||
* b) accompany the distribution with the machine-readable source of *
|
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||||
* the Package with your modifications. *
|
* Standard Version, under the Original License, so that the Copyright Holder *
|
||||||
|
* may include your modifications in the Standard Version. *
|
||||||
|
* (b) ensure that installation of your Modified Version does not prevent the *
|
||||||
|
* user installing or running the Standard Version. In addition, the Modified *
|
||||||
|
* Version must bear a name that is different from the name of the Standard *
|
||||||
|
* Version. *
|
||||||
|
* (c) allow anyone who receives a copy of the Modified Version to make the *
|
||||||
|
* Source form of the Modified Version available to others under *
|
||||||
|
* (i) the Original License or *
|
||||||
|
* (ii) a license that permits the licensee to freely copy, modify and *
|
||||||
|
* redistribute the Modified Version using the same licensing terms that apply *
|
||||||
|
* to the copy that the licensee received, and requires that the Source form of *
|
||||||
|
* the Modified Version, and of any works derived from it, be made freely *
|
||||||
|
* available in that license fees are prohibited but Distributor Fees are *
|
||||||
|
* allowed. *
|
||||||
|
* Distribution of Compiled Forms of the Standard Version or Modified Versions *
|
||||||
|
* without the Source *
|
||||||
* *
|
* *
|
||||||
* c) give non-standard executables non-standard names, and clearly *
|
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||||
* document the differences in manual pages (or equivalent), together *
|
* Source, provided that you include complete instructions on how to get the *
|
||||||
* with instructions on where to get the Standard Version. *
|
* Source of the Standard Version. Such instructions must be valid at the time *
|
||||||
|
* of your distribution. If these instructions, at any time while you are *
|
||||||
|
* carrying out such distribution, become invalid, you must provide new *
|
||||||
|
* instructions on demand or cease further distribution. If you provide valid *
|
||||||
|
* instructions or cease distribution within thirty days after you become aware *
|
||||||
|
* that the instructions are invalid, then you do not forfeit any of your *
|
||||||
|
* rights under this license. *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (6) You may Distribute a Modified Version in Compiled form without the *
|
||||||
|
* Source, provided that you comply with Section 4 with respect to the Source *
|
||||||
|
* of the Modified Version. *
|
||||||
|
* Aggregating or Linking the Package *
|
||||||
* *
|
* *
|
||||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||||
* Package. You may charge any fee you choose for support of this *
|
* Version) with other packages and Distribute the resulting aggregation *
|
||||||
* Package. You may not charge a fee for this Package itself. However, *
|
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||||
* you may distribute this Package in aggregate with other (possibly *
|
* Fees are permitted, and licensing fees for other components in the *
|
||||||
* commercial) programs as part of a larger (possibly commercial) software *
|
* aggregation are permitted. The terms of this license apply to the use and *
|
||||||
* distribution provided that you do not advertise this Package as a *
|
* Distribution of the Standard or Modified Versions as included in the *
|
||||||
* product of your own. You may embed this Package's interpreter within *
|
* aggregation. *
|
||||||
* an executable of yours (by linking); this shall be construed as a mere *
|
|
||||||
* form of aggregation, provided that the complete Standard Version of the *
|
|
||||||
* interpreter is so embedded. *
|
|
||||||
* *
|
* *
|
||||||
* 6. The scripts and library files supplied as input to or produced as *
|
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||||
* output from the programs of this Package do not automatically fall *
|
* works, to embed the Package in a larger work of your own, or to build *
|
||||||
* under the copyright of this Package, but belong to whoever generated *
|
* stand-alone binary or bytecode versions of applications that include the *
|
||||||
* them, and may be sold commercially, and may be aggregated with this *
|
* Package, and Distribute the result without restriction, provided the result *
|
||||||
* Package. If such scripts or library files are aggregated with this *
|
* does not expose a direct interface to the Package. *
|
||||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
* Items That are Not Considered Part of a Modified Version *
|
||||||
* binary executable image, then distribution of such an image shall *
|
|
||||||
* neither be construed as a distribution of this Package nor shall it *
|
|
||||||
* fall under the restrictions of Paragraphs 3 and 4, provided that you do *
|
|
||||||
* not represent such an executable image as a Standard Version of this *
|
|
||||||
* Package. *
|
|
||||||
* *
|
* *
|
||||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||||
* languages) supplied by you and linked into this Package in order to *
|
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||||
* emulate subroutines and variables of the language defined by this *
|
* to be a Modified Version. In addition, such works are not considered parts *
|
||||||
* Package shall not be considered part of this Package, but are the *
|
* of the Package itself, and are not subject to the terms of this license. *
|
||||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
* General Provisions *
|
||||||
* not change the language in any way that would cause it to fail the *
|
|
||||||
* regression tests for the language. *
|
|
||||||
* *
|
* *
|
||||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||||
* permitted provided that the use of this Package is embedded; that is, *
|
* Versions is governed by this Artistic License. By using, modifying or *
|
||||||
* when no overt attempt is made to make this Package's interfaces visible *
|
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||||
* to the end user of the commercial distribution. Such use shall not be *
|
* distribute the Package, if you do not accept this license. *
|
||||||
* construed as a distribution of this Package. *
|
|
||||||
* *
|
* *
|
||||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||||
* products derived from this software without specific prior written *
|
* by someone other than you, you are nevertheless required to ensure that your *
|
||||||
* permission. *
|
* Modified Version complies with the requirements of this license. *
|
||||||
* *
|
* *
|
||||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
* (12) This license does not grant you the right to use any trademark, service *
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
* mark, tradename, or logo of the Copyright Holder. *
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
* *
|
||||||
|
* (13) This license includes the non-exclusive, worldwide, free-of-charge *
|
||||||
|
* patent license to make, have made, use, offer to sell, sell, import and *
|
||||||
|
* otherwise transfer the Package with respect to any patent claims licensable *
|
||||||
|
* by the Copyright Holder that are necessarily infringed by the Package. If *
|
||||||
|
* you institute patent litigation (including a cross-claim or counterclaim) *
|
||||||
|
* against any party alleging that the Package constitutes direct or *
|
||||||
|
* contributory patent infringement, then this Artistic License to you shall *
|
||||||
|
* terminate on the date that such litigation is filed. *
|
||||||
|
* *
|
||||||
|
* (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER *
|
||||||
|
* AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE *
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR *
|
||||||
|
* NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. *
|
||||||
|
* UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE *
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN *
|
||||||
|
* ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF *
|
||||||
|
* SUCH DAMAGE. *
|
||||||
* *
|
* *
|
||||||
* The End *
|
* The End *
|
||||||
* *
|
* *
|
||||||
|
@ -3,139 +3,182 @@
|
|||||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||||
* *
|
* *
|
||||||
* Copyright T. Mantadelis and Katholieke Universiteit Leuven 2008 *
|
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis *
|
* Author: Theofrastos Mantadelis *
|
||||||
* File: general.h *
|
* File: general.h *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
* The "Artistic License" *
|
* Artistic License 2.0 *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||||
|
* *
|
||||||
|
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||||
|
* document, but changing it is not allowed. *
|
||||||
* *
|
* *
|
||||||
* Preamble *
|
* Preamble *
|
||||||
* *
|
* *
|
||||||
* The intent of this document is to state the conditions under which a *
|
* This license establishes the terms under which a given free software Package *
|
||||||
* Package may be copied, such that the Copyright Holder maintains some *
|
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||||
* semblance of artistic control over the development of the package, *
|
* that the Copyright Holder maintains some artistic control over the *
|
||||||
* while giving the users of the package the right to use and distribute *
|
* development of that Package while still keeping the Package available as *
|
||||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
* open source and free software. *
|
||||||
* reasonable modifications. *
|
|
||||||
* *
|
* *
|
||||||
* Definitions: *
|
* You are always permitted to make arrangements wholly outside of this license *
|
||||||
|
* directly with the Copyright Holder of a given Package. If the terms of this *
|
||||||
|
* license do not permit the full use that you propose to make of the Package, *
|
||||||
|
* you should contact the Copyright Holder and seek a different licensing *
|
||||||
|
* arrangement. *
|
||||||
|
* Definitions *
|
||||||
* *
|
* *
|
||||||
* "Package" refers to the collection of files distributed by the *
|
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||||
* Copyright Holder, and derivatives of that collection of files *
|
* copyright notice for the entire Package. *
|
||||||
* created through textual modification. *
|
|
||||||
* *
|
* *
|
||||||
* "Standard Version" refers to such a Package if it has not been *
|
* "Contributor" means any party that has contributed code or other material to *
|
||||||
* modified, or has been modified in accordance with the wishes *
|
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||||
* of the Copyright Holder as specified below. *
|
|
||||||
* *
|
* *
|
||||||
* "Copyright Holder" is whoever is named in the copyright or *
|
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||||
* copyrights for the package. *
|
* modify the Package. *
|
||||||
* *
|
* *
|
||||||
* "You" is you, if you're thinking about copying or distributing *
|
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||||
* this Package. *
|
* and derivatives of that collection and/or of those files. A given Package *
|
||||||
|
* may consist of either the Standard Version, or a Modified Version. *
|
||||||
* *
|
* *
|
||||||
* "Reasonable copying fee" is whatever you can justify on the *
|
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||||
* basis of media cost, duplication charges, time of people involved, *
|
* to anyone else, or in the case of a company or organization, to others *
|
||||||
* and so on. (You will not be required to justify it to the *
|
* outside of your company or organization. *
|
||||||
* Copyright Holder, but only to the computing community at large *
|
|
||||||
* as a market that must bear the fee.) *
|
|
||||||
* *
|
* *
|
||||||
* "Freely Available" means that no fee is charged for the item *
|
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||||
* itself, though there may be fees involved in handling the item. *
|
* Package or providing support for this Package to another party. It does not *
|
||||||
* It also means that recipients of the item may redistribute it *
|
* mean licensing fees. *
|
||||||
* under the same conditions they received it. *
|
|
||||||
* *
|
* *
|
||||||
* 1. You may make and give away verbatim copies of the source form of the *
|
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||||
* Standard Version of this Package without restriction, provided that you *
|
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
|
||||||
* *
|
* *
|
||||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
* "Modified Version" means the Package, if it has been changed, and such *
|
||||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
* changes were not explicitly requested by the Copyright Holder. *
|
||||||
* modified in such a way shall still be considered the Standard Version. *
|
|
||||||
* *
|
* *
|
||||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
* "Original License" means this Artistic License as Distributed with the *
|
||||||
* that you insert a prominent notice in each changed file stating how and *
|
* Standard Version of the Package, in its current version or as it may be *
|
||||||
* when you changed that file, and provided that you do at least ONE of the *
|
* modified by The Perl Foundation in the future. *
|
||||||
* following: *
|
|
||||||
* *
|
* *
|
||||||
* a) place your modifications in the Public Domain or otherwise make them *
|
* "Source" form means the source code, documentation source, and configuration *
|
||||||
* Freely Available, such as by posting said modifications to Usenet or *
|
* files for the Package. *
|
||||||
* an equivalent medium, or placing the modifications on a major archive *
|
|
||||||
* site such as uunet.uu.net, or by allowing the Copyright Holder to include *
|
|
||||||
* your modifications in the Standard Version of the Package. *
|
|
||||||
* *
|
* *
|
||||||
* b) use the modified Package only within your corporation or organization. *
|
* "Compiled" form means the compiled bytecode, object code, binary, or any *
|
||||||
|
* other form resulting from mechanical transformation or translation of the *
|
||||||
|
* Source form. *
|
||||||
|
* Permission for Use and Modification Without Distribution *
|
||||||
* *
|
* *
|
||||||
* c) rename any non-standard executables so the names do not conflict *
|
* (1) You are permitted to use the Standard Version and create and use *
|
||||||
* with standard executables, which must also be provided, and provide *
|
* Modified Versions for any purpose without restriction, provided that you do *
|
||||||
* a separate manual page for each non-standard executable that clearly *
|
* not Distribute the Modified Version. *
|
||||||
* documents how it differs from the Standard Version. *
|
* Permissions for Redistribution of the Standard Version *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (2) You may Distribute verbatim copies of the Source form of the Standard *
|
||||||
|
* Version of this Package in any medium without restriction, either gratis or *
|
||||||
|
* for a Distributor Fee, provided that you duplicate all of the original *
|
||||||
|
* copyright notices and associated disclaimers. At your discretion, such *
|
||||||
|
* verbatim copies may or may not include a Compiled form of the Package. *
|
||||||
* *
|
* *
|
||||||
* 4. You may distribute the programs of this Package in object code or *
|
* (3) You may apply any bug fixes, portability changes, and other *
|
||||||
* executable form, provided that you do at least ONE of the following: *
|
* modifications made available from the Copyright Holder. The resulting *
|
||||||
|
* Package will still be considered the Standard Version, and as such will be *
|
||||||
|
* subject to the Original License. *
|
||||||
|
* Distribution of Modified Versions of the Package as Source *
|
||||||
* *
|
* *
|
||||||
* a) distribute a Standard Version of the executables and library files, *
|
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||||
* together with instructions (in the manual page or equivalent) on where *
|
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||||
* to get the Standard Version. *
|
* Version) provided that you clearly document how it differs from the Standard *
|
||||||
|
* Version, including, but not limited to, documenting any non-standard *
|
||||||
|
* features, executables, or modules, and provided that you do at least ONE of *
|
||||||
|
* the following: *
|
||||||
* *
|
* *
|
||||||
* b) accompany the distribution with the machine-readable source of *
|
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||||
* the Package with your modifications. *
|
* Standard Version, under the Original License, so that the Copyright Holder *
|
||||||
|
* may include your modifications in the Standard Version. *
|
||||||
|
* (b) ensure that installation of your Modified Version does not prevent the *
|
||||||
|
* user installing or running the Standard Version. In addition, the Modified *
|
||||||
|
* Version must bear a name that is different from the name of the Standard *
|
||||||
|
* Version. *
|
||||||
|
* (c) allow anyone who receives a copy of the Modified Version to make the *
|
||||||
|
* Source form of the Modified Version available to others under *
|
||||||
|
* (i) the Original License or *
|
||||||
|
* (ii) a license that permits the licensee to freely copy, modify and *
|
||||||
|
* redistribute the Modified Version using the same licensing terms that apply *
|
||||||
|
* to the copy that the licensee received, and requires that the Source form of *
|
||||||
|
* the Modified Version, and of any works derived from it, be made freely *
|
||||||
|
* available in that license fees are prohibited but Distributor Fees are *
|
||||||
|
* allowed. *
|
||||||
|
* Distribution of Compiled Forms of the Standard Version or Modified Versions *
|
||||||
|
* without the Source *
|
||||||
* *
|
* *
|
||||||
* c) give non-standard executables non-standard names, and clearly *
|
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||||
* document the differences in manual pages (or equivalent), together *
|
* Source, provided that you include complete instructions on how to get the *
|
||||||
* with instructions on where to get the Standard Version. *
|
* Source of the Standard Version. Such instructions must be valid at the time *
|
||||||
|
* of your distribution. If these instructions, at any time while you are *
|
||||||
|
* carrying out such distribution, become invalid, you must provide new *
|
||||||
|
* instructions on demand or cease further distribution. If you provide valid *
|
||||||
|
* instructions or cease distribution within thirty days after you become aware *
|
||||||
|
* that the instructions are invalid, then you do not forfeit any of your *
|
||||||
|
* rights under this license. *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (6) You may Distribute a Modified Version in Compiled form without the *
|
||||||
|
* Source, provided that you comply with Section 4 with respect to the Source *
|
||||||
|
* of the Modified Version. *
|
||||||
|
* Aggregating or Linking the Package *
|
||||||
* *
|
* *
|
||||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||||
* Package. You may charge any fee you choose for support of this *
|
* Version) with other packages and Distribute the resulting aggregation *
|
||||||
* Package. You may not charge a fee for this Package itself. However, *
|
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||||
* you may distribute this Package in aggregate with other (possibly *
|
* Fees are permitted, and licensing fees for other components in the *
|
||||||
* commercial) programs as part of a larger (possibly commercial) software *
|
* aggregation are permitted. The terms of this license apply to the use and *
|
||||||
* distribution provided that you do not advertise this Package as a *
|
* Distribution of the Standard or Modified Versions as included in the *
|
||||||
* product of your own. You may embed this Package's interpreter within *
|
* aggregation. *
|
||||||
* an executable of yours (by linking); this shall be construed as a mere *
|
|
||||||
* form of aggregation, provided that the complete Standard Version of the *
|
|
||||||
* interpreter is so embedded. *
|
|
||||||
* *
|
* *
|
||||||
* 6. The scripts and library files supplied as input to or produced as *
|
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||||
* output from the programs of this Package do not automatically fall *
|
* works, to embed the Package in a larger work of your own, or to build *
|
||||||
* under the copyright of this Package, but belong to whoever generated *
|
* stand-alone binary or bytecode versions of applications that include the *
|
||||||
* them, and may be sold commercially, and may be aggregated with this *
|
* Package, and Distribute the result without restriction, provided the result *
|
||||||
* Package. If such scripts or library files are aggregated with this *
|
* does not expose a direct interface to the Package. *
|
||||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
* Items That are Not Considered Part of a Modified Version *
|
||||||
* binary executable image, then distribution of such an image shall *
|
|
||||||
* neither be construed as a distribution of this Package nor shall it *
|
|
||||||
* fall under the restrictions of Paragraphs 3 and 4, provided that you do *
|
|
||||||
* not represent such an executable image as a Standard Version of this *
|
|
||||||
* Package. *
|
|
||||||
* *
|
* *
|
||||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||||
* languages) supplied by you and linked into this Package in order to *
|
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||||
* emulate subroutines and variables of the language defined by this *
|
* to be a Modified Version. In addition, such works are not considered parts *
|
||||||
* Package shall not be considered part of this Package, but are the *
|
* of the Package itself, and are not subject to the terms of this license. *
|
||||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
* General Provisions *
|
||||||
* not change the language in any way that would cause it to fail the *
|
|
||||||
* regression tests for the language. *
|
|
||||||
* *
|
* *
|
||||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||||
* permitted provided that the use of this Package is embedded; that is, *
|
* Versions is governed by this Artistic License. By using, modifying or *
|
||||||
* when no overt attempt is made to make this Package's interfaces visible *
|
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||||
* to the end user of the commercial distribution. Such use shall not be *
|
* distribute the Package, if you do not accept this license. *
|
||||||
* construed as a distribution of this Package. *
|
|
||||||
* *
|
* *
|
||||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||||
* products derived from this software without specific prior written *
|
* by someone other than you, you are nevertheless required to ensure that your *
|
||||||
* permission. *
|
* Modified Version complies with the requirements of this license. *
|
||||||
* *
|
* *
|
||||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
* (12) This license does not grant you the right to use any trademark, service *
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
* mark, tradename, or logo of the Copyright Holder. *
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
* *
|
||||||
|
* (13) This license includes the non-exclusive, worldwide, free-of-charge *
|
||||||
|
* patent license to make, have made, use, offer to sell, sell, import and *
|
||||||
|
* otherwise transfer the Package with respect to any patent claims licensable *
|
||||||
|
* by the Copyright Holder that are necessarily infringed by the Package. If *
|
||||||
|
* you institute patent litigation (including a cross-claim or counterclaim) *
|
||||||
|
* against any party alleging that the Package constitutes direct or *
|
||||||
|
* contributory patent infringement, then this Artistic License to you shall *
|
||||||
|
* terminate on the date that such litigation is filed. *
|
||||||
|
* *
|
||||||
|
* (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER *
|
||||||
|
* AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE *
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR *
|
||||||
|
* NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. *
|
||||||
|
* UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE *
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN *
|
||||||
|
* ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF *
|
||||||
|
* SUCH DAMAGE. *
|
||||||
* *
|
* *
|
||||||
* The End *
|
* The End *
|
||||||
* *
|
* *
|
||||||
|
@ -3,139 +3,182 @@
|
|||||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||||
* *
|
* *
|
||||||
* Copyright T. Mantadelis and Katholieke Universiteit Leuven 2008 *
|
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis *
|
* Author: Theofrastos Mantadelis *
|
||||||
* File: simplecudd.c *
|
* File: simplecudd.c *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
* The "Artistic License" *
|
* Artistic License 2.0 *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||||
|
* *
|
||||||
|
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||||
|
* document, but changing it is not allowed. *
|
||||||
* *
|
* *
|
||||||
* Preamble *
|
* Preamble *
|
||||||
* *
|
* *
|
||||||
* The intent of this document is to state the conditions under which a *
|
* This license establishes the terms under which a given free software Package *
|
||||||
* Package may be copied, such that the Copyright Holder maintains some *
|
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||||
* semblance of artistic control over the development of the package, *
|
* that the Copyright Holder maintains some artistic control over the *
|
||||||
* while giving the users of the package the right to use and distribute *
|
* development of that Package while still keeping the Package available as *
|
||||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
* open source and free software. *
|
||||||
* reasonable modifications. *
|
|
||||||
* *
|
* *
|
||||||
* Definitions: *
|
* You are always permitted to make arrangements wholly outside of this license *
|
||||||
|
* directly with the Copyright Holder of a given Package. If the terms of this *
|
||||||
|
* license do not permit the full use that you propose to make of the Package, *
|
||||||
|
* you should contact the Copyright Holder and seek a different licensing *
|
||||||
|
* arrangement. *
|
||||||
|
* Definitions *
|
||||||
* *
|
* *
|
||||||
* "Package" refers to the collection of files distributed by the *
|
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||||
* Copyright Holder, and derivatives of that collection of files *
|
* copyright notice for the entire Package. *
|
||||||
* created through textual modification. *
|
|
||||||
* *
|
* *
|
||||||
* "Standard Version" refers to such a Package if it has not been *
|
* "Contributor" means any party that has contributed code or other material to *
|
||||||
* modified, or has been modified in accordance with the wishes *
|
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||||
* of the Copyright Holder as specified below. *
|
|
||||||
* *
|
* *
|
||||||
* "Copyright Holder" is whoever is named in the copyright or *
|
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||||
* copyrights for the package. *
|
* modify the Package. *
|
||||||
* *
|
* *
|
||||||
* "You" is you, if you're thinking about copying or distributing *
|
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||||
* this Package. *
|
* and derivatives of that collection and/or of those files. A given Package *
|
||||||
|
* may consist of either the Standard Version, or a Modified Version. *
|
||||||
* *
|
* *
|
||||||
* "Reasonable copying fee" is whatever you can justify on the *
|
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||||
* basis of media cost, duplication charges, time of people involved, *
|
* to anyone else, or in the case of a company or organization, to others *
|
||||||
* and so on. (You will not be required to justify it to the *
|
* outside of your company or organization. *
|
||||||
* Copyright Holder, but only to the computing community at large *
|
|
||||||
* as a market that must bear the fee.) *
|
|
||||||
* *
|
* *
|
||||||
* "Freely Available" means that no fee is charged for the item *
|
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||||
* itself, though there may be fees involved in handling the item. *
|
* Package or providing support for this Package to another party. It does not *
|
||||||
* It also means that recipients of the item may redistribute it *
|
* mean licensing fees. *
|
||||||
* under the same conditions they received it. *
|
|
||||||
* *
|
* *
|
||||||
* 1. You may make and give away verbatim copies of the source form of the *
|
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||||
* Standard Version of this Package without restriction, provided that you *
|
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
|
||||||
* *
|
* *
|
||||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
* "Modified Version" means the Package, if it has been changed, and such *
|
||||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
* changes were not explicitly requested by the Copyright Holder. *
|
||||||
* modified in such a way shall still be considered the Standard Version. *
|
|
||||||
* *
|
* *
|
||||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
* "Original License" means this Artistic License as Distributed with the *
|
||||||
* that you insert a prominent notice in each changed file stating how and *
|
* Standard Version of the Package, in its current version or as it may be *
|
||||||
* when you changed that file, and provided that you do at least ONE of the *
|
* modified by The Perl Foundation in the future. *
|
||||||
* following: *
|
|
||||||
* *
|
* *
|
||||||
* a) place your modifications in the Public Domain or otherwise make them *
|
* "Source" form means the source code, documentation source, and configuration *
|
||||||
* Freely Available, such as by posting said modifications to Usenet or *
|
* files for the Package. *
|
||||||
* an equivalent medium, or placing the modifications on a major archive *
|
|
||||||
* site such as uunet.uu.net, or by allowing the Copyright Holder to include *
|
|
||||||
* your modifications in the Standard Version of the Package. *
|
|
||||||
* *
|
* *
|
||||||
* b) use the modified Package only within your corporation or organization. *
|
* "Compiled" form means the compiled bytecode, object code, binary, or any *
|
||||||
|
* other form resulting from mechanical transformation or translation of the *
|
||||||
|
* Source form. *
|
||||||
|
* Permission for Use and Modification Without Distribution *
|
||||||
* *
|
* *
|
||||||
* c) rename any non-standard executables so the names do not conflict *
|
* (1) You are permitted to use the Standard Version and create and use *
|
||||||
* with standard executables, which must also be provided, and provide *
|
* Modified Versions for any purpose without restriction, provided that you do *
|
||||||
* a separate manual page for each non-standard executable that clearly *
|
* not Distribute the Modified Version. *
|
||||||
* documents how it differs from the Standard Version. *
|
* Permissions for Redistribution of the Standard Version *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (2) You may Distribute verbatim copies of the Source form of the Standard *
|
||||||
|
* Version of this Package in any medium without restriction, either gratis or *
|
||||||
|
* for a Distributor Fee, provided that you duplicate all of the original *
|
||||||
|
* copyright notices and associated disclaimers. At your discretion, such *
|
||||||
|
* verbatim copies may or may not include a Compiled form of the Package. *
|
||||||
* *
|
* *
|
||||||
* 4. You may distribute the programs of this Package in object code or *
|
* (3) You may apply any bug fixes, portability changes, and other *
|
||||||
* executable form, provided that you do at least ONE of the following: *
|
* modifications made available from the Copyright Holder. The resulting *
|
||||||
|
* Package will still be considered the Standard Version, and as such will be *
|
||||||
|
* subject to the Original License. *
|
||||||
|
* Distribution of Modified Versions of the Package as Source *
|
||||||
* *
|
* *
|
||||||
* a) distribute a Standard Version of the executables and library files, *
|
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||||
* together with instructions (in the manual page or equivalent) on where *
|
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||||
* to get the Standard Version. *
|
* Version) provided that you clearly document how it differs from the Standard *
|
||||||
|
* Version, including, but not limited to, documenting any non-standard *
|
||||||
|
* features, executables, or modules, and provided that you do at least ONE of *
|
||||||
|
* the following: *
|
||||||
* *
|
* *
|
||||||
* b) accompany the distribution with the machine-readable source of *
|
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||||
* the Package with your modifications. *
|
* Standard Version, under the Original License, so that the Copyright Holder *
|
||||||
|
* may include your modifications in the Standard Version. *
|
||||||
|
* (b) ensure that installation of your Modified Version does not prevent the *
|
||||||
|
* user installing or running the Standard Version. In addition, the Modified *
|
||||||
|
* Version must bear a name that is different from the name of the Standard *
|
||||||
|
* Version. *
|
||||||
|
* (c) allow anyone who receives a copy of the Modified Version to make the *
|
||||||
|
* Source form of the Modified Version available to others under *
|
||||||
|
* (i) the Original License or *
|
||||||
|
* (ii) a license that permits the licensee to freely copy, modify and *
|
||||||
|
* redistribute the Modified Version using the same licensing terms that apply *
|
||||||
|
* to the copy that the licensee received, and requires that the Source form of *
|
||||||
|
* the Modified Version, and of any works derived from it, be made freely *
|
||||||
|
* available in that license fees are prohibited but Distributor Fees are *
|
||||||
|
* allowed. *
|
||||||
|
* Distribution of Compiled Forms of the Standard Version or Modified Versions *
|
||||||
|
* without the Source *
|
||||||
* *
|
* *
|
||||||
* c) give non-standard executables non-standard names, and clearly *
|
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||||
* document the differences in manual pages (or equivalent), together *
|
* Source, provided that you include complete instructions on how to get the *
|
||||||
* with instructions on where to get the Standard Version. *
|
* Source of the Standard Version. Such instructions must be valid at the time *
|
||||||
|
* of your distribution. If these instructions, at any time while you are *
|
||||||
|
* carrying out such distribution, become invalid, you must provide new *
|
||||||
|
* instructions on demand or cease further distribution. If you provide valid *
|
||||||
|
* instructions or cease distribution within thirty days after you become aware *
|
||||||
|
* that the instructions are invalid, then you do not forfeit any of your *
|
||||||
|
* rights under this license. *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (6) You may Distribute a Modified Version in Compiled form without the *
|
||||||
|
* Source, provided that you comply with Section 4 with respect to the Source *
|
||||||
|
* of the Modified Version. *
|
||||||
|
* Aggregating or Linking the Package *
|
||||||
* *
|
* *
|
||||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||||
* Package. You may charge any fee you choose for support of this *
|
* Version) with other packages and Distribute the resulting aggregation *
|
||||||
* Package. You may not charge a fee for this Package itself. However, *
|
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||||
* you may distribute this Package in aggregate with other (possibly *
|
* Fees are permitted, and licensing fees for other components in the *
|
||||||
* commercial) programs as part of a larger (possibly commercial) software *
|
* aggregation are permitted. The terms of this license apply to the use and *
|
||||||
* distribution provided that you do not advertise this Package as a *
|
* Distribution of the Standard or Modified Versions as included in the *
|
||||||
* product of your own. You may embed this Package's interpreter within *
|
* aggregation. *
|
||||||
* an executable of yours (by linking); this shall be construed as a mere *
|
|
||||||
* form of aggregation, provided that the complete Standard Version of the *
|
|
||||||
* interpreter is so embedded. *
|
|
||||||
* *
|
* *
|
||||||
* 6. The scripts and library files supplied as input to or produced as *
|
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||||
* output from the programs of this Package do not automatically fall *
|
* works, to embed the Package in a larger work of your own, or to build *
|
||||||
* under the copyright of this Package, but belong to whoever generated *
|
* stand-alone binary or bytecode versions of applications that include the *
|
||||||
* them, and may be sold commercially, and may be aggregated with this *
|
* Package, and Distribute the result without restriction, provided the result *
|
||||||
* Package. If such scripts or library files are aggregated with this *
|
* does not expose a direct interface to the Package. *
|
||||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
* Items That are Not Considered Part of a Modified Version *
|
||||||
* binary executable image, then distribution of such an image shall *
|
|
||||||
* neither be construed as a distribution of this Package nor shall it *
|
|
||||||
* fall under the restrictions of Paragraphs 3 and 4, provided that you do *
|
|
||||||
* not represent such an executable image as a Standard Version of this *
|
|
||||||
* Package. *
|
|
||||||
* *
|
* *
|
||||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||||
* languages) supplied by you and linked into this Package in order to *
|
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||||
* emulate subroutines and variables of the language defined by this *
|
* to be a Modified Version. In addition, such works are not considered parts *
|
||||||
* Package shall not be considered part of this Package, but are the *
|
* of the Package itself, and are not subject to the terms of this license. *
|
||||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
* General Provisions *
|
||||||
* not change the language in any way that would cause it to fail the *
|
|
||||||
* regression tests for the language. *
|
|
||||||
* *
|
* *
|
||||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||||
* permitted provided that the use of this Package is embedded; that is, *
|
* Versions is governed by this Artistic License. By using, modifying or *
|
||||||
* when no overt attempt is made to make this Package's interfaces visible *
|
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||||
* to the end user of the commercial distribution. Such use shall not be *
|
* distribute the Package, if you do not accept this license. *
|
||||||
* construed as a distribution of this Package. *
|
|
||||||
* *
|
* *
|
||||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||||
* products derived from this software without specific prior written *
|
* by someone other than you, you are nevertheless required to ensure that your *
|
||||||
* permission. *
|
* Modified Version complies with the requirements of this license. *
|
||||||
* *
|
* *
|
||||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
* (12) This license does not grant you the right to use any trademark, service *
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
* mark, tradename, or logo of the Copyright Holder. *
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
* *
|
||||||
|
* (13) This license includes the non-exclusive, worldwide, free-of-charge *
|
||||||
|
* patent license to make, have made, use, offer to sell, sell, import and *
|
||||||
|
* otherwise transfer the Package with respect to any patent claims licensable *
|
||||||
|
* by the Copyright Holder that are necessarily infringed by the Package. If *
|
||||||
|
* you institute patent litigation (including a cross-claim or counterclaim) *
|
||||||
|
* against any party alleging that the Package constitutes direct or *
|
||||||
|
* contributory patent infringement, then this Artistic License to you shall *
|
||||||
|
* terminate on the date that such litigation is filed. *
|
||||||
|
* *
|
||||||
|
* (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER *
|
||||||
|
* AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE *
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR *
|
||||||
|
* NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. *
|
||||||
|
* UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE *
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN *
|
||||||
|
* ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF *
|
||||||
|
* SUCH DAMAGE. *
|
||||||
* *
|
* *
|
||||||
* The End *
|
* The End *
|
||||||
* *
|
* *
|
||||||
@ -1088,7 +1131,7 @@ DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int max
|
|||||||
}
|
}
|
||||||
endAt = clock();
|
endAt = clock();
|
||||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %i\n", term, iline, endAt - startAt);
|
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||||
if (bdd == NULL) {
|
if (bdd == NULL) {
|
||||||
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
||||||
@ -1120,7 +1163,7 @@ DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int max
|
|||||||
else bdd = BDD_Operator(manager, inter[ivar], bdd, curoper, inegoper);
|
else bdd = BDD_Operator(manager, inter[ivar], bdd, curoper, inegoper);
|
||||||
endAt = clock();
|
endAt = clock();
|
||||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %i\n", term, iline, endAt - startAt);
|
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||||
if (bdd == NULL) {
|
if (bdd == NULL) {
|
||||||
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
||||||
@ -1400,7 +1443,7 @@ DdNode* OnlineLineParser(DdManager *manager, namedvars *varmap, DdNode **inter,
|
|||||||
}
|
}
|
||||||
endAt = clock();
|
endAt = clock();
|
||||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %i\n", term, iline, endAt - startAt);
|
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||||
if (bdd == NULL) {
|
if (bdd == NULL) {
|
||||||
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
||||||
@ -1432,7 +1475,7 @@ DdNode* OnlineLineParser(DdManager *manager, namedvars *varmap, DdNode **inter,
|
|||||||
else bdd = BDD_Operator(manager, inter[ivar], bdd, curoper, inegoper);
|
else bdd = BDD_Operator(manager, inter[ivar], bdd, curoper, inegoper);
|
||||||
endAt = clock();
|
endAt = clock();
|
||||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %i\n", term, iline, endAt - startAt);
|
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||||
if (bdd == NULL) {
|
if (bdd == NULL) {
|
||||||
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
fprintf(stderr, "Line Parser Error at line: %i. Error using operator %c on term: %s.\n", iline, curoper, term);
|
||||||
|
@ -3,139 +3,182 @@
|
|||||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||||
* *
|
* *
|
||||||
* Copyright T. Mantadelis and Katholieke Universiteit Leuven 2008 *
|
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis *
|
* Author: Theofrastos Mantadelis *
|
||||||
* File: simplecudd.h *
|
* File: simplecudd.h *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
* The "Artistic License" *
|
* Artistic License 2.0 *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||||
|
* *
|
||||||
|
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||||
|
* document, but changing it is not allowed. *
|
||||||
* *
|
* *
|
||||||
* Preamble *
|
* Preamble *
|
||||||
* *
|
* *
|
||||||
* The intent of this document is to state the conditions under which a *
|
* This license establishes the terms under which a given free software Package *
|
||||||
* Package may be copied, such that the Copyright Holder maintains some *
|
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||||
* semblance of artistic control over the development of the package, *
|
* that the Copyright Holder maintains some artistic control over the *
|
||||||
* while giving the users of the package the right to use and distribute *
|
* development of that Package while still keeping the Package available as *
|
||||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
* open source and free software. *
|
||||||
* reasonable modifications. *
|
|
||||||
* *
|
* *
|
||||||
* Definitions: *
|
* You are always permitted to make arrangements wholly outside of this license *
|
||||||
|
* directly with the Copyright Holder of a given Package. If the terms of this *
|
||||||
|
* license do not permit the full use that you propose to make of the Package, *
|
||||||
|
* you should contact the Copyright Holder and seek a different licensing *
|
||||||
|
* arrangement. *
|
||||||
|
* Definitions *
|
||||||
* *
|
* *
|
||||||
* "Package" refers to the collection of files distributed by the *
|
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||||
* Copyright Holder, and derivatives of that collection of files *
|
* copyright notice for the entire Package. *
|
||||||
* created through textual modification. *
|
|
||||||
* *
|
* *
|
||||||
* "Standard Version" refers to such a Package if it has not been *
|
* "Contributor" means any party that has contributed code or other material to *
|
||||||
* modified, or has been modified in accordance with the wishes *
|
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||||
* of the Copyright Holder as specified below. *
|
|
||||||
* *
|
* *
|
||||||
* "Copyright Holder" is whoever is named in the copyright or *
|
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||||
* copyrights for the package. *
|
* modify the Package. *
|
||||||
* *
|
* *
|
||||||
* "You" is you, if you're thinking about copying or distributing *
|
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||||
* this Package. *
|
* and derivatives of that collection and/or of those files. A given Package *
|
||||||
|
* may consist of either the Standard Version, or a Modified Version. *
|
||||||
* *
|
* *
|
||||||
* "Reasonable copying fee" is whatever you can justify on the *
|
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||||
* basis of media cost, duplication charges, time of people involved, *
|
* to anyone else, or in the case of a company or organization, to others *
|
||||||
* and so on. (You will not be required to justify it to the *
|
* outside of your company or organization. *
|
||||||
* Copyright Holder, but only to the computing community at large *
|
|
||||||
* as a market that must bear the fee.) *
|
|
||||||
* *
|
* *
|
||||||
* "Freely Available" means that no fee is charged for the item *
|
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||||
* itself, though there may be fees involved in handling the item. *
|
* Package or providing support for this Package to another party. It does not *
|
||||||
* It also means that recipients of the item may redistribute it *
|
* mean licensing fees. *
|
||||||
* under the same conditions they received it. *
|
|
||||||
* *
|
* *
|
||||||
* 1. You may make and give away verbatim copies of the source form of the *
|
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||||
* Standard Version of this Package without restriction, provided that you *
|
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
|
||||||
* *
|
* *
|
||||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
* "Modified Version" means the Package, if it has been changed, and such *
|
||||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
* changes were not explicitly requested by the Copyright Holder. *
|
||||||
* modified in such a way shall still be considered the Standard Version. *
|
|
||||||
* *
|
* *
|
||||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
* "Original License" means this Artistic License as Distributed with the *
|
||||||
* that you insert a prominent notice in each changed file stating how and *
|
* Standard Version of the Package, in its current version or as it may be *
|
||||||
* when you changed that file, and provided that you do at least ONE of the *
|
* modified by The Perl Foundation in the future. *
|
||||||
* following: *
|
|
||||||
* *
|
* *
|
||||||
* a) place your modifications in the Public Domain or otherwise make them *
|
* "Source" form means the source code, documentation source, and configuration *
|
||||||
* Freely Available, such as by posting said modifications to Usenet or *
|
* files for the Package. *
|
||||||
* an equivalent medium, or placing the modifications on a major archive *
|
|
||||||
* site such as uunet.uu.net, or by allowing the Copyright Holder to include *
|
|
||||||
* your modifications in the Standard Version of the Package. *
|
|
||||||
* *
|
* *
|
||||||
* b) use the modified Package only within your corporation or organization. *
|
* "Compiled" form means the compiled bytecode, object code, binary, or any *
|
||||||
|
* other form resulting from mechanical transformation or translation of the *
|
||||||
|
* Source form. *
|
||||||
|
* Permission for Use and Modification Without Distribution *
|
||||||
* *
|
* *
|
||||||
* c) rename any non-standard executables so the names do not conflict *
|
* (1) You are permitted to use the Standard Version and create and use *
|
||||||
* with standard executables, which must also be provided, and provide *
|
* Modified Versions for any purpose without restriction, provided that you do *
|
||||||
* a separate manual page for each non-standard executable that clearly *
|
* not Distribute the Modified Version. *
|
||||||
* documents how it differs from the Standard Version. *
|
* Permissions for Redistribution of the Standard Version *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (2) You may Distribute verbatim copies of the Source form of the Standard *
|
||||||
|
* Version of this Package in any medium without restriction, either gratis or *
|
||||||
|
* for a Distributor Fee, provided that you duplicate all of the original *
|
||||||
|
* copyright notices and associated disclaimers. At your discretion, such *
|
||||||
|
* verbatim copies may or may not include a Compiled form of the Package. *
|
||||||
* *
|
* *
|
||||||
* 4. You may distribute the programs of this Package in object code or *
|
* (3) You may apply any bug fixes, portability changes, and other *
|
||||||
* executable form, provided that you do at least ONE of the following: *
|
* modifications made available from the Copyright Holder. The resulting *
|
||||||
|
* Package will still be considered the Standard Version, and as such will be *
|
||||||
|
* subject to the Original License. *
|
||||||
|
* Distribution of Modified Versions of the Package as Source *
|
||||||
* *
|
* *
|
||||||
* a) distribute a Standard Version of the executables and library files, *
|
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||||
* together with instructions (in the manual page or equivalent) on where *
|
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||||
* to get the Standard Version. *
|
* Version) provided that you clearly document how it differs from the Standard *
|
||||||
|
* Version, including, but not limited to, documenting any non-standard *
|
||||||
|
* features, executables, or modules, and provided that you do at least ONE of *
|
||||||
|
* the following: *
|
||||||
* *
|
* *
|
||||||
* b) accompany the distribution with the machine-readable source of *
|
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||||
* the Package with your modifications. *
|
* Standard Version, under the Original License, so that the Copyright Holder *
|
||||||
|
* may include your modifications in the Standard Version. *
|
||||||
|
* (b) ensure that installation of your Modified Version does not prevent the *
|
||||||
|
* user installing or running the Standard Version. In addition, the Modified *
|
||||||
|
* Version must bear a name that is different from the name of the Standard *
|
||||||
|
* Version. *
|
||||||
|
* (c) allow anyone who receives a copy of the Modified Version to make the *
|
||||||
|
* Source form of the Modified Version available to others under *
|
||||||
|
* (i) the Original License or *
|
||||||
|
* (ii) a license that permits the licensee to freely copy, modify and *
|
||||||
|
* redistribute the Modified Version using the same licensing terms that apply *
|
||||||
|
* to the copy that the licensee received, and requires that the Source form of *
|
||||||
|
* the Modified Version, and of any works derived from it, be made freely *
|
||||||
|
* available in that license fees are prohibited but Distributor Fees are *
|
||||||
|
* allowed. *
|
||||||
|
* Distribution of Compiled Forms of the Standard Version or Modified Versions *
|
||||||
|
* without the Source *
|
||||||
* *
|
* *
|
||||||
* c) give non-standard executables non-standard names, and clearly *
|
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||||
* document the differences in manual pages (or equivalent), together *
|
* Source, provided that you include complete instructions on how to get the *
|
||||||
* with instructions on where to get the Standard Version. *
|
* Source of the Standard Version. Such instructions must be valid at the time *
|
||||||
|
* of your distribution. If these instructions, at any time while you are *
|
||||||
|
* carrying out such distribution, become invalid, you must provide new *
|
||||||
|
* instructions on demand or cease further distribution. If you provide valid *
|
||||||
|
* instructions or cease distribution within thirty days after you become aware *
|
||||||
|
* that the instructions are invalid, then you do not forfeit any of your *
|
||||||
|
* rights under this license. *
|
||||||
* *
|
* *
|
||||||
* d) make other distribution arrangements with the Copyright Holder. *
|
* (6) You may Distribute a Modified Version in Compiled form without the *
|
||||||
|
* Source, provided that you comply with Section 4 with respect to the Source *
|
||||||
|
* of the Modified Version. *
|
||||||
|
* Aggregating or Linking the Package *
|
||||||
* *
|
* *
|
||||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||||
* Package. You may charge any fee you choose for support of this *
|
* Version) with other packages and Distribute the resulting aggregation *
|
||||||
* Package. You may not charge a fee for this Package itself. However, *
|
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||||
* you may distribute this Package in aggregate with other (possibly *
|
* Fees are permitted, and licensing fees for other components in the *
|
||||||
* commercial) programs as part of a larger (possibly commercial) software *
|
* aggregation are permitted. The terms of this license apply to the use and *
|
||||||
* distribution provided that you do not advertise this Package as a *
|
* Distribution of the Standard or Modified Versions as included in the *
|
||||||
* product of your own. You may embed this Package's interpreter within *
|
* aggregation. *
|
||||||
* an executable of yours (by linking); this shall be construed as a mere *
|
|
||||||
* form of aggregation, provided that the complete Standard Version of the *
|
|
||||||
* interpreter is so embedded. *
|
|
||||||
* *
|
* *
|
||||||
* 6. The scripts and library files supplied as input to or produced as *
|
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||||
* output from the programs of this Package do not automatically fall *
|
* works, to embed the Package in a larger work of your own, or to build *
|
||||||
* under the copyright of this Package, but belong to whoever generated *
|
* stand-alone binary or bytecode versions of applications that include the *
|
||||||
* them, and may be sold commercially, and may be aggregated with this *
|
* Package, and Distribute the result without restriction, provided the result *
|
||||||
* Package. If such scripts or library files are aggregated with this *
|
* does not expose a direct interface to the Package. *
|
||||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
* Items That are Not Considered Part of a Modified Version *
|
||||||
* binary executable image, then distribution of such an image shall *
|
|
||||||
* neither be construed as a distribution of this Package nor shall it *
|
|
||||||
* fall under the restrictions of Paragraphs 3 and 4, provided that you do *
|
|
||||||
* not represent such an executable image as a Standard Version of this *
|
|
||||||
* Package. *
|
|
||||||
* *
|
* *
|
||||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||||
* languages) supplied by you and linked into this Package in order to *
|
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||||
* emulate subroutines and variables of the language defined by this *
|
* to be a Modified Version. In addition, such works are not considered parts *
|
||||||
* Package shall not be considered part of this Package, but are the *
|
* of the Package itself, and are not subject to the terms of this license. *
|
||||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
* General Provisions *
|
||||||
* not change the language in any way that would cause it to fail the *
|
|
||||||
* regression tests for the language. *
|
|
||||||
* *
|
* *
|
||||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||||
* permitted provided that the use of this Package is embedded; that is, *
|
* Versions is governed by this Artistic License. By using, modifying or *
|
||||||
* when no overt attempt is made to make this Package's interfaces visible *
|
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||||
* to the end user of the commercial distribution. Such use shall not be *
|
* distribute the Package, if you do not accept this license. *
|
||||||
* construed as a distribution of this Package. *
|
|
||||||
* *
|
* *
|
||||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||||
* products derived from this software without specific prior written *
|
* by someone other than you, you are nevertheless required to ensure that your *
|
||||||
* permission. *
|
* Modified Version complies with the requirements of this license. *
|
||||||
* *
|
* *
|
||||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
* (12) This license does not grant you the right to use any trademark, service *
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
* mark, tradename, or logo of the Copyright Holder. *
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
* *
|
||||||
|
* (13) This license includes the non-exclusive, worldwide, free-of-charge *
|
||||||
|
* patent license to make, have made, use, offer to sell, sell, import and *
|
||||||
|
* otherwise transfer the Package with respect to any patent claims licensable *
|
||||||
|
* by the Copyright Holder that are necessarily infringed by the Package. If *
|
||||||
|
* you institute patent litigation (including a cross-claim or counterclaim) *
|
||||||
|
* against any party alleging that the Package constitutes direct or *
|
||||||
|
* contributory patent infringement, then this Artistic License to you shall *
|
||||||
|
* terminate on the date that such litigation is filed. *
|
||||||
|
* *
|
||||||
|
* (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER *
|
||||||
|
* AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE *
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR *
|
||||||
|
* NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. *
|
||||||
|
* UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE *
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN *
|
||||||
|
* ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF *
|
||||||
|
* SUCH DAMAGE. *
|
||||||
* *
|
* *
|
||||||
* The End *
|
* The End *
|
||||||
* *
|
* *
|
||||||
|
Reference in New Issue
Block a user