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/
-----------------------------------------------------------------------------
Hello !
Probably that's a newbie question, but I'm really lost.
I want to declare an operator (like :-op(500,xfx,-:-).) in a module in a way
that I could use it from the application that uses this module.
--
Bartek Wilczynski
==============================================================================
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/
-----------------------------------------------------------------------------
Hello,
I have a very simple question. I'm trying to download the content of a
web page using the pillow library with ECLIPSE Prolog.
The web page exists for sure, as I can access it via any browser,
including lynx. I can even download it using "lynx --source"
However, when I fetch it with fetch_url/3 I get a "Not found" reply!
[eclipse3]:url_info('http://www.espectador.com/dolina/principal.htm',UI), fetch_url(UI,[],R), member(status(X,C,RC),R), string_list(L,RC).
UI = http('www.espectador.com', 80, [47, 100, 111, 108, 105, 110, 97,
47, 112, 114, 105, 110, 99, 105, 112, 97, 108, 46, ...])
X = request_error
C = 404
R = [status(request_error, 404, [78, 111, 116, 32, 70, 111, 117, 110,
100]), message_date(date('Thursday', 1, 'August', 2002, '01:04:06')),
http_server([65, 112, 97, 99, 104, 101, 47, 49, 46, 51, 46, 50, 50, 32,
40, ...]), connection([99, 108, 111, 115, 101]), content_type(text,
html, [charset = 'iso-8859-1']), content([60, 33, 68, 79, 67, 84, 89,
80, 69, 32, 72, 84, ...])]
RC = [78, 111, 116, 32, 70, 111, 117, 110, 100]
L = `Not Found`
As you can see it returns with error 404, not found. The web page, you
can check, does exist: http://www.espectador.com/dolina/principal.htm
Notice it's not a problem of redirection, as the answer is an error.
I have had similar problems with ECLIPSE's http_client library so I
guess there is some relation with this problem. So far, this was the
only web page I had problem, but I really want to know if fetch_url/3
should work with ANY possible web page a browser can read (modulo
automatic redirection of course)
does anyone has a clue on this problem?
Thanks a lot!
Sebastian
==============================================================================
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/
-----------------------------------------------------------------------------
I just got ciao yesterday, and for my first program in it I wrote a
little hello-server (accept connections, greet them, close them.)
Part of the hello-server is an announce-connection/1 that takes the
Socket stream and writes something like
"Recieved a connection from 1.0.1.0:12345"
... which is a little difficult to write in Ciao, because it doesn't
have any kind of getsockname. Servers in ciao have no way to know
who they're getting connections from!
I'd suggest
ip_socket_name/3 (+Socket, -Host, -Port)
(actually I'd suggest 'ip-socket-name', but the above is more
consistent.)
where Host is an atom such as as '1.0.1.0' and Port is an atom
such as 12345. The "ip-" in "ip-socket-name" is there because
the hostname/port part of a socket address structure is defined
at the IP level ("tcp-" would be inappropriate, since UDP sockets
have the same address structure).
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
==============================================================================
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/
-----------------------------------------------------------------------------
------- Start of forwarded message -------
X-Coding-System: nil
Return-Path: <plamen(a)stamov.ch>
Date: Sat, 27 Jul 2002 00:10:17 +0200
From: Plamen Stamov <plamen(a)stamov.ch>
Subject: Re: Can't download CIAO and PILLOW
To: ciao-bug(a)clip.dia.fi.upm.es
MIME-version: 1.0
X-Accept-Language: en-us
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4)
Gecko/20011128 Netscape6/6.2.1
X-Virus-Scanned: by AMaViS perl-11
References: <3D413475.60705(a)stamov.ch>
<15681.26793.689773.650410(a)salmon.ls.fi.upm.es>
Hello,
thank you for the quick answer - the problem was really on my side - my
firewall blocks some cookies etc. So, please excuse me for the disturbing.
With best regards
Plamen Stamov
Manuel Carro wrote:
>Plamen Stamov writes:
>
>>>I wanted to download a copy of the CIAO and PILLOW systems, but when I
>>>click on any of the files, I receive a web page with the folllowing
>>>content :described below.
>>>
>>>Can you help me further? I need the latest CIAO distribution for Windows
>>>and the PILLOW distributions for CIAO and XSB.
>>>
>
> Hi. I've just made a test dowloading it, and it is working fine.
>Maybe it was a transient problem? Please tell us if you are still
>experiencing problems, and, if so, which page you are trying to
>access.
>
>
> MCL
>
>__________________________________________________________________
>Anything is possible if you don't know what you are talking about.
>
------- End of forwarded message -------
--
-----------------------------------------------------------------------------
herme(a)fi.upm.es | Manuel Hermenegildo
+34-91-336-7435 (Work) | Facultad de Informatica, UPM
+34-91-352-4819 or 336-7412 (FAX) | Universidad Politecnica de Madrid
http://www.clip.dia.fi.upm.es/~herme | 28660-Boadilla del Monte, MADRID SPAIN
-----------------------------------------------------------------------------
==============================================================================
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/
-----------------------------------------------------------------------------
I have updated the Debian packages located at:
http://people.debian.org/~bfulgham/ciao to the new 1.8p2 release.
Enjoy!
-Brent
==============================================================================
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,
I'm very new in prolog, but this language give me a good feeling
I'm interesting to use the tcltk interface
So I have read and run the queens.pl example in tcltk/examples
I want a few explanations : why begin the file with a :-module (I'm sure I'm
idiot but....)
What is a regtype, I have read the html doc but don't understand at all
Why :-export(queens/2) ?
I see in test prédicate, it begin with
tk_new([name('Ciao+TclTk - Queens')],I), is I a regtypes ? For the
tclinterpreter
I swim in océan and perharps you think I'm silly
But I ask even.
Thanks
David
The queens.pl
:- module(queens,[main/0, test/0],[assertions,isomodes,regtypes]).
:- use_module(library(tcltk)).
:- use_module(library(lists)).
:- use_module(library(format)).
:-export(queens/2).
queens(N,Qs) :-
range(1,N,Ns),
queens(Ns,[],Qs).
queens(UnplacedQs, SafeQs, Qs) :-
select(Q,UnplacedQs, UnplacedQs1),
\+ attack(Q,SafeQs),
queens(UnplacedQs1,[Q|SafeQs],Qs).
queens([], Qs, Qs).
attack(X,Xs) :- attack(X, 1, Xs).
attack(X,N,[Y|_Ys]) :- X is Y + N.
attack(X,N,[Y|_Ys]) :- X is Y - N.
attack(X,N,[_Y|Ys]) :-
N1 is N + 1,
attack(X,N1,Ys).
range(M,N,[M|Ns]) :-
M < N,
M1 is M + 1,
range(M1,N,Ns).
range(N, N,[N]).
main:- test.
test :-
tk_new([name('Ciao+TclTk - Queens')],I),
% tcl_new(I),
tcl_eval(I,'source 8-queens.tcl',_),
% tcl_event(I,[prolog_event,dq(write(next))],_),
% tcl_event(I,[prolog_event,dq(write(next))],_),
% tcl_event(I,[prolog_event,dq(write(next))],_),
% tcl_event(I,[prolog_event,dq(write(quit))],H),
% display(H),
tk_next_event(I,Event),
% display(Event),
% display('En el primero*****'),nl,
% display(Event),nl,
( Event = next -> go(I)
; closedown(I)
).
closedown(X) :- tcl_delete(X).
go(I) :-
% display('Queens'),nl,
tcl_eval(I,'clear_board',_),
queens(8,Qs),
display(Qs),nl,
show_solution(I,Qs),
tk_next_event(I,Event),
% display('En el segundo*****'),display(Event),nl,
( Event = next -> fail
; closedown(I)
).
go(I) :-
tcl_eval(I,'disable_next',_),
tcl_eval(I,'clear_board',_),
tk_next_event(I,_Event),
closedown(I).
show_solution(I,L) :-
reverse(L,LR),
tcl_eval(I,[show_solution,br(LR)],_).
==============================================================================
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/
-----------------------------------------------------------------------------
>> This is slightly off-topic, but I'm hoping some of the list readers
>> might be able to direct me to references on projects integrating
>> a persistant database store (e.g., MySQL, PostgreSQL, etc.) with
>> a Prolog runtime in a "real world" example.
>>
>> I'm looking to see what issues are involved with keeping information
>> in a database, then using Prolog searching algorithms to locate
>> and retrieve data.
Dear Brent,
I do not think it is an off-topic, but a very interesting excellent
issue instead. We are currently involved in a project where
substantial part of the data will be presumably stored in a separate
database, and, while the amount of data itself is not very high,
searches will be frequent.
In our case it presumably pays off to import all the data into the
local Ciao Prolog database and work (i.e., search) locally. Updates
to the database are supposed to be scarce, and under the control of a
manager (the data is sensible, and has to be verified before being
changed), so concurrent updates or concurrent read/writes are not
really an issue here. We
But, while importing data can be enough for at least a initial
working prototype, it can turn out (for us, and for many people) that
this initial DB loading is simply unfeasible. It should be pointed
out, though, that since the Ciao Prolog database interface aims at
transparency with respect to where the data really lives, incore or
remote access matters very little with respect to the program code
itself. Interesting issues here are caching, prefetching, compiling
complex queries (such as findall/3 of goal conjunctions), estimating
costs of queries, etc.
We plan to add the libraries, utilities, etc. we develop to Ciao
Prolog. But we (and surely many Ciao Prolog users) would like to hear
about user experiences, developments, etc. in order to improve Ciao
Prolog, tackle weaknesses, add new features, etc. which will remain in
the system and be beneficial for all.
Best regards,
--
+--------------------------------------------------------------------------+
|Manuel Carro -- Facultad de Informática -- U. Politécnica de Madrid (UPM) |
| Email: mcarro(a)fi.upm.es --- Ph: +34-91336-7455 --- FAX: +34-91336-7412 |
|http://lml.ls.fi.upm.es/~boris --- http://clip.dia.fi.upm.es/Software/Ciao|
==============================================================================
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/
-----------------------------------------------------------------------------