zlacker

[return to "Can logic programming be liberated from predicates and backtracking? [pdf]"]
1. woolio+du2[view] [source] 2024-10-13 08:10:44
>>matt_d+(OP)
This is a reference to the "Can programming be liberated from the von Neumann style?" from 1977. It argues for functional programming, making the point that the imperative style is more common for efficiency reasons, as the programming model is close to the computer architecture. It aims to be a general thought framework inviting to step a step back on some notions that have been (hastily?) accepted in the programming world.

It makes the same analogy that Prolog (or logic programming languages in general) have been strongly influenced by the resolution algorithm. In practice that means that if you write a non-trivial program, if performance is not right you'll need to understand the execution model and adapt to it, mainly with the pruning operator (!). So while the promise is to "declare" values and not think about the implementation details, you're railroaded to think in a very specific way.

I personally found that frustrating to find good solutions essentially unworkable because of this, in comparison with either imperative or functional paradigms that are significantly more flexible. As a result, Prolog-style programming feels limited to the small problems for which it is readily a good fit, to be integrated into a general program using a general-purpose language. I may be wrong on this, but of the 50 people that learned Prolog around the same time as me, none kept up with it. Meanwhile, other niche languages like Ocaml, Haskell and Scheme had good success.

Rethinking the language foundation could remove these barriers to give the language a broader user base.

◧◩
2. Guthur+2S4[view] [source] 2024-10-14 08:00:21
>>woolio+du2
It's possible that new execution models can be found. Tabling is one such execution strategy that many prolog implementationsc already provide.
[go to top]