Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
171 views

The phrase "pure monotonic Prolog" (sometimes written with a comma) is often used in discussion of the language, especially in discussion of how one ought to write code. How is the phrase ...
rotu's user avatar
  • 190
0 votes
0 answers
43 views

Is there any LPL that supports tracking multiple fact scenarios, identifying those that have become inconsistent, and performing what-if tests? All the versions of Prolog I have seen have only a ...
Mark Green's user avatar
  • 1,362
1 vote
0 answers
99 views

I am interested in expressing the number of occurrences of an element in a list as a relational goal in Clojure's core.logic library. (Note that this question is not a duplicate of clojure core.logic ...
oper0's user avatar
  • 11
1 vote
1 answer
76 views

I'm developing a Minizinc model and I ran into this issue: given this model enum req_type = {roads, rivers}; enum cities = {city1, city2, city3} array[cities, cities] of var bool: are_connected; % ...
Sassa's user avatar
  • 11
3 votes
0 answers
111 views

I have to find a logically consistent subset of multiple fact sets (databases). Is there a logic programming language with built-in facilities to do this? If not, are there logic programming languages ...
Paul Jurczak's user avatar
  • 8,630
4 votes
2 answers
492 views

I'm learning prolog, and I'm confused by the claim that prolog uses proof by contradiction: The resolution proof process makes use of a technique that is known as reduction to the absurd: suppose ...
Joseph Garvin's user avatar
0 votes
0 answers
44 views

What is the advantage of following value semantics while designing parallel programming?
Pankaj Chowdhury's user avatar
1 vote
0 answers
32 views

I use the next unification lib. from unification import * x1 = var('x1') unify((x1, 1), x1) # {~x1: (~x1, 1)} Can you please suggest how to eliminate such circular solutions (~x1 references to ...
Oleg Dats's user avatar
  • 4,143
0 votes
1 answer
954 views

I want to find atoms, within a pre-defined set of atoms, that are in all possible optimal solutions of an ASP problem. I'll explain what i want to do. I have an optimization problem where multiple ...
J.Doe's user avatar
  • 21
1 vote
0 answers
143 views

Prolog mixes logic (fallible) goals, and (infallible) processes like write/2 or assert/1. Is it possible to do so with Clojure's core.logic? For example: (pldb/with-db myFacts (l/run* [x y] ...
Hugolin Bergier's user avatar
7 votes
1 answer
328 views

I started to learn Prolog and I just read that the atom at the beginning of an structure is usually called functor. I'm also familiar with the term functor from Category Theory and Functional ...
Gabriel Santana Paredes's user avatar
0 votes
1 answer
150 views

I've been trying to solve the logic puzzle Lady or the Tiger in Alloy but got stuck. Right now I'm trying to solve the 4th puzzle which is on the 2nd day. It goes as following: There are a few rooms ...
Myrqz's user avatar
  • 51
2 votes
1 answer
236 views

For the multidirected graph below I am trying to write an program that visits all edges at least once. For instance, in the below graph I am looking for an outcome similar to "edge(1,2), edge(2,3)...
john_ny's user avatar
  • 183
1 vote
1 answer
465 views

I have written an ASP program with an optimization condition in the end. When I compile it, even though I get the correct result, in the summary I get a negative value for the optimization (i.e. -3). ...
john_ny's user avatar
  • 183
1 vote
1 answer
105 views

Consider this blog post where the author implements palindrome relation using reverso: (defn reverso [l r] (conde [(== l ()) (== r ())] [(fresh [la ld ldr] (conso la ld l) (...
tsuki's user avatar
  • 907
3 votes
2 answers
329 views

In the logic programming community, I have heard many people talk about "committed choice logic programming language", but I am not very clear about its definition. I searched the internet, ...
chansey's user avatar
  • 1,429
3 votes
1 answer
133 views

Here's an algorithm in Curry which takes n and matches on two strings within edit distance n of each other. lev :: Eq a => Int -> [a] -> [a] -> () lev n (a : b) (a : c) = lev n b c lev n ...
Wheat Wizard's user avatar
  • 4,226
1 vote
1 answer
362 views

Recently I am learning SMT solver. Although SMT solver is a new concept to me, it reminds me of logic programming, e.g. Prolog and minikanren. So I tried a classic example of logic programming in SMT ...
chansey's user avatar
  • 1,429
1 vote
1 answer
546 views

Suppose I have a the following file foo.lp: foo(x). Now when I run gringo -t -c x=1 foo.lp I obviously get: foo(1). Now I want to know how to achieve the same behavior as the -c command line option ...
user1747134's user avatar
  • 2,502
1 vote
1 answer
657 views

Adding the following rule to my code results in an error message (info: operation undefined (Max-Min)): rank_difference(Room, Deck, Diff) :- played(Room, Deck), Min = #min {Rank: seat(Player, ...
rudolfovic's user avatar
  • 3,316
0 votes
1 answer
317 views

Right now I have a single choice predicate that defines my search space. #const nRounds = 3. #const nPlayers = 17. #const nSeats = nRounds * nPlayers. #const nRooms = 3. #const nDecks = 6. nSeats { ...
rudolfovic's user avatar
  • 3,316
2 votes
2 answers
776 views

I am trying to use clingo to generate tournament player-room allocations: player(1..20). room(1..4). played(1..20, 0). rank(1..20, 1). played(1..20, 1..20, 0). 0 { used_room(R) } 1 :- room(R). 3 {...
rudolfovic's user avatar
  • 3,316
0 votes
1 answer
486 views

I am testing some programs involving arithmetics in Clingo 5.0.0 and I don't understand why the below program is unsatisfiable: #const v = 1. a(object1). a(object2). b(object3). value(object1,object2,...
Olivier's user avatar
  • 33
1 vote
2 answers
120 views

I'm looking for research, algorithms or even terminology for this area of research that take a Prolog program and a query I want to be true and attempt to find the facts that would need to be asserted ...
Eric Zinda's user avatar
2 votes
1 answer
311 views

I have come across the following puzzle and couldn't formulate a solution in Picat: You will generate 5-digit numbers, where each digit is in 1..5 and different from the others, with the constraint ...
mlg556's user avatar
  • 419

1
2 3 4 5