Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RDF/XML and Prolog: seeking Javascript prolog/logic tools (!)

21 views
Skip to first unread message

Dan Brickley

unread,
Aug 14, 1999, 3:00:00 AM8/14/99
to

Hi

This may seem an odd request, but I'm looking for an implementation of
Prolog or similar language layered on top of Javascript. Aim is to
explore logic-based applications within context of the Netscape/Mozilla
browsers RDF based information management systems.

See
http://www.mozilla.org/rdf/doc/
http://www.mozilla.org/rdf/back-end-architecture.html (including examples)

for more info on the Mozilla side of things. Basically browser bookmarks
and many other data sources are exposed through logic-friendly RDF
interfaces to Javascript...


See
http://www.ilrt.bris.ac.uk/discovery/rdf-dev/purls/papers/QL98-queryservice/
http://www.ilrt.bris.ac.uk/discovery/rdf-dev/purls/papers/QL98-enabling/

for background on RDF (which is an XML application) and logic, and
http://www.w3.org/RDF/ for the RDF home page.

Many thanks for any leads! I've trawled the Web but can only find
(numerous) Java implementations, which wouldn't (I think) work with
Mozilla in it's current state. I've no sense of whether such a thing is
really feasible in Javascript but if anyone knows it'll be this
newsgroup...

cheers,

Dan


--
Daniel....@bristol.ac.uk
Institute for Learning and Research Technology http://www.ilrt.bris.ac.uk/
University of Bristol, Bristol BS8 1TN, UK. phone:+44(0)117-9287096


Ulrich Mayring

unread,
Aug 14, 1999, 3:00:00 AM8/14/99
to
Dan Brickley wrote:
>
> Hi
>
> This may seem an odd request, but I'm looking for an implementation of
> Prolog or similar language layered on top of Javascript. Aim is to
> explore logic-based applications within context of the Netscape/Mozilla
> browsers RDF based information management systems.

Why do you want to do the processing on the client-side? You are
excluding all clients, that do not speak JavaScript (i.e. everyone
except Netscape). I would do the processing on the server and deliver
pure HTML to the client.

Ulrich

--
Ulrich Mayring
DENIC eG, software development
ul...@denic.de

Dan Brickley

unread,
Aug 14, 1999, 3:00:00 AM8/14/99
to
On Sat, 14 Aug 1999, Ulrich Mayring wrote:

> Dan Brickley wrote:
> >
> > Hi
> >
> > This may seem an odd request, but I'm looking for an implementation of
> > Prolog or similar language layered on top of Javascript. Aim is to
> > explore logic-based applications within context of the Netscape/Mozilla
> > browsers RDF based information management systems.
>
> Why do you want to do the processing on the client-side? You are
> excluding all clients, that do not speak JavaScript (i.e. everyone
> except Netscape). I would do the processing on the server and deliver
> pure HTML to the client.

I appreciate this concern, and in fact we are (in a separate project)
doing just this with server-side inference over RDF content.

The reason I'm after Javascript logic code is that I'm not in this case
talking about making a web page / service available, but rather
concerned with the potential for building a better web client through
building in logic/inference stuff to the client itself. In Mozilla, RDF
is the data model of choice, and Javascript is the lightweight scripting
language used to create behaviours in the UI. This has enormous appeal:
imagine being able to build a value-added bookmarks system that
aggregated your bookmarks data with 3rd party annotations and
classifications, and that exposed a smarter query interface through the
browsers native GUI.

Now... many pieces of this puzzle are already in place. What's not there
is the logic side of things. It's been suggested to me offline that
another approach would be to compile a prolog engine into the Mozilla
browser and have it expose its facilities to the scripting ; this seems
doable but a bigger job. So I thought I'd trawl around first to see if
anybody had managed to build anything clever with Javascript. See the
backend-architecture note at http://www.mozilla.org/rdf/doc/ for example
code showing how RDF data is exposed in the browser for such purposes.

cheers,

Dan


Ulrich Mayring

unread,
Aug 15, 1999, 3:00:00 AM8/15/99
to
Dan Brickley wrote:

> The reason I'm after Javascript logic code is that I'm not in this case
> talking about making a web page / service available, but rather
> concerned with the potential for building a better web client through
> building in logic/inference stuff to the client itself. In Mozilla, RDF
> is the data model of choice, and Javascript is the lightweight scripting
> language used to create behaviours in the UI. This has enormous appeal:
> imagine being able to build a value-added bookmarks system that
> aggregated your bookmarks data with 3rd party annotations and
> classifications, and that exposed a smarter query interface through the
> browsers native GUI.

Gotcha :-)

But still, the question is: why not implement this functionality as a
web-based service, so anyone can use it? Most surfers are not keen to
change their browser or download new plug-ins.

