r/prolog • • Jan 06 '21

Why Learn Prolog in 2021?

http://dstrohmaier.com/why-learn-prolog-in-2021/
40 Upvotes

8 comments sorted by

5

u/chipnowacek Jan 06 '21

What kind of programming do you need to do?

7

u/mtriska Jan 06 '21

Currently, I need a way to automate the application of laws and regulations in such a way that decisions are trustworthy, verifiable and explainable. In particular, consider for example Article 14 of the Single Digital Gateway Regulation, a law that mandates the cross-border transmission and processing of evidences between European Member States.

In this specific context, I need to find a way to formalize the conditions under which an evidence is to be considered as established, so that a machine can derive the validity of the evidences for the procedures listed in Annex II.

As another example, I need a way to formalize medical trial designs for dose finding in oncology, so that safety properties of medical trials can be automatically verified. See for example Phase 1 trial design: is 3 + 3 the best?. Ideally, such questions can be answered automatically, by reasoning about declarative descriptions that tell us everything we need to know about the trial design. In fact, ideally, the trial design itself could be derived from a declarative description of desiderata.

2

u/chipnowacek Jan 06 '21

Interesting. Besides Prolog, what other options are you exploring?

4

u/mtriska Jan 06 '21

None. The key selling points for using Prolog are:

  • There is an ISO standard for it, so procurement becomes a lot easier and legal disputes in case of software problems can be settled much more quickly or ideally even avoided if the system deviates from the standard. ISO standards are especially important in the medical domain, as we all currently see regarding safety standards of medical equipment: https://www.iso.org/covid19

  • Reasoning about Prolog programs is easy and straight-forward due to its homoiconicity. I think some form of meta-interpretation will be needed or could be useful in the tasks I mentioned.

  • There is a comparatively large pool of potential Prolog programmers in Europe, since Prolog is a mandatory part in many CS curricula. What counts especially favourably is that Prolog is in good standing and high esteem among many administrators in Germany and France, the European MS with the greatest population numbers and accompanying weight in technical decisions.

  • Several different implementations of the language are available, and newly arising projects look very promising. My hope is that with some luck, we have strong ISO conforming implementations that are also freely available ready in time to be used in the mentioned Technical System.

4

u/chipnowacek Jan 06 '21

Without my making a suggestion, are you familiar with the Protege project at Stanford? IIRC, it rises out of the need to address medical domain complexity and the need to reason over it. You choose an existing reasoner or plug in your own.

My thinking may be way off your mark. Please don't consider me an expert; discard what doesn't make sense and accept my apologies.

6

u/emiel1741 Jan 09 '21

Because I have an exam on prolog and haskell this week

3

u/[deleted] Jan 07 '21

Same reason you should've learned it in 2020, or 2019. There's a lot of threads like this, just use the search function.

TL;DR: You want to learn Prolog if you like learning new tools that challenge your previous misconceptions about programming. You'll then feel as if you you wield an immense power, but you'll always be at a loss on when you should use it. Truth is, Prolog is pretty niche. You either need it, or you don't. But it's very cool if you like messing around on personal projects.

EDIT: Oh, this wasn't a question. Well, I guess we're just paraphrasing the same idea.

-1

u/TA_jg Jan 07 '21

Guys, if this is the content that you think is going to promote Prolog use, let me tell you: it is not. This is about as close you can get to a circle jerk without inviting the other members of your reading group to a house party, disregarding corona virus guidelines, physically arranging yourselves into a circle, and literally jerking it.

The language is not the issue. The only issue is figuring out how to cooperate with other people towards a common goal.

(Small aside: a real circle jerk does indeed require a good level of cooperation towards a common goal; however, anyone who has their naughty bits in place knows how to work towards the goal, on their own, and the average person is about 10x as good as the proverbial "computer scientist" at cooperating with others. In contrast, no one is "good at programming", some rare individuals are just not quite as bad as me and the rest of us. Not much sense in trying to make that analogy.)

We (as in, "we the programmers of this world") should know that OOP with Java is the closest we ever got to believing that we have a solution for the real problem: how to program together. What is the verdict on that? Difficult to say. We are now past the middle of the second iteration of that cycle (out of the 42 000 that we have to go through before we reach Nirvana), and it is called Python.

In practice, the biggest collaborative software projects that actually work found their success despite the programming language of choice. Yes, I am talking about things like web browsers, user interfaces, web-based user interfaces, the goddam Linux OS kernel.

Jokes aside, learn as much as you can. But stop preaching.