Skip to main content

Questions tagged [prolog]

A logic programming language.

Filter by
Sorted by
Tagged with
2 votes
3 answers
859 views

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 ...
Qqwy's user avatar
  • 4,947
19 votes
5 answers
8k views

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" ...
ALXGTV's user avatar
  • 1,555
4 votes
2 answers
1k views

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 ...
alexw's user avatar
  • 339
15 votes
4 answers
3k views

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. ...
53777A's user avatar
  • 1,718
0 votes
1 answer
84 views

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 ...
user avatar
-1 votes
1 answer
716 views

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 ...
user avatar
19 votes
3 answers
7k views

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 ...
Onorio Catenacci's user avatar
1 vote
2 answers
4k views

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,...
Ronin Tom's user avatar
  • 111
0 votes
1 answer
1k views

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), rank_move(X,Y,...
Euphoric's user avatar
  • 38.2k
15 votes
5 answers
13k views

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 ...
Eduard Florinescu's user avatar
0 votes
1 answer
2k views

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 ...
Ben's user avatar
  • 101
9 votes
1 answer
367 views

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 ...
David Cowden's user avatar
  • 2,913
3 votes
2 answers
2k views

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 ...
Onorio Catenacci's user avatar
22 votes
4 answers
6k views

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 ...
John Donn's user avatar
  • 424
3 votes
1 answer
1k views

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 ...
user712092's user avatar
  • 1,412
26 votes
4 answers
35k views

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 ...
2rs2ts's user avatar
  • 515
3 votes
3 answers
770 views

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 ...
Joshua Aresty's user avatar
13 votes
3 answers
6k views

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) ...
Anto's user avatar
  • 11.2k
15 votes
9 answers
42k views

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 ...
Gursel Koca's user avatar