[HN Gopher] 50 Years of Prolog and Beyond
___________________________________________________________________
50 Years of Prolog and Beyond
Author : elvis70
Score : 84 points
Date : 2022-01-27 06:27 UTC (2 days ago)
(HTM) web link (arxiv.org)
(TXT) w3m dump (arxiv.org)
| tannhaeuser wrote:
| > _The great initiatives consisting of a small group of experts,
| such as the ISO working group or the Prolog Commons project, with
| some tweaks that we hope to have covered, can be re-invigorated
| to make stronger progress in the future. However, they may not be
| enough to bring together a user community that contributes to the
| language and its growth._
|
| Not wanting to take away from that _Festschrift_ and the wealth
| of authors covering generations of Prolog programming, but
| realistically, Prolog Commons contributed very little, was almost
| entirely ignored, had its last update almost ten years ago, can
| 't be contributed towards, and those things it did add feel
| distinctly un-Prolog-ish and procedural, such as get_ and put_
| primitives for maps.
|
| Also, ISO/IEC 13211-1:1995/Cor.2:2012(E) feels kindof rushed (eg
| specifying false/0 thereby trivially breaking existing Prolog
| code such as ILP packages for no reason, insufficient description
| for subsumes_term/2, introducing call/N and the concept of
| _closures_ without sufficient precedent, etc.)
| elcapitan wrote:
| Are there real world use cases of Prolog outside of purely
| theoretical or academic areas? Logic programming is often named
| together with the other major programming paradigms like
| functional, object-oriented or imperative, but I have never seen
| the use of Prolog in any actual project. Introductions rarely go
| beyond some primitive examples of filling a Prolog interpreter
| with data and running some deductions on it.
| exdsq wrote:
| I read about a use for it in printing factories in Germany,
| using it to deduce the optimal number at to print different
| shapes on set sized paper.
| WJW wrote:
| There is apparently a web framework (http://eu.swi-
| prolog.org/), and they do mention commercial sponsors both as
| users and as contributors. It's no PHP or Javascript to be
| sure, but there are some users.
| tpoacher wrote:
| Apparently there was a massive prolog-based component in the
| Windows NT kernel, to do with hardware monitoring or something.
|
| I can't remember details, although last time I mentioned this
| here, I remember some guy replied to my comment and confirmed
| with details, so ... Angola Search is your friend :)
| elcapitan wrote:
| I guess it was this article? http://web.archive.org/web/20040
| 603192757/research.microsoft...
| Contexti wrote:
| IBM Watson was using Prolog when it won in a Jeopardy! game:
| "We required a language in which we could conveniently express
| pattern matching rules over the parse trees and other
| annotations (such as named entity recognition results), and a
| technology that could execute these rules very efficiently. We
| found that Prolog was the ideal choice for the language due to
| its simplicity and expressiveness."[0]
|
| [0] https://www.cs.nmsu.edu/ALP/2011/03/natural-language-
| process...
| guessbest wrote:
| I always wondered how this compared to something like CLIPS[1]
|
| [1] http://www.clipsrules.net/index.html
| aarroyoc wrote:
| The main difference is that CLIPS is a forward chaining rule
| system, while Prolog is backward chaining. This is a big
| difference in how rules are defined and how do you use them (in
| Prolog you start with a query always and you try to prove it,
| in CLIPS you just run it to get some rules dispatched).
|
| However, Prolog is also a valid general purpose programming
| language, so you can actually implement forward chaining rule
| systems in them (see for example CHR[1] and Heiseneye [2]).
| CLIPS is not a general purpose programming language.
|
| [1] https://www.swi-prolog.org/man/chr.html [2]
| https://github.com/IDLabResearch/Heiseneye
| sirwhinesalot wrote:
| I'm not a big fan of Prolog, but its descendents like Datalog or
| Answer-Set Programming are excellent. Datalog in particular I
| find much nicer than SQL as a database language. All the "normal
| forms" are basically how you'd model things in Datalog anyway.
| tpoacher wrote:
| Prolog is beautiful. I don't necessarily use it much these days,
| but it completely transformed the way I see coding since.
| melissalobos wrote:
| One of the most transformative parts of Prolog is the
| DCG(Definite Clause Grammars), you can specify a parser as
| regular Prolog code out of the box. Combine that with strings
| just being lists of chars, and it becomes super easy to write
| parsers, which simplifies a lot of issues.
| tkot wrote:
| Could you point me to some resources about this sort of thing?
| I remember hearing about someone implementing transpilation of
| some subset of C++ to some subset of Java using Prolog but I
| couldn't find the actual code.
| emmanueloga_ wrote:
| Learn Prolog Now! [1] has a chapter on DCGs [1].
|
| 1: http://www.let.rug.nl/bos/lpn//lpnpage.php?pagetype=html&p
| ag...
| pjmlp wrote:
| You can have a look at my mini-Pascal parser, it was a toy
| exercise for the university almost 30 years ago, and some day
| I decided to uploaded into github.
|
| https://github.com/pjmlp/Analyzer
| emmanueloga_ wrote:
| Sometime ago I came across Flix [1] which supports "First-class
| Datalog Constraints". I feel like this is the "right way" to
| implement Prolog: provide syntax/semantics for supporting logic
| programming, but don't force everything to be a Prolog predicate.
| Would be nice if more languages provided syntax and support for
| unification of data types and Prolog style searches.
|
| 1: https://flix.dev/
| pjmlp wrote:
| It is one of my favourite programming languages, pity that after
| university logic programming competitions I never found a use
| case where I could profit from it.
|
| Happy birthday Prolog.
___________________________________________________________________
(page generated 2022-01-29 23:01 UTC)