I wondered if anyone has looked at Lambda Prolog in a practical light? Are you able to share any simple – general – examples illustrating its advantages over vanilla Prolog?
I didn’t know of Lambda Prolog neither in theoretical nor in practical light. In an abstract way, I would think of Prolog and Lisp-derived dialects as two distinct worlds/traditions. But of course one can mix almost everything depending on one’s needs, goals, etc.
Hey @emiruz, I took a look at lambda prolog a few years ago, I guess as far as installing the compiler and trying some programs. I could try to mangle the authors’ arguments myself, but I heavily suggest reading the first chapters (stop when you get tired, but I found it a surprisingly good book)
of:
Dale Miller and Gopalan Nadathur - Programming with Higher-Order Logic (2012)
for intellectual curiosity mostly. I fear you won’t get much use from it on the practical side (if prolog has a very small mindshare this is downright minuscule). On the contrary, if you do, ping me!
I used a lambda prolog dialect called prolog mali during my PhD but I only have vague memories about it.
I believe the rational behind lambda prolog was just to add static types to prolog during compilation because of the two main well-known arguments:
- it can catch bugs at compilation
- can be better optimized.
In my experience, having to specify the types of every compound and predicates you use was extremely tedious and error prone which counteract the catching bugs argument.
In terms of efficiency, all the heavy lifting that had to be done (things like image manipulation) was done in C++ anyway. But I don’t really know if using a regular prolog would have been fine or not.
You should take all of this with a grain (or lots) of salt since I was a very prolog beginner at the time and it took me years for my brain to actually like and understand prolog.
But I believe that using lambda prolog did not contribute to my love of prolog
Although I have never used Mercury, I believe it is a prolog dialect with types that actually manage to provide a robust usable open-source implementation.