Arenas where core.logic dominates [soft]
Asked Answered
V

2

10

Community Wiki

I don't care about the reputation points, I just want good answers. Feel free to remark this question as community wiki.

Context

I'm been working through The Reasoned Schemer, and have found the following observations:

  • Logic programming is very interesting.
  • Logic programming is sometimes counter-intuitive
  • Logic programming is often "inefficient" (or at least the code I write).

    It seems like in going from

  • Assembly -> C++, I "give up" control of writing my own machine code
  • C++ -> Clojure, I give up control of memory management
  • Clojure -> core.logic/prolog/minikanren, I lose partial control of how computations are done

Question:

Besides (1) solving logic puzzles and (2) type inference, what are the domains of problems that logic programming dominates?

Thanks!

Vocalism answered 2/6, 2012 at 0:55 Comment(1)
This seems related to the other questions previously asked here: real-world applications of prolog and real-world prolog usage. (Please take note of how the questions ended up closed).Owner
T
4

Constraint logic programming can be really useful for solving various scheduling, resource allocation, and other nontrivial constraint satisfaction / combinatorial optimization problems. All you have is declarative: the constraints (e.g. only one aircraft can be on the runway at a time), and maybe something you want to minimize/maximize (throughput/waiting).

There are various well-known flavors of that in Prolog, including CLP(FD), which works in finite integer domain, and CLP(R), which works in real domain. At least CLP(FD) seems to be in core.logic's immediate roadmap.

I believe such Prolog-derived solutions are actively being used in air traffic control and other logistics tasks, although it's hard to get precise info what technologies exactly such mission- and life-critical companies are using under the hood.

Terrigenous answered 2/6, 2012 at 7:56 Comment(0)
P
3

Research in artificial intelligence, and in particular cognitive robotics and other application of logic-based knowledge representation, are areas where Prolog is used a lot for its close relation to logic theory. This relation is very useful because it basically brings theory to life. Theorems can be proven on paper, and then implemented almost trivially in prolog and executed, and the executing programs have the proven properties. This allows for programs that are "correct by construction", which is the opposite of first writing programs and then trying to prove properties about them (as is done in formal methods, using, e.g., model checking).

The semantic web is another place where logic programming plays a growing role.

Patch answered 2/6, 2012 at 1:4 Comment(4)
I believe in both AI and Robotics, probabilistic methods (which can handle noise) dominates logic based approaches (which can't handle noise).Vocalism
@Vocalism Different branches of AI for different purposes; there are certainly things probabilistic methods aren't appropriate for.Manners
there is of course ongoing research on probabilistic logic: see for instance MCMCChitwood
@Vocalism - in cognitive robotics, logic programming is used a lot, as it is used often as a testbed for theories on cognition that are based on formal reasoning. Several systems for reactive robotics (based on Brooks' Subsumption Architecture) are rooted in formal logic. Lastly, computational linguistics is firmly rooted in formal systems and theorem (and grammar) provers are well suited for logic programming.Sabinesabino

© 2022 - 2024 — McMap. All rights reserved.