prolog
How to convert integer to decimal point in PROLOG?
How to convert integ开发者_高级运维er to decimal point in PROLOG? Example, imagine I assign Integer = 10[详细]
2023-04-07 10:00 分类:问答Prolog meta-predicates: applying a predicate to lists, passing a constant
Assume that you want a predicate that replaces Number1 with Number2 in a list. Of course it is trivial to write a recursive function for that, like:[详细]
2023-04-07 07:38 分类:问答Prolog: In a list, finding the element after a given element
I recently began 开发者_如何学Goprogramming in Prolog and am currently trying to create rules that find the element after a given element in a list. For example, I want find(2,X,[1,2,3,4]). to result[详细]
2023-04-07 02:08 分类:问答How do I replace vowels in a list with underscore?
I have a list of characters (basically a word) and I want to substitute the vowels in the word by underscore [\'_\'] and return a new list.[详细]
2023-04-07 01:15 分类:问答executing operation for each list element in swi-prolog and others
How do I do an operation for each element of a list, in order? Based on these two resources: http://www.swi-prolog.org/pldoc/doc/swi/library/lists.pl[详细]
2023-04-06 22:57 分类:问答SWI Prolog interpret/compile from command line
I am using Windows, and i want to interpret/compile a prolog file with cmd, is any method to do that?. The purpose is to make a shell to the interpreter/compiler prolog to a file like:[详细]
2023-04-06 22:50 分类:问答"Not equal" sign in Visual Prolog?
I can\'t find any documentation on "not equal" sign in Visual Prolog. Please provide the right solution of this problem:[详细]
2023-04-06 16:32 分类:问答Alternative for swi prologs clpq library for soving simplex
Excuse me if this is the wrong place to ask. I have been using SWI Prolog\'s clpq library to solve simplex. I find the syntax pretty simple and expressive. It looks like this:[详细]
2023-04-06 05:41 分类:问答Get random predicate from knowledge base. Prolog
For example I have: upred(mary, have, knife). upred(john, have,sword). upred(sam, have, bowl). upred(sword, is,long).[详细]
2023-04-06 00:59 分类:问答Prolog Comparisation problem
anyone have idea how to solve this problem counts the number of occurrences of an operator inside an expression. For instance, the query:[详细]
2023-04-05 18:55 分类:问答