8
$\begingroup$

I've just recently found out about KRR (Knowledge representation and Reasoning) and ASP, not hearing a thing about them before (except a bit about prolog). I've read a bit about them and one of their primary usage seems to be AIs.

My question would be how widely used ASP or other declarative languages are, is there some frequently used program using them (like search engines?) or is it mostly for research purposes? What may be the reason they are not so well known? Is it because AI-development belongs to a more "advanced level" of programming?

$\endgroup$
  • $\begingroup$ This seems off-topic here. $\endgroup$ – Yuval Filmus Jun 3 '18 at 20:17
  • 2
    $\begingroup$ It's the second place I posted it, any idea where would it be on-topic? $\endgroup$ – FloriOn Jun 3 '18 at 21:01
  • $\begingroup$ @FloriOn: what is the first place and first occurrence of your question? $\endgroup$ – Basile Starynkevitch Jun 23 '18 at 13:13
  • $\begingroup$ Prolog was good for its time but is realy hard to use in any big project. The syntax becomes very obscure in complex terms, also always interpreting the whole structure in desigion tree is not what you desire - KRR system yould have further functionality... $\endgroup$ – user8426627 Jun 17 at 18:29
4
$\begingroup$

how widely used ASP or other declarative languages are

You can see the activity of Prolog which I think is the most common ASP programming language:

Just based on that, Prolog's top package is (483 / 139,326) x 100 = 0.35% as popular as one of Node.js's large packages. Or 0.07% as many packages.

is it mostly for research purposes

IMO yes, it is mostly for research purposes. But it is similar to Ocaml, which from my experience was mostly for research purposes until corporate users like Facebook published Flow (typed JavaScript programming), and others published Coq (automated theorem proving), which helped bring Ocaml to the mainstream.

What may be the reason they are not so well known?

IMO Prolog is not used because it is (a) a different paradigm, (b) the package manager isn't up to par (this is a big deal these days), and (c) there is no evangelized web framework. If there was a good package manager like NPM for Node.js, and there was a web framework that was marketed, as well as a small group of evangelists, that would help bring it to the mainstream. Ruby had 37signals and Rails, Python had Google, etc.

Is it because AI-development belongs to a more "advanced level" of programming?

No not really. Some AI research uses prolog for modeling stuff, but it is not a requirement for AI. AI could be divided into two parts: (1) Machine learning / probabilistic-based models where the relations are learned and not well-defined, and then (2) manually defined models. Most AI is a mixture of both, but the manually defined models are valuable and kept private for the most part. The manually defined models could be defined using Prolog, and there are a few papers out there for doing that, but it is not necessary. To summarize, all AI work can be done in regular programming languages, just that Prolog might make it slightly more compact to write in some cases.

$\endgroup$
  • 1
    $\begingroup$ 1. I think Coq is much less mainstream than OCaml. 2. SWI-Prolog does have a web framework swi-prolog.org/FAQ/PrologLAMP.txt, pathwayslms.com/swipltuts/html/index.html To put it mildly, that hasn't been sufficient to make it mainstream. $\endgroup$ – Alexey Romanov Jun 4 '18 at 6:32
  • $\begingroup$ Dang, I thought that might help :p $\endgroup$ – Lance Pollard Jun 4 '18 at 6:59
  • $\begingroup$ Part of it comes down to ease of installation, and prolog and packages are hard to install and run. $\endgroup$ – Lance Pollard Jun 4 '18 at 7:00
  • 6
    $\begingroup$ There is much more to the programming world than web sites. I'm pretty sure Flow did little to improve OCaml's adoption which was hardly struggling before then. Similarly for Coq but for different reasons. Coq is 30 years old. As far as I can tell, there's fairly significant adoption of OCaml in finance. But finance isn't web sites so you mostly don't hear about it. Now consider things like supply chain and operations research where ASP might be applied. This is the problem with questions like the OP's. Presumably someone is giving SICStus money to continue to be a going concern. $\endgroup$ – Derek Elkins Jun 4 '18 at 10:59
2
$\begingroup$

I just walked 354 students, mostly SE's, through installing SWI-Prolog. Had about a dozen install issues. Most found the process fairly easy.

I'll admit, if SWI-Prolog had 100x as many users the install would get more polished. But nobody is shying away because the install is too hard.

As for packs, to install a pack you query pack_install(my_pack).

That's easier than installing ruby gems.

Now, as to how often it's used in non-research areas - the d/l stats mean nothing a) because http://swi-prolog.org is served through a CDN (that we have to use multiple servers and a CDN says something), and b) we know the majority of users are undergrads taking a PL theory/survey course.

Commercial use is becoming more common. I've been writing just Prolog for a few years now, and I'm not an academic (sometimes I was working as a contractor for a university, but not as an academic, as an engineer).

Most of the applications are in AI or machine learning environments. Hard ML problems often benefit from an admixture of symbolic AI.

$\endgroup$
1
$\begingroup$

Read about AI winters and more on the history of AI.

In the 1980s, symbolic AI was dominant. In that time, expert systems proliferated. Many of them have been coded in Prolog.

Today, we still have (in some areas) business rules systems and business rules engines, and the business rules approach used in business rule management systems, which IMHO are the direct successors of expert systems from the 1980s. AFAIK, a lot of business oriented software is built on similar principles. I believe that many credit (or insurance) decisions are made today automatically (and daily) in banks with such systems. Rewriting systems like XSLT are also in daily use, and are descendants of 1980's expert systems ideas. Declarative programming (including CLIPS or even make or other rule-based systems) can be viewed as the dissolution of symbolic AI ideas in the general programming and software industry (as soon as something becomes "easy" and "widespread" it cannot be called AI anymore).

Today, AI is reduced to machine learning approaches (including neural computing). What (broadly) was called AI before the 1980s is currently called AGI.

The next AI winter might be some abstract interpretation winter. Abstract Interpretation is a theory and mindset about static program analysis. Today, that AI has become a buzzword, and is sometimes presented as the solution to most software safety concerns (which IMHO it is not).

Some persons (including me) believes that symbolic AI is not entirely dead (at least when combined with other paradigms). An interesting view is that of Jacques Pitrat (a retired researcher and French AI pioneer) in his blog.

But AI (both as "artificial intelligence" as defined in Dartmouth 1956 and as "advanced informatics") systems are hard to build. Many years of effort are needed to develop them. Remember Brook's insight: "while it takes one woman nine months to make one baby, nine women can't make a baby in one month". This is true for complex and challenging software systems (which might need nine years to be completed, but we live in a world which cannot afford paying a small team of talented software researchers for nine years). For social and economical reasons that I don't fully understand (but that I do deeply regret), software has no equivalent of large long term projects like ITER (and has not even small long-term research projects lasting more than 4 or 5 years with a dozen of researchers). See also the softwareheritage project, and notice that the software domain is today less creative, as a whole, than the many ideas that flourished in the 1980s. See Liam Proven's FOSDEM 2018 talk The Circuit Less Traveled

What was mostly called in the previous century (XXth century) AI is today called AGI. The terminology has changed, and the ambition is today nearly gone. These days, in the early 2020s, AI is mostly about neural networks and machine learning. My feeling in 2019 is that AI became a useless buzzword today (it is no more about Artificial Intelligence).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.