[comp.sys.mac.hypercard] Help wanted on HyperCard and Expert Systems

dsr@otter.hple.hp.com (Dave Raggett) (09/23/88)

I am a newcomer to the Mac and would like to use HyperCard as the user
interface for expert systems which will be implemented in Prolog.

Is it possible to co-routine HyperCard and Prolog, so that you can prove
Prolog goals from HyperTalk scripts and also get Prolog to send HyperTalk
messages back to HyperCard?

LPA (who supply MacProlog) say that they have had a lot of requests, but that
you can't call MacProlog as yet. They intend to release a version with this
feature in about one years time. What about other Prologs?

So far I have two ideas:

   1) To implement a simple prolog interpreter in C as a XCMD
      with entry points for initializing stacks, proving goals and
      freeing resources.  Can you send messages to HyperCard from XCMDs?

   2) To run Prolog (e.g. MacProlog) in the background (under MultiFinder),
      and get it to call a C predicate which blocks waiting for a service
      request. You then need to find a way to get HyperCard to send such a
      request and wait for a reply. This is all very hazy to me!

I'm sorry if my lack of knowledge shows, but I would be very grateful for any
ideas. 

Dave (hopeful) Raggett      -     in darkest Bristol, England.

dan@Apple.COM (Dan Allen) (09/28/88)

Yes, HyperCard COULD be a good front end for an expert system, although
I do not know of anyone doing this yet.  Yes, XCMDs can send messages to
HyperCard and writing a small Prolog compiler/interpreter as an XCMD is
feasible.  (The whole Pascal compiler portion of Turbo Pascal, for
example, is only 24K, but it was written in assembly, not C.)

The other option proposed would be to pass Prolog requests to an already
existing Prolog compiler running simultaneously under MultiFinder.  This
would probably require some sort of IPC which is not strictly supported
in the current versions of MultiFinder, although you could probably do
something by passing info back and forth through files written to the
disk, but that is kind of messy and slow.

Dan Allen
Apple Computer

geb@cadre.dsl.PITTSBURGH.EDU (Gordon E. Banks) (10/03/88)

In article <17871@apple.Apple.COM> dan@apple.com.UUCP (Dan Allen) writes:
>Yes, HyperCard COULD be a good front end for an expert system, although
>I do not know of anyone doing this yet.  Yes, XCMDs can send messages to

At the Apple booth at AAAI there was an expert system shell done
in Hypercard.  I forget the name of the company.