in visual prolog there is \"domains\" section in a prolog program in which you can define types. Is there any si开发者_开发问答milar thing in swi-prolog?
I am trying to make a predicate in order to validate if a given input represents a formula. I am allowed to use only to propositional atoms like p, q, r, s, t, etc.
heli_link_dis(h1,b1,800). heli_link_dis(h1,b3,1400). heli_link_dis(h1,b2,600). heli_link_dis(h1,b8,1200). 开发者_StackOverflow社区
How would you code a program in Prolog to print numbers from 1 to 10 using recursion? I\'ve tried the following but it doesn\'t work, can you tell me why?
I have a small question. I need to make a predicate that counts from a natural number to some other natural number. I have to implement a check too, that the second interval is bigger than the first o
I can easily write a predicate to get unique elements from a given list in Prolog e.g. no_doubles( [], [] ).
I currently have the need to execute prolog code in an application I am making. I am aware that Apple probably never would allow something like this in the App Store, but that is not the intention eit
As many programmers I studied Prolog in university, but only very little.I understand that Prolog and Datalog are closely related, but Datalog is simpler?Also, I believe that I read that Datalog does
I\'m given a list of arcs: arc(a,b). arc(b,c). arc(c,d). arc(d,b). arc(d,e). arc(e,e). arc(e,f). I\'ve written a set of clauses which will tell me if there\'s a path from node X to node Y.Loops may
I have a problem trying to get some code that returns unique answers to my query. For example, defining