Hi,
Sorry to bother you folks, but I'm building ciao-1.8p2 on a solaris/sparc
5.7 platform with gcc 2.95.3, and there is a surprising error. The make
fails because of the following error:
gcc wam.o format.o inout.o misc.o startgoal.o ciao.o nondet.o objareas.o
streams.o timing.o wambuiltin.o wamfunction.o unix_utils.o attr.o
dynlink.o tasks.o locks.o prolog_tasks.o own_malloc_linear.o alloc.o
heapgc.o indexing.o initial.o registers.o stacks.o support.o
term_support.o wamsupport.o qread.o qget.o builtin.o interrupt.o gauge.o
bignum.o profile.o ciao_prolog.o start.o version.o sockets_c.o random.o
main.o -ldl -lm -lnsl -lpthread -lrt -lsocket -o ciaoengine
Undefined first referenced
symbol in file
setenv unix_utils.o
ld: fatal: Symbol referencing errors. No output written to ciaoengine
which is definately because unix_utils.c is using setenv() -- and that's
not present in solaris C libraries (at least through solaris 8, I haven't
checked solaris 9). It's not present in a lot of C libraries, so I'm very
surprised that it's used when it is detecting a "SolarisSparc" system --
which it does, btw, for example:
if test ! -d /usr/local/src/ciao-1.8p2/bin/SolarisSparc ; then \
mkdir /usr/local/src/ciao-1.8p2/bin/SolarisSparc ; chmod 775
/usr/local/src/ciao-1.8p2/bin/SolarisSparc ; fi
make[2]: Leaving directory `/usr/local/src/ciao-1.8p2'
cd /usr/local/src/ciao-1.8p2/bin/SolarisSparc &&
\
ln -s ../../engine/*.[ch] . && \
ln -s ../../engine/Makefile . && \
rm -f configure.h
make createincludedir
is right in the beginning of the output of make.
So, any ideas? All I did was edit SETTINGS and run make. The system is
fairly gnu-ified, and it is used for compiling a diverse assortment of
things, so most tools are there and/or fairly up-to-date (gcc2.95.3 versus
newer gcc3+ is a topic for another day).
If there's some patch I need, or something I need to edit, please let me
know! I don't want to mess around any more, because it's such an obvious
bug that I have to believe it's something stupid on my end...
Thanks,
-V Hoffman
Vasilios Hoffman
Junior Unix Administrator
Wesleyan University
voice (860) 685-3142
fax (860) 685-2401
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Thanks to Paco Bueno's changes to mycin_tr.pl, I can now use the example
horse_riding.
As explained by Paco, mycin is a package. At compile-time it rewrites
its clauses into a different form.
This provokes the question:
Is is possible to prompt for some of the properties (like sunny(yes)
cf 0.6)
and then submit them from the top level to mycin.
I am trying to build a small expert system (for claims processing). So
I want
to use something like the Solve program in Art of Prolog (p 312) to
get
the answers to a series of questions - assert a set of statements of
the
form: property(x) cf CF, then query: ?- file:mycin(payout(x),CF).
Can this be done simply and directly?
Or will I have to write code to
1. Prompt for the answers (where necessary)
2. Build a file (like horse_riding.pl) and compile it.
3. use_module the new file.
4. delete the file.
John O'Gorman
Francisco Bueno Carrillo wrote:
>
> The mycin library is a package (also assertions). The use of packages
> can be declared in three ways:
>
> :- use_package(mycin).
> :- module(MyModule,[...],[mycin]).
> :- mycin(MyModule).
>
> As mentioned, :- mycin(MyModule). is just a way of declaring the use
> of the mycin package within a file. It is not a call to a
> predicate. So, in fact, there is no much use in calling it from the
> top level.
>
> Paco Bueno
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Paco
Thanks. 1 step forward - but still no go!
when I try the sequence (in ...mycin/examples):
ciao
?-use_module(horse_riding).
yes
?-horse_riding(mycin(winner(C),P).
{ERROR: horse_riding:weather/1 - undefined predicate}
The above line is repeated 9 times.
Similarly if I try:
?-use_module(age).
I get a message
{compiling /opt/ciao/...../examples/age.pl
WARNING: (lns 11-12_ Predicate age/2 undefined in source
--- above line 4 times ----
}
When I try:
?-use_module(library(mycin)).
{Reading /usr/lib/.....mycin/mycin.itf
ERROR: Source used as module without module declaration
}
Should I do some sort of recompile? (perhaps rm the .po .itf files,
and run make from high up in the tree).
The documentation comments in file mycin_doc.pl says to use as first
statememt in a file:
:-mycin(MyDatabaseName).
Is this right?
If is the first statement (without a use_module(library(mycin))) or
use_module(library(assertion)), then how can the :-mycin statement
work?
If running at the top level, do you call the :-mycin(X) as a predicate?
?-mycin(C).
Also what does the mycin directive do? Is it meant to called with an
atom
:-mycin(john).
or a var
:-mycin(John).
???
John O'Gorman
Francisco Bueno Carrillo wrote:
>
> John,
>
> Here is the promised update. You have to replace the file
> contrib/mycin/mycin_tr.pl in your Ciao distribution by the following
> code.
>
> Best,
>
> Paco Bueno
>
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hi everyone.
I am brand new to ciao.
I am trying to get started with a MYCIN style
program. The horse_riding example in
contrib/mycin/examples looks good. But I
get errors relating to modules, exports, etc.
I programmed in prolog years ago, but I am
unfamiliar with the ciao module and compilation
processes.
Would some kind soul please give me the minimum
needed to call horse_riding:winner(X,P)
from
a. ciao shell
b. compiling with ciaoc
Also, I am puzzled that horse_riding seems to be
defined as winner/1 bvt the author suggests calling
it as winner/2. Is this an error or is the Certainty
Factor variabel an implicit 2nd arg?
John O'Gorman
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Vasilios Hoffman <vhoffman01(a)wesleyan.edu> wrote:
that building ciao-1.8p2 on SPARC Solaris 5.7 ran into a problem with setenv().
Is setenv() a Linuxism? There is certainly no such function in Solaris
or OSF/1, although they do have a putenv("VAR=VALUE") function.
I note that there are warnings in the documentation against using
putenv() in multithreaded code, for the obvious reasons, and that
the OSF/1 manual page is flat-out WRONG in what it says putenv() does.
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------