A logic programming language.

learn more… | top users | synonyms

177
votes
18answers
68k views

How can one manage thousands of IF…THEN…ELSE rules?

I am considering building an application, which, at its core, would consist of thousands of if...then...else statements. The purpose of the application is to be able to predict how cows move around in ...
21
votes
4answers
11k views

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 ...
14
votes
4answers
3k views

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 (manual of Drools). Now, ...
13
votes
5answers
7k views

Recent programming language for AI? [closed]

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 ...
11
votes
3answers
1k views

Why Aren't Rule Engines Written In Prolog? [closed]

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 ...
11
votes
2answers
3k views

Prolog in current research world [closed]

i've a doubt about using Prolog for my grad school research. Recently, i've presented a small part of my research work which is discussed about logic and prolog in a conference. I got a comment from ...
10
votes
4answers
954 views

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

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. ...
10
votes
3answers
2k views

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) ...
9
votes
1answer
191 views

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 ...
7
votes
4answers
324 views

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" ...
3
votes
3answers
452 views

Scheme and Functional programming is to “Structure and Interpretation of Computer Programs” as Prolog and Logic programming is to what book? [closed]

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 ...
3
votes
1answer
463 views

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 ...
3
votes
2answers
144 views

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 ...
2
votes
2answers
2k views

How Would I Start With Prolog? [closed]

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 ...
1
vote
1answer
501 views

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( ...
0
votes
1answer
508 views

Efficient way to find highest value from predicates

I have predicate, that enumerates through backtracking list of values. I want to find highest value from this list. For example: ranked_move(X,Y,R) :- between(0,10,Y), between(0,10,X), ...
0
votes
1answer
786 views

Strategy for writing a logic program

I have had a hard time learning logic programming thus far, and my request for outside resources on this site was met with some opprobrium, so perhaps this question better addresses both my needs and ...
0
votes
0answers
38 views

What can I do with XSB that I can't do with Prolog? [on hold]

I've done a ton of web searching about XSB and the only real new inference I've gained is that it does something called "tabled logic programming". I'm an experienced Prolog programmer and I've heard ...
0
votes
1answer
38 views

How should I draw the (special) is predicate, which is used for arithmetic, in a Prolog search tree?

I normally construct my search tree by following the common convention: Place Queries or Goals in need of unification inside node boxes. Write down decision points on the edges, where Prolog has ...
0
votes
1answer
172 views

Trying to break elements which are lists in a list? [closed]

I am trying to write a program which make the following: ?- g([2,3, [22,[3],9] ,4,[5],99],X). X= [2,3,22,[3],9 ,4,5,99] so it searches for lists in the given list and replace it by their elements ...