From jan@swi.psy.uva.nl Thu Nov 22 21:19:30 2001
Received: from gollem.swi.psy.uva.nl (gollem [145.18.152.30])
	by swi.psy.uva.nl (8.10.2+Sun/8.11.2) with ESMTP id fAMKJTf28490;
	Thu, 22 Nov 2001 21:19:29 +0100 (MET)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id fAMKJUu03882;
	Thu, 22 Nov 2001 21:19:30 +0100
Date: Thu, 22 Nov 2001 21:19:30 +0100
Message-Id: <200111222019.fAMKJUu03882@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: [SWIPL] aaahhhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!! nonsense!!!!!!!!
To: Armando Stellato <starred@tiscalinet.it>,
   SWI Mailing List <prolog@swi.psy.uva.nl>
In-Reply-To: Armando Stellato's message of Thu, 22 Nov 2001 19:22:16 +0100
Phone: +31 - 20 - 525 6121

>   argh!!! look at this!!!
> 
> handle_msg(Coordinator,ask_words(Ontology,CONCEPT)) :-
> 
> /*1*/
> linguistic_agents:ag_IdCard(Coordinator,[coordinator,[]]),
> /*2*/
> write('Concept is: '),write_ln(CONCEPT),
> /*3*/
> Ontology:find_Words(CONCEPT,Bag_of_Words),
> /*4*/
> write(Bag_of_Words).
> 
> 
> Ok, don't even try to understand what it does.
> Just know that:
> 
> row1: check if message-sender Coordinator is what he claims to be
> 
> row2: i write CONCEPT to see if no problem has occurred (it has to be a
> number), this row is not strictly necessary
> 
> row3: use module Ontology procedure find_Words to extract a list of
> synonyms related to CONCEPT (that it'll be Bag_of_Words).
> 
> row4: write(Bag_of_Words). don't think you need explanations  [;-)]
> 
> 
> Ok,when my agent system works, i got this result on the shell:
> 
> ReadyList is: $stream(1998822)
> Msg from Agent: Reiser@localhost. ReadStream: $stream(1998822)
> Msg read is: ask_words(wordnet_track_hound, 102443613)
> Concept is: 102443613
> []
> ok
> Where the '[]' is a empty list, this should mean there are no lexicals,
> but i know there are, and that my system "teorically" works fine, infact
> (and this is absurd!!!), if i manually write on the shell:
> 
> handle_msg(['Reiser',localhost],ask_words(wordnet_track_hound, 102443613)).
> 
> I got:
> 
> Concept is: 102443613
> [circuit_board, circuit_card, board, card]
> 
> that is the right result!!!!!!!!
> 
> there's no way why it works this way, the system runs the same predicate
> that i've manually written in the shell...but it gives no result (empty
> list)....i fear it may be some low-level bug....

Never say never, but I doubt it.  Most obvious things to check for
(you've not given us much to go on) are environment settings, working
directory, etc. that differ between the two invocations and are somehow
relevant.  Best advice

	* If you can manage the server process to talk to the user
	to do so and run in trace-mode.  Details depend on how Prolog
	is used, which OS, etc.

	* Print tactical messages to a file and see where things go
	wrong if you can't talk to a user directly.

Depending on the setup, debugging server-embedded (Prolog) applications
can be a nightmare ...

	Cheers --- Jan

	

