From tob@world.std.com Tue May 22 02:19:36 2001
Received: from localhost.std.com (ppp0b174.std.com [208.192.101.174])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f4M0JX305410
	for <prolog@swi.psy.uva.nl>; Tue, 22 May 2001 02:19:34 +0200 (MET DST)
Received: (from Tehom@localhost)
	by localhost.std.com (8.9.3/8.9.3) id UAA00697;
	Mon, 21 May 2001 20:14:53 -0400
X-Authentication-Warning: localhost.std.com: Tehom set sender to tob@world.std.com using -f
To: <srsilva@din.uem.br>
Cc: <prolog@swi.psy.uva.nl>
Subject: Re: [SWIPL] A help with the use of the module predicate.
References: <AIEFJNHLCEPNEBEBCMLKOEOECDAA.srsilva@din.uem.br>
From: Tom Breton <tob@world.std.com>
Date: 21 May 2001 19:18:11 -0400
In-Reply-To: "Sergio R. P. da Silva"'s message of "Mon, 21 May 2001 16:53:07 -0300"
Message-ID: <m3bsomqojw.fsf@world.std.com>
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 49

"Sergio R. P. da Silva" <srsilva@din.uem.br> writes:

> Hi all,
> 
> I'm trying to run the programs that come with the book "Representation and
> Inference for Natural Language" from Patrick Blackburn and Johan Bos
> (http://www.comsem.org/
> But I can't make it work since the operators defined in the module described
> below are not exported for the mainLambda.pl module.
> If I insert the code directly in the mainLambda file everything works fine,
> ie., the operators get exported to the other module as it needs to be.
> 
> Can anybody ell me if this is a problem with the code or with the module
> system behavior?

You're in luck.  I got that working some time ago.  I had to make 3
changes, but IIRC that wasn't one of them.

You need to define a rule Quintus has that SWI doesn't:

        simple(X) :- (atom(X) | number(X) | var(X) ), !.

For some reason EnglishLexicon needed to be a module, so I added:

%Tom
:- module(englishLexicon,[lexicon/4]).

And then I had to change a `consult' to a `use_module' in both curt.pl
and mainLambda.pl, as follows:

%Tom
:- use_module(englishLexicon, [lexicon/4]).

%:- [englishGrammar], [englishLexicon], [semMacrosPresupDRT].
:- [englishGrammar], [semMacrosPresupDRT].

Then it worked.  I had no trouble with comsemOperators, which appears
unchanged.

> Thank you very much in advance.

You're welcome very much in advance.  I got this working very much in
advance.  }:)

On a side-note, you have chosen well.  Blackburn and Bos is a very
fine tutorial on natural language understanding.

-- 
Tom Breton, http://world.std.com/~tob

