Questions tagged [prolog]

A logic programming language.

19 questions
26
votes
4 answers

Why is Prolog good for AI programming?

I am researching programming languages used for AI programming. I know that LISP is taught as an AI programming language in my university, but Prolog rarely is. I am kind of fond of Prolog, but I'm not an AI programmer so I don't think I'm qualified…
2rs2ts
  • 515
  • 1
  • 6
  • 11
22
votes
4 answers

The relation between Business Rules Engines and Constraint Programming languages

If one looks at (perhaps older) manuals of Drools or some other rule engines, one of the illustrations of their added value is solving puzzles such as the Miss Manners puzzle (listed in the Drools Documentation). Now, such puzzles are naturally…
18
votes
5 answers

What makes functional programming languages declarative as opposed to Imperative?

On many articles, describing the benefits of functional programming, I have seen functional programming languages, such as Haskell, ML, Scala or Clojure, referred to as "declarative languages" distinct from imperative languages such as…
18
votes
3 answers

Why Aren't Rule Engines Written In Prolog?

From what I've seen of Prolog, it seems as if it would be ideal for crafting a rule engine for an app. Yet, I don't believe I've ever seen a rule engine written in Prolog. Is there some inherent limitation in Prolog (e. g. poor garbage collection…
Onorio Catenacci
  • 2,937
  • 3
  • 26
  • 37
15
votes
9 answers

Is Prolog professionally useful?

I learned Prolog many years ago in University. During my professional life, I have never needed to use Prolog. Have I missed something special? As far as I remember Prolog requires completely different mindset comparing to prominent programming…
Gursel Koca
  • 261
  • 1
  • 2
  • 6
15
votes
5 answers

Recent programming language for AI?

For a few decades the programming language of choice for AI was either Prolog or LISP, and a few more others that are not so well known. Most of them were designed before the 70's. Changes happens a lot on many other domains specific languages, but…
Eduard Florinescu
  • 973
  • 2
  • 12
  • 32
14
votes
4 answers

Historical precedent for why Prolog is less popular than SQL in Imperative Programming?

It seems that writing Declarative SQL is very popular in Imperative Programming. However, it also seems that writing Declarative Prolog could save a lot of complexity but this is not very common. Is there a historical precedent for this apparent…
53777A
  • 1,706
  • 13
  • 18
12
votes
3 answers

Why (not) logic programming?

I have not yet heard about any uses of a logical programming language (such as Prolog) in the software industry, nor do I know of usage of it in hobby programming or open source projects. It (Prolog) is used as an academic language to some extent,…
Anto
  • 11,157
  • 13
  • 67
  • 103
9
votes
1 answer

Prolog parallelism

Are there any prolog interpreters that can functionally decompose your 'programs' in order to improve efficiency? I know there's been research on prolog interpreters that reach near-C speeds through parallelism (the kind that a typical C programmer…
David Cowden
  • 2,903
  • 17
  • 23
3
votes
1 answer

Good introduction to metaprogramming in Prolog?

I would like to make for example imperative programs as output of Prolog (shaders of graphic card) and also event-driven programs (game logic) ... also I would like to learn how to metaprogram in Prolog in general. I believe there might be some…
user712092
  • 1,412
  • 10
  • 18
3
votes
3 answers

Scheme and Functional programming is to "Structure and Interpretation of Computer Programs" as Prolog and Logic programming is to what book?

I'm looking for some advice how to get started with Logic programming, and I am really enjoying working through the Scheme book "Structure and Interpretation of Computer Programs." Is there a similar book that is geared toward Prolog? Or, if there…
3
votes
2 answers

Using Prolog to implement authorization rules

I'm working on a user management "pseudoframework" in PHP, and I'm trying to implement fine-grained rule-based authorization. I'm using a combination of SQL and condition-checking functions written in PHP right now, but I'm not completely…
alexw
  • 329
  • 1
  • 10
3
votes
2 answers

How Would I Start With Prolog?

If I wanted to start learning Prolog on Windows, is there any package that would integrate Prolog into Visual Studio 2010? That is, a compiler and templates and so forth for working with Prolog on Windows? Assuming there is no flavor of Prolog…
Onorio Catenacci
  • 2,937
  • 3
  • 26
  • 37
2
votes
3 answers

Logic Programming(Unification) vs List Comprehensions (in Functional Programming)

I found this answer on StackOverflow very clear to explain the difference beween the Logic Programming paradigm and the Functional Programming paradigm: The thing that makes logical append different [from the functional one] is you can use it to…
Qqwy
  • 4,709
  • 4
  • 31
  • 45
1
vote
2 answers

Connected components of a graph using Prolog

Given a corner x of an undirected Graph G I would like to ask for the connected component of x, but my first try does not work as desired. Here it is: edge( a,b ). edge( b,a ). edge( b,c ). edge( c,b ). edge( c,d ). edge( d,c ). connected( X,X…
Ronin Tom
  • 111
  • 1
  • 3
1
2