fixed typo in configure.in
cleaned up code in lpad.pl git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2043 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
0ba4dd8efd
commit
b8f97132d2
@ -946,8 +946,8 @@ if test ! "$yap_cv_cplint" = "no"
|
|||||||
GFLAGS=`glib-config --cflags glib`
|
GFLAGS=`glib-config --cflags glib`
|
||||||
CPLINT_LIBS=${CPLINT_LIBS}$GLIBS
|
CPLINT_LIBS=${CPLINT_LIBS}$GLIBS
|
||||||
CPLINT_CFLAGS=" $GFLAGS "
|
CPLINT_CFLAGS=" $GFLAGS "
|
||||||
CPLINT_LDFLAGS=" `echo $GLIBS | awk '{print $1}'` -L/usrl/local/lib/"
|
CPLINT_LDFLAGS=" `echo $GLIBS | awk '{print $1}'` -L/usr/local/lib/"
|
||||||
LDFLAGS=${LDFLAGS}" `echo $GLIBS | awk '{print $1}'` -L/usrl/local/lib/"
|
LDFLAGS=${LDFLAGS}" `echo $GLIBS | awk '{print $1}'` -L/usr/local/lib/"
|
||||||
if test ! "$yap_cv_cplint" = "yes"
|
if test ! "$yap_cv_cplint" = "yes"
|
||||||
then
|
then
|
||||||
LDFLAGS+=" -L${yap_cv_cplint}/lib"
|
LDFLAGS+=" -L${yap_cv_cplint}/lib"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
This directory contains the code of the LPAD anc CP-logic interpreter cplint
|
This directory contains the code of the LPAD anc CP-logic interpreter cplint
|
||||||
|
|
||||||
COMPILATION:
|
COMPILATION:
|
||||||
This package requires GLU (a subpackage of VIS) and GLIB.
|
This package requires GLU (a subpackage of VIS) and GLIB version 1.2.
|
||||||
You can download GLU from http://vlsi.colorado.edu/~vis/getting_VIS_2.1.html
|
You can download GLU from http://vlsi.colorado.edu/~vis/getting_VIS_2.1.html
|
||||||
You can download GLIB from http://www.gtk.org/. This is a standard Linux package
|
You can download GLIB from http://www.gtk.org/. This is a standard Linux package
|
||||||
so it is easy to install using the package management software of your Linux
|
so it is easy to install using the package management software of your Linux
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
:-use_module(library(ugraphs)).
|
:-use_module(library(ugraphs)).
|
||||||
:-use_module(library(lists)).
|
:-use_module(library(lists)).
|
||||||
:- use_module(library(charsio)).
|
:- use_module(library(charsio)).
|
||||||
%:-load_foreign_files(['cplint'],[],init_my_predicates).
|
|
||||||
|
|
||||||
|
|
||||||
:- op(1200,xfx,<--).
|
:- op(1200,xfx,<--).
|
||||||
@ -127,9 +126,9 @@ solve(Goal,Prob):-
|
|||||||
var2numbers(Var,0,NewVar),
|
var2numbers(Var,0,NewVar),
|
||||||
(setting(save_dot,true)->
|
(setting(save_dot,true)->
|
||||||
format("Variables: ~p~n",[Var]),
|
format("Variables: ~p~n",[Var]),
|
||||||
compute_prob1(NewVar,Formula,_Prob,1)
|
compute_prob(NewVar,Formula,_Prob,1)
|
||||||
;
|
;
|
||||||
compute_prob1(NewVar,Formula,Prob,0)
|
compute_prob(NewVar,Formula,Prob,0)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
format("It requires the choice of a head atom from a non ground head~n~p~n",[L]),
|
format("It requires the choice of a head atom from a non ground head~n~p~n",[L]),
|
||||||
@ -140,7 +139,7 @@ solve(Goal,Prob):-
|
|||||||
Prob=0
|
Prob=0
|
||||||
).
|
).
|
||||||
|
|
||||||
compute_prob1(Var,For,Prob,_):-
|
compute_prob(Var,For,Prob,_):-
|
||||||
compute_prob_term(Var,For,0,Prob).
|
compute_prob_term(Var,For,0,Prob).
|
||||||
|
|
||||||
compute_prob_term(_Var,[],Prob,Prob).
|
compute_prob_term(_Var,[],Prob,Prob).
|
||||||
@ -168,7 +167,7 @@ solve_cond(Goal,Evidence,Prob):-
|
|||||||
rem_dup_lists(LDupE,[],LE),
|
rem_dup_lists(LDupE,[],LE),
|
||||||
build_formula(LE,FormulaE,[],VarE),
|
build_formula(LE,FormulaE,[],VarE),
|
||||||
var2numbers(VarE,0,NewVarE),
|
var2numbers(VarE,0,NewVarE),
|
||||||
compute_prob1(NewVarE,FormulaE,ProbE,0),
|
compute_prob(NewVarE,FormulaE,ProbE,0),
|
||||||
solve_cond_goals(Goal,LE,ProbGE),
|
solve_cond_goals(Goal,LE,ProbGE),
|
||||||
Prob is ProbGE/ProbE
|
Prob is ProbGE/ProbE
|
||||||
;
|
;
|
||||||
@ -197,9 +196,9 @@ find_deriv_GE(LD,GoalsList,Deriv):-
|
|||||||
call_compute_prob(NewVarGE,FormulaGE,ProbGE):-
|
call_compute_prob(NewVarGE,FormulaGE,ProbGE):-
|
||||||
(setting(save_dot,true)->
|
(setting(save_dot,true)->
|
||||||
format("Variables: ~p~n",[NewVarGE]),
|
format("Variables: ~p~n",[NewVarGE]),
|
||||||
compute_prob1(NewVarGE,FormulaGE,ProbGE,1)
|
compute_prob(NewVarGE,FormulaGE,ProbGE,1)
|
||||||
;
|
;
|
||||||
compute_prob1(NewVarGE,FormulaGE,ProbGE,0)
|
compute_prob(NewVarGE,FormulaGE,ProbGE,0)
|
||||||
).
|
).
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user