views:

184

answers:

3

at work there was discussion of using prolog as the backend for a rules engine on an web-app. how would this get tied into existing systems? are there available prolog libraries for other languages allowing invocation of prolog modules.

+1  A: 

For SWI-PROLOG, you could look to Thea2 which has support for SWRL in PROLOG and can also be attached to external reasoners via JPL such as HermiT for OWL/SWRL reasoning, or Pellet, etc.

On a personal note, I have used JPL several times in the past to enable web-apps with a SWI-PROLOG backend, which works just fine if you intend to program your web app using a language which is executable on a JVM, like Java, Groovy, or Scala, for example. Another alternative would be to hook SWI-PROLOG into a C or C++ environment, which I haven't tried for a web-app.

If your web-app is using another development language that doesn't run on a JVM or in C/C++, then this mightn't be the right path for you as it seems to be a bit harder to connect a running SWI-PROLOG environment to other language environments. However, that said, we have successfully implemented a SWI-PROLOG-to-anything bridge using HTTP before, but this is less than ideal if performance is a necessity.

sharky
+1  A: 

I'm not sure exactly what you're looking for, but you may want to look into Yield Prolog , which allows the embedding of Prolog code into programs using Python, C#, or Javascript. There is no API involved. I haven't used this myself (yet), but it may be amenable to what you're trying to do.

arbn
A: 

LPA Prolog has been widely used in various commercial web-based applications, most noticeably within Business Integrity's industry-lead document assembly product, DealBuilder

LPA provide various architectures for deliverying web-based applications - some of which are shocased within the VisiRule section on the LPA web-site www.lpa.co.uk

Clive

Clive Spenser