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= \
|
||||
$(srcdir)/problog.yap \
|
||||
$(srcdir)/problog_learning.yap
|
||||
$(srcdir)/learning.yap
|
||||
|
||||
PROBLOG_PROGRAMS= \
|
||||
$(srcdir)/problog/flags.yap \
|
||||
@ -34,19 +34,20 @@ PROBLOG_PROGRAMS= \
|
||||
$(srcdir)/problog/tptree.yap
|
||||
|
||||
LEARNING_PROGRAMS = \
|
||||
$(srcdir)/problog_learning/flags_learning.yap \
|
||||
$(srcdir)/problog_learning/logger.yap
|
||||
$(srcdir)/learning/flags_learning.yap \
|
||||
$(srcdir)/learning/logger.yap
|
||||
|
||||
EXAMPLES = \
|
||||
$(srcdir)/problog_examples/graph.pl \
|
||||
$(srcdir)/problog_examples/learn_graph.pl
|
||||
$(srcdir)/examples/graph.pl \
|
||||
$(srcdir)/examples/learn_graph.pl
|
||||
|
||||
install: $(PROGRAMS) $(LEARNING_PROGRAMS) $(EXAMPLE_PROGRAMS)
|
||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
|
||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog
|
||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/problog_examples
|
||||
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 $(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
|
||||
|
@ -4,15 +4,4 @@ To clean the directory call
|
||||
make clean
|
||||
|
||||
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.
|
||||
|
||||
Please, consult
|
||||
|
||||
http://dtai.cs.kuleuven.be/problog
|
||||
|
||||
and the examples directory
|
||||
|
||||
problog_examples
|
||||
|
||||
for more information
|
||||
|
||||
And it will finally copy the binary executable ProblogBDD to the main directory.
|
File diff suppressed because it is too large
Load Diff
@ -2,17 +2,18 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $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 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
%
|
||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
||||
%
|
||||
% Copyright 2009
|
||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||
%
|
||||
% Copyright 2009 Katholieke Universiteit Leuven
|
||||
%
|
||||
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||
% Vitor Santos Costa
|
||||
%
|
||||
%
|
||||
% Main authors of this file:
|
||||
% Bernd Gutmann
|
||||
%
|
@ -2,17 +2,18 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2009-07-21 18:30:23 +0200 (Tue, 21 Jul 2009) $
|
||||
% $Revision: 1805 $
|
||||
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||
% $Revision: 1550 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
%
|
||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
||||
%
|
||||
% Copyright 2009
|
||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||
%
|
||||
% Copyright 2009 Katholieke Universiteit Leuven
|
||||
%
|
||||
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||
% Vitor Santos Costa
|
||||
%
|
||||
%
|
||||
% Main authors of this file:
|
||||
% Angelika Kimmig, Vitor Santos Costa,Bernd Gutmann
|
||||
%
|
||||
@ -223,27 +224,27 @@
|
||||
% angelika.kimmig@cs.kuleuven.be
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
:- module(problog, [problog_delta/5,
|
||||
problog_threshold/5,
|
||||
problog_low/4,
|
||||
problog_kbest/4,
|
||||
problog_kbest_save/6,
|
||||
problog_max/3,
|
||||
problog_exact/3,
|
||||
problog_montecarlo/3,
|
||||
problog_answers/2,
|
||||
problog_table/1,
|
||||
get_fact_probability/2,
|
||||
set_fact_probability/2,
|
||||
get_fact/2,
|
||||
tunable_fact/2,
|
||||
non_ground_fact/1,
|
||||
export_facts/1,
|
||||
problog_help/0,
|
||||
show_inference/0,
|
||||
problog_dir/1,
|
||||
set_problog_flag/2,
|
||||
problog_flag/2,
|
||||
problog_flags/0]).
|
||||
problog_threshold/5,
|
||||
problog_low/4,
|
||||
problog_kbest/4,
|
||||
problog_kbest_save/6,
|
||||
problog_max/3,
|
||||
problog_exact/3,
|
||||
problog_montecarlo/3,
|
||||
problog_answers/2,
|
||||
get_fact_probability/2,
|
||||
set_fact_probability/2,
|
||||
get_fact/2,
|
||||
tunable_fact/2,
|
||||
non_ground_fact/1,
|
||||
export_facts/1,
|
||||
problog_help/0,
|
||||
show_inference/0,
|
||||
problog_dir/1,
|
||||
set_problog_flag/2,
|
||||
problog_flag/2,
|
||||
problog_flags/0,
|
||||
op( 550, yfx, :: )]).
|
||||
|
||||
:- style_check(all).
|
||||
:- yap_flag(unknown,error).
|
||||
@ -272,12 +273,6 @@
|
||||
:- ensure_loaded(library(system)).
|
||||
:- 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
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
@ -313,17 +308,14 @@
|
||||
:- dynamic dynamic_probability_fact/1.
|
||||
:- dynamic dynamic_probability_fact_extract/2.
|
||||
|
||||
% keep a tab on tabling
|
||||
:- dynamic problog_tabled/1.
|
||||
|
||||
% directory where ProblogBDD executable is located
|
||||
% automatically set during loading -- assumes it is in same place as this file (problog.yap)
|
||||
%:- getcwd(PD),retractall(problog_dir(_)),assert(problog_dir(PD)).
|
||||
% yap-6 separates executables and prolog progams...
|
||||
:- yap_flag(shared_object_search_path,PD),
|
||||
retractall(problog_dir(_)),
|
||||
assert(problog_dir(PD)).
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% help
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
@ -371,7 +363,7 @@ init_global_params :-
|
||||
set_problog_flag(bdd_file,example_bdd),
|
||||
set_problog_flag(dir,output),
|
||||
set_problog_flag(save_bdd,false),
|
||||
set_problog_flag(hacked_proofs,false),
|
||||
set_problog_flag(fast_proofs,false),
|
||||
set_problog_flag(verbose,true).
|
||||
% problog_flags,
|
||||
% print_sep_line,
|
||||
@ -401,12 +393,10 @@ problog_control(off,X) :-
|
||||
problog_control(check,X) :-
|
||||
call(X).
|
||||
|
||||
reset_control :-
|
||||
problog_control(off,up),
|
||||
problog_control(off,mc),
|
||||
problog_control(off,limit),
|
||||
problog_control(off,remember).
|
||||
:- reset_control.
|
||||
:- problog_control(off,up).
|
||||
:- problog_control(off,mc).
|
||||
:- problog_control(off,limit).
|
||||
:- problog_control(off,remember).
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% nice user syntax Prob::Fact
|
||||
@ -437,7 +427,7 @@ user:term_expansion(P::Goal,Goal) :-
|
||||
P =:= 1,
|
||||
!.
|
||||
*/
|
||||
user:term_expansion(P::Goal, problog:ProbFact) :-
|
||||
user:term_expansion(P::Goal, problog:ProbFact) :-
|
||||
copy_term((P,Goal),(P_Copy,Goal_Copy)),
|
||||
functor(Goal, Name, Arity),
|
||||
atomic_concat([problog_,Name],ProblogName),
|
||||
@ -446,7 +436,7 @@ user:term_expansion(P::Goal, problog:ProbFact) :-
|
||||
probclause_id(ID),
|
||||
ProbFact =.. [ProblogName,ID|L1],
|
||||
(
|
||||
(nonvar(P), P = t(TrueProb))
|
||||
(\+ var(P), P = t(TrueProb))
|
||||
->
|
||||
(
|
||||
assert(tunable_fact(ID,TrueProb)),
|
||||
@ -455,8 +445,6 @@ user:term_expansion(P::Goal, problog:ProbFact) :-
|
||||
(
|
||||
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);
|
||||
(
|
||||
% Probability is a variable... check wether it appears in the term
|
||||
@ -496,6 +484,7 @@ problog_predicate(Name, Arity, ProblogName) :-
|
||||
ProbFact =.. [ProblogName,ID|L1],
|
||||
prolog_load_context(module,Mod),
|
||||
make_add_to_proof(ID2,ProbEval,AddToProof),
|
||||
|
||||
assert( (Mod:OriginalGoal :- ProbFact,
|
||||
(
|
||||
non_ground_fact(ID)
|
||||
@ -527,13 +516,11 @@ problog_predicate(Name, Arity, ProblogName) :-
|
||||
dynamic(problog:ProblogName/ArityPlus2).
|
||||
|
||||
make_add_to_proof(ID2,ProbEval,O) :-
|
||||
problog_flag(hacked_proofs,true), !,
|
||||
O = hacked_add_to_proof(ID2,ProbEval).
|
||||
problog_flag(fast_proofs,true), !,
|
||||
O = fast_positive_add_to_proof(ID2,ProbEval).
|
||||
make_add_to_proof(ID2,ProbEval,add_to_proof(ID2,ProbEval)).
|
||||
|
||||
|
||||
|
||||
|
||||
% generate next global identifier
|
||||
probclause_id(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),
|
||||
ID2 is ID+1,
|
||||
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
|
||||
% 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),
|
||||
% 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) :-
|
||||
(
|
||||
ground(ID) ->
|
||||
@ -726,8 +707,10 @@ add_to_proof(ID,Prob) :-
|
||||
)
|
||||
).
|
||||
|
||||
% simpliciation
|
||||
hacked_add_to_proof(ID,Prob) :-
|
||||
% this is a version for long proofs, it assumes we are using
|
||||
% 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),
|
||||
nb_getval(problog_threshold, CurrentThreshold),
|
||||
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
|
||||
% to set up environment for proving
|
||||
% it resets control flags, method specific values to be set afterwards!
|
||||
init_problog(Threshold) :-
|
||||
reset_non_ground_facts,
|
||||
reset_control,
|
||||
LT is log(Threshold),
|
||||
b_setval(problog_probability, 0.0),
|
||||
b_setval(problog_current_proof, []),
|
||||
nb_setval(problog_threshold, LT),
|
||||
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
|
||||
% 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, _, _, _) :-
|
||||
init_problog_threshold(Threshold),
|
||||
problog_control(on,up),
|
||||
init_problog_threshold(Threshold),
|
||||
problog_call(Goal),
|
||||
add_solution,
|
||||
fail.
|
||||
@ -988,8 +970,8 @@ compute_bounds(LP, UP, Status) :-
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
problog_low(Goal, Threshold, _, _) :-
|
||||
init_problog_low(Threshold),
|
||||
problog_control(off,up),
|
||||
init_problog_low(Threshold),
|
||||
problog_call(Goal),
|
||||
add_solution,
|
||||
fail.
|
||||
@ -1014,9 +996,9 @@ init_problog_low(Threshold) :-
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
problog_delta(Goal, Delta, Low, Up, Status) :-
|
||||
problog_control(on,up),
|
||||
problog_flag(first_threshold,InitT),
|
||||
init_problog_delta(InitT,Delta),
|
||||
problog_control(on,up),
|
||||
problog_delta_id(Goal,Status),
|
||||
delete_ptree(1),
|
||||
delete_ptree(2),
|
||||
@ -1142,9 +1124,9 @@ eval_upper(N,UpP,ok) :-
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
problog_max(Goal, Prob, Facts) :-
|
||||
problog_control(off,up),
|
||||
problog_flag(first_threshold,InitT),
|
||||
init_problog_max(InitT),
|
||||
problog_control(off,up),
|
||||
problog_max_id(Goal, Prob, FactIDs),
|
||||
( FactIDs = [_|_] -> get_fact_list(FactIDs,Facts);
|
||||
Facts = FactIDs).
|
||||
@ -1220,9 +1202,9 @@ problog_kbest_save(Goal, K, Prob, Status, BDDFile, ParamFile) :-
|
||||
true).
|
||||
|
||||
problog_kbest(Goal, K, Prob, Status) :-
|
||||
problog_control(off,up),
|
||||
problog_flag(first_threshold,InitT),
|
||||
init_problog_kbest(InitT),
|
||||
problog_control(off,up),
|
||||
problog_kbest_id(Goal, K),
|
||||
retract(current_kbest(_,ListFound,_NumFound)),
|
||||
build_prefixtree(ListFound),
|
||||
@ -1273,17 +1255,13 @@ update_current_kbest(K,NewLogProb,Cl) :-
|
||||
(NewLength < K ->
|
||||
assert(current_kbest(OldThres,NewList,NewLength))
|
||||
;
|
||||
(NewLength>K
|
||||
->
|
||||
(NewLength>K ->
|
||||
First is NewLength-K+1,
|
||||
cutoff(NewList,NewLength,First,FinalList,FinalLength)
|
||||
;
|
||||
FinalList=NewList, FinalLength=NewLength
|
||||
),
|
||||
FinalList=[NewThres-_|_],
|
||||
nb_setval(problog_threshold,NewThres),
|
||||
assert(current_kbest(NewThres,FinalList,FinalLength))
|
||||
).
|
||||
; FinalList=NewList, FinalLength=NewLength),
|
||||
FinalList=[NewThres-_|_],
|
||||
nb_setval(problog_threshold,NewThres),
|
||||
assert(current_kbest(NewThres,FinalList,FinalLength))).
|
||||
|
||||
sorted_insert(A,[],[A]).
|
||||
sorted_insert(A-LA,[B1-LB1|B], [A-LA,B1-LB1|B] ) :-
|
||||
@ -1401,33 +1379,14 @@ mc_prove(A) :- !,
|
||||
|
||||
clean_sample :-
|
||||
reset_static_array(mc_sample),
|
||||
problog_tabled(P),%show_table(P),table_statistics(P),get(_),
|
||||
abolish_table(P),
|
||||
fail.
|
||||
clean_sample.
|
||||
|
||||
% find new proof -- need to reset control after init
|
||||
% find new proof
|
||||
get_some_proof(Goal) :-
|
||||
init_problog(0),
|
||||
problog_control(on,mc),
|
||||
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
|
||||
% output goes to File
|
||||
@ -1446,4 +1405,4 @@ eval_answers :-
|
||||
problog_exact(G,P,_),
|
||||
format(answer,'answer(~q,~w).~n',[G,P]),
|
||||
fail.
|
||||
eval_answers.
|
||||
eval_answers.
|
@ -2,17 +2,18 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $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 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
%
|
||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
||||
%
|
||||
% Copyright 2009
|
||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||
%
|
||||
% Copyright 2009 Katholieke Universiteit Leuven
|
||||
%
|
||||
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||
% Vitor Santos Costa
|
||||
%
|
||||
%
|
||||
% Main authors of this file:
|
||||
% Angelika Kimmig, Vitor Santos Costa
|
||||
%
|
||||
@ -216,7 +217,7 @@
|
||||
|
||||
:- 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
|
||||
@ -258,8 +259,8 @@ get_problog_flag(save_bdd,X) :-
|
||||
save_bdd(X).
|
||||
get_problog_flag(verbose,X) :-
|
||||
problog_verbose(X).
|
||||
get_problog_flag(hacked_proofs,X) :-
|
||||
hacked_proofs(X).
|
||||
get_problog_flag(fast_proofs,X) :-
|
||||
fast_proofs(X).
|
||||
|
||||
|
||||
%%%%%%%%%%%%
|
||||
@ -474,17 +475,18 @@ set_problog_flag(verbose,_) :-
|
||||
flush_output(user),
|
||||
fail.
|
||||
|
||||
set_problog_flag(hacked_proofs,true) :-
|
||||
retractall(hacked_proofs(_)),
|
||||
assert(hacked_proofs(true)).
|
||||
set_problog_flag(hacked_proofs,false) :-
|
||||
retractall(hacked_proofs(_)),
|
||||
assert(hacked_proofs(true)).
|
||||
set_problog_flag(hacked_proofs,V) :-
|
||||
set_problog_flag(fast_proofs,true) :-
|
||||
retractall(fast_proofs(_)),
|
||||
assert(fast_proofs(true)).
|
||||
set_problog_flag(fast_proofs,false) :-
|
||||
retractall(fast_proofs(_)),
|
||||
assert(fast_proofs(true)).
|
||||
set_problog_flag(fast_proofs,V) :-
|
||||
format(user,'\% ERROR: value ~w should be \'true\' or \'false\'!~n',[V]),
|
||||
flush_output(user),
|
||||
fail.
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% show values
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
@ -2,17 +2,18 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2009-06-24 22:07:32 +0200 (Wed, 24 Jun 2009) $
|
||||
% $Revision: 1669 $
|
||||
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||
% $Revision: 1550 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
%
|
||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
||||
%
|
||||
% Copyright 2009
|
||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||
%
|
||||
% Copyright 2009 Katholieke Universiteit Leuven
|
||||
%
|
||||
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||
% Vitor Santos Costa
|
||||
%
|
||||
%
|
||||
% Main authors of this file:
|
||||
% Angelika Kimmig, Vitor Santos Costa
|
||||
%
|
||||
@ -212,16 +213,11 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
:- module(print, [print_param/4,
|
||||
print_long_param/4,
|
||||
print_sep_line/0,
|
||||
print_inference/2]).
|
||||
print_sep_line/0,
|
||||
print_inference/2]).
|
||||
|
||||
print_param(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 :-
|
||||
sep_line(125).
|
||||
sep_line(0) :-
|
||||
|
@ -2,17 +2,18 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% $Date: 2009-06-29 17:10:57 +0200 (Mon, 29 Jun 2009) $
|
||||
% $Revision: 1782 $
|
||||
% $Date: 2009-06-17 22:22:00 +0200 (Mi, 17 Jun 2009) $
|
||||
% $Revision: 1550 $
|
||||
%
|
||||
% This file is part of ProbLog
|
||||
% http://dtai.cs.kuleuven.be/problog
|
||||
%
|
||||
% ProbLog was developed at Katholieke Universiteit Leuven
|
||||
%
|
||||
% Copyright 2009
|
||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||
%
|
||||
% Copyright 2009 Katholieke Universiteit Leuven
|
||||
%
|
||||
% Authors: Luc De Raedt, Bernd Gutmann, Angelika Kimmig,
|
||||
% Vitor Santos Costa
|
||||
%
|
||||
%
|
||||
% Main authors of this file:
|
||||
% Angelika Kimmig, Vitor Santos Costa, Bernd Gutmann
|
||||
%
|
||||
@ -272,7 +273,9 @@ init_ptree(ID) :-
|
||||
delete_ptree(ID) :-
|
||||
sym(ID,Sym),
|
||||
nb_getval(Sym, Trie), !,
|
||||
trie_close(Trie).
|
||||
trie_close(Trie),
|
||||
trie_open(NewTrie),
|
||||
nb_setval(Sym, NewTrie).
|
||||
delete_ptree(_).
|
||||
|
||||
rename_ptree(OldID,NewID) :-
|
||||
|
@ -3,139 +3,182 @@
|
||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||
* 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 *
|
||||
* File: Example.c *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
* The "Artistic License" *
|
||||
* Artistic License 2.0 *
|
||||
* *
|
||||
* Preamble *
|
||||
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||
* *
|
||||
* The intent of this document is to state the conditions under which a *
|
||||
* Package may be copied, such that the Copyright Holder maintains some *
|
||||
* semblance of artistic control over the development of the package, *
|
||||
* while giving the users of the package the right to use and distribute *
|
||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
||||
* reasonable modifications. *
|
||||
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||
* document, but changing it is not allowed. *
|
||||
* *
|
||||
* Definitions: *
|
||||
* Preamble *
|
||||
* *
|
||||
* "Package" refers to the collection of files distributed by the *
|
||||
* Copyright Holder, and derivatives of that collection of files *
|
||||
* created through textual modification. *
|
||||
* This license establishes the terms under which a given free software Package *
|
||||
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||
* that the Copyright Holder maintains some artistic control over the *
|
||||
* development of that Package while still keeping the Package available as *
|
||||
* open source and free software. *
|
||||
* *
|
||||
* "Standard Version" refers to such a Package if it has not been *
|
||||
* modified, or has been modified in accordance with the wishes *
|
||||
* of the Copyright Holder as specified below. *
|
||||
* 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 *
|
||||
* *
|
||||
* "Copyright Holder" is whoever is named in the copyright or *
|
||||
* copyrights for the package. *
|
||||
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||
* copyright notice for the entire Package. *
|
||||
* *
|
||||
* "You" is you, if you're thinking about copying or distributing *
|
||||
* this Package. *
|
||||
* "Contributor" means any party that has contributed code or other material to *
|
||||
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||
* *
|
||||
* "Reasonable copying fee" is whatever you can justify on the *
|
||||
* basis of media cost, duplication charges, time of people involved, *
|
||||
* and so on. (You will not be required to justify it to the *
|
||||
* Copyright Holder, but only to the computing community at large *
|
||||
* as a market that must bear the fee.) *
|
||||
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||
* modify the Package. *
|
||||
* *
|
||||
* "Freely Available" means that no fee is charged for the item *
|
||||
* itself, though there may be fees involved in handling the item. *
|
||||
* It also means that recipients of the item may redistribute it *
|
||||
* under the same conditions they received it. *
|
||||
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||
* and derivatives of that collection and/or of those files. A given Package *
|
||||
* may consist of either the Standard Version, or a Modified Version. *
|
||||
* *
|
||||
* 1. You may make and give away verbatim copies of the source form of the *
|
||||
* Standard Version of this Package without restriction, provided that you *
|
||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
||||
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||
* to anyone else, or in the case of a company or organization, to others *
|
||||
* outside of your company or organization. *
|
||||
* *
|
||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
||||
* modified in such a way shall still be considered the Standard Version. *
|
||||
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||
* Package or providing support for this Package to another party. It does not *
|
||||
* mean licensing fees. *
|
||||
* *
|
||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
||||
* that you insert a prominent notice in each changed file stating how and *
|
||||
* when you changed that file, and provided that you do at least ONE of the *
|
||||
* following: *
|
||||
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* a) place your modifications in the Public Domain or otherwise make them *
|
||||
* Freely Available, such as by posting said modifications to Usenet or *
|
||||
* 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. *
|
||||
* "Modified Version" means the Package, if it has been changed, and such *
|
||||
* changes were not explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* b) use the modified Package only within your corporation or organization. *
|
||||
* "Original License" means this Artistic License as Distributed with the *
|
||||
* Standard Version of the Package, in its current version or as it may be *
|
||||
* modified by The Perl Foundation in the future. *
|
||||
* *
|
||||
* c) rename any non-standard executables so the names do not conflict *
|
||||
* with standard executables, which must also be provided, and provide *
|
||||
* a separate manual page for each non-standard executable that clearly *
|
||||
* documents how it differs from the Standard Version. *
|
||||
* "Source" form means the source code, documentation source, and configuration *
|
||||
* files for the Package. *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* "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 *
|
||||
* *
|
||||
* 4. You may distribute the programs of this Package in object code or *
|
||||
* executable form, provided that you do at least ONE of the following: *
|
||||
* (1) You are permitted to use the Standard Version and create and use *
|
||||
* Modified Versions for any purpose without restriction, provided that you do *
|
||||
* not Distribute the Modified Version. *
|
||||
* Permissions for Redistribution of the Standard Version *
|
||||
* *
|
||||
* a) distribute a Standard Version of the executables and library files, *
|
||||
* together with instructions (in the manual page or equivalent) on where *
|
||||
* to get the Standard Version. *
|
||||
* (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. *
|
||||
* *
|
||||
* b) accompany the distribution with the machine-readable source of *
|
||||
* the Package with your modifications. *
|
||||
* (3) You may apply any bug fixes, portability changes, and other *
|
||||
* 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 *
|
||||
* *
|
||||
* c) give non-standard executables non-standard names, and clearly *
|
||||
* document the differences in manual pages (or equivalent), together *
|
||||
* with instructions on where to get the Standard Version. *
|
||||
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||
* 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: *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||
* 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 *
|
||||
* *
|
||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
||||
* Package. You may charge any fee you choose for support of this *
|
||||
* Package. You may not charge a fee for this Package itself. However, *
|
||||
* you may distribute this Package in aggregate with other (possibly *
|
||||
* commercial) programs as part of a larger (possibly commercial) software *
|
||||
* distribution provided that you do not advertise this Package as a *
|
||||
* product of your own. You may embed this Package's interpreter within *
|
||||
* 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. *
|
||||
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||
* Source, provided that you include complete instructions on how to get the *
|
||||
* 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. *
|
||||
* *
|
||||
* 6. The scripts and library files supplied as input to or produced as *
|
||||
* output from the programs of this Package do not automatically fall *
|
||||
* under the copyright of this Package, but belong to whoever generated *
|
||||
* them, and may be sold commercially, and may be aggregated with this *
|
||||
* Package. If such scripts or library files are aggregated with this *
|
||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
||||
* 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. *
|
||||
* (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 *
|
||||
* *
|
||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
||||
* languages) supplied by you and linked into this Package in order to *
|
||||
* emulate subroutines and variables of the language defined by this *
|
||||
* Package shall not be considered part of this Package, but are the *
|
||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
||||
* not change the language in any way that would cause it to fail the *
|
||||
* regression tests for the language. *
|
||||
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||
* Version) with other packages and Distribute the resulting aggregation *
|
||||
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||
* Fees are permitted, and licensing fees for other components in the *
|
||||
* aggregation are permitted. The terms of this license apply to the use and *
|
||||
* Distribution of the Standard or Modified Versions as included in the *
|
||||
* aggregation. *
|
||||
* *
|
||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
||||
* permitted provided that the use of this Package is embedded; that is, *
|
||||
* when no overt attempt is made to make this Package's interfaces visible *
|
||||
* to the end user of the commercial distribution. Such use shall not be *
|
||||
* construed as a distribution of this Package. *
|
||||
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||
* works, to embed the Package in a larger work of your own, or to build *
|
||||
* stand-alone binary or bytecode versions of applications that include the *
|
||||
* Package, and Distribute the result without restriction, provided the result *
|
||||
* does not expose a direct interface to the Package. *
|
||||
* Items That are Not Considered Part of a Modified Version *
|
||||
* *
|
||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
||||
* products derived from this software without specific prior written *
|
||||
* permission. *
|
||||
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||
* to be a Modified Version. In addition, such works are not considered parts *
|
||||
* of the Package itself, and are not subject to the terms of this license. *
|
||||
* General Provisions *
|
||||
* *
|
||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||
* Versions is governed by this Artistic License. By using, modifying or *
|
||||
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||
* distribute the Package, if you do not accept this license. *
|
||||
* *
|
||||
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||
* by someone other than you, you are nevertheless required to ensure that your *
|
||||
* Modified Version complies with the requirements of this license. *
|
||||
* *
|
||||
* (12) This license does not grant you the right to use any trademark, service *
|
||||
* mark, tradename, or logo of the Copyright Holder. *
|
||||
* *
|
||||
* (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 *
|
||||
* *
|
||||
@ -228,7 +271,7 @@ void DFS(extmanager MyManager, DdNode *Current) {
|
||||
char *curnode;
|
||||
curnode = GetNodeVarNameDisp(MyManager.manager, MyManager.varmap, Current);
|
||||
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 {
|
||||
printf("%s\n", curnode);
|
||||
}
|
||||
|
@ -3,140 +3,182 @@
|
||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||
* SimpleCUDD was developed at Katholieke Universiteit Leuven(www.kuleuven.be) *
|
||||
* *
|
||||
* Copyright T. Mantadelis, A. Kimmig, B. Gutmann *
|
||||
* and Katholieke Universiteit Leuven 2008 *
|
||||
* Copyright Katholieke Universiteit Leuven 2008 *
|
||||
* *
|
||||
* Author: Theofrastos Mantadelis, Angelika Kimmig, Bernd Gutmann *
|
||||
* File: ProblogBDD.c *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
* The "Artistic License" *
|
||||
* Artistic License 2.0 *
|
||||
* *
|
||||
* Preamble *
|
||||
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||
* *
|
||||
* The intent of this document is to state the conditions under which a *
|
||||
* Package may be copied, such that the Copyright Holder maintains some *
|
||||
* semblance of artistic control over the development of the package, *
|
||||
* while giving the users of the package the right to use and distribute *
|
||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
||||
* reasonable modifications. *
|
||||
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||
* document, but changing it is not allowed. *
|
||||
* *
|
||||
* Definitions: *
|
||||
* Preamble *
|
||||
* *
|
||||
* "Package" refers to the collection of files distributed by the *
|
||||
* Copyright Holder, and derivatives of that collection of files *
|
||||
* created through textual modification. *
|
||||
* This license establishes the terms under which a given free software Package *
|
||||
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||
* that the Copyright Holder maintains some artistic control over the *
|
||||
* development of that Package while still keeping the Package available as *
|
||||
* open source and free software. *
|
||||
* *
|
||||
* "Standard Version" refers to such a Package if it has not been *
|
||||
* modified, or has been modified in accordance with the wishes *
|
||||
* of the Copyright Holder as specified below. *
|
||||
* 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 *
|
||||
* *
|
||||
* "Copyright Holder" is whoever is named in the copyright or *
|
||||
* copyrights for the package. *
|
||||
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||
* copyright notice for the entire Package. *
|
||||
* *
|
||||
* "You" is you, if you're thinking about copying or distributing *
|
||||
* this Package. *
|
||||
* "Contributor" means any party that has contributed code or other material to *
|
||||
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||
* *
|
||||
* "Reasonable copying fee" is whatever you can justify on the *
|
||||
* basis of media cost, duplication charges, time of people involved, *
|
||||
* and so on. (You will not be required to justify it to the *
|
||||
* Copyright Holder, but only to the computing community at large *
|
||||
* as a market that must bear the fee.) *
|
||||
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||
* modify the Package. *
|
||||
* *
|
||||
* "Freely Available" means that no fee is charged for the item *
|
||||
* itself, though there may be fees involved in handling the item. *
|
||||
* It also means that recipients of the item may redistribute it *
|
||||
* under the same conditions they received it. *
|
||||
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||
* and derivatives of that collection and/or of those files. A given Package *
|
||||
* may consist of either the Standard Version, or a Modified Version. *
|
||||
* *
|
||||
* 1. You may make and give away verbatim copies of the source form of the *
|
||||
* Standard Version of this Package without restriction, provided that you *
|
||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
||||
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||
* to anyone else, or in the case of a company or organization, to others *
|
||||
* outside of your company or organization. *
|
||||
* *
|
||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
||||
* modified in such a way shall still be considered the Standard Version. *
|
||||
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||
* Package or providing support for this Package to another party. It does not *
|
||||
* mean licensing fees. *
|
||||
* *
|
||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
||||
* that you insert a prominent notice in each changed file stating how and *
|
||||
* when you changed that file, and provided that you do at least ONE of the *
|
||||
* following: *
|
||||
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* a) place your modifications in the Public Domain or otherwise make them *
|
||||
* Freely Available, such as by posting said modifications to Usenet or *
|
||||
* 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. *
|
||||
* "Modified Version" means the Package, if it has been changed, and such *
|
||||
* changes were not explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* b) use the modified Package only within your corporation or organization. *
|
||||
* "Original License" means this Artistic License as Distributed with the *
|
||||
* Standard Version of the Package, in its current version or as it may be *
|
||||
* modified by The Perl Foundation in the future. *
|
||||
* *
|
||||
* c) rename any non-standard executables so the names do not conflict *
|
||||
* with standard executables, which must also be provided, and provide *
|
||||
* a separate manual page for each non-standard executable that clearly *
|
||||
* documents how it differs from the Standard Version. *
|
||||
* "Source" form means the source code, documentation source, and configuration *
|
||||
* files for the Package. *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* "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 *
|
||||
* *
|
||||
* 4. You may distribute the programs of this Package in object code or *
|
||||
* executable form, provided that you do at least ONE of the following: *
|
||||
* (1) You are permitted to use the Standard Version and create and use *
|
||||
* Modified Versions for any purpose without restriction, provided that you do *
|
||||
* not Distribute the Modified Version. *
|
||||
* Permissions for Redistribution of the Standard Version *
|
||||
* *
|
||||
* a) distribute a Standard Version of the executables and library files, *
|
||||
* together with instructions (in the manual page or equivalent) on where *
|
||||
* to get the Standard Version. *
|
||||
* (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. *
|
||||
* *
|
||||
* b) accompany the distribution with the machine-readable source of *
|
||||
* the Package with your modifications. *
|
||||
* (3) You may apply any bug fixes, portability changes, and other *
|
||||
* 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 *
|
||||
* *
|
||||
* c) give non-standard executables non-standard names, and clearly *
|
||||
* document the differences in manual pages (or equivalent), together *
|
||||
* with instructions on where to get the Standard Version. *
|
||||
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||
* 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: *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||
* 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 *
|
||||
* *
|
||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
||||
* Package. You may charge any fee you choose for support of this *
|
||||
* Package. You may not charge a fee for this Package itself. However, *
|
||||
* you may distribute this Package in aggregate with other (possibly *
|
||||
* commercial) programs as part of a larger (possibly commercial) software *
|
||||
* distribution provided that you do not advertise this Package as a *
|
||||
* product of your own. You may embed this Package's interpreter within *
|
||||
* 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. *
|
||||
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||
* Source, provided that you include complete instructions on how to get the *
|
||||
* 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. *
|
||||
* *
|
||||
* 6. The scripts and library files supplied as input to or produced as *
|
||||
* output from the programs of this Package do not automatically fall *
|
||||
* under the copyright of this Package, but belong to whoever generated *
|
||||
* them, and may be sold commercially, and may be aggregated with this *
|
||||
* Package. If such scripts or library files are aggregated with this *
|
||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
||||
* 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. *
|
||||
* (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 *
|
||||
* *
|
||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
||||
* languages) supplied by you and linked into this Package in order to *
|
||||
* emulate subroutines and variables of the language defined by this *
|
||||
* Package shall not be considered part of this Package, but are the *
|
||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
||||
* not change the language in any way that would cause it to fail the *
|
||||
* regression tests for the language. *
|
||||
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||
* Version) with other packages and Distribute the resulting aggregation *
|
||||
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||
* Fees are permitted, and licensing fees for other components in the *
|
||||
* aggregation are permitted. The terms of this license apply to the use and *
|
||||
* Distribution of the Standard or Modified Versions as included in the *
|
||||
* aggregation. *
|
||||
* *
|
||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
||||
* permitted provided that the use of this Package is embedded; that is, *
|
||||
* when no overt attempt is made to make this Package's interfaces visible *
|
||||
* to the end user of the commercial distribution. Such use shall not be *
|
||||
* construed as a distribution of this Package. *
|
||||
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||
* works, to embed the Package in a larger work of your own, or to build *
|
||||
* stand-alone binary or bytecode versions of applications that include the *
|
||||
* Package, and Distribute the result without restriction, provided the result *
|
||||
* does not expose a direct interface to the Package. *
|
||||
* Items That are Not Considered Part of a Modified Version *
|
||||
* *
|
||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
||||
* products derived from this software without specific prior written *
|
||||
* permission. *
|
||||
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||
* to be a Modified Version. In addition, such works are not considered parts *
|
||||
* of the Package itself, and are not subject to the terms of this license. *
|
||||
* General Provisions *
|
||||
* *
|
||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||
* Versions is governed by this Artistic License. By using, modifying or *
|
||||
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||
* distribute the Package, if you do not accept this license. *
|
||||
* *
|
||||
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||
* by someone other than you, you are nevertheless required to ensure that your *
|
||||
* Modified Version complies with the requirements of this license. *
|
||||
* *
|
||||
* (12) This license does not grant you the right to use any trademark, service *
|
||||
* mark, tradename, or logo of the Copyright Holder. *
|
||||
* *
|
||||
* (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 *
|
||||
* *
|
||||
@ -296,10 +338,10 @@ int main(int argc, char **arg) {
|
||||
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;
|
||||
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 {
|
||||
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);
|
||||
}
|
||||
@ -313,15 +355,15 @@ int main(int argc, char **arg) {
|
||||
tvalue = CalcGradient(MyManager, bdd, 0 + MyManager.varmap.varstart, NULL);
|
||||
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;
|
||||
case 'l':
|
||||
tvalue = CalcGradient(MyManager, bdd, 0 + MyManager.varmap.varstart, NULL);
|
||||
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;
|
||||
case 'p':
|
||||
printf("probability(%e).\n", CalcProbability(MyManager, bdd));
|
||||
printf("probability(%1.12f).\n", CalcProbability(MyManager, bdd));
|
||||
break;
|
||||
case 'o':
|
||||
onlinetraverse(MyManager.manager, MyManager.varmap, MyManager.his, bdd);
|
||||
|
@ -3,139 +3,182 @@
|
||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||
* 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 *
|
||||
* File: general.c *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
* The "Artistic License" *
|
||||
* Artistic License 2.0 *
|
||||
* *
|
||||
* Preamble *
|
||||
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||
* *
|
||||
* The intent of this document is to state the conditions under which a *
|
||||
* Package may be copied, such that the Copyright Holder maintains some *
|
||||
* semblance of artistic control over the development of the package, *
|
||||
* while giving the users of the package the right to use and distribute *
|
||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
||||
* reasonable modifications. *
|
||||
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||
* document, but changing it is not allowed. *
|
||||
* *
|
||||
* Definitions: *
|
||||
* Preamble *
|
||||
* *
|
||||
* "Package" refers to the collection of files distributed by the *
|
||||
* Copyright Holder, and derivatives of that collection of files *
|
||||
* created through textual modification. *
|
||||
* This license establishes the terms under which a given free software Package *
|
||||
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||
* that the Copyright Holder maintains some artistic control over the *
|
||||
* development of that Package while still keeping the Package available as *
|
||||
* open source and free software. *
|
||||
* *
|
||||
* "Standard Version" refers to such a Package if it has not been *
|
||||
* modified, or has been modified in accordance with the wishes *
|
||||
* of the Copyright Holder as specified below. *
|
||||
* 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 *
|
||||
* *
|
||||
* "Copyright Holder" is whoever is named in the copyright or *
|
||||
* copyrights for the package. *
|
||||
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||
* copyright notice for the entire Package. *
|
||||
* *
|
||||
* "You" is you, if you're thinking about copying or distributing *
|
||||
* this Package. *
|
||||
* "Contributor" means any party that has contributed code or other material to *
|
||||
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||
* *
|
||||
* "Reasonable copying fee" is whatever you can justify on the *
|
||||
* basis of media cost, duplication charges, time of people involved, *
|
||||
* and so on. (You will not be required to justify it to the *
|
||||
* Copyright Holder, but only to the computing community at large *
|
||||
* as a market that must bear the fee.) *
|
||||
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||
* modify the Package. *
|
||||
* *
|
||||
* "Freely Available" means that no fee is charged for the item *
|
||||
* itself, though there may be fees involved in handling the item. *
|
||||
* It also means that recipients of the item may redistribute it *
|
||||
* under the same conditions they received it. *
|
||||
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||
* and derivatives of that collection and/or of those files. A given Package *
|
||||
* may consist of either the Standard Version, or a Modified Version. *
|
||||
* *
|
||||
* 1. You may make and give away verbatim copies of the source form of the *
|
||||
* Standard Version of this Package without restriction, provided that you *
|
||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
||||
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||
* to anyone else, or in the case of a company or organization, to others *
|
||||
* outside of your company or organization. *
|
||||
* *
|
||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
||||
* modified in such a way shall still be considered the Standard Version. *
|
||||
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||
* Package or providing support for this Package to another party. It does not *
|
||||
* mean licensing fees. *
|
||||
* *
|
||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
||||
* that you insert a prominent notice in each changed file stating how and *
|
||||
* when you changed that file, and provided that you do at least ONE of the *
|
||||
* following: *
|
||||
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* a) place your modifications in the Public Domain or otherwise make them *
|
||||
* Freely Available, such as by posting said modifications to Usenet or *
|
||||
* 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. *
|
||||
* "Modified Version" means the Package, if it has been changed, and such *
|
||||
* changes were not explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* b) use the modified Package only within your corporation or organization. *
|
||||
* "Original License" means this Artistic License as Distributed with the *
|
||||
* Standard Version of the Package, in its current version or as it may be *
|
||||
* modified by The Perl Foundation in the future. *
|
||||
* *
|
||||
* c) rename any non-standard executables so the names do not conflict *
|
||||
* with standard executables, which must also be provided, and provide *
|
||||
* a separate manual page for each non-standard executable that clearly *
|
||||
* documents how it differs from the Standard Version. *
|
||||
* "Source" form means the source code, documentation source, and configuration *
|
||||
* files for the Package. *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* "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 *
|
||||
* *
|
||||
* 4. You may distribute the programs of this Package in object code or *
|
||||
* executable form, provided that you do at least ONE of the following: *
|
||||
* (1) You are permitted to use the Standard Version and create and use *
|
||||
* Modified Versions for any purpose without restriction, provided that you do *
|
||||
* not Distribute the Modified Version. *
|
||||
* Permissions for Redistribution of the Standard Version *
|
||||
* *
|
||||
* a) distribute a Standard Version of the executables and library files, *
|
||||
* together with instructions (in the manual page or equivalent) on where *
|
||||
* to get the Standard Version. *
|
||||
* (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. *
|
||||
* *
|
||||
* b) accompany the distribution with the machine-readable source of *
|
||||
* the Package with your modifications. *
|
||||
* (3) You may apply any bug fixes, portability changes, and other *
|
||||
* 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 *
|
||||
* *
|
||||
* c) give non-standard executables non-standard names, and clearly *
|
||||
* document the differences in manual pages (or equivalent), together *
|
||||
* with instructions on where to get the Standard Version. *
|
||||
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||
* 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: *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||
* 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 *
|
||||
* *
|
||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
||||
* Package. You may charge any fee you choose for support of this *
|
||||
* Package. You may not charge a fee for this Package itself. However, *
|
||||
* you may distribute this Package in aggregate with other (possibly *
|
||||
* commercial) programs as part of a larger (possibly commercial) software *
|
||||
* distribution provided that you do not advertise this Package as a *
|
||||
* product of your own. You may embed this Package's interpreter within *
|
||||
* 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. *
|
||||
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||
* Source, provided that you include complete instructions on how to get the *
|
||||
* 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. *
|
||||
* *
|
||||
* 6. The scripts and library files supplied as input to or produced as *
|
||||
* output from the programs of this Package do not automatically fall *
|
||||
* under the copyright of this Package, but belong to whoever generated *
|
||||
* them, and may be sold commercially, and may be aggregated with this *
|
||||
* Package. If such scripts or library files are aggregated with this *
|
||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
||||
* 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. *
|
||||
* (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 *
|
||||
* *
|
||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
||||
* languages) supplied by you and linked into this Package in order to *
|
||||
* emulate subroutines and variables of the language defined by this *
|
||||
* Package shall not be considered part of this Package, but are the *
|
||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
||||
* not change the language in any way that would cause it to fail the *
|
||||
* regression tests for the language. *
|
||||
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||
* Version) with other packages and Distribute the resulting aggregation *
|
||||
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||
* Fees are permitted, and licensing fees for other components in the *
|
||||
* aggregation are permitted. The terms of this license apply to the use and *
|
||||
* Distribution of the Standard or Modified Versions as included in the *
|
||||
* aggregation. *
|
||||
* *
|
||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
||||
* permitted provided that the use of this Package is embedded; that is, *
|
||||
* when no overt attempt is made to make this Package's interfaces visible *
|
||||
* to the end user of the commercial distribution. Such use shall not be *
|
||||
* construed as a distribution of this Package. *
|
||||
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||
* works, to embed the Package in a larger work of your own, or to build *
|
||||
* stand-alone binary or bytecode versions of applications that include the *
|
||||
* Package, and Distribute the result without restriction, provided the result *
|
||||
* does not expose a direct interface to the Package. *
|
||||
* Items That are Not Considered Part of a Modified Version *
|
||||
* *
|
||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
||||
* products derived from this software without specific prior written *
|
||||
* permission. *
|
||||
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||
* to be a Modified Version. In addition, such works are not considered parts *
|
||||
* of the Package itself, and are not subject to the terms of this license. *
|
||||
* General Provisions *
|
||||
* *
|
||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||
* Versions is governed by this Artistic License. By using, modifying or *
|
||||
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||
* distribute the Package, if you do not accept this license. *
|
||||
* *
|
||||
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||
* by someone other than you, you are nevertheless required to ensure that your *
|
||||
* Modified Version complies with the requirements of this license. *
|
||||
* *
|
||||
* (12) This license does not grant you the right to use any trademark, service *
|
||||
* mark, tradename, or logo of the Copyright Holder. *
|
||||
* *
|
||||
* (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 *
|
||||
* *
|
||||
|
@ -3,139 +3,182 @@
|
||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||
* 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 *
|
||||
* File: general.h *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
* The "Artistic License" *
|
||||
* Artistic License 2.0 *
|
||||
* *
|
||||
* Preamble *
|
||||
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||
* *
|
||||
* The intent of this document is to state the conditions under which a *
|
||||
* Package may be copied, such that the Copyright Holder maintains some *
|
||||
* semblance of artistic control over the development of the package, *
|
||||
* while giving the users of the package the right to use and distribute *
|
||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
||||
* reasonable modifications. *
|
||||
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||
* document, but changing it is not allowed. *
|
||||
* *
|
||||
* Definitions: *
|
||||
* Preamble *
|
||||
* *
|
||||
* "Package" refers to the collection of files distributed by the *
|
||||
* Copyright Holder, and derivatives of that collection of files *
|
||||
* created through textual modification. *
|
||||
* This license establishes the terms under which a given free software Package *
|
||||
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||
* that the Copyright Holder maintains some artistic control over the *
|
||||
* development of that Package while still keeping the Package available as *
|
||||
* open source and free software. *
|
||||
* *
|
||||
* "Standard Version" refers to such a Package if it has not been *
|
||||
* modified, or has been modified in accordance with the wishes *
|
||||
* of the Copyright Holder as specified below. *
|
||||
* 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 *
|
||||
* *
|
||||
* "Copyright Holder" is whoever is named in the copyright or *
|
||||
* copyrights for the package. *
|
||||
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||
* copyright notice for the entire Package. *
|
||||
* *
|
||||
* "You" is you, if you're thinking about copying or distributing *
|
||||
* this Package. *
|
||||
* "Contributor" means any party that has contributed code or other material to *
|
||||
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||
* *
|
||||
* "Reasonable copying fee" is whatever you can justify on the *
|
||||
* basis of media cost, duplication charges, time of people involved, *
|
||||
* and so on. (You will not be required to justify it to the *
|
||||
* Copyright Holder, but only to the computing community at large *
|
||||
* as a market that must bear the fee.) *
|
||||
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||
* modify the Package. *
|
||||
* *
|
||||
* "Freely Available" means that no fee is charged for the item *
|
||||
* itself, though there may be fees involved in handling the item. *
|
||||
* It also means that recipients of the item may redistribute it *
|
||||
* under the same conditions they received it. *
|
||||
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||
* and derivatives of that collection and/or of those files. A given Package *
|
||||
* may consist of either the Standard Version, or a Modified Version. *
|
||||
* *
|
||||
* 1. You may make and give away verbatim copies of the source form of the *
|
||||
* Standard Version of this Package without restriction, provided that you *
|
||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
||||
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||
* to anyone else, or in the case of a company or organization, to others *
|
||||
* outside of your company or organization. *
|
||||
* *
|
||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
||||
* modified in such a way shall still be considered the Standard Version. *
|
||||
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||
* Package or providing support for this Package to another party. It does not *
|
||||
* mean licensing fees. *
|
||||
* *
|
||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
||||
* that you insert a prominent notice in each changed file stating how and *
|
||||
* when you changed that file, and provided that you do at least ONE of the *
|
||||
* following: *
|
||||
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* a) place your modifications in the Public Domain or otherwise make them *
|
||||
* Freely Available, such as by posting said modifications to Usenet or *
|
||||
* 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. *
|
||||
* "Modified Version" means the Package, if it has been changed, and such *
|
||||
* changes were not explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* b) use the modified Package only within your corporation or organization. *
|
||||
* "Original License" means this Artistic License as Distributed with the *
|
||||
* Standard Version of the Package, in its current version or as it may be *
|
||||
* modified by The Perl Foundation in the future. *
|
||||
* *
|
||||
* c) rename any non-standard executables so the names do not conflict *
|
||||
* with standard executables, which must also be provided, and provide *
|
||||
* a separate manual page for each non-standard executable that clearly *
|
||||
* documents how it differs from the Standard Version. *
|
||||
* "Source" form means the source code, documentation source, and configuration *
|
||||
* files for the Package. *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* "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 *
|
||||
* *
|
||||
* 4. You may distribute the programs of this Package in object code or *
|
||||
* executable form, provided that you do at least ONE of the following: *
|
||||
* (1) You are permitted to use the Standard Version and create and use *
|
||||
* Modified Versions for any purpose without restriction, provided that you do *
|
||||
* not Distribute the Modified Version. *
|
||||
* Permissions for Redistribution of the Standard Version *
|
||||
* *
|
||||
* a) distribute a Standard Version of the executables and library files, *
|
||||
* together with instructions (in the manual page or equivalent) on where *
|
||||
* to get the Standard Version. *
|
||||
* (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. *
|
||||
* *
|
||||
* b) accompany the distribution with the machine-readable source of *
|
||||
* the Package with your modifications. *
|
||||
* (3) You may apply any bug fixes, portability changes, and other *
|
||||
* 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 *
|
||||
* *
|
||||
* c) give non-standard executables non-standard names, and clearly *
|
||||
* document the differences in manual pages (or equivalent), together *
|
||||
* with instructions on where to get the Standard Version. *
|
||||
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||
* 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: *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||
* 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 *
|
||||
* *
|
||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
||||
* Package. You may charge any fee you choose for support of this *
|
||||
* Package. You may not charge a fee for this Package itself. However, *
|
||||
* you may distribute this Package in aggregate with other (possibly *
|
||||
* commercial) programs as part of a larger (possibly commercial) software *
|
||||
* distribution provided that you do not advertise this Package as a *
|
||||
* product of your own. You may embed this Package's interpreter within *
|
||||
* 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. *
|
||||
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||
* Source, provided that you include complete instructions on how to get the *
|
||||
* 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. *
|
||||
* *
|
||||
* 6. The scripts and library files supplied as input to or produced as *
|
||||
* output from the programs of this Package do not automatically fall *
|
||||
* under the copyright of this Package, but belong to whoever generated *
|
||||
* them, and may be sold commercially, and may be aggregated with this *
|
||||
* Package. If such scripts or library files are aggregated with this *
|
||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
||||
* 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. *
|
||||
* (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 *
|
||||
* *
|
||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
||||
* languages) supplied by you and linked into this Package in order to *
|
||||
* emulate subroutines and variables of the language defined by this *
|
||||
* Package shall not be considered part of this Package, but are the *
|
||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
||||
* not change the language in any way that would cause it to fail the *
|
||||
* regression tests for the language. *
|
||||
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||
* Version) with other packages and Distribute the resulting aggregation *
|
||||
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||
* Fees are permitted, and licensing fees for other components in the *
|
||||
* aggregation are permitted. The terms of this license apply to the use and *
|
||||
* Distribution of the Standard or Modified Versions as included in the *
|
||||
* aggregation. *
|
||||
* *
|
||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
||||
* permitted provided that the use of this Package is embedded; that is, *
|
||||
* when no overt attempt is made to make this Package's interfaces visible *
|
||||
* to the end user of the commercial distribution. Such use shall not be *
|
||||
* construed as a distribution of this Package. *
|
||||
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||
* works, to embed the Package in a larger work of your own, or to build *
|
||||
* stand-alone binary or bytecode versions of applications that include the *
|
||||
* Package, and Distribute the result without restriction, provided the result *
|
||||
* does not expose a direct interface to the Package. *
|
||||
* Items That are Not Considered Part of a Modified Version *
|
||||
* *
|
||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
||||
* products derived from this software without specific prior written *
|
||||
* permission. *
|
||||
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||
* to be a Modified Version. In addition, such works are not considered parts *
|
||||
* of the Package itself, and are not subject to the terms of this license. *
|
||||
* General Provisions *
|
||||
* *
|
||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||
* Versions is governed by this Artistic License. By using, modifying or *
|
||||
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||
* distribute the Package, if you do not accept this license. *
|
||||
* *
|
||||
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||
* by someone other than you, you are nevertheless required to ensure that your *
|
||||
* Modified Version complies with the requirements of this license. *
|
||||
* *
|
||||
* (12) This license does not grant you the right to use any trademark, service *
|
||||
* mark, tradename, or logo of the Copyright Holder. *
|
||||
* *
|
||||
* (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 *
|
||||
* *
|
||||
|
@ -3,139 +3,182 @@
|
||||
* SimpleCUDD library (www.cs.kuleuven.be/~theo/tools/simplecudd.html) *
|
||||
* 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 *
|
||||
* File: simplecudd.c *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
* The "Artistic License" *
|
||||
* Artistic License 2.0 *
|
||||
* *
|
||||
* Preamble *
|
||||
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||
* *
|
||||
* The intent of this document is to state the conditions under which a *
|
||||
* Package may be copied, such that the Copyright Holder maintains some *
|
||||
* semblance of artistic control over the development of the package, *
|
||||
* while giving the users of the package the right to use and distribute *
|
||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
||||
* reasonable modifications. *
|
||||
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||
* document, but changing it is not allowed. *
|
||||
* *
|
||||
* Definitions: *
|
||||
* Preamble *
|
||||
* *
|
||||
* "Package" refers to the collection of files distributed by the *
|
||||
* Copyright Holder, and derivatives of that collection of files *
|
||||
* created through textual modification. *
|
||||
* This license establishes the terms under which a given free software Package *
|
||||
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||
* that the Copyright Holder maintains some artistic control over the *
|
||||
* development of that Package while still keeping the Package available as *
|
||||
* open source and free software. *
|
||||
* *
|
||||
* "Standard Version" refers to such a Package if it has not been *
|
||||
* modified, or has been modified in accordance with the wishes *
|
||||
* of the Copyright Holder as specified below. *
|
||||
* 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 *
|
||||
* *
|
||||
* "Copyright Holder" is whoever is named in the copyright or *
|
||||
* copyrights for the package. *
|
||||
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||
* copyright notice for the entire Package. *
|
||||
* *
|
||||
* "You" is you, if you're thinking about copying or distributing *
|
||||
* this Package. *
|
||||
* "Contributor" means any party that has contributed code or other material to *
|
||||
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||
* *
|
||||
* "Reasonable copying fee" is whatever you can justify on the *
|
||||
* basis of media cost, duplication charges, time of people involved, *
|
||||
* and so on. (You will not be required to justify it to the *
|
||||
* Copyright Holder, but only to the computing community at large *
|
||||
* as a market that must bear the fee.) *
|
||||
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||
* modify the Package. *
|
||||
* *
|
||||
* "Freely Available" means that no fee is charged for the item *
|
||||
* itself, though there may be fees involved in handling the item. *
|
||||
* It also means that recipients of the item may redistribute it *
|
||||
* under the same conditions they received it. *
|
||||
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||
* and derivatives of that collection and/or of those files. A given Package *
|
||||
* may consist of either the Standard Version, or a Modified Version. *
|
||||
* *
|
||||
* 1. You may make and give away verbatim copies of the source form of the *
|
||||
* Standard Version of this Package without restriction, provided that you *
|
||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
||||
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||
* to anyone else, or in the case of a company or organization, to others *
|
||||
* outside of your company or organization. *
|
||||
* *
|
||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
||||
* modified in such a way shall still be considered the Standard Version. *
|
||||
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||
* Package or providing support for this Package to another party. It does not *
|
||||
* mean licensing fees. *
|
||||
* *
|
||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
||||
* that you insert a prominent notice in each changed file stating how and *
|
||||
* when you changed that file, and provided that you do at least ONE of the *
|
||||
* following: *
|
||||
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* a) place your modifications in the Public Domain or otherwise make them *
|
||||
* Freely Available, such as by posting said modifications to Usenet or *
|
||||
* 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. *
|
||||
* "Modified Version" means the Package, if it has been changed, and such *
|
||||
* changes were not explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* b) use the modified Package only within your corporation or organization. *
|
||||
* "Original License" means this Artistic License as Distributed with the *
|
||||
* Standard Version of the Package, in its current version or as it may be *
|
||||
* modified by The Perl Foundation in the future. *
|
||||
* *
|
||||
* c) rename any non-standard executables so the names do not conflict *
|
||||
* with standard executables, which must also be provided, and provide *
|
||||
* a separate manual page for each non-standard executable that clearly *
|
||||
* documents how it differs from the Standard Version. *
|
||||
* "Source" form means the source code, documentation source, and configuration *
|
||||
* files for the Package. *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* "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 *
|
||||
* *
|
||||
* 4. You may distribute the programs of this Package in object code or *
|
||||
* executable form, provided that you do at least ONE of the following: *
|
||||
* (1) You are permitted to use the Standard Version and create and use *
|
||||
* Modified Versions for any purpose without restriction, provided that you do *
|
||||
* not Distribute the Modified Version. *
|
||||
* Permissions for Redistribution of the Standard Version *
|
||||
* *
|
||||
* a) distribute a Standard Version of the executables and library files, *
|
||||
* together with instructions (in the manual page or equivalent) on where *
|
||||
* to get the Standard Version. *
|
||||
* (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. *
|
||||
* *
|
||||
* b) accompany the distribution with the machine-readable source of *
|
||||
* the Package with your modifications. *
|
||||
* (3) You may apply any bug fixes, portability changes, and other *
|
||||
* 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 *
|
||||
* *
|
||||
* c) give non-standard executables non-standard names, and clearly *
|
||||
* document the differences in manual pages (or equivalent), together *
|
||||
* with instructions on where to get the Standard Version. *
|
||||
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||
* 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: *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||
* 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 *
|
||||
* *
|
||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
||||
* Package. You may charge any fee you choose for support of this *
|
||||
* Package. You may not charge a fee for this Package itself. However, *
|
||||
* you may distribute this Package in aggregate with other (possibly *
|
||||
* commercial) programs as part of a larger (possibly commercial) software *
|
||||
* distribution provided that you do not advertise this Package as a *
|
||||
* product of your own. You may embed this Package's interpreter within *
|
||||
* 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. *
|
||||
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||
* Source, provided that you include complete instructions on how to get the *
|
||||
* 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. *
|
||||
* *
|
||||
* 6. The scripts and library files supplied as input to or produced as *
|
||||
* output from the programs of this Package do not automatically fall *
|
||||
* under the copyright of this Package, but belong to whoever generated *
|
||||
* them, and may be sold commercially, and may be aggregated with this *
|
||||
* Package. If such scripts or library files are aggregated with this *
|
||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
||||
* 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. *
|
||||
* (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 *
|
||||
* *
|
||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
||||
* languages) supplied by you and linked into this Package in order to *
|
||||
* emulate subroutines and variables of the language defined by this *
|
||||
* Package shall not be considered part of this Package, but are the *
|
||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
||||
* not change the language in any way that would cause it to fail the *
|
||||
* regression tests for the language. *
|
||||
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||
* Version) with other packages and Distribute the resulting aggregation *
|
||||
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||
* Fees are permitted, and licensing fees for other components in the *
|
||||
* aggregation are permitted. The terms of this license apply to the use and *
|
||||
* Distribution of the Standard or Modified Versions as included in the *
|
||||
* aggregation. *
|
||||
* *
|
||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
||||
* permitted provided that the use of this Package is embedded; that is, *
|
||||
* when no overt attempt is made to make this Package's interfaces visible *
|
||||
* to the end user of the commercial distribution. Such use shall not be *
|
||||
* construed as a distribution of this Package. *
|
||||
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||
* works, to embed the Package in a larger work of your own, or to build *
|
||||
* stand-alone binary or bytecode versions of applications that include the *
|
||||
* Package, and Distribute the result without restriction, provided the result *
|
||||
* does not expose a direct interface to the Package. *
|
||||
* Items That are Not Considered Part of a Modified Version *
|
||||
* *
|
||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
||||
* products derived from this software without specific prior written *
|
||||
* permission. *
|
||||
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||
* to be a Modified Version. In addition, such works are not considered parts *
|
||||
* of the Package itself, and are not subject to the terms of this license. *
|
||||
* General Provisions *
|
||||
* *
|
||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||
* Versions is governed by this Artistic License. By using, modifying or *
|
||||
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||
* distribute the Package, if you do not accept this license. *
|
||||
* *
|
||||
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||
* by someone other than you, you are nevertheless required to ensure that your *
|
||||
* Modified Version complies with the requirements of this license. *
|
||||
* *
|
||||
* (12) This license does not grant you the right to use any trademark, service *
|
||||
* mark, tradename, or logo of the Copyright Holder. *
|
||||
* *
|
||||
* (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 *
|
||||
* *
|
||||
@ -1088,7 +1131,7 @@ DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int max
|
||||
}
|
||||
endAt = clock();
|
||||
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 (bdd == NULL) {
|
||||
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);
|
||||
endAt = clock();
|
||||
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 (bdd == NULL) {
|
||||
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();
|
||||
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 (bdd == NULL) {
|
||||
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);
|
||||
endAt = clock();
|
||||
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 (bdd == NULL) {
|
||||
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 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 *
|
||||
* File: simplecudd.h *
|
||||
* *
|
||||
********************************************************************************
|
||||
* *
|
||||
* The "Artistic License" *
|
||||
* Artistic License 2.0 *
|
||||
* *
|
||||
* Preamble *
|
||||
* Copyright (c) 2000-2006, The Perl Foundation. *
|
||||
* *
|
||||
* The intent of this document is to state the conditions under which a *
|
||||
* Package may be copied, such that the Copyright Holder maintains some *
|
||||
* semblance of artistic control over the development of the package, *
|
||||
* while giving the users of the package the right to use and distribute *
|
||||
* the Package in a more-or-less customary fashion, plus the right to make *
|
||||
* reasonable modifications. *
|
||||
* Everyone is permitted to copy and distribute verbatim copies of this license *
|
||||
* document, but changing it is not allowed. *
|
||||
* *
|
||||
* Definitions: *
|
||||
* Preamble *
|
||||
* *
|
||||
* "Package" refers to the collection of files distributed by the *
|
||||
* Copyright Holder, and derivatives of that collection of files *
|
||||
* created through textual modification. *
|
||||
* This license establishes the terms under which a given free software Package *
|
||||
* may be copied, modified, distributed, and/or redistributed. The intent is *
|
||||
* that the Copyright Holder maintains some artistic control over the *
|
||||
* development of that Package while still keeping the Package available as *
|
||||
* open source and free software. *
|
||||
* *
|
||||
* "Standard Version" refers to such a Package if it has not been *
|
||||
* modified, or has been modified in accordance with the wishes *
|
||||
* of the Copyright Holder as specified below. *
|
||||
* 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 *
|
||||
* *
|
||||
* "Copyright Holder" is whoever is named in the copyright or *
|
||||
* copyrights for the package. *
|
||||
* "Copyright Holder" means the individual(s) or organization(s) named in the *
|
||||
* copyright notice for the entire Package. *
|
||||
* *
|
||||
* "You" is you, if you're thinking about copying or distributing *
|
||||
* this Package. *
|
||||
* "Contributor" means any party that has contributed code or other material to *
|
||||
* the Package, in accordance with the Copyright Holder's procedures. *
|
||||
* *
|
||||
* "Reasonable copying fee" is whatever you can justify on the *
|
||||
* basis of media cost, duplication charges, time of people involved, *
|
||||
* and so on. (You will not be required to justify it to the *
|
||||
* Copyright Holder, but only to the computing community at large *
|
||||
* as a market that must bear the fee.) *
|
||||
* "You" and "your" means any person who would like to copy, distribute, or *
|
||||
* modify the Package. *
|
||||
* *
|
||||
* "Freely Available" means that no fee is charged for the item *
|
||||
* itself, though there may be fees involved in handling the item. *
|
||||
* It also means that recipients of the item may redistribute it *
|
||||
* under the same conditions they received it. *
|
||||
* "Package" means the collection of files distributed by the Copyright Holder, *
|
||||
* and derivatives of that collection and/or of those files. A given Package *
|
||||
* may consist of either the Standard Version, or a Modified Version. *
|
||||
* *
|
||||
* 1. You may make and give away verbatim copies of the source form of the *
|
||||
* Standard Version of this Package without restriction, provided that you *
|
||||
* duplicate all of the original copyright notices and associated disclaimers. *
|
||||
* "Distribute" means providing a copy of the Package or making it accessible *
|
||||
* to anyone else, or in the case of a company or organization, to others *
|
||||
* outside of your company or organization. *
|
||||
* *
|
||||
* 2. You may apply bug fixes, portability fixes and other modifications *
|
||||
* derived from the Public Domain or from the Copyright Holder. A Package *
|
||||
* modified in such a way shall still be considered the Standard Version. *
|
||||
* "Distributor Fee" means any fee that you charge for Distributing this *
|
||||
* Package or providing support for this Package to another party. It does not *
|
||||
* mean licensing fees. *
|
||||
* *
|
||||
* 3. You may otherwise modify your copy of this Package in any way, provided *
|
||||
* that you insert a prominent notice in each changed file stating how and *
|
||||
* when you changed that file, and provided that you do at least ONE of the *
|
||||
* following: *
|
||||
* "Standard Version" refers to the Package if it has not been modified, or has *
|
||||
* been modified only in ways explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* a) place your modifications in the Public Domain or otherwise make them *
|
||||
* Freely Available, such as by posting said modifications to Usenet or *
|
||||
* 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. *
|
||||
* "Modified Version" means the Package, if it has been changed, and such *
|
||||
* changes were not explicitly requested by the Copyright Holder. *
|
||||
* *
|
||||
* b) use the modified Package only within your corporation or organization. *
|
||||
* "Original License" means this Artistic License as Distributed with the *
|
||||
* Standard Version of the Package, in its current version or as it may be *
|
||||
* modified by The Perl Foundation in the future. *
|
||||
* *
|
||||
* c) rename any non-standard executables so the names do not conflict *
|
||||
* with standard executables, which must also be provided, and provide *
|
||||
* a separate manual page for each non-standard executable that clearly *
|
||||
* documents how it differs from the Standard Version. *
|
||||
* "Source" form means the source code, documentation source, and configuration *
|
||||
* files for the Package. *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* "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 *
|
||||
* *
|
||||
* 4. You may distribute the programs of this Package in object code or *
|
||||
* executable form, provided that you do at least ONE of the following: *
|
||||
* (1) You are permitted to use the Standard Version and create and use *
|
||||
* Modified Versions for any purpose without restriction, provided that you do *
|
||||
* not Distribute the Modified Version. *
|
||||
* Permissions for Redistribution of the Standard Version *
|
||||
* *
|
||||
* a) distribute a Standard Version of the executables and library files, *
|
||||
* together with instructions (in the manual page or equivalent) on where *
|
||||
* to get the Standard Version. *
|
||||
* (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. *
|
||||
* *
|
||||
* b) accompany the distribution with the machine-readable source of *
|
||||
* the Package with your modifications. *
|
||||
* (3) You may apply any bug fixes, portability changes, and other *
|
||||
* 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 *
|
||||
* *
|
||||
* c) give non-standard executables non-standard names, and clearly *
|
||||
* document the differences in manual pages (or equivalent), together *
|
||||
* with instructions on where to get the Standard Version. *
|
||||
* (4) You may Distribute your Modified Version as Source (either gratis or for *
|
||||
* a Distributor Fee, and with or without a Compiled form of the Modified *
|
||||
* 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: *
|
||||
* *
|
||||
* d) make other distribution arrangements with the Copyright Holder. *
|
||||
* (a) make the Modified Version available to the Copyright Holder of the *
|
||||
* 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 *
|
||||
* *
|
||||
* 5. You may charge a reasonable copying fee for any distribution of this *
|
||||
* Package. You may charge any fee you choose for support of this *
|
||||
* Package. You may not charge a fee for this Package itself. However, *
|
||||
* you may distribute this Package in aggregate with other (possibly *
|
||||
* commercial) programs as part of a larger (possibly commercial) software *
|
||||
* distribution provided that you do not advertise this Package as a *
|
||||
* product of your own. You may embed this Package's interpreter within *
|
||||
* 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. *
|
||||
* (5) You may Distribute Compiled forms of the Standard Version without the *
|
||||
* Source, provided that you include complete instructions on how to get the *
|
||||
* 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. *
|
||||
* *
|
||||
* 6. The scripts and library files supplied as input to or produced as *
|
||||
* output from the programs of this Package do not automatically fall *
|
||||
* under the copyright of this Package, but belong to whoever generated *
|
||||
* them, and may be sold commercially, and may be aggregated with this *
|
||||
* Package. If such scripts or library files are aggregated with this *
|
||||
* Package via the so-called "undump" or "unexec" methods of producing a *
|
||||
* 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. *
|
||||
* (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 *
|
||||
* *
|
||||
* 7. C subroutines (or comparably compiled subroutines in other *
|
||||
* languages) supplied by you and linked into this Package in order to *
|
||||
* emulate subroutines and variables of the language defined by this *
|
||||
* Package shall not be considered part of this Package, but are the *
|
||||
* equivalent of input as in Paragraph 6, provided these subroutines do *
|
||||
* not change the language in any way that would cause it to fail the *
|
||||
* regression tests for the language. *
|
||||
* (7) You may aggregate the Package (either the Standard Version or Modified *
|
||||
* Version) with other packages and Distribute the resulting aggregation *
|
||||
* provided that you do not charge a licensing fee for the Package. Distributor *
|
||||
* Fees are permitted, and licensing fees for other components in the *
|
||||
* aggregation are permitted. The terms of this license apply to the use and *
|
||||
* Distribution of the Standard or Modified Versions as included in the *
|
||||
* aggregation. *
|
||||
* *
|
||||
* 8. Aggregation of this Package with a commercial distribution is always *
|
||||
* permitted provided that the use of this Package is embedded; that is, *
|
||||
* when no overt attempt is made to make this Package's interfaces visible *
|
||||
* to the end user of the commercial distribution. Such use shall not be *
|
||||
* construed as a distribution of this Package. *
|
||||
* (8) You are permitted to link Modified and Standard Versions with other *
|
||||
* works, to embed the Package in a larger work of your own, or to build *
|
||||
* stand-alone binary or bytecode versions of applications that include the *
|
||||
* Package, and Distribute the result without restriction, provided the result *
|
||||
* does not expose a direct interface to the Package. *
|
||||
* Items That are Not Considered Part of a Modified Version *
|
||||
* *
|
||||
* 9. The name of the Copyright Holder may not be used to endorse or promote *
|
||||
* products derived from this software without specific prior written *
|
||||
* permission. *
|
||||
* (9) Works (including, but not limited to, modules and scripts) that merely *
|
||||
* extend or make use of the Package, do not, by themselves, cause the Package *
|
||||
* to be a Modified Version. In addition, such works are not considered parts *
|
||||
* of the Package itself, and are not subject to the terms of this license. *
|
||||
* General Provisions *
|
||||
* *
|
||||
* 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR *
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED *
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* (10) Any use, modification, and distribution of the Standard or Modified *
|
||||
* Versions is governed by this Artistic License. By using, modifying or *
|
||||
* distributing the Package, you accept this license. Do not use, modify, or *
|
||||
* distribute the Package, if you do not accept this license. *
|
||||
* *
|
||||
* (11) If your Modified Version has been derived from a Modified Version made *
|
||||
* by someone other than you, you are nevertheless required to ensure that your *
|
||||
* Modified Version complies with the requirements of this license. *
|
||||
* *
|
||||
* (12) This license does not grant you the right to use any trademark, service *
|
||||
* mark, tradename, or logo of the Copyright Holder. *
|
||||
* *
|
||||
* (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 *
|
||||
* *
|
||||
|
Reference in New Issue
Block a user