Questions tagged [logic-programming]

Logic Programming is a programming paradigm based on first order logic.

Logic programming is a programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic programming language families include Prolog, answer set programming (ASP) and Datalog.

231 questions
0
votes
1 answer

Eclipse Constraint Programming - search/6

I'm having trouble understanding this documentation for the search/6 function in the eclipse constraint programming framework. I understand that the choice parameter basically affects the value ordering. It also seems like the selection method…
NickHalden
  • 1,469
  • 2
  • 20
  • 31
-1
votes
3 answers

Prolog XOR on elements of list

I am new in Prolog and I would like to apply XOR operation on elements of given list of length n. The predicate should return True if list contains some false elements in the first n-1 element or if last element is True. I have written the following…
-1
votes
1 answer

Adding dynamical amount of numbers

Take a given database, e.g. input(80). input(30). input(25). input(90). Compute the amount of inputs above 50 times 100, constrained to only taking /1 input. e.g. %compute(?integer). compute(I). I = 200 %seeing as input(80) and input(90) matches…
user3711518
  • 253
  • 1
  • 3
  • 14
-1
votes
1 answer

Using java in a predicative logic manner

Premises ('till point 7 let's pretend they're all true or reasonable or pertinent, please) (1) Java is free, has Swing and Javafx etc. (2) About Java there are a lot of docs, tutorials, etc. (3) I'd like to use it for kinda ontology - first order…
-1
votes
2 answers

Tutorial in using generatedInitialize()

Recently I had been told that prolog can create a graphical display, and told that by using the predicate generatedInitialize(). Can I ask for some tutorial for this? For example, how to display a rectangle? rectangle(2, 1, 2, 1). …
Chin
  • 593
  • 4
  • 15
  • 36
-2
votes
1 answer

Prolog combinatorics

Is there any way to generate all possibilities like 9 letters to be divided in 3 teams, like this: 1st team: 2 letters 2nd team: 3 letters 3rd team: 4 letters ? Example: find([a, b, c, d, e, f, g, h, i], T1, T2, T3). T1 = [a, b] T2 = [c, d,…
charqus
  • 469
  • 1
  • 5
  • 15
1 2 3
15
16