> Now... many pieces of this puzzle are already in place. What's not there
> is the logic side of things. It's been suggested to me offline that
> another approach would be to compile a prolog engine into the Mozilla
> browser and have it expose its facilities to the scripting ; this seems
> doable but a bigger job. So I thought I'd trawl around first to see if
> anybody had managed to build anything clever with Javascript. See the
> backend-architecture note at http://www.mozilla.org/rdf/doc/ for example
> code showing how RDF data is exposed in the browser for such purposes.

I looked at the page and think I see what you mean. You depend a lot on
the ill-fated Mozilla project for that. But yes, it is doable and also
(IMHO) desirable - just seems a lot more work than a web-based service.

good luck,

Richard Katz

unread,
Aug 17, 1999, 3:00:00 AM8/17/99
to Ulrich Mayring <ulim@denic.de>;Dan Brickley

Ulrich Mayring wrote:

> Dan Brickley wrote:
> >
> > Hi
> >
> > This may seem an odd request, but I'm looking for an implementation of
> > Prolog or similar language layered on top of Javascript. Aim is to
> > explore logic-based applications within context of the Netscape/Mozilla
> > browsers RDF based information management systems.
>
> Why do you want to do the processing on the client-side? You are
> excluding all clients, that do not speak JavaScript (i.e. everyone
> except Netscape). I would do the processing on the server and deliver
> pure HTML to the client.
>

> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, software development
> ul...@denic.de

Ulrich and Dan,

After a brief look at the situation, I'm going to echo Ulrich's comments and
amplify them somewhat.

It appears that the Mozilla project was attempting to refine the
relationship between Javascript and Java by, for instance, having them share
exception information. It also appears that Mozilla (M8) does not run Java
Applets reliably yet -nor did M7 or M6. Fragmentation of "zilla" efforts may
have left a lot of Java expertise in the Jazilla and other camps.

Despite this, you can take advantage of server-side Java, and Prolog with any
of the "zillas." I'm going to offer three advantages of going toward Java
and especially server-side Java, then I'm going to defy Nietzsche and save my
major philosophical and economic assumptions about all this for last.

Advantages:
========
1. Server-side Java works quite well with JavaScript. You can have a Java
Servlet compose JavaScript and load it into the browser; use JavaScript to
manipulate form information; and receive JavaScript results information
directly using its form.post() method. So whatever RDF you receive in
JavaScript you should be able to forward to a Java Servlet. You can even use
SnoopServlet to monitor the communication.

2. Server-side Java is not restricted in the way that Applets are. A
servlet is basically running under a desktop application. You can use all
the I/O functions, and access any database - not just one located on the web
server as you would have to with Applets.

3. Using server-side or desktop Java can give you access to Java-based and
Java-interfaced Prologs of which there are many.

Philosophical Assumption.
=================
Given the framework of intelligent clients, I can see no practical need for a
difference between a "client" and a "server." Why shouldn't the client be
able to do all the things that servers do? To handle intelligent frameworks,
it probably needs to anyway. You can run ServletRunner (JSDK from
java.sun.com) or JRun (livesoftware.com) on your desk top (by the way,
running JRun on your desktop basically makes your computer into an HTTP web
server).

Memetic and Economic Assumptions
=========================

o Although Java applets offered distribution advantages over Java desktop
applications, those advantages are disappearing. Just as an example, take a
look at what Lee Fesperman has done with FirstSQL/j. You can download and
install FirstSQL/j right through the browser (www.firstsql.com).

o Just one particular browser may be too limiting an environment in which to
deploy RDF.

o Although someone "could" write a Prolog-like language in JavaScript, it
might be difficult (as say writing Prolog in Visual Basic would be) and it
is probably unlikely to guarantee its functionality and meet its recursion
requirements in the browser environment.

Technical Assumptions
===============
Dan, what your working on, RDF, seem to me to be highly important -- as
would it's connection with logic programming be. Check with BinNet and some
of the other commercial Prolog vendors. Even if Mozilla is eventually going
to support applets, you can use BinNet/Jinni or W-Prolog with it. However,
in the server side or desk top environment, you can already be using
Prolog. You can find references to BinNet, W-Prolog and other Java related
vendors (as well as your Nov 1998 paper) on
http://www.cetus-links.org/oo_prolog.html -- but you probably alread know
that.

I'm wish I knew all the details, but I do anticipate that XML metadata access
would be much more robust with RDF. Metadata access seems somewhat lacking
in XSL. With XSL you spend this time formulating a DTD, and then you can't
read it back. Instead you have to go to say the first data instance and get
the nodename. I'm not well versed in XSL yet, but if that's the case it
seems somewhat lame.

Best wishes,


Richard Katz

0 new messages