prolog
In Prolog why does this query return this particular result
?- assert(p(a)),assert(p(b)),p(X). X = a yes Wha开发者_如何学运维ts the effect of this query and why does it return this particular result?It is as if you queried the following source:[详细]
2023-03-20 15:18 分类:问答Allegrograph - Functors like RDF objects properties?
Using Allegrograph, Prolog functors are pretty awesome, but there is one downside. Let\'s say you define a functor that links two entities, for example parentOf which equals to \"!n:motherOf OR !n:f[详细]
2023-03-20 10:20 分类:问答How to write "a implies b or c" in Prolog
How would I write the following in Prolog?开发者_JAVA技巧 a -> b V c In English that would be a implies that b or c (or both)The clause[详细]
2023-03-20 07:51 分类:问答Programming in the large with prolog
I\'m trying to keep my Prolog code modular, and I was wondering if anyone had any advice as to how to do this. The way I was doing this with simple consults, but that is getting cumbersome as the numb[详细]
2023-03-20 03:31 分类:问答Exception thrown when trying to use JPL and YAP Prolog in OS X
I am trying to use JPL for the interaction of Java programs and YAP Prolog. In my java file, this line is throwing an exception:[详细]
2023-03-20 02:46 分类:问答Prolog - Term replacement, Term alteration in workflow graphs
In this link ( Meta Interpreter ) I believe to have found a nifty way of solving a problem I have to tackle, but since my prolog is very bad I\'d first ask if its even possible what I have in mind.[详细]
2023-03-19 22:16 分类:问答Lists conversion
I am newbie to prolog and I am trying to flatten a list which is like this: X = [[[0,0,1],[1,0,2]],[[0,1,3],[0,2,2]],[[0,3,5],[0,4,4]],[[0,5,4],[0,6,5]]][详细]
2023-03-19 19:27 分类:问答Prolog DCGs Multiple Features?
From what I understand, in Prolog you capture features while parsing 开发者_JS百科like so: foo(feature(X)) --> [X], bar.[详细]
2023-03-16 20:15 分类:问答PROLOG / All paths in a directed graph with loops
I\'ve got the following diagram given: Diagram here The first gateway/connector is an OR-gateway/connector (it has a circle in it). The gateway/connector with a \'x\' in it is a XOR-gateway/connecto[详细]
2023-03-16 01:31 分类:问答Find duplicates in the same row and column in a grid using Prolog
I am new to Prolog. I am writing Prolog code to solve a puzzle which requires me to find duplicates in a 2 dimensional grid of numbers.[详细]
2023-03-15 18:23 分类:问答