11

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?

FloriOn
  • 211
  • 1
  • 3

3 Answers3

4

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.

Lance
  • 2,213
  • 1
  • 17
  • 31
  • 2
  • I think Coq is much less mainstream than OCaml. 2. SWI-Prolog does have a web framework http://www.swi-prolog.org/FAQ/PrologLAMP.txt, http://www.pathwayslms.com/swipltuts/html/index.html To put it mildly, that hasn't been sufficient to make it mainstream.
  • – Alexey Romanov Jun 04 '18 at 06:32
  • Dang, I thought that might help :p – Lance Jun 04 '18 at 06:59
  • Part of it comes down to ease of installation, and prolog and packages are hard to install and run. – Lance Jun 04 '18 at 07:00
  • 6
    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. – Derek Elkins left SE Jun 04 '18 at 10:59