prolog
How Concurrent is Prolog?
I can\'t find any info on this online... I am al开发者_高级运维so new to Prolog... It seems to me that Prolog could be highly concurrent, perhaps trying many possibilities at once when trying to match[详细]
2023-03-23 16:21 分类:问答Using phrase_from_file to read a file's lines
I\'ve been trying to parse a file containing lines of integers using phrase_from_file with the grammar rules[详细]
2023-03-23 11:05 分类:问答How to create a list of numbers that add up to a specific number
I need some help writing a predicate in Prolog that, given a number as input, returns a list of lists with numbers that add up to it.[详细]
2023-03-23 09:32 分类:问答Filtering elements from a list based on conditions in prolog
I have a list of routes path(chicago,milwaukee). path(milwaukee,detroit). path(chicago,detroit). path(detroit, newyork).[详细]
2023-03-23 03:43 分类:问答Prolog - Merging Symbols (or Terms?)
(Pardon if my terminology is wrong... I\'m new to Prolog.) Suppose you have a series of symbols appearing in some unknown number of predicates.[详细]
2023-03-23 01:30 分类:问答prolog atom concat swi and yap prolog
input : run([p(X,Y,Z),h(Z,P,Q)],Out). code: :- ensure_loaded(library(lists)). run([X|Y],Out) :- X =.. [Fct|Args],[详细]
2023-03-22 23:10 分类:问答Prolog change from a list to a conjunction
suppose i have a list [p(X,Y) , h(n,U) , f(U,R)] i want to change to a conjunction and assign the conjunction to a variable[详细]
2023-03-22 18:54 分类:问答Fill list in SWI-Prolog
I am trying to fill a list of given length N with numbers 1,2,3,...,N. I thought this could be done this way:[详细]
2023-03-22 02:21 分类:问答Prolog Beginner - Is This a Bad Idea?
The application I\'m working on is a \"configurator\" of sorts. It\'s written in C# and I even wrote a rules engine to go with it. The idea is that there are a bunch of propositional logic statements,[详细]
2023-03-21 19:32 分类:问答Find all solutions to a predicate
I\'m trying to define a predicate开发者_运维技巧 that receives a single term with free variables and returns a list of mappings of those variables, so for example if the database is[详细]
2023-03-21 11:30 分类:问答