Hacker News new | ask | show | jobs
by hendler 695 days ago
Prolog itself is still developed and used in various settings (mostly swi-prolog?), but other languages and logic engines solve domain specific but similar problems better (rule engines, formal proof verifiers, etc). For exploratory work it can be useful.

I have tried to use it in combination will LLMs unsuccessfully, partly because the domain was not specific enough. Otherwise you need a lot of real world knowledge and a large fact database.

Logic engines for first order logic in RDF/OWL also have interesting logical inference abilities, like graphdbs.

Any programming language can do "logic" and the work at MIT/CSAIL in probabilistic programming may turn out to be a better way to combine fuzzy logic and formal proofs.

Not sure this answers your question, but maybe this points towards some interesting directions.

2 comments

Any answer here is a good one since the question is soooo unspecific :D. My professor is a staunch advocate for RDF/OWL, inference engines and stuff like that (hence why i also mentioned ontologies :D).

The thing is that i think that the language itself has so much untapped potential and the world that i dived into with my studies is so vast, so full of stuff that it left me kind of dazed to be fair!

I got some papers in regards to knowledge representation (that to be fair i still have to read... exams and work got in the midst of all :/) but still it seems so... odd: when we were studying OOP in my bachelor we went over the usual examples that made you understand "this is not an imperative paradigm but there are object abstractions" while, in my studies, prolog and logic programming in general was seen as a tool of sorts for reaching an objective like "hey we have a MAS system, let's sprinkle some prolog in it for fun :D" (maybe i am exaggerating but it feels like this lol). I feel it can do much much more

You are definitely on to something here. OOP has some common roots with formal ontologies and knowledge representation (not so much the programming languages, but object oriented modeling). OO fails at this for various reasons, whereas logic is tailored for this specific purpose. Check out ErgoAI (formerly Flora-2), it's the most advanced Prolog flavor for representing and reasoning over knowledge. https://github.com/ErgoAI
you guys are giving me so much to read thanks <3 i'll give this a check when i have some time out of exams/work. I will surely check ErgoAI
If you want to see something truly fascinating, take apart https://logtalk.org/ - it implements an OO system for prolog which gives you all sorts of advantages (the least of which being a not-terrible way of getting namespaces).

Reading "The Art of Prolog" and "The Craft of Prolog" was fun for me, as was learning how the Warren Abstract Machine works.

(I am not at all a prolog expert, merely a programmer who happens to be fascinated by it, so this is all dabbling on my end but hopefully provides some stuff that's fun to learn for you as well)

Hi! Are you Jim Hendler (or related to him), my Reagan-era AI professor from UMD?

https://en.wikipedia.org/wiki/James_Hendler

My Prolog programming assignment #4, a Prolog "nehcihsahA" detector (maternal uncle: a mother's brother, or any equivalent relative) seemed designed to make me hate Prolog with a passion, involving bending over backwards by defining ridiculous predicates like siblish, sibloid, relatoid, sistoid, brothoid, mothoid, and fathoid.

https://www.donhopkins.com/home/code/nehcihsaha.prolog.txt

I much more enjoyed the OPS-5 programming assignment #6, for which I made a worm simulation that hacked into Ollie North's Intimus-007s ("the ace of security paper shredders") in the White House basement, via Professor Hendler's Sun workstation dormouse, rms's account with password rms on prep, and Casper Weinberger's account on UMD's Vax 11/780 mimsy and NSA's PDP-11/70 tycho, connected via the NSA's MILNET IMP 57 at Fort Mead, then posted Ollie North's secret diary and notes it found in the paper shredder to talk.rumors via the UCB-Vax usenet gateway.

https://www.donhopkins.com/home/code/crack-ollie.ops5.txt

https://news.ycombinator.com/item?id=18376750

>At the University of Maryland, our network access was through the NSA's "secret" MILNET IMP 57 at Fort Mead. It was pretty obvious that UMD got their network access via NSA, because mimsy.umd.edu had a similar "*.57" IP address as dockmaster, tycho and coins. [...]

> My Prolog programming assignment #4, a Prolog "nehcihsahA" detector (maternal uncle: a mother's brother, or any equivalent relative) seemed designed to make me hate Prolog with a passion, involving bending over backwards by defining ridiculous predicates

Your attempt at a solution definitely defines ridiculous predicates, but you should not blame that on your teacher or the language. For example, there is no way that defining "a mother's brother" would need to refer to a "same sex" predicate in any way. You took a wrong turn somewhere with your approach, but again it's neither the language nor your teacher that forced you down that path.

No. Good catch though! I am not Jim, though I have talked with him!