Prolog/V port to Squeak. Trouble with fileIn

Bijan Parsia bparsia at email.unc.edu
Sat Apr 21 14:44:19 UTC 2001


On Sat, 21 Apr 2001, Chris WRIGHT wrote:

I've not yet tried to load Prolog/V into 3.0 yet, so I don't have a
solution (yet). BUt...

> I'm filing in the Squeak port of Mike Teng's V/Prolog (thanks very much
> Bolot!), but I get a syntax error during the fileIn:
> 
> This is with Squeak3.0 of 4 February 2001. Latest update #3552
> 
> I get an error at:
> arg(n, structure, x) Nothing more expected ->:-
> 	integer(n),
> 	is(true, structure value isKindOf: List),
> 	is(x, (self allValue: structure)
> 		at: n + 1).
> 
> with 
>  (n is Undeclared)  (structure is Undeclared)  (x is Undeclared) 
> 
> on the transcript (httpFileIn).

Note that the above is, in fact, Prolog/V code (and not Smalltalk
code). Prolog/V overrides the normal parser and compiler for subclasses of
Prolog (or subclasses of Logic...at least Prolog and its subclasses).

Somethings that can break this: pretty-printing (*especially* if it works
:)), or simply not having the LCompiler hooked up right.

Things have changed in the browser/compiler relationship since the port
was done.

Anyway, that's likely to be the problem.

While I find it *very* slick to be able to have methods in the normal
browser that are written in some other language (e.g., SSPs, even), it
does seem that this is a tad fragile. I'd love it if there were so more
explicit and explicitly documented hooks for doing this.

(SSPs use a pragma...Prolog/V uses a class side compiler/evaluaterClass
method. A per method technique would be nice, especially if one *didn't*
have to use a pragma. Something like the "language" button in
AppleScript/HyperCard/OSA editors.)

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list