chunk_id
large_stringlengths
9
11
question_id
large_stringlengths
6
8
language
large_stringclasses
1 value
chunk_index
int64
0
4
chunk_text
large_stringlengths
115
2.62k
sparse_text
large_stringlengths
111
4.37k
dense_vector
listlengths
3.58k
3.58k
sparse_indices
listlengths
9
217
sparse_values
listlengths
9
217
export_source
large_stringclasses
1 value
23815929_c0
23815929
prolog
0
Title: Converting integer elements of list to a decimal in prolog Problem title: Converting integer elements of list to a decimal in prolog Tags: prolog Problem: Converting integer elements of list to a decimal in prolog I would like to convert an integer list into a decimal number but am getting an instantiation error...
Converting integer elements of list to a decimal in prolog Converting integer elements of list to a decimal in prolog prolog Converting B-1 Converting integer elements of list to a decimal in prolog I would like to convert an integer list into a decimal number but am getting an instantiation error I cannot fix.Below is...
[ 0.00714111328125, -0.00408935546875, -0.00010061264038085938, 0.023193359375, 0.0025787353515625, 0.01226806640625, -0.0252685546875, 0.00518798828125, 0.0123291015625, -0.0120849609375, -0.00689697265625, -0.004913330078125, -0.0157470703125, 0.00775146484375, 0.008056640625, -0.00103...
[ 1657, 814, 1916, 892, 1505, 80854, 5303, 47, 10, 32380, 2749, 502, 4867, 335, 5759, 1884, 96760, 3934, 14012, 1284, 20949, 34648, 14, 18499, 87, 53418, 30022, 17336, 18151, 9790, 645, 2967, 3098, 83, 32354, 30646, 140909, 34475, 4358, 779...
[ 0.038787841796875, 0.1168212890625, 0.0111083984375, 0.14697265625, 0.1199951171875, 0.1383056640625, 0.20458984375, 0.0711669921875, 0.03314208984375, 0.2103271484375, 0.18212890625, 0.13232421875, 0.2027587890625, 0.074462890625, 0.0987548828125, 0.057586669921875, 0.1605224609375,...
embed
13608520_c0
13608520
prolog
0
Title: delete some elements from a list Problem title: delete some elements from a list Tags: prolog Problem: delete some elements from a list What I want to do is to delete part of a list specified in another list i.e. e.g. ?- deleteSome([1,4,3,3,2,2],[1,2,4],Z). Z = [3,3,2]. I first defined the following. No problem ...
delete some elements from a list delete some elements from a list prolog a delete some elements from a list What I want to do is to delete part of a list specified in another list i.e. e.g. I first defined the following. No problem there. Then, the following does not work as expected.
[ 0.01055908203125, 0.00848388671875, -0.0000762939453125, -0.0012969970703125, -0.02880859375, -0.00054931640625, -0.0107421875, 0.002288818359375, 0.0091552734375, -0.00225830078125, 0.0189208984375, 0.00909423828125, -0.0027923583984375, -0.014404296875, 0.004425048828125, 0.000602722...
[ 154109, 3060, 80854, 1295, 5303, 502, 4867, 3444, 54, 47, 2831, 111, 58735, 23, 15700, 61924, 25632, 959, 4488, 84751 ]
[ 0.204345703125, 0.0877685546875, 0.1806640625, 0.1370849609375, 0.176025390625, 0.11895751953125, 0.17822265625, 0.034698486328125, 0.0001207590103149414, 0.004913330078125, 0.0953369140625, 0.0452880859375, 0.11370849609375, 0.0254058837890625, 0.0355224609375, 0.11737060546875, 0.1...
embed
34891108_c0
34891108
prolog
0
Title: Prolog - get_code/1 without prompt Problem title: Prolog - get_code/1 without prompt Tags: input, prolog, prompt Problem: Prolog - get_code/1 without prompt If I try to input a character of input by calling get_code/1 like this, there is a prompt displayed. ?- get_code(C). |: a C = 97. This works as I would expe...
Prolog - get_code/1 without prompt Prolog - get_code/1 without prompt input prolog prompt Prolog get_code my_get_code prompt1 Prolog - get_code/1 without prompt If I try to input a character of input by calling get_code/1 like this, there is a prompt displayed. This works as I would expect, but I want to input characte...
[ -0.01263427734375, 0.0126953125, 0.011962890625, 0.00885009765625, 0.002227783203125, -0.0031280517578125, 0.0230712890625, 0.004913330078125, -0.005645751953125, -0.059326171875, 0.01190185546875, 0.0022125244140625, -0.04296875, 0.00909423828125, -0.001220703125, -0.00027656555175781...
[ 1250, 4867, 2046, 40899, 11583, 15490, 105876, 107730, 502, 759, 3794, 418, 9790, 62816, 111, 159029, 1884, 903, 44116, 43240, 41206, 3444, 124850, 188304, 29458, 11782, 79442, 11522, 27798, 3917 ]
[ 0.165771484375, 0.2476806640625, 0.1279296875, 0.2315673828125, 0.1455078125, 0.1126708984375, 0.2315673828125, 0.1727294921875, 0.105712890625, 0.0513916015625, 0.114013671875, 0.08856201171875, 0.0712890625, 0.1368408203125, 0.021392822265625, 0.108642578125, 0.02178955078125, 0....
embed
25427696_c0
25427696
prolog
0
Title: Display first 100 Integers in Prolog Problem title: Display first 100 Integers in Prolog Tags: prolog Problem: Display first 100 Integers in Prolog I am very new to prolog and I am trying to code a simple program which will display the first 100 integers. is_integer(0). is_integer(X) :- is_integer(Y), ( Y >= 100...
Display first 100 Integers in Prolog Display first 100 Integers in Prolog prolog Display Integers Prolog is_integer Display first 100 Integers in Prolog I am very new to prolog and I am trying to code a simple program which will display the first 100 integers. It works well but when we ask if 2.1 is an integer then it ...
[ -0.00119781494140625, -0.014404296875, 0.0103759765625, 0.0016021728515625, 0.0196533203125, 0.0281982421875, 0.00946044921875, -0.01373291015625, -0.0021514892578125, -0.033935546875, 0.006256103515625, 0.0025787353515625, -0.0147705078125, 0.01300048828125, 0.0260009765625, 0.0081176...
[ 90045, 5117, 805, 44401, 7, 23, 1250, 4867, 502, 83, 6191, 1505, 4552, 3525, 31577, 18151, 8781, 1528, 1221, 44116, 892, 26255, 43240, 5299, 26458, 2174, 34513, 156405, 9774, 17721, 757, 3444, 81113, 4734, 4358, 22936, 22362 ]
[ 0.1632080078125, 0.1522216796875, 0.2427978515625, 0.2236328125, 0.0428466796875, 0.079833984375, 0.1748046875, 0.2427978515625, 0.1298828125, 0.13671875, 0.1878662109375, 0.127197265625, 0.0258636474609375, 0.049102783203125, 0.042022705078125, 0.10101318359375, 0.06378173828125, ...
embed
27586406_c0
27586406
prolog
0
Title: How to compare lists length Prolog Problem title: How to compare lists length Prolog Tags: prolog Problem: How to compare lists length Prolog I'm new at Prolog and i was trying to solve some exercises and I found this one twice_as_long(L1,L2) that succeeds if the list L2 is twice as long as the list L1. Do NOT c...
How to compare lists length Prolog How to compare lists length Prolog prolog How Prolog twice_as_long _G328 _G331 _G334 _G337 How to compare lists length Prolog I'm new at Prolog and i was trying to solve some exercises and I found this one twice_as_long(L1,L2) that succeeds if the list L2 is twice as long as the list ...
[ -0.00113677978515625, 0.0260009765625, 0.00634765625, 0.01806640625, 0.0012664794921875, 0.01025390625, -0.004486083984375, 0.015380859375, 0.01708984375, -0.01263427734375, 0.020263671875, -0.000873565673828125, 0.01031494140625, 0.0284423828125, 0.00982666015625, 0.009521484375, 0....
[ 11249, 47, 69101, 5303, 7, 140909, 1250, 4867, 502, 186351, 162, 10617, 724, 363, 3882, 5016, 124618, 129176, 3525, 86869, 81979, 14037, 866, 418, 10461, 214493, 2174, 339, 304, 237, 4989, 86725, 6743, 5122, 22936 ]
[ 0.088134765625, 0.0673828125, 0.2127685546875, 0.250244140625, 0.1090087890625, 0.1966552734375, 0.1922607421875, 0.266845703125, 0.1502685546875, 0.1905517578125, 0.10205078125, 0.1475830078125, 0.0347900390625, 0.0762939453125, 0.1861572265625, 0.1712646484375, 0.1903076171875, 0...
embed
44229012_c0
44229012
prolog
0
Title: How can I write a procedure in prolog that tags each element in a list, associating a number with it Problem title: How can I write a procedure in prolog that tags each element in a list, associating a number with it Tags: prolog Problem: How can I write a procedure in prolog that tags each element in a list, as...
How can I write a procedure in prolog that tags each element in a list, associating a number with it How can I write a procedure in prolog that tags each element in a list, associating a number with it prolog How How can I write a procedure in prolog that tags each element in a list, associating a number with it The re...
[ 0.00299072265625, 0.0155029296875, -0.00299072265625, -0.0146484375, -0.00946044921875, 0.0147705078125, -0.01312255859375, 0.003387451171875, 0.01123046875, -0.06298828125, -0.003997802734375, 0.00469970703125, -0.0189208984375, -0.00396728515625, 0.004425048828125, 0.0001621246337890...
[ 11249, 831, 33022, 50491, 23, 502, 4867, 69141, 12638, 12830, 5303, 30699, 14012, 678, 87, 442, 1916, 16750, 7909, 839, 1193, 45646, 541, 142424, 25568, 363, 33636, 1250, 28484, 22936 ]
[ 0.049072265625, 0.051727294921875, 0.183349609375, 0.22509765625, 0.045989990234375, 0.1619873046875, 0.232421875, 0.221435546875, 0.058837890625, 0.1737060546875, 0.17724609375, 0.1685791015625, 0.1771240234375, 0.1121826171875, 0.01318359375, 0.00823974609375, 0.000885009765625, ...
embed
54650590_c0
54650590
prolog
0
Title: PROLOG program semantic and exercise Problem title: PROLOG program semantic and exercise Tags: prolog, logic Problem: PROLOG program semantic and exercise First of all I have a doubt about the semantic of a program , for example : length([],0). length([_|L],N):- length(L,N0), N is N0 + 1. The first instruction m...
PROLOG program semantic and exercise PROLOG program semantic and exercise prolog logic PROLOG PROLOG program semantic and exercise First of all I have a doubt about the semantic of a program , for example : The first instruction means the base case , or it has other meanings ? I have to write a prolog program that, giv...
[ 0.005279541015625, 0.037109375, -0.00177001953125, 0.0172119140625, -0.004638671875, 0.0291748046875, -0.0166015625, 0.01470947265625, 0.0125732421875, -0.03173828125, 0.00518798828125, -0.030029296875, -0.016357421875, 0.0233154296875, 0.008056640625, 0.00225830078125, 0.01879882812...
[ 10514, 47510, 1528, 484, 109109, 136, 81979, 502, 4867, 62775, 765, 92814, 111, 581, 5117, 188336, 26950, 3647, 7225, 442, 1556, 91084, 33022, 34475, 14012, 30646, 5303, 101935, 1295, 757, 107730, 190, 140992, 2389, 133063, 363, 80389, 29806,...
[ 0.1864013671875, 0.24609375, 0.223876953125, 0.17822265625, 0.1776123046875, 0.0045166015625, 0.1884765625, 0.174560546875, 0.239013671875, 0.167236328125, 0.008026123046875, 0.08935546875, 0.0234222412109375, 0.00927734375, 0.15087890625, 0.25927734375, 0.0899658203125, 0.16821289...
embed
43421538_c0
43421538
prolog
0
Title: Generate a list of different values with CLPFD Problem title: Generate a list of different values with CLPFD Tags: prolog, clpfd Problem: Generate a list of different values with CLPFD I am trying to generate all possible combinations of lists of three elements where all are distinct. I am using the CLPFD librar...
Generate a list of different values with CLPFD Generate a list of different values with CLPFD prolog clpfd Generate CLPFD all_distinct _7374 _7380 Generate a list of different values with CLPFD I am trying to generate all possible combinations of lists of three elements where all are distinct. I am using the CLPFD libr...
[ 0.0101318359375, -0.00054168701171875, -0.00616455078125, 0.001007080078125, -0.0021820068359375, -0.0029449462890625, 0.004302978515625, -0.0091552734375, 0.0126953125, -0.019775390625, -0.029052734375, -0.002471923828125, 0.023193359375, 0.0235595703125, -0.0034027099609375, 0.020019...
[ 155370, 5303, 12921, 142424, 678, 46323, 41265, 397, 502, 4867, 33139, 39557, 71, 67, 756, 46295, 38893, 18, 115252, 617, 13574, 4836, 31577, 139392, 7722, 162515, 17262, 80854, 117781, 35773, 61924, 77758, 77336, 25632, 44116, 892, 1505 ]
[ 0.1510009765625, 0.1671142578125, 0.1556396484375, 0.1619873046875, 0.040008544921875, 0.118896484375, 0.1663818359375, 0.2039794921875, 0.0843505859375, 0.15771484375, 0.0270843505859375, 0.08746337890625, 0.1287841796875, 0.0145721435546875, 0.114990234375, 0.045166015625, 0.122192...
embed
15456014_c0
15456014
prolog
0
Title: What does the "-" symbol mean in Prolog when dealing with lists? Problem title: What does the "-" symbol mean in Prolog when dealing with lists? Tags: dcg, difference-lists, prolog-cut, prolog Problem: What does the "-" symbol mean in Prolog when dealing with lists? I was reading the answer t...
What does the "-" symbol mean in Prolog when dealing with lists? What does the "-" symbol mean in Prolog when dealing with lists? dcg difference-lists prolog-cut prolog What Prolog X-X X-Y What does the "-" symbol mean in Prolog when dealing with lists? I was reading the answer to this question, The...
[ 0.02587890625, 0.00897216796875, 0.0047607421875, 0.0194091796875, -0.015869140625, 0.01806640625, 0.00017452239990234375, 0.021728515625, 0.0240478515625, 0.01165771484375, -0.002777099609375, -0.01409912109375, 0.00015163421630859375, -0.0186767578125, -0.0191650390625, 0.00161743164...
[ 4865, 41502, 9, 1230, 26582, 29459, 1250, 4867, 184017, 5303, 7, 74, 23, 177, 60212, 6562, 502, 19774, 1193, 1542, 1723, 70, 58, 678, 18151, 6002, 86531, 32036, 154663, 28219, 19714, 2063, 14602, 38969, 29458 ]
[ 0.034759521484375, 0.106689453125, 0.204345703125, 0.0819091796875, 0.2276611328125, 0.1212158203125, 0.1634521484375, 0.2281494140625, 0.074951171875, 0.1971435546875, 0.01287841796875, 0.045562744140625, 0.03045654296875, 0.023651123046875, 0.0987548828125, 0.122314453125, 0.067687...
embed
50083705_c0
50083705
prolog
0
Title: Print sequence of numbers in Prolog Problem title: Print sequence of numbers in Prolog Tags: prolog Problem: Print sequence of numbers in Prolog I wanted to create a sequence of numbers in Prolog. So, if the function is print(4,3,10) , it will print 4 7 10 13 16 19 22 25 28 31 . The second parameter determines t...
Print sequence of numbers in Prolog Print sequence of numbers in Prolog prolog Print Prolog C-1 Print sequence of numbers in Prolog I wanted to create a sequence of numbers in Prolog. So, if the function is print(4,3,10) , it will print 4 7 10 13 16 19 22 25 28 31 . The second parameter determines the next number and t...
[ 0.00604248046875, 0.0262451171875, -0.005615234375, 0.0263671875, -0.0052490234375, 0.01324462890625, -0.02490234375, 0.004364013671875, -0.0030670166015625, -0.000885009765625, -0.00396728515625, -0.00897216796875, -0.0196533203125, 0.0205078125, 0.0234375, -0.006805419921875, 0.003...
[ 39754, 40, 944, 3956, 111, 101935, 23, 1250, 4867, 502, 313, 5759, 36663, 28282, 32354, 28412, 105801, 363, 50258, 1221, 201, 361, 209, 702, 611, 953, 1039, 714, 1372, 1936, 17932, 171859, 83324, 11737, 14012, 4568, 7440, 5608, 7279, 1815...
[ 0.220458984375, 0.113525390625, 0.1820068359375, 0.15087890625, 0.01385498046875, 0.197265625, 0.049346923828125, 0.1876220703125, 0.2626953125, 0.14208984375, 0.04412841796875, 0.135986328125, 0.060699462890625, 0.1099853515625, 0.1448974609375, 0.2315673828125, 0.058349609375, 0....
embed
58780456_c0
58780456
prolog
0
Title: Print elements of a list but handle last element differently Problem title: Print elements of a list but handle last element differently Tags: prolog Problem: Print elements of a list but handle last element differently I have written a predicate that prints out each element in the list except the last. The last...
Print elements of a list but handle last element differently Print elements of a list but handle last element differently prolog Print LAST write_data Rest Print elements of a list but handle last element differently I have written a predicate that prints out each element in the list except the last. The last element s...
[ -0.0010528564453125, 0.02392578125, -0.01092529296875, -0.006744384765625, -0.0040283203125, 0.018798828125, 0.0069580078125, -0.00001895427703857422, 0.01153564453125, -0.005340576171875, 0.003662109375, -0.0205078125, 0.0009613037109375, 0.006378173828125, -0.00115966796875, 0.016967...
[ 39754, 80854, 111, 5303, 1284, 34831, 4568, 12830, 12921, 538, 502, 4867, 172905, 33022, 10135, 49756, 59121, 1653, 2063, 67, 28412, 1810, 12638, 40494, 5608, 186, 71, 38, 64457, 765, 11522, 3917, 54, 15490, 59226 ]
[ 0.2406005859375, 0.2166748046875, 0.0777587890625, 0.2020263671875, 0.1478271484375, 0.2169189453125, 0.254150390625, 0.20166015625, 0.2227783203125, 0.002716064453125, 0.13916015625, 0.1761474609375, 0.256103515625, 0.130859375, 0.119873046875, 0.18603515625, 0.1097412109375, 0.13...
embed
61601706_c0
61601706
prolog
0
Title: Prolog truth set Problem title: Prolog truth set Tags: prolog Problem: Prolog truth set A Boolean expression is of the form – in Prolog List [and, a, b, c, d] or [and, [or, b, c], [not, a], [and, c, d]] – or any combination thereof – a,b,c,d are propositions. Truth set is given in the form – in Prolog List [[a, ...
Prolog truth set Prolog truth set prolog Prolog Prolog truth set A Boolean expression is of the form – in Prolog List [and, a, b, c, d] or [and, [or, b, c], [not, a], [and, c, d]] – or any combination thereof – a,b,c,d are propositions. Truth set is given in the form – in Prolog List [[a, t], [b, f], [c, t], [d, t]] wh...
[ 0.0238037109375, 0.0211181640625, 0.03662109375, -0.006439208984375, -0.00897216796875, 0.017578125, -0.00506591796875, -0.0001068115234375, 0.0140380859375, 0.01251220703125, -0.0179443359375, 0.017333984375, 0.005950927734375, 0.004638671875, -0.0068359375, 0.01043701171875, 0.0093...
[ 1250, 4867, 85027, 5423, 502, 73783, 34677, 125195, 111, 3173, 23, 32036, 2940, 876, 501, 104, 707, 748, 10869, 10, 162515, 275, 238, 71, 621, 89261, 184431, 34475, 808, 1238, 29568, 98320, 11249, 831, 87, 33022, 1653, 2063, 67, 28, 140...
[ 0.1754150390625, 0.270263671875, 0.2010498046875, 0.2415771484375, 0.113037109375, 0.16552734375, 0.263427734375, 0.2371826171875, 0.041229248046875, 0.15185546875, 0.0799560546875, 0.166015625, 0.081787109375, 0.10260009765625, 0.07135009765625, 0.1104736328125, 0.0546875, 0.14831...
embed
20462712_c0
20462712
prolog
0
Title: Explain what this Prolog program does? Problem title: Explain what this Prolog program does? Tags: prolog Problem: Explain what this Prolog program does? I am working on Prolog and I came across the below program. When I execute this program with a query for example: mysterious([2,3,4,5,6,7,8],L) , it gives me t...
Explain what this Prolog program does? Explain what this Prolog program does? prolog Explain Prolog Res Res1 Explain what this Prolog program does? I am working on Prolog and I came across the below program. When I execute this program with a query for example: mysterious([2,3,4,5,6,7,8],L) , it gives me the answer 20....
[ 0.0081787109375, -0.00408935546875, -0.00848388671875, -0.004608154296875, 0.000797271728515625, 0.0269775390625, 0.01318359375, 0.01409912109375, 0.038330078125, -0.0220947265625, 0.0181884765625, -0.02294921875, -0.0030364990234375, -0.015869140625, 0.01123046875, 0.00927734375, 0....
[ 60075, 16442, 2367, 903, 1250, 4867, 1528, 14602, 502, 9624, 418, 20697, 36880, 35064, 71924, 678, 41, 1294, 27781, 759, 824, 93905, 304, 82449, 104629, 136005, 866, 76199, 163, 35166, 7085, 2301, 18, 28219, 86608, 20949, 16750, 4358, 18151...
[ 0.0986328125, 0.19287109375, 0.10491943359375, 0.1026611328125, 0.193603515625, 0.27880859375, 0.208740234375, 0.141357421875, 0.1163330078125, 0.181396484375, 0.1219482421875, 0.05303955078125, 0.0762939453125, 0.1136474609375, 0.1383056640625, 0.007598876953125, 0.130859375, 0.05...
embed
67848952_c0
67848952
prolog
0
Title: Matrix multiplication using Prolog arrays Problem title: Matrix multiplication using Prolog arrays Tags: number-crunching, prolog Problem: Matrix multiplication using Prolog arrays It might not be evident, but Prolog also offers arrays out of the box. A Prolog compound has a functor and a number of arguments. Th...
Matrix multiplication using Prolog arrays Matrix multiplication using Prolog arrays number-crunching prolog Prolog Matrix Matrix multiplication using Prolog arrays It might not be evident, but Prolog also offers arrays out of the box. A Prolog compound has a functor and a number of arguments. This means we could repres...
[ 0.000835418701171875, 0.004974365234375, 0.0081787109375, 0.01611328125, -0.0050048828125, -0.00140380859375, -0.028564453125, -0.006195068359375, 0.0111083984375, -0.031494140625, -0.0245361328125, 0.01165771484375, -0.0281982421875, -0.0220947265625, -0.0196533203125, -0.019653320312...
[ 194234, 127664, 1363, 17368, 1250, 4867, 10298, 4778, 14012, 47913, 19, 59207, 502, 13648, 36875, 2843, 64600, 1810, 111, 16530, 217773, 1556, 7477, 18770, 136, 10750, 26950, 5809, 33636, 53, 853, 133266, 5303, 25632, 92940, 2806, 4271, 56, ...
[ 0.2427978515625, 0.243896484375, 0.06280517578125, 0.09259033203125, 0.2052001953125, 0.27099609375, 0.1964111328125, 0.1312255859375, 0.08233642578125, 0.077880859375, 0.0791015625, 0.03973388671875, 0.153564453125, 0.045166015625, 0.06634521484375, 0.003936767578125, 0.116821289062...
embed
16059485_c0
16059485
prolog
0
Title: Prolog - Creating a list by iterating facts Problem title: Prolog - Creating a list by iterating facts Tags: list, prolog Problem: Prolog - Creating a list by iterating facts I am new in Prolog and wanted to learn it. I have been trying to create a list while iterating facts but list that was created one step ba...
Prolog - Creating a list by iterating facts Prolog - Creating a list by iterating facts list prolog Prolog Creating Prolog - Creating a list by iterating facts I am new in Prolog and wanted to learn it. I have been trying to create a list while iterating facts but list that was created one step back refreshing and lost...
[ 0.0299072265625, -0.0026397705078125, 0.002227783203125, 0.0220947265625, 0.0038604736328125, -0.00933837890625, 0.0034332275390625, 0.0186767578125, 0.0208740234375, -0.039306640625, 0.00177764892578125, -0.005218505859375, -0.020263671875, -0.01226806640625, -0.0096435546875, 0.01367...
[ 1250, 4867, 56781, 1916, 5303, 390, 17, 67, 98767, 15824, 502, 7, 3525, 36663, 30698, 31577, 28282, 10, 12960, 1284, 75935, 1632, 29954, 4420, 210651, 136, 72856, 2053, 11249, 831, 13695, 15190, 80854, 47, 37842, 144851, 388, 214, 41206, ...
[ 0.173095703125, 0.2626953125, 0.154296875, 0.04833984375, 0.2183837890625, 0.0880126953125, 0.0953369140625, 0.199462890625, 0.18115234375, 0.1744384765625, 0.1007080078125, 0.013336181640625, 0.060516357421875, 0.01025390625, 0.053436279296875, 0.0682373046875, 0.153564453125, 0.0...
embed
28292465_c0
28292465
prolog
0
Title: Transition Issue Unknown Cause Problem title: Transition Issue Unknown Cause Tags: prolog Problem: Transition Issue Unknown Cause I am trying to create a NFA to describe it with states which accepts "y|x*" This is what I have tried so far: acpt(State, [A]). acpt(State, []) :- acpt(State). acpt(State, InputList) ...
Transition Issue Unknown Cause Transition Issue Unknown Cause prolog Transition Issue Unknown Cause State InputList Transition Issue Unknown Cause I am trying to create a NFA to describe it with states which accepts "y|x*" This is what I have tried so far: When given the input I'm looking for it to return t When given ...
[ 0.01239013671875, -0.0081787109375, 0.0123291015625, 0.0157470703125, -0.01953125, -0.005035400390625, -0.000002428889274597168, -0.003692626953125, 0.007537841796875, -0.0225830078125, 0.0203857421875, 0.01141357421875, -0.014892578125, 0.025634765625, 0.005096435546875, -0.0220947265...
[ 162774, 1830, 223317, 992, 69723, 19, 2041, 4032, 502, 4867, 22836, 360, 7077, 154663, 31577, 28282, 541, 14676, 98363, 678, 117249, 26946, 7, 53, 58745, 425, 1639, 37842, 2060, 14847, 34475, 70, 107730, 16487, 100, 442, 30646, 808, 5608, ...
[ 0.20947265625, 0.1102294921875, 0.2113037109375, 0.06707763671875, 0.219970703125, 0.02740478515625, 0.1181640625, 0.0908203125, 0.12255859375, 0.1854248046875, 0.15966796875, 0.06982421875, 0.131591796875, 0.1922607421875, 0.06939697265625, 0.138916015625, 0.0828857421875, 0.22644...
embed
54960421_c0
54960421
prolog
0
Title: Finding prime factors in Prolog Problem title: Finding prime factors in Prolog Tags: primes, prolog Problem: Finding prime factors in Prolog prime_factors(N, [_:_]) :- prime_factors(N, [_:_], 2). prime_factors(N, [_:_], D) :- N mod D == 0, N1 is N div D, prime_factors(N1, [_:D], D). prime_factors(N, [_:_], D) :-...
Finding prime factors in Prolog Finding prime factors in Prolog primes prolog Finding Prolog prime_factors _:_ _:D Finding prime factors in Prolog This is my proposed solution to find the prime factors of an input N. When I try to run it I am getting an error about such a predicate/2 not existing - is my syntax somehow...
[ -0.0087890625, 0.0087890625, 0.01141357421875, -0.006622314453125, 0.00823974609375, -0.00034332275390625, -0.009765625, -0.0322265625, -0.00174713134765625, -0.03076171875, 0.015869140625, -0.018798828125, -0.0042724609375, -0.0125732421875, -0.005859375, 0.003997802734375, -0.00020...
[ 26040, 20809, 120103, 1250, 4867, 23, 502, 214, 144810, 7, 397, 26171, 29806, 7413, 107730, 541, 9790, 11675, 18499, 6044, 1653, 2063, 67, 12477, 959, 144573, 6002, 86531, 44691, 65042, 18113 ]
[ 0.106689453125, 0.204345703125, 0.236572265625, 0.170166015625, 0.250244140625, 0.01171875, 0.1270751953125, 0.0013427734375, 0.2349853515625, 0.06109619140625, 0.05810546875, 0.06903076171875, 0.0523681640625, 0.10498046875, 0.143798828125, 0.048492431640625, 0.03521728515625, 0.0...
embed
65279677_c0
65279677
prolog
0
Title: Finding the position of an element within a nested list in Prolog Problem title: Finding the position of an element within a nested list in Prolog Tags: prolog, list Problem: Finding the position of an element within a nested list in Prolog For example: ?- position([[b,c,f],[a,d,g],[h,e]],c,P) P=1 ?- position([[...
Finding the position of an element within a nested list in Prolog Finding the position of an element within a nested list in Prolog prolog list Finding Prolog Finding the position of an element within a nested list in Prolog For example: I've been looking at the nth0/3 predicate but I'm not sure if that is the right wa...
[ -0.01019287109375, 0.021728515625, 0.00933837890625, 0.00179290771484375, -0.004669189453125, 0.031494140625, 0.0172119140625, 0.00421142578125, 0.0030517578125, -0.0174560546875, 0.00732421875, -0.0218505859375, -0.000583648681640625, 0.0089111328125, -0.00811767578125, 0.007415771484...
[ 26040, 19069, 12830, 28032, 8512, 71, 5303, 1250, 4867, 502, 23, 16487, 653, 927, 2389, 18113, 1653, 2063, 67, 9077, 7108, 1672, 6275, 1314, 77947, 31577, 7413, 12638 ]
[ 0.085693359375, 0.2115478515625, 0.189453125, 0.143310546875, 0.2154541015625, 0.112060546875, 0.1590576171875, 0.1573486328125, 0.234375, 0.1275634765625, 0.003814697265625, 0.008026123046875, 0.0182647705078125, 0.1136474609375, 0.094970703125, 0.163330078125, 0.12158203125, 0.12...
embed
50069875_c0
50069875
prolog
0
Title: Associative Lists in Prolog Problem title: Associative Lists in Prolog Tags: dictionary, list, predicate, associative, prolog Problem: Associative Lists in Prolog my task is to implement maps with lists. We defined associative lists as follows: [] is the list, k is a key, v is a value and a is an associative lis...
Associative Lists in Prolog Associative Lists in Prolog dictionary list predicate associative prolog Associative Lists Prolog Associative Lists in Prolog my task is to implement maps with lists. We defined associative lists as follows: [] is the list, k is a key, v is a value and a is an associative list, then [[k, v] ...
[ 0.0030059814453125, -0.005401611328125, -0.0037689208984375, -0.00250244140625, -0.00799560546875, 0.006561279296875, -0.0014801025390625, 0.006439208984375, -0.0002803802490234375, -0.004913330078125, 0.0208740234375, 0.0189208984375, -0.0225830078125, 0.0146484375, 0.01324462890625, ...
[ 159594, 4935, 32036, 1250, 4867, 23, 10763, 5303, 1653, 2063, 67, 166027, 272, 502, 66211, 29479, 22288, 678, 61924, 83, 472, 22799, 81, 34292, 10, 92, 33022, 12765, 2174, 34475, 10750, 566, 6183, 224, 109637, 15673, 22008, 831, 4358, 163...
[ 0.1907958984375, 0.15087890625, 0.2440185546875, 0.1466064453125, 0.228759765625, 0.1097412109375, 0.06634521484375, 0.22265625, 0.1527099609375, 0.181396484375, 0.099853515625, 0.1888427734375, 0.095703125, 0.1109619140625, 0.08929443359375, 0.0980224609375, 0.1182861328125, 0.030...
embed
53584440_c0
53584440
prolog
0
Title: Compare two predicates in Prolog Problem title: Compare two predicates in Prolog Tags: prolog Problem: Compare two predicates in Prolog First of all, thank you for your help. I'm studying Prolog right now, and I found a problem. It might be a stupid problem, but I still not figure it out. In Prolog, go(1) = go(1...
Compare two predicates in Prolog Compare two predicates in Prolog prolog Compare Prolog Call Fail Compare two predicates in Prolog First of all, thank you for your help. I'm studying Prolog right now, and I found a problem. It might be a stupid problem, but I still not figure it out. In Prolog, will return true. will r...
[ 0.0184326171875, -0.00125885009765625, 0.01116943359375, 0.00823974609375, 0.0007476806640625, -0.004852294921875, 0.024169921875, -0.004486083984375, -0.005126953125, -0.00049591064453125, 0.014404296875, 0.01171875, -0.01324462890625, -0.00002002716064453125, 0.0162353515625, -0.0030...
[ 113307, 13, 6626, 1653, 2063, 1636, 1250, 4867, 502, 26265, 190355, 23, 4358, 2967, 110833, 26366, 360, 1221, 30646, 29568, 5, 98320, 9790, 28960 ]
[ 0.16552734375, 0.006378173828125, 0.0889892578125, 0.1690673828125, 0.208740234375, 0.031585693359375, 0.1473388671875, 0.234130859375, 0.1029052734375, 0.1458740234375, 0.1807861328125, 0.002593994140625, 0.004364013671875, 0.04833984375, 0.0406494140625, 0.0047607421875, 0.00247192...
embed
16325106_c0
16325106
prolog
0
Title: Calling exe program with arguments from Prolog code in Windows Problem title: Calling exe program with arguments from Prolog code in Windows Tags: swi-prolog, prolog, windows-7 Problem: Calling exe program with arguments from Prolog code in Windows How can I run an exe program from my Prolog code and then use th...
Calling exe program with arguments from Prolog code in Windows Calling exe program with arguments from Prolog code in Windows swi-prolog prolog windows-7 Prolog Calling Windows windows-7 Calling exe program with arguments from Prolog code in Windows How can I run an exe program from my Prolog code and then use the outp...
[ 0.0299072265625, 0.0126953125, -0.0057373046875, 0.0255126953125, -0.0203857421875, 0.02783203125, 0.003936767578125, -0.01397705078125, -0.008056640625, -0.0439453125, 0.004241943359375, 0.0306396484375, -0.01025390625, -0.00396728515625, 0.0189208984375, 0.000881195068359375, 0.014...
[ 26265, 214, 97733, 1528, 678, 10750, 7, 1295, 1250, 4867, 18151, 23, 3773, 91, 2452, 3454, 502, 54825, 16709, 11249, 831, 87, 11675, 142, 759, 7068, 4527, 140992, 143321, 1653, 2063, 181653, 209052, 31577, 17203, 159, 38969, 361, 28541, 2...
[ 0.1771240234375, 0.08477783203125, 0.25927734375, 0.20849609375, 0.09210205078125, 0.249755859375, 0.0855712890625, 0.1422119140625, 0.18896484375, 0.247802734375, 0.214599609375, 0.07275390625, 0.1826171875, 0.024871826171875, 0.186279296875, 0.1494140625, 0.1319580078125, 0.12548...
embed
14014602_c0
14014602
prolog
0
Title: read file and construct facts in prolog Problem title: read file and construct facts in prolog Tags: prolog Problem: read file and construct facts in prolog I would like to construct a mechanism that constructs different facts depending from txt file, imported in prolog. I already have found some examples where ...
read file and construct facts in prolog read file and construct facts in prolog prolog read file and construct facts in prolog I would like to construct a mechanism that constructs different facts depending from txt file, imported in prolog. I already have found some examples where they directly assert the line that wa...
[ 0.013427734375, -0.0179443359375, -0.008544921875, 0.023681640625, -0.0159912109375, 0.00970458984375, -0.0030059814453125, 0.00994873046875, -0.0079345703125, -0.034423828125, -0.00250244140625, 0.00311279296875, -0.0162353515625, -0.0267333984375, 0.0130615234375, 0.026611328125, 0...
[ 12301, 11435, 136, 64549, 15824, 7, 23, 502, 4867, 1884, 191619, 12921, 96819, 1295, 124326, 76242, 27781, 105237, 237, 33657, 13315, 27198, 2053, 8108, 10, 16865, 3687, 7722, 35509, 26582, 107730 ]
[ 0.1680908203125, 0.1849365234375, 0.0697021484375, 0.248046875, 0.2330322265625, 0.090576171875, 0.0711669921875, 0.143798828125, 0.2066650390625, 0.041229248046875, 0.1619873046875, 0.0838623046875, 0.0958251953125, 0.018035888671875, 0.19140625, 0.1422119140625, 0.07440185546875, ...
embed
36302656_c0
36302656
prolog
0
Title: Why does this simple Prolog example cause a stack overflow? Problem title: Why does this simple Prolog example cause a stack overflow? Tags: prolog, stack-overflow Problem: Why does this simple Prolog example cause a stack overflow? I'm learning Prolog. I wrote several simple facts and rules: heavier(X,Y) :- lig...
Why does this simple Prolog example cause a stack overflow? Why does this simple Prolog example cause a stack overflow? prolog stack-overflow Why Prolog Fatal Error LOCALSZ Why does this simple Prolog example cause a stack overflow? I'm learning Prolog. I wrote several simple facts and rules: Then I asked this query: A...
[ 0.018798828125, 0.0157470703125, -0.0128173828125, 0.025146484375, -0.005157470703125, -0.01031494140625, -0.0174560546875, 0.013916015625, 0.0128173828125, -0.043212890625, 0.02099609375, 0.00146484375, 0.0034637451171875, -0.008544921875, 0.052978515625, -0.001922607421875, 0.01623...
[ 44084, 14602, 903, 8781, 1250, 4867, 27781, 22304, 177261, 645, 118664, 10, 502, 5465, 3036, 1803, 212059, 230588, 19934, 52080, 15824, 91736, 41, 25632, 18499, 4865, 44691, 678, 1528 ]
[ 0.119140625, 0.0506591796875, 0.06671142578125, 0.1326904296875, 0.1806640625, 0.278564453125, 0.1849365234375, 0.1424560546875, 0.1746826171875, 0.12646484375, 0.286865234375, 0.0509033203125, 0.1187744140625, 0.1043701171875, 0.1241455078125, 0.09326171875, 0.180908203125, 0.1690...
embed
68356010_c0
68356010
prolog
0
Title: Prolog. I can't mix two lists Problem title: Prolog. I can't mix two lists Tags: list, prolog Problem: Prolog. I can't mix two lists I want to mix two lists into one. For example, [1,3,5] and [2,3,9] would yield [1,2,3,5,9] . I tried this: mezclar( L1, L2, L3 ):- L1 = [Cab|Cola] , L3 = [Cab,Cola2] , me...
Prolog. I can't mix two lists Prolog. I can't mix two lists list prolog Prolog Cab Cola Cola2 Prolog. I can't mix two lists I want to mix two lists into one. For example, [1,3,5] and [2,3,9] would yield [1,2,3,5,9] . I tried this: But I have 2 problems. The first problem are duplicated numbers The second one ...
[ -0.00421142578125, 0.0179443359375, 0.0185546875, 0.0045166015625, -0.004119873046875, 0.01446533203125, -0.01513671875, 0.01495361328125, 0.01904296875, -0.0211181640625, 0.01202392578125, 0.0106201171875, 0.00848388671875, 0.0084228515625, 0.00124359130859375, 0.005279541015625, -0...
[ 1250, 4867, 87, 831, 3768, 18, 17664, 6626, 5303, 7, 502, 30438, 121154, 304, 3444, 3934, 1632, 27781, 92714, 136, 125157, 2806, 11180, 19388, 155761, 166213, 37842, 116, 44402, 2967, 171763, 3674, 101935, 118620, 13319, 71924 ]
[ 0.1923828125, 0.256591796875, 0.000579833984375, 0.12158203125, 0.033447265625, 0.08917236328125, 0.26123046875, 0.1602783203125, 0.239013671875, 0.0947265625, 0.1588134765625, 0.1707763671875, 0.16259765625, 0.1253662109375, 0.08251953125, 0.108154296875, 0.107666015625, 0.0169219...
embed
53262099_c0
53262099
prolog
0
Title: SWI-prolog - how to clear terminal screen with a keyboard shortcut or global predicate? Problem title: SWI-prolog - how to clear terminal screen with a keyboard shortcut or global predicate? Tags: swi-prolog, prolog Problem: SWI-prolog - how to clear terminal screen with a keyboard shortcut or global predicate? ...
SWI-prolog - how to clear terminal screen with a keyboard shortcut or global predicate? SWI-prolog - how to clear terminal screen with a keyboard shortcut or global predicate? swi-prolog prolog SWI-prolog SWI-prolog - how to clear terminal screen with a keyboard shortcut or global predicate? I want to clear screen insi...
[ 0.00823974609375, 0.0225830078125, -0.0020904541015625, -0.007659912109375, -0.025146484375, -0.0030975341796875, 0.02490234375, 0.003448486328125, -0.0155029296875, -0.00060272216796875, -0.00010061264038085938, 0.003326416015625, -0.003173828125, -0.0146484375, 0.0172119140625, 0.002...
[ 159, 38969, 9, 3454, 4867, 3642, 34735, 33949, 49119, 678, 149186, 16610, 19774, 7964, 1653, 2063, 67, 47, 91, 2452, 502, 707, 3444, 46132, 130250, 17368, 75101, 1250, 19714, 3871, 43240, 11522, 1544, 56, 3917 ]
[ 0.044464111328125, 0.1962890625, 0.0284423828125, 0.1142578125, 0.179443359375, 0.04803466796875, 0.2235107421875, 0.2291259765625, 0.171142578125, 0.0316162109375, 0.2066650390625, 0.121826171875, 0.13671875, 0.113037109375, 0.130615234375, 0.1650390625, 0.016082763671875, 0.04452...
embed
2562784_c0
2562784
prolog
0
Title: Prolog remove function - almost working Problem title: Prolog remove function - almost working Tags: prolog Problem: Prolog remove function - almost working The following predicate is remove(L,X,R) , where L is a list, X is an element to remove from the list. The code returns the correct list, however it always ...
Prolog remove function - almost working Prolog remove function - almost working prolog Prolog Prolog remove function - almost working The following predicate is remove(L,X,R) , where L is a list, X is an element to remove from the list. The code returns the correct list, however it always also returns false afterwards....
[ 0.00885009765625, 0.032470703125, 0.01007080078125, 0.0037384033203125, -0.0230712890625, 0.00946044921875, -0.007232666015625, -0.00127410888671875, 0.00186920166015625, -0.003692626953125, 0.0147705078125, 0.005828857421875, -0.0079345703125, -0.0074462890625, 0.00518798828125, 0.013...
[ 1250, 4867, 87388, 32354, 39555, 20697, 502, 25632, 1653, 2063, 67, 866, 1542, 1052, 339, 5303, 1193, 12830, 47, 1295, 18151, 30646, 26785, 49903, 11343, 2843, 98320, 7103, 19364, 6626, 91736, 831, 190659, 20271, 11675, 6032, 947, 33209, 41...
[ 0.172607421875, 0.2249755859375, 0.247314453125, 0.1761474609375, 0.236083984375, 0.157470703125, 0.1290283203125, 0.0498046875, 0.1529541015625, 0.166015625, 0.06402587890625, 0.1033935546875, 0.1163330078125, 0.1497802734375, 0.113037109375, 0.1297607421875, 0.120849609375, 0.111...
embed
11820309_c0
11820309
prolog
0
Title: Prolog four of a kind poker Problem title: Prolog four of a kind poker Tags: prolog Problem: Prolog four of a kind poker I am trying to code a poker game using Prolog. I understand how to code the royal flush but my four of a kind code won't work. I have the following code: four_of_a_kind(R):- member(card(V, T1)...
Prolog four of a kind poker Prolog four of a kind poker prolog Prolog four_of_a_kind Prolog four of a kind poker I am trying to code a poker game using Prolog. I understand how to code the royal flush but my four of a kind code won't work. I have the following code: where V is the rank which I want to be the same and T...
[ -0.005035400390625, -0.0017242431640625, 0.00860595703125, -0.0130615234375, 0.00811767578125, -0.00872802734375, -0.0062255859375, 0.0096435546875, 0.010009765625, -0.0242919921875, -0.0035858154296875, 0.00116729736328125, -0.0069580078125, -0.007598876953125, -0.019287109375, -0.016...
[ 1250, 4867, 22759, 111, 10, 8562, 25600, 502, 4390, 68347, 31577, 18151, 6712, 17368, 28219, 3642, 121678, 14838, 1495, 23742, 18, 4488, 25632, 7440, 310, 30648, 3444, 5701, 384, 418, 304, 363, 617, 60813, 627, 83, 759, 5303, 126381, 7334...
[ 0.147216796875, 0.2261962890625, 0.23046875, 0.169189453125, 0.044464111328125, 0.2005615234375, 0.1822509765625, 0.1251220703125, 0.0777587890625, 0.07611083984375, 0.032928466796875, 0.237060546875, 0.09722900390625, 0.06463623046875, 0.064453125, 0.040008544921875, 0.14208984375, ...
embed
32543847_c0
32543847
prolog
0
Title: Sum of even, product of odd numbers in Prolog Problem title: Sum of even, product of odd numbers in Prolog Tags: prolog, list Problem: Sum of even, product of odd numbers in Prolog I have a list of numbers, I need to calculate the sum of the even numbers of the list and the product of the odd numbers of the same...
Sum of even, product of odd numbers in Prolog Sum of even, product of odd numbers in Prolog prolog list Sum Prolog l_odd_even Odd Etail Otail Even Sum of even, product of odd numbers in Prolog I have a list of numbers, I need to calculate the sum of the even numbers of the list and the product of the odd numbers of the...
[ -0.002960205078125, 0.027587890625, 0.000039577484130859375, -0.00390625, -0.039794921875, 0.02734375, -0.013916015625, 0.0115966796875, 0.0115966796875, -0.01708984375, 0.01483154296875, -0.007354736328125, 0.00011587142944335938, 0.00482177734375, 0.0106201171875, 0.01068115234375, ...
[ 36335, 111, 3853, 12996, 70270, 101935, 23, 1250, 4867, 502, 5303, 96, 13606, 26301, 67948, 25623, 379, 180, 46741, 31267, 3871, 74481, 10554, 136, 5701, 33938, 65771, 4358, 86869 ]
[ 0.2037353515625, 0.11767578125, 0.206298828125, 0.2296142578125, 0.22705078125, 0.181640625, 0.0557861328125, 0.1435546875, 0.2144775390625, 0.0941162109375, 0.1361083984375, 0.029998779296875, 0.1610107421875, 0.1639404296875, 0.1773681640625, 0.0810546875, 0.1016845703125, 0.0231...
embed
3500560_c0
3500560
prolog
0
Title: SWI Prolog - Simplifying expressions Problem title: SWI Prolog - Simplifying expressions Tags: prolog Problem: SWI Prolog - Simplifying expressions I want to write a procedure simplify (E, E1) which is able to simplify expressions. I have only one operation +, and symbolic and numeric operands. Examples of this ...
SWI Prolog - Simplifying expressions SWI Prolog - Simplifying expressions prolog SWI Prolog Simplifying SWI Prolog - Simplifying expressions I want to write a procedure simplify (E, E1) which is able to simplify expressions. I have only one operation +, and symbolic and numeric operands. Examples of this procedure: All...
[ 0.02294921875, -0.01446533203125, 0.0137939453125, 0.0341796875, 0.00958251953125, 0.00022411346435546875, -0.004150390625, 0.00787353515625, 0.0174560546875, 0.001373291015625, -0.00689697265625, -0.0064697265625, 0.0002899169921875, 0.001861572265625, 0.00860595703125, 0.0048828125, ...
[ 159, 38969, 1250, 4867, 55331, 141, 151138, 125195, 502, 3444, 33022, 50491, 112892, 18929, 647, 241, 17727, 19048, 765, 4734, 1632, 41018, 997, 128201, 54744, 6264, 2208, 89536, 3164, 70, 124850, 642, 122925, 47, 86595, 74481, 10554, 114689,...
[ 0.041778564453125, 0.2186279296875, 0.1351318359375, 0.2008056640625, 0.1260986328125, 0.12353515625, 0.1343994140625, 0.2254638671875, 0.07623291015625, 0.066162109375, 0.160888671875, 0.2335205078125, 0.20703125, 0.1651611328125, 0.099365234375, 0.0819091796875, 0.0855712890625, ...
embed
8329354_c0
8329354
prolog
0
Title: How do you program a translator with lists in prolog? Problem title: How do you program a translator with lists in prolog? Tags: prolog, machine-translation Problem: How do you program a translator with lists in prolog? What I want to do is a translator in Prolog. I've done something like this to translate one w...
How do you program a translator with lists in prolog? How do you program a translator with lists in prolog? prolog machine-translation How Hola Juan Hello John How do you program a translator with lists in prolog? What I want to do is a translator in Prolog. I've done something like this to translate one word: And when...
[ 0.0162353515625, -0.003265380859375, 0.00157928466796875, -0.000965118408203125, 0.0033111572265625, 0.00154876708984375, 0.00145721435546875, 0.0029144287109375, 0.00144195556640625, -0.042724609375, 0.01495361328125, -0.00689697265625, -0.0208740234375, -0.00738525390625, -0.0054321289...
[ 11249, 1528, 3900, 143, 1290, 678, 5303, 7, 502, 4867, 36279, 30145, 57860, 47958, 20178, 35378, 4939, 54, 10, 23, 1250, 19309, 1632, 2565, 26458, 70963, 481, 1542, 4460, 35166, 1193, 1369, 76571, 3444, 113251, 11, 266, 66520, 90, 21718, ...
[ 0.045684814453125, 0.1932373046875, 0.177978515625, 0.2314453125, 0.2022705078125, 0.09552001953125, 0.21533203125, 0.07501220703125, 0.15380859375, 0.251220703125, 0.0889892578125, 0.14404296875, 0.089111328125, 0.1474609375, 0.1717529296875, 0.1109619140625, 0.1375732421875, 0.00...
embed
71743158_c0
71743158
prolog
0
Title: Writing a math function in Prolog Problem title: Writing a math function in Prolog Tags: prolog Problem: Writing a math function in Prolog I need to write a function in Prolog, but I don't understand how to return the value of R and put it in the final function. I get that Prolog doesn't return values, but I sti...
Writing a math function in Prolog Writing a math function in Prolog prolog Writing Prolog Input Writing a math function in Prolog I need to write a function in Prolog, but I don't understand how to return the value of R and put it in the final function. I get that Prolog doesn't return values, but I still can't figure ...
[ 0.00921630859375, 0.0004596710205078125, -0.01385498046875, 0.0125732421875, 0.00958251953125, 0.017822265625, 0.004150390625, -0.001708984375, -0.0026092529296875, -0.005279541015625, 0.0169677734375, 0.00714111328125, -0.0218505859375, -0.0159912109375, 0.038818359375, 0.011413574218...
[ 213185, 48909, 32354, 23, 1250, 4867, 502, 360, 7077, 3871, 33022, 28219, 30646, 34292, 627, 3884, 2704, 22027, 18, 142424, 7464, 26366, 1810 ]
[ 0.1455078125, 0.1436767578125, 0.177978515625, 0.0291595458984375, 0.162353515625, 0.259765625, 0.10345458984375, 0.02069091796875, 0.033294677734375, 0.0430908203125, 0.126708984375, 0.070068359375, 0.16162109375, 0.111083984375, 0.1805419921875, 0.04217529296875, 0.1241455078125, ...
embed
1523172_c0
1523172
prolog
0
Title: Prolog list difference routine Problem title: Prolog list difference routine Tags: set-theory, prolog, list Problem: Prolog list difference routine I am trying to implement a list difference routine in prolog. For some reason the following fails: difference(Xs,Ys,D) :- difference(Xs,Ys,[],D). difference([],_,A,D...
Prolog list difference routine Prolog list difference routine set-theory prolog list Prolog ERROR Type Exception _L161 Prolog list difference routine I am trying to implement a list difference routine in prolog. For some reason the following fails: When trying: I get this error:
[ 0.0167236328125, -0.0007781982421875, 0.0113525390625, 0.001953125, -0.006988525390625, 0.004364013671875, -0.00714111328125, 0.01025390625, 0.0068359375, 0.0078125, 0.011962890625, 0.0174560546875, 0.0042724609375, -0.0033416748046875, 0.002716064453125, 0.00872802734375, 0.01733398...
[ 1250, 4867, 5303, 60212, 124374, 5423, 2347, 30675, 502, 151206, 24638, 60457, 5443, 63928, 866, 151525, 31577, 29479, 1326, 31635, 70, 25632, 35782, 14847, 2046, 903, 18499 ]
[ 0.137451171875, 0.2279052734375, 0.187255859375, 0.238037109375, 0.2374267578125, 0.0863037109375, 0.0291748046875, 0.00893402099609375, 0.1260986328125, 0.11248779296875, 0.0404052734375, 0.15380859375, 0.04547119140625, 0.1162109375, 0.06170654296875, 0.252197265625, 0.137084960937...
embed
31573197_c1
31573197
prolog
1
are not identical then X term_precedes Y shall be implementation dependent except that during the creation of a sorted list (7.1.6.5, 8.10.3.1 j) the ordering shall remain constant. So it is not clear whether predsort/3 would still qualify as a creation of a sorted list. What is clear is that the ordering remains cons...
are not identical then X term_precedes Y shall be implementation dependent except that during the creation of a sorted list (7.1.6.5, 8.10.3.1 j) the ordering shall remain constant. So it is not clear whether predsort/3 would still qualify as a creation of a sorted list. What is clear is that the ordering remains cons...
[ 0.007049560546875, 0.0089111328125, 0.02783203125, -0.02392578125, 0.00128173828125, 0.01177978515625, 0.01385498046875, -0.0103759765625, 0.0115966796875, 0.012939453125, 0.01220703125, 0.0299072265625, -0.00909423828125, -0.0164794921875, -0.01348876953125, 0.00628662109375, -0.010...
[ 621, 959, 31943, 6827, 1193, 13579, 4692, 329, 988, 990, 35299, 208124, 108750, 20271, 166635, 17497, 71, 5303, 165830, 136473, 10179, 97109, 1647, 12989, 214, 47143, 53697, 34735, 1653, 62351, 18113, 7464, 14768, 12096, 12477, 22799, 13452, ...
[ 0.0601806640625, 0.120849609375, 0.145751953125, 0.110595703125, 0.04779052734375, 0.1846923828125, 0.0662841796875, 0.129150390625, 0.06805419921875, 0.0799560546875, 0.015716552734375, 0.1636962890625, 0.173095703125, 0.0694580078125, 0.127197265625, 0.20751953125, 0.0875244140625,...
embed
63399951_c0
63399951
prolog
0
Title: Split a list into two in prolog Problem title: Split a list into two in prolog Tags: prolog, list Problem: Split a list into two in prolog Im trying to split a list into 2 in prolog. But im still new to this and any help would be much appreciated. My problem is: Implement a clause choose(N,L,R,S) that chooses N ...
Split a list into two in prolog Split a list into two in prolog prolog list Split _L1 _L2 _L4 X-1 Split a list into two in prolog Im trying to split a list into 2 in prolog. But im still new to this and any help would be much appreciated. My problem is: Implement a clause choose(N,L,R,S) that chooses N items from L and...
[ -0.019287109375, 0.00933837890625, 0.0001277923583984375, 0.003631591796875, -0.037841796875, 0.014892578125, -0.0233154296875, 0.022216796875, 0.017822265625, 0.013671875, 0.0220947265625, -0.00439453125, -0.01422119140625, 0.004058837890625, 0.0189208984375, 0.0172119140625, 0.0166...
[ 46474, 5303, 3934, 6626, 23, 502, 4867, 866, 418, 304, 617, 1193, 5759, 31577, 65450, 116, 4358, 2967, 153941, 70731, 13, 55076, 839, 1052, 294, 541, 55769, 1295, 339, 3884, 627, 47143, 80854, 25737, 159, 37842, 2060, 9790, 11675, 3293, ...
[ 0.2310791015625, 0.2354736328125, 0.1748046875, 0.1859130859375, 0.03863525390625, 0.168701171875, 0.2210693359375, 0.07861328125, 0.0269622802734375, 0.0811767578125, 0.1221923828125, 0.04241943359375, 0.11279296875, 0.036773681640625, 0.2037353515625, 0.136962890625, 0.031280517578...
embed
64949737_c0
64949737
prolog
0
Title: Problems writing to a file in prolog Problem title: Problems writing to a file in prolog Tags: prolog Problem: Problems writing to a file in prolog I'm trying to write to a txt file using prolog so I tried making a simple predicate to test that, here it is: writefacts():- open('output.txt', write, Out), write(Ou...
Problems writing to a file in prolog Problems writing to a file in prolog prolog Problems output.txt Out Problems writing to a file in prolog I'm trying to write to a txt file using prolog so I tried making a simple predicate to test that, here it is: The problem is that when I run it, on SWI-Prolog (AMD64, Multi-threa...
[ 0.040283203125, 0.010009765625, -0.000579833984375, 0.005706787109375, -0.01214599609375, 0.0024566650390625, -0.0004482269287109375, 0.009521484375, -0.00616455078125, 0.0019683837890625, -0.00592041015625, 0.01806640625, -0.0203857421875, 0.0023651123046875, 0.0201416015625, 0.002685...
[ 15649, 32562, 47, 11435, 23, 502, 4867, 140992, 124326, 13538, 31577, 33022, 17368, 8781, 1653, 2063, 3034, 2967, 11675, 98, 159, 38969, 10752, 8922, 13307, 19335, 39116, 11389, 3217, 68107, 756, 2046, 29568, 33720, 18151, 20697, 4358 ]
[ 0.186279296875, 0.212646484375, 0.153564453125, 0.1514892578125, 0.0618896484375, 0.1680908203125, 0.2275390625, 0.203857421875, 0.2254638671875, 0.1607666015625, 0.039306640625, 0.185302734375, 0.0347900390625, 0.004180908203125, 0.057769775390625, 0.0797119140625, 0.0772705078125, ...
embed
67365944_c0
67365944
prolog
0
Title: Prolog indexOf function Problem title: Prolog indexOf function Tags: prolog, algorithm Problem: Prolog indexOf function I have following code snippet. indexOf() finds index of given element in list. There is two problems: this function does not work if given element is not first or if it is not in list( user dir...
Prolog indexOf function Prolog indexOf function prolog algorithm Prolog Element Tail Index Index1 Prolog indexOf function I have following code snippet. indexOf() finds index of given element in list. There is two problems: this function does not work if given element is not first or if it is not in list( user directiv...
[ 0.01348876953125, 0.0198974609375, 0.005462646484375, 0.00848388671875, -0.021240234375, 0.0069580078125, 0.001617431640625, 0.00848388671875, 0.0108642578125, -0.04052734375, 0.01153564453125, -0.01092529296875, -0.0247802734375, 0.003387451171875, 0.0262451171875, -0.010986328125, ...
[ 1250, 4867, 63262, 132887, 32354, 502, 234873, 48325, 1218, 379, 31471, 418, 25632, 18151, 132, 7413, 111, 34475, 12830, 23, 5303, 6626, 44402, 903, 959, 4488, 2174, 5117, 38937, 8951, 5844, 2967, 2811, 40383, 30098, 3934, 77336 ]
[ 0.1588134765625, 0.2325439453125, 0.243408203125, 0.347412109375, 0.1917724609375, 0.12890625, 0.177978515625, 0.14599609375, 0.1087646484375, 0.12890625, 0.2275390625, 0.02642822265625, 0.05364990234375, 0.070068359375, 0.0587158203125, 0.1282958984375, 0.0640869140625, 0.07122802...
embed
42768199_c0
42768199
prolog
0
Title: Using DCG remove non-numbers from a list Problem title: Using DCG remove non-numbers from a list Tags: prolog, dcg Problem: Using DCG remove non-numbers from a list I need to write a predicate CleanList/3 in Prolog by using dcg which parses a list and returns a new list with the same numbers but all elements tha...
Using DCG remove non-numbers from a list Using DCG remove non-numbers from a list prolog dcg a Using DCG CleanList CSI2120 Using DCG remove non-numbers from a list I need to write a predicate CleanList/3 in Prolog by using dcg which parses a list and returns a new list with the same numbers but all elements that are no...
[ -0.0026702880859375, 0.00341796875, 0.00004124641418457031, 0.01318359375, 0.01123046875, 0.036376953125, -0.0147705078125, -0.01116943359375, 0.006561279296875, -0.01220703125, -0.023681640625, -0.0245361328125, -0.0152587890625, -0.0006561279296875, 0.00157928466796875, 0.02197265625...
[ 345, 391, 56367, 87388, 351, 2606, 1297, 7, 1295, 5303, 502, 4867, 104, 238, 177, 73133, 154663, 170687, 1549, 3871, 33022, 1653, 2063, 67, 18113, 1250, 17368, 366, 30646, 3525, 5701, 101935, 1284, 756, 80854, 959, 14012, 184750, 27781, 5...
[ 0.083251953125, 0.1220703125, 0.251708984375, 0.1636962890625, 0.1646728515625, 0.1300048828125, 0.1436767578125, 0.0191650390625, 0.08721923828125, 0.190673828125, 0.113525390625, 0.2069091796875, 0.0736083984375, 0.080078125, 0.1639404296875, 0.20263671875, 0.2088623046875, 0.072...
embed
52045519_c0
52045519
prolog
0
Title: Prolog graph representation missing fact Problem title: Prolog graph representation missing fact Tags: prolog Problem: Prolog graph representation missing fact I have a graph with edges in Prolog. I'm representing the graph as a set of prolog facts. Where e.g. s(a,b,2). = b is the successor of a. Here are my fac...
Prolog graph representation missing fact Prolog graph representation missing fact prolog Prolog Prolog graph representation missing fact I have a graph with edges in Prolog. I'm representing the graph as a set of prolog facts. Where e.g. s(a,b,2). = b is the successor of a. Here are my facts in prolog for this graph. F...
[ 0.028076171875, 0.0255126953125, -0.007080078125, 0.01519775390625, -0.0167236328125, 0.009765625, -0.00836181640625, -0.0002613067626953125, -0.0034942626953125, -0.00738525390625, 0.01239013671875, -0.01318359375, -0.0263671875, -0.00482177734375, 0.0140380859375, 0.0201416015625, ...
[ 1250, 4867, 41382, 18811, 132283, 15824, 502, 765, 678, 121303, 33636, 5423, 91, 275, 10461, 876, 83, 39457, 42, 111, 10, 759, 132640, 2022, 87, 3688, 177, 17727, 78662, 706, 28, 33938, 110, 4734, 1556, 116, 90356, 13, 619, 73342 ]
[ 0.1593017578125, 0.24951171875, 0.224609375, 0.2054443359375, 0.16455078125, 0.1845703125, 0.1109619140625, 0.000396728515625, 0.038238525390625, 0.158935546875, 0.16796875, 0.007781982421875, 0.0760498046875, 0.07763671875, 0.0853271484375, 0.092041015625, 0.02740478515625, 0.1884...
embed
41492808_c1
41492808
prolog
1
(-20, 0), (-60, 0)]] With this pairs I would like to generate the next 4 coordinates between for example start point (60,0) and end point (20,0) using the auxiliary predicate next_level_segment . When I look at the trace it seems that I'm (hopefully) not that wrong with my implementation, but I'm not able to get those...
(-20, 0), (-60, 0)]] With this pairs I would like to generate the next 4 coordinates between for example start point (60,0) and end point (20,0) using the auxiliary predicate next_level_segment . When I look at the trace it seems that I'm (hopefully) not that wrong with my implementation, but I'm not able to get those...
[ -0.0037384033203125, 0.01019287109375, 0.0086669921875, -0.00101470947265625, -0.0107421875, 0.013671875, -0.022705078125, 0.0010528564453125, 0.0126953125, -0.007598876953125, 0.019287109375, 0.01263427734375, 0.0022735595703125, -0.005615234375, 0.006103515625, -0.01165771484375, 0...
[ 11033, 757, 60488, 86245, 17106, 903, 80836, 7, 1884, 139392, 11737, 201, 176866, 90, 17721, 27781, 4034, 6275, 85769, 77495, 3564, 28583, 17368, 119591, 1653, 2063, 67, 67919, 25398, 674, 144851, 37202, 44691, 208124, 959, 19048, 2046, 611, ...
[ 0.183837890625, 0.138916015625, 0.1915283203125, 0.0145721435546875, 0.031463623046875, 0.07427978515625, 0.19384765625, 0.049957275390625, 0.056976318359375, 0.152099609375, 0.1680908203125, 0.1422119140625, 0.2398681640625, 0.0987548828125, 0.119873046875, 0.032806396484375, 0.1154...
embed
20079763_c1
20079763
prolog
1
8, 9] ; Sorted = [2, 3, 5, 6, 7, 8, 6, 9] ; Sorted = [2, 3, 5, 6, 7, 8, 9, 6] ; I think that somehow I get it, but I am not sure. Could it be that at a certain moment, it backtracks over swap(List, List1) going to the second bubble-sort predicate and hitting the goal, meaning the two lists Sorted are equal? In English...
8, 9] ; Sorted = [2, 3, 5, 6, 7, 8, 6, 9] ; Sorted = [2, 3, 5, 6, 7, 8, 9, 6] ; I think that somehow I get it, but I am not sure. Could it be that at a certain moment, it backtracks over swap(List, List1) going to the second bubble-sort predicate and hitting the goal, meaning the two lists Sorted are equal? In English...
[ 0.01397705078125, 0.031005859375, 0.007476806640625, 0.01165771484375, -0.024658203125, 0.020263671875, -0.01434326171875, -0.0103759765625, -0.00121307373046875, 0.028076171875, 0.00714111328125, 0.0220947265625, -0.0101318359375, 0.003326416015625, -0.00799560546875, -0.0007972717285...
[ 382, 483, 268, 53666, 297, 2203, 304, 138, 190, 305, 361, 4, 5351, 2046, 9077, 191147, 3095, 442, 4420, 125728, 7, 645, 202317, 154663, 32036, 17727, 17932, 373, 73163, 62351, 1653, 2063, 5962, 69236, 91084, 6626, 5303, 621, 105950, 14941...
[ 0.1776123046875, 0.203125, 0.00018310546875, 0.2161865234375, 0.1925048828125, 0.05963134765625, 0.014923095703125, 0.08837890625, 0.0718994140625, 0.12939453125, 0.06292724609375, 0.00054931640625, 0.06884765625, 0.03863525390625, 0.041046142578125, 0.0340576171875, 0.0635986328125,...
embed
44510832_c0
44510832
prolog
0
Title: How do I change position of two elements in a list(PROLOG) Problem title: How do I change position of two elements in a list(PROLOG) Tags: prolog Problem: How do I change position of two elements in a list(PROLOG) predicate change_pos(E1, E2,Lin,Lout). The Lin has any number of elements, and I need to change all...
How do I change position of two elements in a list(PROLOG) How do I change position of two elements in a list(PROLOG) prolog How PROLOG change_pos Lin Lout How do I change position of two elements in a list(PROLOG) predicate change_pos(E1, E2,Lin,Lout). The Lin has any number of elements, and I need to change all occur...
[ -0.00531005859375, -0.003997802734375, -0.00154876708984375, 0.00823974609375, 0.004241943359375, 0.02783203125, -0.0274658203125, 0.0162353515625, 0.014892578125, 0.0218505859375, 0.010986328125, 0.02685546875, 0.0106201171875, -0.002960205078125, 0.010009765625, -0.00138092041015625,...
[ 11249, 54, 87, 15549, 19069, 111, 6626, 80854, 23, 5303, 47970, 47510, 10, 502, 4867, 10514, 7522, 25497, 42225, 18, 1653, 2063, 67, 647, 418, 4, 241, 304, 866, 73, 6056, 1556, 2499, 14012, 3871, 756, 74918, 69098, 47, 22925, 28784, 3...
[ 0.07208251953125, 0.06085205078125, 0.051239013671875, 0.25537109375, 0.2646484375, 0.047607421875, 0.198974609375, 0.2232666015625, 0.061553955078125, 0.220947265625, 0.1676025390625, 0.251708984375, 0.00665283203125, 0.1705322265625, 0.2344970703125, 0.18896484375, 0.2498779296875,...
embed
27537854_c0
27537854
prolog
0
Title: Compute list in Prolog Problem title: Compute list in Prolog Tags: prolog Problem: Compute list in Prolog I want to compute list of all triples [X,Y,Z] in prolog for some game and the challenge is to X, Y,, and Z are different integers between 0 and 9 (both included), and (10*X+Y)/(10*Y+Z) equals X/Z. ?- good_tr...
Compute list in Prolog Compute list in Prolog prolog Compute Prolog good_triples good_list creat_triples Compute list in Prolog I want to compute list of all triples [X,Y,Z] in prolog for some game and the challenge is to X, Y,, and Z are different integers between 0 and 9 (both included), and (10*X+Y)/(10*Y+Z) equals ...
[ -0.0029296875, -0.001953125, 0.0244140625, 0.0111083984375, -0.00811767578125, 0.01055908203125, -0.025634765625, 0.00173187255859375, 0.0234375, -0.021240234375, 0.007476806640625, 0.001800537109375, 0.020263671875, 0.0211181640625, -0.00634765625, 0.03076171875, 0.0272216796875, ...
[ 159415, 13, 5303, 23, 1250, 4867, 502, 4127, 59623, 1577, 6562, 48107, 3444, 9969, 6743, 756, 162738, 7, 1542, 1723, 1511, 6712, 66801, 1193, 990, 136, 567, 12921, 892, 26255, 17721, 757, 483, 99201, 15094, 1639, 1328, 64, 90980, 105950, ...
[ 0.219482421875, 0.08660888671875, 0.236328125, 0.1004638671875, 0.172119140625, 0.2176513671875, 0.146728515625, 0.13427734375, 0.1982421875, 0.1153564453125, 0.1949462890625, 0.12060546875, 0.075439453125, 0.152587890625, 0.1429443359375, 0.1007080078125, 0.252685546875, 0.0992431...
embed
5240491_c0
5240491
prolog
0
Title: Lists within lists in prolog Problem title: Lists within lists in prolog Tags: prolog, list Problem: Lists within lists in prolog I have the following list in prolog: [[1,2],[2,3]] Now, I can do a simple traversal in the list like this: traverse([]). traverse([H|T]):- write(H), traverse(T). But, I don't want thi...
Lists within lists in prolog Lists within lists in prolog prolog list Lists Lists within lists in prolog I have the following list in prolog: Now, I can do a simple traversal in the list like this: But, I don't want this; I want to be able to access each element in the list as a list itself, not as a simple variable. W...
[ 0.00799560546875, 0.00994873046875, 0.0052490234375, 0.0028076171875, -0.00665283203125, 0.01226806640625, -0.00372314453125, 0.0078125, 0.01263427734375, -0.0264892578125, -0.0040283203125, -0.011474609375, -0.00628662109375, 0.01422119140625, 0.005706787109375, 0.004913330078125, 0...
[ 32036, 28032, 5303, 7, 23, 502, 4867, 25632, 8781, 37317, 289, 2301, 18, 3444, 17203, 12638, 12830, 237, 68034, 77336, 37702, 720, 572, 3934, 10, 28412, 1810, 5117, 17932, 34292, 6002, 86531, 4358 ]
[ 0.2308349609375, 0.2030029296875, 0.221923828125, 0.05328369140625, 0.028656005859375, 0.172607421875, 0.2236328125, 0.047027587890625, 0.044464111328125, 0.147705078125, 0.07940673828125, 0.0247802734375, 0.041961669921875, 0.053924560546875, 0.11474609375, 0.059600830078125, 0.0977...
embed
52860471_c0
52860471
prolog
0
Title: How to change working directory in Prolog? Problem title: How to change working directory in Prolog? Tags: swi-prolog, working-directory, prolog Problem: How to change working directory in Prolog? I am running SWI-Prolog (AMD64, Multi-threaded, version 7.6.4) on Windows 7. I checked current working directory: wo...
How to change working directory in Prolog? How to change working directory in Prolog? swi-prolog working-directory prolog How Prolog working_directory CWD some.user NewCWD How to change working directory in Prolog? I am running SWI-Prolog (AMD64, Multi-threaded, version 7.6.4) on Windows 7. I checked current working di...
[ 0.002899169921875, 0.00131988525390625, 0.0245361328125, 0.0167236328125, -0.00689697265625, 0.006744384765625, -0.01422119140625, -0.003570556640625, -0.003265380859375, -0.0269775390625, 0.0123291015625, 0.034423828125, -0.024658203125, 0.01300048828125, 0.01361083984375, -0.00466918...
[ 11249, 47, 15549, 20697, 14364, 53, 23, 1250, 4867, 32, 91, 2452, 9, 3454, 80581, 30675, 502, 313, 87390, 3060, 5, 65918, 2356, 441, 51042, 159, 38969, 10752, 8922, 397, 13307, 19335, 39116, 11389, 361, 43652, 29557, 98, 3773, 2861, 127...
[ 0.111572265625, 0.08551025390625, 0.251708984375, 0.2159423828125, 0.255859375, 0.166015625, 0.1143798828125, 0.1898193359375, 0.281494140625, 0.021942138671875, 0.04345703125, 0.1766357421875, 0.04095458984375, 0.1412353515625, 0.177490234375, 0.128662109375, 0.1480712890625, 0.02...
embed
61497653_c0
61497653
prolog
0
Title: Change list of variables according to another list containing the index and atoms in prolog Problem title: Change list of variables according to another list containing the index and atoms in prolog Tags: list, indexing, prolog Problem: Change list of variables according to another list containing the index and ...
Change list of variables according to another list containing the index and atoms in prolog Change list of variables according to another list containing the index and atoms in prolog list indexing prolog Change Change list of variables according to another list containing the index and atoms in prolog I have a list of...
[ 0.00921630859375, -0.004241943359375, 0.004852294921875, 0.00714111328125, -0.0002880096435546875, -0.00439453125, -0.03173828125, 0.0169677734375, 0.0079345703125, -0.0028839111328125, 0.0016021728515625, 0.0289306640625, 0.0057373046875, 0.011962890625, 0.0146484375, 0.00251770019531...
[ 87377, 5303, 77336, 59499, 15700, 70541, 63262, 34627, 502, 4867, 136, 214, 241, 339, 3444, 1653, 2063, 67, 43240, 1884, 903, 12506, 86869, 132, 11675, 8305, 15549, 17368, 275, 47, 51, 40383, 99, 678, 335, 3917, 54 ]
[ 0.17333984375, 0.2086181640625, 0.2342529296875, 0.1025390625, 0.056640625, 0.042083740234375, 0.1558837890625, 0.16650390625, 0.1337890625, 0.2279052734375, 0.0189361572265625, 0.017547607421875, 0.10211181640625, 0.065185546875, 0.097412109375, 0.1295166015625, 0.1552734375, 0.05...
embed
60212229_c0
60212229
prolog
0
Title: Expanding DCGs in Prolog Problem title: Expanding DCGs in Prolog Tags: dcg, swi-prolog, prolog Problem: Expanding DCGs in Prolog I'm writing a code generator that converts definite clause grammars to other grammar notations. To do this, I need to expand a grammar rule: :- initialization(main). main :- -->(exampl...
Expanding DCGs in Prolog Expanding DCGs in Prolog dcg swi-prolog prolog Expanding DCGs Prolog example1 Expanding DCGs in Prolog I'm writing a code generator that converts definite clause grammars to other grammar notations. To do this, I need to expand a grammar rule: But -->(example, A) doesn't expand the rule, even t...
[ 0.057861328125, -0.0036773681640625, -0.002349853515625, 0.044189453125, -0.00811767578125, 0.02490234375, 0.0014801025390625, 0.0068359375, 0.01068115234375, -0.0478515625, -0.005401611328125, -0.0078125, -0.01348876953125, -0.001617431640625, 0.01904296875, 0.01483154296875, 0.0209...
[ 60075, 11, 33770, 391, 56367, 7, 23, 1250, 4867, 177, 2452, 3454, 502, 27781, 32562, 18151, 145823, 96760, 71496, 70731, 122092, 21816, 147, 959, 71062, 79986, 129908, 3355, 33209, 62, 22027, 18, 12477, 135179, 61924, 17203, 80934, 91736 ]
[ 0.07080078125, 0.08111572265625, 0.058868408203125, 0.08123779296875, 0.2081298828125, 0.06298828125, 0.0194549560546875, 0.1400146484375, 0.2286376953125, 0.05743408203125, 0.1011962890625, 0.07769775390625, 0.050140380859375, 0.1051025390625, 0.0047607421875, 0.1019287109375, 0.107...
embed
10742973_c0
10742973
prolog
0
Title: prolog xpce dynamic list Problem title: prolog xpce dynamic list Tags: prolog, xpce Problem: prolog xpce dynamic list I have a problem with Prolog and the XPCE cycle menu. Here is my code: list:- new(D,dialog('List')), send_list(D,append, [ new(Von,menu(von,cycle)), new(Zu,menu(zu,cycle)), new(Ok,button('OK')) ]...
prolog xpce dynamic list prolog xpce dynamic list prolog xpce List send_list Von ERROR Unknown prolog xpce dynamic list I have a problem with Prolog and the XPCE cycle menu. Here is my code: My problem is, that he can use the findall term. But the findall goes well if u use it solo.
[ 0.0108642578125, -0.000705718994140625, 0.0155029296875, 0.0311279296875, 0.00225830078125, 0.014892578125, -0.00701904296875, 0.01953125, 0.01019287109375, -0.05224609375, 0.0101318359375, -0.0255126953125, 0.00872802734375, 0.0028839111328125, -0.00494384765625, 0.00897216796875, 0...
[ 502, 4867, 1022, 254, 329, 84079, 5303, 32036, 25379, 6562, 21209, 151206, 24638, 69723, 2967, 1250, 45005, 10854, 105823, 8026, 18151, 764, 831, 4527, 7413, 5584, 13579, 60899, 5299, 2639 ]
[ 0.10516357421875, 0.22802734375, 0.0723876953125, 0.05181884765625, 0.148681640625, 0.1724853515625, 0.16015625, 0.12841796875, 0.13232421875, 0.197509765625, 0.05230712890625, 0.09423828125, 0.0322265625, 0.0906982421875, 0.07916259765625, 0.125732421875, 0.09576416015625, 0.16784...
embed
23796488_c1
23796488
prolog
1
, 99), foreach(CoinsforPrice, Pockets), param(Coins, Values) do price_cons(Price, Coins, Values, CoinsforPrice) ). price_cons(Price, Coins, Values, CoinsforPrice) :- ( foreach(V, Values), foreach(C, CoinsforPrice), foreach(Coin, Coins), foreach(Prod, ProdList) do Prod = V*C, 0 #=< C, C #=< Coin ), Price #= sum(ProdList...
, 99), foreach(CoinsforPrice, Pockets), param(Coins, Values) do price_cons(Price, Coins, Values, CoinsforPrice) ). price_cons(Price, Coins, Values, CoinsforPrice) :- ( foreach(V, Values), foreach(C, CoinsforPrice), foreach(Coin, Coins), foreach(Prod, ProdList) do Prod = V*C, 0 #=< C, C #=< Coin ), Price #= sum(ProdList...
[ -0.0086669921875, -0.000102996826171875, 0.009033203125, 0.00872802734375, -0.00543212890625, 0.0225830078125, -0.0240478515625, -0.01092529296875, 0.0174560546875, -0.0289306640625, -0.002777099609375, 0.0189208984375, 0.0115966796875, 0.0028839111328125, 0.02392578125, -0.00199890136...
[ 6, 4, 10078, 247, 100, 41581, 10625, 5425, 2472, 33163, 329, 158226, 121, 39, 190060, 54, 27167, 454, 25553, 132, 76123, 7, 15772, 856, 441, 73, 10752, 71, 1250, 154663, 2203, 310, 1639, 757, 16093, 313, 48025, 468, 10554, 194, 12765, ...
[ 0.0223541259765625, 0.067626953125, 0.27880859375, 0.078125, 0.095703125, 0.2137451171875, 0.10369873046875, 0.09991455078125, 0.1627197265625, 0.1385498046875, 0.0975341796875, 0.18017578125, 0.1080322265625, 0.08868408203125, 0.1719970703125, 0.090087890625, 0.2081298828125, 0.00...
embed
49894317_c0
49894317
prolog
0
Title: Getting the end date from start date and duration in PROLOG Problem title: Getting the end date from start date and duration in PROLOG Tags: date, duration, prolog Problem: Getting the end date from start date and duration in PROLOG I have just started to code in Prolog, and I cannot do what I would like to. Bas...
Getting the end date from start date and duration in PROLOG Getting the end date from start date and duration in PROLOG date duration prolog start Getting PROLOG is_a_date is_a_duration Getting the end date from start date and duration in PROLOG I have just started to code in Prolog, and I cannot do what I would like t...
[ 0.0242919921875, -0.0031280517578125, 0.0031890869140625, 0.03759765625, -0.0206298828125, 0.003936767578125, -0.01348876953125, 0.0238037109375, 0.01171875, -0.037353515625, -0.00384521484375, 0.0087890625, -0.01507568359375, -0.0025177001953125, -0.0089111328125, -0.0145263671875, ...
[ 210732, 70, 3564, 5622, 1295, 4034, 136, 115, 30494, 23, 10514, 47510, 502, 4867, 83, 11, 17489, 3020, 2320, 18151, 1250, 53418, 116, 107730, 1742, 66540, 2592, 5046, 13312, 15477, 92054, 5201, 2967, 9384, 6305 ]
[ 0.09814453125, 0.02691650390625, 0.1898193359375, 0.1705322265625, 0.13330078125, 0.1458740234375, 0.10400390625, 0.1302490234375, 0.141357421875, 0.030120849609375, 0.187744140625, 0.2401123046875, 0.153564453125, 0.2242431640625, 0.124267578125, 0.09515380859375, 0.175048828125, ...
embed
69066034_c0
69066034
prolog
0
Title: Recursively implementation of squares/2 Problem title: Recursively implementation of squares/2 Tags: prolog Problem: Recursively implementation of squares/2 I started my studies of the logical paradigm recently and am struggling with the following problem. How to RECURSIVELY implement the squares/2 predicate tha...
Recursively implementation of squares/2 Recursively implementation of squares/2 prolog Recursively Squared_list Recursively implementation of squares/2 I started my studies of the logical paradigm recently and am struggling with the following problem. How to RECURSIVELY implement the squares/2 predicate that takes a va...
[ 0.0018768310546875, 0.007110595703125, 0.02734375, 0.0078125, 0.00469970703125, 0.016845703125, -0.0264892578125, 0.01513671875, 0.0030059814453125, -0.01483154296875, 0.02734375, -0.0220947265625, -0.0078125, -0.00994873046875, 0.00830078125, -0.0078125, 0.0087890625, 0.0043334960...
[ 853, 48650, 5844, 538, 208124, 108047, 7, 12477, 502, 4867, 68305, 71, 6562, 96335, 62775, 214709, 237875, 2967, 11249, 47, 98166, 112045, 96479, 19917, 29479, 1653, 2063, 67, 51776, 77336, 1193, 136, 5303, 24491, 892, 26255, 990, 1257, 678...
[ 0.0894775390625, 0.2264404296875, 0.171630859375, 0.0479736328125, 0.2200927734375, 0.2353515625, 0.1004638671875, 0.283935546875, 0.1390380859375, 0.17431640625, 0.178955078125, 0.02392578125, 0.208740234375, 0.02081298828125, 0.1143798828125, 0.1256103515625, 0.08935546875, 0.072...
embed
32238456_c1
32238456
prolog
1
,A), padre(X,A);madre(X,B). tia(A,B):- mujer(A), hermano(X,A);hermana(X,A), padre(X,A);madre(X,B). primos(A,B):- hombre(A);mujer(A),tio(X,B);tia(X,B),desciende(A,X). abuelo(A,B):- hombre(A), desciende(X,A), desciende(B,X). abuela(A,B):- mujer(A), desciende(X,A), desciende(B,X). cuñados(A,B):- mujer(A);hombre(A), herman...
,A), padre(X,A);madre(X,B). tia(A,B):- mujer(A), hermano(X,A);hermana(X,A), padre(X,A);madre(X,B). primos(A,B):- hombre(A);mujer(A),tio(X,B);tia(X,B),desciende(A,X). abuelo(A,B):- hombre(A), desciende(X,A), desciende(B,X). abuela(A,B):- mujer(A), desciende(X,A), desciende(B,X). cuñados(A,B):- mujer(A);hombre(A), herman...
[ 0.01141357421875, 0.01177978515625, 0.019287109375, 0.03564453125, 0.0015716552734375, 0.00183868408203125, -0.01611328125, 0.0096435546875, 0.01263427734375, -0.027587890625, -0.00848388671875, -0.0274658203125, -0.00007963180541992188, -0.00180816650390625, 0.00628662109375, 0.007568...
[ 6, 4, 284, 247, 44053, 132, 1542, 3142, 7404, 107, 571, 194, 61769, 9, 44543, 131218, 3334, 4707, 10014, 7, 46491, 4227, 5565, 4526, 988, 318, 45405, 8242, 224, 3597, 2285, 314, 141853, 66520, 30210, 32536, 28864, 26073, 12, 43609, 1507...
[ 0.1412353515625, 0.06976318359375, 0.1231689453125, 0.1346435546875, 0.1895751953125, 0.0229644775390625, 0.11181640625, 0.097412109375, 0.11376953125, 0.1219482421875, 0.0726318359375, 0.1343994140625, 0.2142333984375, 0.06884765625, 0.135986328125, 0.1837158203125, 0.07598876953125...
embed
55089311_c0
55089311
prolog
0
Title: How to assert many facts into knowledge base at once? Problem title: How to assert many facts into knowledge base at once? Tags: prolog Problem: How to assert many facts into knowledge base at once? I have a predicate that asserts many facts into knowledge base to describe a grid for the Wumpus game. Basically, ...
How to assert many facts into knowledge base at once? How to assert many facts into knowledge base at once? prolog How init_map X-Y X1-Y1 arc_from_to How to assert many facts into knowledge base at once? I have a predicate that asserts many facts into knowledge base to describe a grid for the Wumpus game. Basically, th...
[ 0.0096435546875, 0.01019287109375, 0, 0.0341796875, -0.0164794921875, -0.006805419921875, 0.00107574462890625, -0.00946044921875, 0.00408935546875, -0.0021209716796875, 0.009765625, 0.021484375, -0.00250244140625, 0.0189208984375, 0.0027923583984375, -0.0018463134765625, 0.0154418945...
[ 11249, 47, 237, 33657, 5941, 15824, 7, 3934, 51359, 3647, 99, 24145, 502, 4867, 23, 217, 62346, 1193, 1723, 20268, 418, 46552, 161063, 188, 1653, 2063, 67, 98363, 120067, 601, 316, 7332, 6712, 25632, 55300, 139392, 756, 7722, 58585, 14930...
[ 0.113525390625, 0.057281494140625, 0.113525390625, 0.261474609375, 0.185302734375, 0.21044921875, 0.1214599609375, 0.1600341796875, 0.1798095703125, 0.2269287109375, 0.083251953125, 0.177978515625, 0.1361083984375, 0.181640625, 0.0555419921875, 0.1160888671875, 0.1871337890625, 0.0...
embed
40768925_c2
40768925
prolog
2
([m(_, _, X)|Xs]), [X|Ys]) :- variabili(poly(Xs), Ys), !. /* monomi */ monomials(Poly1, Result) :- is_polynomial(Poly1), monomi(Poly1, Result), !. monomials(Poly1, Result) :- as_polynomial(Poly1, Result1), monomi(Result1, Result), !. monomi(poly([]), []) :- !. monomi(poly([X|Xs]), [X|Ys]) :- monomi(poly(Xs), Ys), !. /*...
([m(_, _, X)|Xs]), [X|Ys]) :- variabili(poly(Xs), Ys), !. /* monomi */ monomials(Poly1, Result) :- is_polynomial(Poly1), monomi(Poly1, Result), !. monomials(Poly1, Result) :- as_polynomial(Poly1, Result1), monomi(Result1, Result), !. monomi(poly([]), []) :- !. monomi(poly([X|Xs]), [X|Ys]) :- monomi(poly(Xs), Ys), !. /*...
[ 0.006072998046875, 0.000545501708984375, 0.0155029296875, 0.0233154296875, 0.0030059814453125, 0.03759765625, -0.006927490234375, -0.017822265625, 0.0181884765625, -0.042724609375, 0.01446533203125, -0.017333984375, -0.005157470703125, -0.017578125, -0.0184326171875, 0.01019287109375, ...
[ 15, 1065, 39, 132, 454, 4, 101, 1193, 1542, 7, 247, 58745, 1723, 15772, 141796, 14, 135545, 990, 711, 5, 248, 1639, 22460, 266, 661, 16765, 7192, 538, 418, 126684, 83, 1687, 15403, 17727, 237, 7136, 124, 192, 35874, 32108, 63306, 304,...
[ 0.0841064453125, 0.000396728515625, 0.1796875, 0.03240966796875, 0.07745361328125, 0.04705810546875, 0.07464599609375, 0.1435546875, 0.14013671875, 0.117919921875, 0.099609375, 0.049072265625, 0.138671875, 0.1202392578125, 0.26513671875, 0.155029296875, 0.2252197265625, 0.134399414...
embed
54363827_c0
54363827
prolog
0
Title: How can I find a sublist of a list of length not greater than the third of the length of the list and the sum of the elements of which is maximal Problem title: How can I find a sublist of a list of length not greater than the third of the length of the list and the sum of the elements of which is maximal Tags: ...
How can I find a sublist of a list of length not greater than the third of the length of the list and the sum of the elements of which is maximal How can I find a sublist of a list of length not greater than the third of the length of the list and the sum of the elements of which is maximal prolog How How can I find a ...
[ 0.0086669921875, 0.006561279296875, 0.0191650390625, 0.01220703125, -0.0162353515625, 0.005828857421875, -0.00927734375, 0.026123046875, 0.030517578125, -0.01904296875, -0.002227783203125, -0.01336669921875, -0.007293701171875, -0.0191650390625, 0.002044677734375, 0.003997802734375, ...
[ 11249, 831, 7413, 1614, 6562, 5303, 140909, 959, 117396, 50960, 10554, 80854, 111340, 87, 3501, 83, 502, 4867, 1250 ]
[ 0.010406494140625, 0.04150390625, 0.1378173828125, 0.22802734375, 0.269287109375, 0.1983642578125, 0.1014404296875, 0.0960693359375, 0.07952880859375, 0.18310546875, 0.1859130859375, 0.145263671875, 0.2359619140625, 0.0145263671875, 0.00567626953125, 0.03692626953125, 0.1032104492187...
embed
77261872_c1
77261872
prolog
1
2). position(3). position(4). % 1 [] 3 % 2 [] 4 % ^Seating arrangement with table uniq_people(A,B,C,D) :- person(A), person(B), person(C), person(D), A\=B, A\=C, A\=D, B\=C, B\=D, C\=D. across(1,3). across(2,4). across(X,Y) :- across(Y,X). beside(1,2). beside(3,4). beside(X,Y) :- beside(Y,X). solution(pizza) :- uniq_pe...
2). position(3). position(4). % 1 [] 3 % 2 [] 4 % ^Seating arrangement with table uniq_people(A,B,C,D) :- person(A), person(B), person(C), person(D), A\=B, A\=C, A\=D, B\=C, B\=D, C\=D. across(1,3). across(2,4). across(X,Y) :- across(Y,X). beside(1,2). beside(3,4). beside(X,Y) :- beside(Y,X). solution(pizza) :- uniq_pe...
[ -0.0140380859375, 0.0208740234375, 0.0137939453125, 0.0174560546875, -0.0223388671875, -0.0111083984375, -0.02880859375, 0.00579833984375, 0.026611328125, -0.0322265625, -0.028076171875, 0.0126953125, 0.0267333984375, 0.0142822265625, -0.0162353515625, 0.00823974609375, -0.0025634765...
[ 4958, 19069, 69829, 99217, 1745, 106, 138, 116, 201, 4233, 26518, 70767, 678, 23180, 51, 24496, 223354, 571, 441, 397, 15772, 3445, 36880, 21320, 29557, 1542, 1723, 8752, 133063, 82449, 29806, 1434, 7070, 4445, 76, 549, 299, 5518, 1846, 5...
[ 0.1044921875, 0.21337890625, 0.09625244140625, 0.13623046875, 0.147705078125, 0.048309326171875, 0.060577392578125, 0.03985595703125, 0.1099853515625, 0.2449951171875, 0.2178955078125, 0.2470703125, 0.10113525390625, 0.270751953125, 0.144287109375, 0.2265625, 0.219970703125, 0.0581...
embed
4267819_c0
4267819
prolog
0
Title: How do return both a variable result and a true/false in Prolog? Problem title: How do return both a variable result and a true/false in Prolog? Tags: prolog-toplevel, prolog, swi-prolog Problem: How do return both a variable result and a true/false in Prolog? It sounds silly, but lets say my predicate largest/2...
How do return both a variable result and a true/false in Prolog? How do return both a variable result and a true/false in Prolog? prolog-toplevel prolog swi-prolog How Prolog How do return both a variable result and a true/false in Prolog? It sounds silly, but lets say my predicate largest/2 returns the largest element...
[ 0.033935546875, 0.027587890625, 0.006195068359375, -0.000659942626953125, -0.0137939453125, 0.0380859375, 0.01177978515625, -0.01611328125, 0.0062255859375, 0.0169677734375, 0.0107421875, -0.005218505859375, -0.011474609375, 0.00054168701171875, 0.0184326171875, 0.00286865234375, -0....
[ 11249, 30646, 15044, 77336, 16750, 29568, 8710, 23, 1250, 4867, 64, 502, 67919, 2452, 3454, 54, 136, 10, 102678, 12097, 1653, 2063, 142105, 12477, 12830, 5303, 140992, 6713, 29479, 43240, 3249, 184, 34292, 8668, 95486, 67229 ]
[ 0.0687255859375, 0.210205078125, 0.1103515625, 0.2607421875, 0.1944580078125, 0.204345703125, 0.1724853515625, 0.03753662109375, 0.1663818359375, 0.24658203125, 0.049102783203125, 0.0782470703125, 0.05657958984375, 0.067626953125, 0.067626953125, 0.011260986328125, 0.0704345703125, ...
embed
26462970_c0
26462970
prolog
0
Title: Prolog - functions? constants? Problem title: Prolog - functions? constants? Tags: prolog Problem: Prolog - functions? constants? I am working in prolog and bumped into something I haven't really managed to grasp. To work without variables and with constant symbols and functions, for example: test(a,T) :- /* cha...
Prolog - functions? constants? Prolog - functions? constants? prolog Prolog Prolog - functions? constants? I am working in prolog and bumped into something I haven't really managed to grasp. To work without variables and with constant symbols and functions, for example: Is this doable? I don't really understand these n...
[ 0.0166015625, 0.016845703125, 0.01287841796875, -0.00946044921875, -0.0052490234375, 0.0030364990234375, -0.0081787109375, -0.0048828125, -0.0081787109375, -0.0167236328125, 0.004547119140625, 0.000545501708984375, -0.0230712890625, 0.0184326171875, 0.0223388671875, 0.0120849609375, ...
[ 1250, 4867, 32354, 7, 53697, 502, 32, 20697, 38246, 145755, 27689, 254, 4488, 15490, 77336, 678, 26582, 136, 54, 2886, 28219, 351, 21690, 19736, 3884, 9525, 149201 ]
[ 0.218017578125, 0.306884765625, 0.258544921875, 0.120849609375, 0.2479248046875, 0.1546630859375, 0.033203125, 0.0675048828125, 0.009307861328125, 0.029815673828125, 0.0244140625, 0.0214385986328125, 0.1173095703125, 0.14697265625, 0.2332763671875, 0.0751953125, 0.1968994140625, 0....
embed
68478018_c1
68478018
prolog
1
), path(T, Q), all_compatible(I, Q). The actual logic: solution([], Paths, Paths, Value, Value). solution([C|D], Paths0, Paths, Value0, Value) :- ( list_price(C, Value0, V) -> ( V < Value0 -> solution(D, [C], Paths, V, Value) ; solution(D, [C|Paths0], Paths, Value0, Value) ) ; solution(D, Paths0, Paths, Value0, Value) ...
), path(T, Q), all_compatible(I, Q). The actual logic: solution([], Paths, Paths, Value, Value). solution([C|D], Paths0, Paths, Value0, Value) :- ( list_price(C, Value0, V) -> ( V < Value0 -> solution(D, [C], Paths, V, Value) ; solution(D, [C|Paths0], Paths, Value0, Value) ) ; solution(D, Paths0, Paths, Value0, Value) ...
[ -0.0074462890625, 0.0113525390625, 0.0145263671875, 0.000759124755859375, 0.003997802734375, 0.015869140625, -0.0118408203125, -0.00153350830078125, 0.02294921875, -0.0322265625, -0.007171630859375, 0.0264892578125, -0.0235595703125, 0.0040283203125, 0.000164031982421875, 0.01422119140...
[ 6, 247, 60875, 618, 2396, 756, 277, 10974, 2661, 568, 194, 581, 8561, 62775, 29806, 108421, 7, 190060, 441, 58745, 397, 2389, 15772, 5303, 5293, 329, 310, 4426, 4, 10519, 18743, 13, 683, 77758, 21, 3285, 111607, 5584, 19692, 30700, 110,...
[ 0.0325927734375, 0.06903076171875, 0.2255859375, 0.08343505859375, 0.157470703125, 0.138916015625, 0.089111328125, 0.177490234375, 0.17919921875, 0.042236328125, 0.0533447265625, 0.045166015625, 0.1802978515625, 0.274169921875, 0.2186279296875, 0.2041015625, 0.096923828125, 0.22351...
embed
6236199_c0
6236199
prolog
0
Title: How loading file in Prolog? Problem title: How loading file in Prolog? Tags: swi-prolog, prolog Problem: How loading file in Prolog? I have a file, name: "file1.pl" in c:/. Now I want to load the file into the prolog , and then ask a query about the procedure and the relations that I defined. as I understood, I ...
How loading file in Prolog? How loading file in Prolog? swi-prolog prolog How Prolog Undefined DWIN How loading file in Prolog? I have a file, name: "file1.pl" in c:/. Now I want to load the file into the prolog , and then ask a query about the procedure and the relations that I defined. as I understood, I need to do t...
[ 0.020751953125, 0.0126953125, 0.0009307861328125, 0.0308837890625, -0.0179443359375, -0.004180908203125, 0.0012054443359375, 0.01025390625, 0.0025177001953125, -0.06298828125, 0.00445556640625, 0.00921630859375, -0.039794921875, -0.0113525390625, 0.009033203125, -0.0037841796875, -0....
[ 11249, 72367, 214, 11435, 23, 1250, 4867, 91, 2452, 3454, 502, 79912, 5983, 297, 391, 108568, 29822, 418, 5, 2424, 12, 64, 3444, 3934, 26458, 41, 50491, 91582, 61924, 217064, 11737, 13569, 27211, 456, 63033, 73197, 102158, 65290, 4597, 21...
[ 0.10205078125, 0.2154541015625, 0.0867919921875, 0.2030029296875, 0.08935546875, 0.20654296875, 0.255615234375, 0.0196685791015625, 0.164306640625, 0.1470947265625, 0.1715087890625, 0.102294921875, 0.173583984375, 0.0443115234375, 0.04058837890625, 0.2335205078125, 0.1851806640625, ...
embed
19874506_c0
19874506
prolog
0
Title: Prolog: list of lists Problem title: Prolog: list of lists Tags: prolog Problem: Prolog: list of lists I have a problem on Prolog related to list of lists. The problem is about implementing a Prolog predicate: to_do(ListOfLists,_,Result) . Where ListOfLists is a list of lists of character, either a , b , c , or ...
Prolog: list of lists Prolog: list of lists prolog Prolog to_do ListOfLists Result Prolog: list of lists I have a problem on Prolog related to list of lists. The problem is about implementing a Prolog predicate: to_do(ListOfLists,_,Result) . Where ListOfLists is a list of lists of character, either a , b , c , or d . R...
[ 0.00726318359375, 0.0035552978515625, 0.002105712890625, 0.01080322265625, -0.0294189453125, 0.0235595703125, -0.000705718994140625, 0.00518798828125, 0.0089111328125, -0.00640869140625, 0.01129150390625, -0.0026397705078125, -0.000152587890625, 0.0093994140625, -0.0128173828125, -0.01...
[ 1250, 4867, 12, 5303, 111, 7, 502, 47, 454, 246, 32036, 132887, 154663, 126684, 765, 2967, 98, 62548, 29479, 1653, 2063, 67, 132, 4, 4332, 7136, 78662, 83, 62816, 876, 501, 707, 104, 8110, 161740, 10, 1300, 333, 1022, 113, 186 ]
[ 0.200927734375, 0.27587890625, 0.0386962890625, 0.256591796875, 0.126953125, 0.1639404296875, 0.1512451171875, 0.1771240234375, 0.0567626953125, 0.177734375, 0.189453125, 0.2396240234375, 0.26513671875, 0.2401123046875, 0.02239990234375, 0.1563720703125, 0.04705810546875, 0.0338134...
embed
22917656_c0
22917656
prolog
0
Title: Converting to unambiguous grammar from ambiguous grammar Problem title: Converting to unambiguous grammar from ambiguous grammar Tags: prolog, ambiguous-grammar, grammar, dcg Problem: Converting to unambiguous grammar from ambiguous grammar I've ambiguous context-free grammar which has products: s --> [0],s,[1]....
Converting to unambiguous grammar from ambiguous grammar Converting to unambiguous grammar from ambiguous grammar prolog ambiguous-grammar grammar dcg ambiguous Converting Converting to unambiguous grammar from ambiguous grammar I've ambiguous context-free grammar which has products: It's of course ambiguous because fo...
[ 0.0086669921875, 0.0146484375, -0.01025390625, 0.021728515625, -0.01251220703125, -0.00177001953125, -0.006561279296875, 0.0234375, -0.00433349609375, -0.00445556640625, 0.006683349609375, 0.014404296875, -0.01312255859375, 0.02197265625, 0.003143310546875, -0.00135040283203125, 0.01...
[ 1657, 814, 1916, 47, 220, 6332, 1234, 10821, 122092, 147, 1295, 920, 12282, 502, 4867, 107415, 177, 272, 43701, 32087, 38742, 15411, 2445, 1662, 831, 79442, 6626, 27060, 366, 6953, 1360, 33022, 759, 83, 98363, 5701, 46876, 6528, 1650, 412...
[ 0.03265380859375, 0.137451171875, 0.046173095703125, 0.06927490234375, 0.0850830078125, 0.142333984375, 0.1123046875, 0.1141357421875, 0.17919921875, 0.1444091796875, 0.0906982421875, 0.1595458984375, 0.2037353515625, 0.08740234375, 0.1361083984375, 0.119873046875, 0.0626220703125, ...
embed
28641782_c1
28641782
prolog
1
[1,2,4]), length(Cs, L), % 2: In a bag, there cannot be two of the same coins. foldl(ascending_coin, Cs, _, _). ascending_coin(C, Prev, C) :- coin(C), Prev @< C.. %All bags are different all_dif([]). all_dif([L|Ls]) :- maplist(dif(L), Ls), all_dif(Ls). bags(Bs) :- Bs = [MM,FM,Wizard,Witch], maplist(bag, Bs), % 1: Ther...
[1,2,4]), length(Cs, L), % 2: In a bag, there cannot be two of the same coins. foldl(ascending_coin, Cs, _, _). ascending_coin(C, Prev, C) :- coin(C), Prev @< C.. %All bags are different all_dif([]). all_dif([L|Ls]) :- maplist(dif(L), Ls), all_dif(Ls). bags(Bs) :- Bs = [MM,FM,Wizard,Witch], maplist(bag, Bs), % 1: Ther...
[ -0.0166015625, 0.008544921875, -0.006683349609375, 0.015625, 0.00274658203125, 0.016357421875, -0.01141357421875, 0.01025390625, 0.00958251953125, -0.00982666015625, -0.029541015625, 0.022705078125, 0.01239013671875, 0.014892578125, 0.0028839111328125, 0.0252685546875, -0.01098632812...
[ 133063, 617, 140909, 441, 7, 339, 1745, 15573, 360, 10, 6157, 2685, 53418, 186, 6626, 111, 5701, 43780, 18344, 20469, 162, 329, 33770, 587, 73, 313, 82800, 214, 74717, 15772, 43512, 97920, 621, 12921, 756, 428, 420, 866, 22288, 6562, 57...
[ 0.057861328125, 0.1368408203125, 0.1812744140625, 0.03887939453125, 0.0219268798828125, 0.05108642578125, 0.090087890625, 0.08984375, 0.072021484375, 0.0377197265625, 0.22265625, 0.00311279296875, 0.122314453125, 0.035888671875, 0.147216796875, 0.0599365234375, 0.1292724609375, 0.2...
embed
65084003_c0
65084003
prolog
0
Title: What does higher-order semantics give you in λProlog? Problem title: What does higher-order semantics give you in λProlog? Tags: prolog, lambda-prolog Problem: What does higher-order semantics give you in λProlog? λProlog is a higher-order dialect of Prolog. On the other hand, HiLog is said to use higher-order s...
What does higher-order semantics give you in λProlog? What does higher-order semantics give you in λProlog? prolog lambda-prolog What What does higher-order semantics give you in λProlog? λProlog is a higher-order dialect of Prolog. On the other hand, HiLog is said to use higher-order syntax with first-order model theo...
[ 0.000823974609375, -0.00787353515625, 0.0036163330078125, -0.0004596710205078125, -0.002532958984375, 0.0115966796875, 0.013916015625, -0.002227783203125, 0.017578125, -0.0003185272216796875, 0.004486083984375, -0.033447265625, -0.01190185546875, -0.003997802734375, -0.006744384765625, ...
[ 4865, 77546, 80596, 484, 109109, 7, 8337, 111147, 10752, 4867, 502, 21, 6492, 85, 3454, 14602, 9, 23, 10, 220734, 1250, 2673, 113972, 4527, 6002, 86531, 5117, 3299, 154453, 4734, 8781, 27781, 58755, 21647 ]
[ 0.0144500732421875, 0.1956787109375, 0.2471923828125, 0.1689453125, 0.1951904296875, 0.045745849609375, 0.11181640625, 0.1654052734375, 0.2159423828125, 0.27490234375, 0.1300048828125, 0.032867431640625, 0.170166015625, 0.1248779296875, 0.1427001953125, 0.0216827392578125, 0.00881958...
embed
8748029_c0
8748029
prolog
0
Title: Assigning a parameter to the greater of two numbers Problem title: Assigning a parameter to the greater of two numbers Tags: recursion, prolog Problem: Assigning a parameter to the greater of two numbers I've written the following recursive function to assign a parameter to the greater of two numbers: max(A,B,X)...
Assigning a parameter to the greater of two numbers Assigning a parameter to the greater of two numbers recursion prolog Assigning Assigning a parameter to the greater of two numbers I've written the following recursive function to assign a parameter to the greater of two numbers: This works as expected but as a newcom...
[ -0.005950927734375, 0.00909423828125, 0.015869140625, 0.0120849609375, -0.00885009765625, 0.0162353515625, -0.00933837890625, 0.008544921875, 0.015869140625, 0.000591278076171875, 0.0233154296875, -0.01904296875, -0.005462646484375, 0.00128936767578125, 0.021728515625, -0.0242919921875...
[ 1301, 31304, 214, 171859, 47, 70, 117396, 111, 6626, 101935, 10, 195625, 1830, 502, 4867, 59121, 25632, 5844, 32354, 95486, 43240, 237, 84751, 277, 56, 1250, 18211, 18822, 2684, 93766, 29806, 11522, 3917, 20594, 24234, 74, 7103, 159029, 119...
[ 0.06475830078125, 0.2484130859375, 0.010894775390625, 0.28662109375, 0.1605224609375, 0.057769775390625, 0.2020263671875, 0.085693359375, 0.1636962890625, 0.1658935546875, 0.0369873046875, 0.205078125, 0.052398681640625, 0.108154296875, 0.2384033203125, 0.07037353515625, 0.0393676757...
embed
15082256_c0
15082256
prolog
0
Title: Prolog_Numbers translation English to French using DCG Problem title: Prolog_Numbers translation English to French using DCG Tags: language-translation, numbers, prolog, dcg Problem: Prolog_Numbers translation English to French using DCG I have to write some code that translate numbers from english to french (fr...
Prolog_Numbers translation English to French using DCG Prolog_Numbers translation English to French using DCG language-translation numbers prolog dcg DCG Prolog_Numbers English French Prolog_Numbers translation English to French using DCG I have to write some code that translate numbers from english to french (from 1 t...
[ 0.01507568359375, -0.0208740234375, -0.0054931640625, -0.004547119140625, 0.01336669921875, 0.0233154296875, -0.0106201171875, -0.01556396484375, 0.00213623046875, -0.029541015625, -0.0205078125, -0.0302734375, -0.0096435546875, 0.00787353515625, 0.0208740234375, -0.009033203125, 0.0...
[ 1250, 4867, 18444, 26278, 7, 153648, 14941, 47, 92265, 17368, 391, 56367, 46876, 30145, 57860, 101935, 502, 177, 765, 33022, 18151, 3900, 19309, 1295, 175457, 57217, 161063, 106, 105546, 23113, 8780, 7565, 6626, 84797, 122092, 147, 91736, 363...
[ 0.2080078125, 0.283935546875, 0.2149658203125, 0.2264404296875, 0.08935546875, 0.2420654296875, 0.2049560546875, 0.1802978515625, 0.28076171875, 0.060211181640625, 0.1019287109375, 0.2025146484375, 0.1202392578125, 0.15576171875, 0.086669921875, 0.250244140625, 0.1275634765625, 0.0...
embed
13096023_c0
13096023
prolog
0
Title: swi-prolog [lists] Problem title: swi-prolog [lists] Tags: prolog Problem: swi-prolog [lists] Hey i was working on this little method i guess you call them messing around trying to get my grip on swi-prolog before I have my big project assigned in a week or so at university. Its pretty obvious what it does say i...
swi-prolog [lists] swi-prolog [lists] prolog swi-prolog [lists] Hey i was working on this little method i guess you call them messing around trying to get my grip on swi-prolog before I have my big project assigned in a week or so at university. Its pretty obvious what it does say i say "colors(yellow,F). it will give ...
[ 0.004852294921875, -0.001983642578125, -0.0069580078125, -0.01123046875, -0.025390625, 0.017578125, -0.002593994140625, 0.0157470703125, -0.000057220458984375, -0.021240234375, -0.01153564453125, 0.00118255615234375, 0.010498046875, 0.00762939453125, 0.00836181640625, 0.002700805664062...
[ 91, 2452, 3454, 4867, 6562, 502, 28240, 20697, 10176, 55300, 11782, 163, 38001, 10932, 31577, 2046, 40158, 9, 8108, 13452, 95486, 5895, 152363, 162520, 442, 5154, 46133, 1033, 41566, 919, 1221, 8337, 134399, 107466, 9655, 3714, 831, 4527, 5...
[ 0.0501708984375, 0.2142333984375, 0.1123046875, 0.2169189453125, 0.1888427734375, 0.1221923828125, 0.014007568359375, 0.079345703125, 0.06097412109375, 0.12841796875, 0.0218505859375, 0.0924072265625, 0.105224609375, 0.076171875, 0.045654296875, 0.0687255859375, 0.083740234375, 0.0...
embed
49722605_c0
49722605
prolog
0
Title: Variable in Prolog Problem title: Variable in Prolog Tags: prolog Problem: Variable in Prolog I have this code in Prolog... I use swi-prolog for ubuntu. follows(ilias, petros). follows(petros,ilias). follows(petros, demos). follows(demos,petros). and I ask this 2 queries: ?- follows(petros,X),follows(X,petros). ...
Variable in Prolog Variable in Prolog prolog Variable Prolog Variable in Prolog I have this code in Prolog... I use swi-prolog for ubuntu. and I ask this 2 queries: and getting these two different outcomes. My trouble is that from what I know makis is a variable just like X. but prolog doesn't respond the same way and ...
[ 0.0186767578125, 0.01300048828125, 0.0054931640625, 0.036865234375, 0.0093994140625, 0.0164794921875, -0.000015079975128173828, 0.0224609375, -0.00372314453125, -0.02685546875, 0.00089263916015625, -0.00543212890625, -0.0186767578125, 0.00830078125, -0.001861572265625, 0.01507568359375...
[ 84572, 2886, 23, 1250, 4867, 502, 18151, 91, 2452, 3454, 198996, 26458, 116, 41, 10484, 6097, 6626, 12921, 184345, 63134, 95208, 7, 83, 77336, 1660, 1884, 1193, 18, 35644, 5701, 831, 28219, 15400 ]
[ 0.236328125, 0.12744140625, 0.0770263671875, 0.1968994140625, 0.2451171875, 0.161376953125, 0.1173095703125, 0.014404296875, 0.1644287109375, 0.1363525390625, 0.103515625, 0.06768798828125, 0.0821533203125, 0.109130859375, 0.1072998046875, 0.00067138671875, 0.0830078125, 0.14660644...
embed
22328651_c0
22328651
prolog
0
Title: Find what&#x27;s not provable in Prolog Problem title: Find what&#x27;s not provable in Prolog Tags: prolog Problem: Find what's not provable in Prolog Consider the following: link(step1, step2) . link(step2, step3) . link(step3, step4) . goal(X) :- \+ link(X, _) . I would like goal functor to represent a step t...
Find what&#x27;s not provable in Prolog Find what&#x27;s not provable in Prolog prolog Find Prolog step1 step2 step3 step4 Find what's not provable in Prolog Consider the following: I would like goal functor to represent a step that is not at the beginning of a link. But when I try : (instead of telling me that step4 i...
[ 0.00665283203125, 0.019775390625, 0.005859375, 0.01422119140625, -0.0250244140625, 0.01513671875, 0.00518798828125, -0.0021209716796875, -0.004058837890625, -0.0203857421875, -0.03125, -0.0054931640625, -0.0093994140625, 0.0198974609375, 0.00408935546875, 0.01611328125, 0.01007080078...
[ 26040, 2367, 3768, 7, 959, 13395, 2661, 23, 1250, 4867, 502, 29954, 418, 304, 363, 617, 1884, 69236, 7477, 18770, 33636, 83, 86595, 3126, 9790, 29806, 25632, 151575, 72272, 57767, 7413, 831, 18 ]
[ 0.12060546875, 0.0885009765625, 0.054779052734375, 0.031005859375, 0.177734375, 0.2213134765625, 0.184326171875, 0.07147216796875, 0.192138671875, 0.2491455078125, 0.14599609375, 0.1597900390625, 0.0188751220703125, 0.02178955078125, 0.06549072265625, 0.13232421875, 0.028457641601562...
embed
55615296_c0
55615296
prolog
0
Title: Find the lower peaks of the list Problem title: Find the lower peaks of the list Tags: prolog Problem: Find the lower peaks of the list Help, please, find the lower peaks of the list. For example, given an array [1,5,4,6,3] the answer would be [1,4,3] lower_peaks([X,Y|T],[X|L]):-X<Y,lp2([Y|T],L). lower_peaks([X,...
Find the lower peaks of the list Find the lower peaks of the list prolog Find lower_peaks lp2 Find the lower peaks of the list Help, please, find the lower peaks of the list. For example, given an array [1,5,4,6,3] the answer would be [1,4,3] The problem is multiple answers:
[ -0.0031280517578125, -0.00830078125, 0.00885009765625, 0.002227783203125, 0.00653076171875, 0.019775390625, 0.0037994384765625, 0.0052490234375, 0.0279541015625, -0.0057373046875, 0.0174560546875, -0.007293701171875, 0.02587890625, 0.0111083984375, -0.0047607421875, 0.0140380859375, ...
[ 26040, 70, 92319, 37185, 111, 5303, 502, 4867, 1081, 24251, 254, 304, 39527, 22936, 7413, 27781, 34475, 10298, 57626, 128191, 96386, 35166, 2806, 186, 163324, 2967, 48716 ]
[ 0.1494140625, 0.105224609375, 0.2724609375, 0.2646484375, 0.10577392578125, 0.208251953125, 0.049102783203125, 0.13818359375, 0.18994140625, 0.1644287109375, 0.0181121826171875, 0.0338134765625, 0.08404541015625, 0.042572021484375, 0.1376953125, 0.02850341796875, 0.06927490234375, ...
embed
74066023_c1
74066023
prolog
1
). parent(romiz,anika). parent(romiz,yash). parent(kani,anika). parent(kani,yash). parent(ben,priti). parent(ben,mathew). parent(sanjida,priti). parent(sanjida,mathew). parent(mark,wasim). parent(mark,rimi). parent(lucy,wasim). parent(lucy,rimi). parent(korim,eric). parent(korim,marry). parent(anika,eric). parent(anika...
). parent(romiz,anika). parent(romiz,yash). parent(kani,anika). parent(kani,yash). parent(ben,priti). parent(ben,mathew). parent(sanjida,priti). parent(sanjida,mathew). parent(mark,wasim). parent(mark,rimi). parent(lucy,wasim). parent(lucy,rimi). parent(korim,eric). parent(korim,marry). parent(anika,eric). parent(anika...
[ 0.01153564453125, -0.003204345703125, -0.002105712890625, 0.007415771484375, -0.02294921875, 0.004730224609375, 0.002777099609375, 0.010009765625, -0.0101318359375, -0.052001953125, 0.0211181640625, -0.04345703125, -0.0036468505859375, 0.0162353515625, 0.0078125, -0.004119873046875, ...
[ 6, 194, 49129, 132, 516, 3930, 11, 3161, 395, 1495, 55825, 776, 5293, 118, 145204, 1462, 658, 85, 10015, 634, 5072, 46117, 822, 2408, 2434, 464, 1771, 1727, 1294, 81298, 69163, 124, 3454, 1491, 45457, 67373, 73, 19729, 1542, 990, 15772,...
[ 0.000732421875, 0.1212158203125, 0.24267578125, 0.03521728515625, 0.062164306640625, 0.193115234375, 0.04083251953125, 0.1915283203125, 0.08197021484375, 0.0970458984375, 0.1385498046875, 0.1234130859375, 0.09033203125, 0.10595703125, 0.12353515625, 0.000732421875, 0.048583984375, ...
embed
42394596_c0
42394596
prolog
0
Title: prolog arguments are not sufficently instantiated Problem title: prolog arguments are not sufficently instantiated Tags: if-statement, instantiation-error, prolog Problem: prolog arguments are not sufficently instantiated I am trying to find max,mid and min number from 3 given number. The code is: t_max(X,Y,Z):-...
prolog arguments are not sufficently instantiated prolog arguments are not sufficently instantiated if-statement instantiation-error prolog t_max ERROR Arguments prolog arguments are not sufficently instantiated I am trying to find max,mid and min number from 3 given number. The code is: When i try to run the method wi...
[ 0.0146484375, 0.0084228515625, 0.0302734375, 0.0279541015625, 0.0128173828125, -0.00141143798828125, 0.0147705078125, 0.0027618408203125, 0.01385498046875, 0.021484375, 0.006744384765625, -0.017822265625, 0.00848388671875, 0.00848388671875, 0.03955078125, 0.0034637451171875, 0.019897...
[ 502, 4867, 10750, 621, 959, 133784, 16797, 538, 34648, 14, 27686, 2174, 61340, 674, 188800, 808, 24084, 151206, 24638, 112140, 7, 31577, 7413, 18389, 22000, 881, 14012, 1295, 138, 34475, 18151, 14847, 9790, 11675, 55300, 678, 2499, 17262, 1...
[ 0.16845703125, 0.258056640625, 0.22119140625, 0.0214080810546875, 0.12353515625, 0.174072265625, 0.1448974609375, 0.06787109375, 0.1387939453125, 0.09783935546875, 0.0841064453125, 0.1240234375, 0.1480712890625, 0.0172882080078125, 0.19580078125, 0.0992431640625, 0.1895751953125, 0...
embed
66187929_c0
66187929
prolog
0
Title: SWI-Prolog syntax for JSON Problem title: SWI-Prolog syntax for JSON Tags: prolog, swi-prolog, json Problem: SWI-Prolog syntax for JSON json([ name='Demo term', created=json([day= @null, month='December', year=2007]), confirmed= @true, members=[1, 2, 3] ]) I'm staring at the swi prolog manual and don't understan...
SWI-Prolog syntax for JSON SWI-Prolog syntax for JSON prolog swi-prolog json SWI-Prolog JSON Demo December SWI-Prolog syntax for JSON I'm staring at the swi prolog manual and don't understand bits of the syntax ( https://linkedpolitics.project.cwi.nl/swish/pldoc/man?section=jsonsupport ) and I can't figure out the appr...
[ 0.00799560546875, 0.03173828125, 0.0115966796875, 0.021484375, -0.029541015625, 0.00970458984375, -0.0045166015625, 0.0223388671875, -0.0177001953125, 0.0050048828125, -0.004150390625, 0.0264892578125, -0.0206298828125, -0.0289306640625, 0.01336669921875, 0.00469970703125, -0.0018615...
[ 159, 38969, 10752, 4867, 6002, 86531, 100, 821, 58627, 502, 91, 2452, 3454, 1647, 1681, 42506, 14487, 6057, 23009, 18, 28219, 4785, 10187, 170272, 95322, 13169, 114686, 29713, 669, 170, 105363, 26366, 95307, 33938, 69407, 29459, 9351, 168678,...
[ 0.0821533203125, 0.237060546875, 0.1605224609375, 0.22216796875, 0.17138671875, 0.2034912109375, 0.04339599609375, 0.1258544921875, 0.1893310546875, 0.1160888671875, 0.03192138671875, 0.1895751953125, 0.09912109375, 0.032501220703125, 0.10107421875, 0.244384765625, 0.1793212890625, ...
embed
42451846_c0
42451846
prolog
0
Title: GNU Prolog: Strange characters Problem title: GNU Prolog: Strange characters Tags: prolog Problem: GNU Prolog: Strange characters I am new to using GNU Prolog. Given the following facts: theme(cafe). role(manager). role(boss). role(coworker). numberOfCharacters(theme(cafe), 3). charactersRole(numberCharacters(th...
GNU Prolog: Strange characters GNU Prolog: Strange characters prolog GNU Prolog Strange GNU Prolog: Strange characters I am new to using GNU Prolog. Given the following facts: When I query: It returns some of the values correctly, while one value contains ç in place of normal character 'c'. Thanks! :)
[ 0.015869140625, -0.004119873046875, -0.0003604888916015625, -0.0038299560546875, -0.0096435546875, -0.010009765625, 0.006591796875, 0.01385498046875, 0.01495361328125, 0.0213623046875, -0.00933837890625, 0.00183868408203125, -0.0224609375, 0.0123291015625, -0.007171630859375, 0.0149536...
[ 165132, 1250, 4867, 12, 187791, 124850, 502, 87, 444, 3525, 47, 17368, 77878, 25632, 15824, 14847, 41, 1294, 1650, 30646, 7, 3060, 70, 142424, 26785, 12960, 1632, 34292, 70541, 7492, 62970, 3687, 3638, 62816, 238, 22362 ]
[ 0.2177734375, 0.174072265625, 0.256591796875, 0.049163818359375, 0.2069091796875, 0.20166015625, 0.08062744140625, 0.01432037353515625, 0.00197601318359375, 0.07403564453125, 0.0276031494140625, 0.10003662109375, 0.0149993896484375, 0.01317596435546875, 0.038177490234375, 0.01280212402...
embed
14373034_c0
14373034
prolog
0
Title: How to convert string to list of integer list? Problem title: How to convert string to list of integer list? Tags: swi-prolog, prolog Problem: How to convert string to list of integer list? I wrote X = [[1,2,3,4,5,6],[6,5,4,3,2,1]|...] to a file by the following code: ?-tell('test.txt'),maplist(format('~d ~d ~d ...
How to convert string to list of integer list? How to convert string to list of integer list? swi-prolog prolog How test.txt read_stream_to_codes How to convert string to list of integer list? I wrote X = [[1,2,3,4,5,6],[6,5,4,3,2,1]|...] to a file by the following code: And using the following code to restore it: what...
[ -0.0033721923828125, -0.017578125, 0.0032196044921875, 0.0225830078125, -0.01312255859375, 0.0201416015625, 0.006011962890625, -0.007476806640625, 0.0009918212890625, -0.0059814453125, 0.00189208984375, -0.0223388671875, -0.022705078125, 0.004730224609375, 0.005096435546875, -0.0115966...
[ 11249, 47, 96760, 79315, 5303, 111, 892, 1505, 91, 2452, 3454, 4867, 502, 3034, 124326, 12301, 86429, 188, 40899, 54397, 1193, 2203, 133063, 82449, 104629, 129678, 617, 363, 304, 76172, 11435, 25632, 18151, 14359, 107, 2965, 3917, 541, 6601...
[ 0.0712890625, 0.1278076171875, 0.1962890625, 0.2783203125, 0.208251953125, 0.131591796875, 0.158447265625, 0.167236328125, 0.02508544921875, 0.156005859375, 0.058563232421875, 0.1419677734375, 0.0491943359375, 0.1114501953125, 0.2005615234375, 0.09674072265625, 0.1207275390625, 0.1...
embed
57602541_c0
57602541
prolog
0
Title: How do I determine if a prolog `compund term` has a particular `atom` inside? Problem title: How do I determine if a prolog `compund term` has a particular `atom` inside? Tags: prolog Problem: How do I determine if a prolog `compund term` has a particular `atom` inside? I want a predicate to tell whether a parti...
How do I determine if a prolog `compund term` has a particular `atom` inside? How do I determine if a prolog `compund term` has a particular `atom` inside? prolog How How do I determine if a prolog `compund term` has a particular `atom` inside? I want a predicate to tell whether a particular atom (say x ) appears insid...
[ -0.0002689361572265625, 0.0113525390625, 0.004150390625, 0.017333984375, -0.006500244140625, 0.0098876953125, 0.025146484375, -0.009765625, -0.0115966796875, -0.045166015625, 0.0107421875, 0.00185394287109375, -0.009033203125, 0.0042724609375, 0.01080322265625, 0.006866455078125, 0.0...
[ 11249, 54, 87, 83324, 2174, 502, 4867, 58875, 7030, 13579, 1556, 17311, 11, 5928, 46132, 10, 3444, 1653, 2063, 47, 14192, 36766, 34627, 1022, 135179, 217773, 49903, 53894, 8512, 12301, 1636, 2452, 3454, 29713, 669, 9051, 32166, 83687, 12239...
[ 0.064208984375, 0.046417236328125, 0.0266876220703125, 0.1954345703125, 0.1214599609375, 0.1749267578125, 0.2427978515625, 0.1075439453125, 0.192626953125, 0.242919921875, 0.091552734375, 0.1580810546875, 0.03985595703125, 0.24951171875, 0.1915283203125, 0.0013427734375, 0.0357971191...
embed
3924654_c0
3924654
prolog
0
Title: Datalog vs CLIPS vs Prolog Problem title: Datalog vs CLIPS vs Prolog Tags: datalog, prolog, logic-programming, clips Problem: Datalog vs CLIPS vs Prolog 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...
Datalog vs CLIPS vs Prolog Datalog vs CLIPS vs Prolog datalog prolog logic-programming clips Datalog CLIPS Prolog Datalog vs CLIPS vs Prolog 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 ...
[ 0.028076171875, 0.017333984375, 0.0120849609375, 0.0257568359375, -0.00927734375, 0.013671875, -0.005401611328125, -0.0181884765625, 0.01043701171875, -0.000370025634765625, -0.01165771484375, -0.010986328125, -0.0062255859375, -0.011474609375, -0.001129150390625, -0.005157470703125, ...
[ 11809, 4867, 20209, 313, 175909, 294, 1250, 2053, 502, 62775, 28966, 34196, 5941, 77848, 22282, 71, 152363, 4734, 10176, 28219, 136, 20903, 62548, 1284, 83, 8781, 42, 18822, 14602, 959, 56566, 12989, 214, 70731, 9077, 15400, 92940, 134598, ...
[ 0.1685791015625, 0.275146484375, 0.1171875, 0.0770263671875, 0.2293701171875, 0.1826171875, 0.1904296875, 0.099609375, 0.1199951171875, 0.1358642578125, 0.08837890625, 0.1956787109375, 0.030487060546875, 0.1539306640625, 0.05712890625, 0.01361083984375, 0.07843017578125, 0.00283813...
embed
40830588_c0
40830588
prolog
0
Title: Addition of elements from a list Problem title: Addition of elements from a list Tags: prolog Problem: Addition of elements from a list I want to make a program, which generates elements from 1 to N, save them in a list and make the addition oft them. N is depending on the length of the list. For example, when I...
Addition of elements from a list Addition of elements from a list prolog a Addition Addition of elements from a list I want to make a program, which generates elements from 1 to N, save them in a list and make the addition oft them. N is depending on the length of the list. For example, when I ask for "add(L,A)" it sho...
[ -0.00015354156494140625, 0.0184326171875, -0.0101318359375, 0.007598876953125, -0.01336669921875, 0.012451171875, 0.0035247802734375, 0.00775146484375, 0.01025390625, -0.049560546875, 0.0284423828125, -0.0152587890625, -0.0032501220703125, 0.016357421875, 0.01043701171875, -0.022338867...
[ 29117, 14, 1363, 111, 80854, 1295, 5303, 10, 502, 4867, 87, 3444, 3249, 1528, 139392, 106, 47, 541, 30098, 23, 70, 66044, 21315, 2856, 8, 96819, 140909, 26458, 11, 4028, 866, 284, 5608, 8337, 163, 1650, 4488, 678, 285, 17721, 1653, 20...
[ 0.1605224609375, 0.14013671875, 0.09613037109375, 0.035614013671875, 0.2244873046875, 0.1624755859375, 0.21728515625, 0.0499267578125, 0.1630859375, 0.2188720703125, 0.000701904296875, 0.1138916015625, 0.0777587890625, 0.169921875, 0.1343994140625, 0.061279296875, 0.087890625, 0.10...
embed
26026888_c0
26026888
prolog
0
Title: dont know how to unificate this in prolog Problem title: dont know how to unificate this in prolog Tags: prolog Problem: dont know how to unificate this in prolog Hi if i have the next knowladge base natural(0). natural(suc(X)):-natural(X). sum(0,N,N). sum(suc(N),suc(N),R). mult(N,1,N). mult(number,times,result)...
dont know how to unificate this in prolog dont know how to unificate this in prolog prolog times-1 dont know how to unificate this in prolog Hi if i have the next knowladge base and i ask the query ? mult(5,3,15). how does prolog runs this??? first i instanciate number to 5, times to 3, and 5 to result. And after it un...
[ 0.0146484375, 0.03564453125, 0.010986328125, 0.013427734375, 0.007049560546875, -0.01055908203125, -0.00341796875, 0.0164794921875, 0.00726318359375, -0.05517578125, -0.00665283203125, -0.0125732421875, -0.0126953125, 0.00244140625, 0.0035400390625, 0.00170135498046875, 0.03515625, ...
[ 13319, 3714, 3642, 51, 65256, 13, 903, 23, 502, 4867, 20028, 5759, 11737, 6616, 429, 3647, 26458, 41, 1294, 3869, 104116, 363, 62155, 127877, 190316, 67, 14012, 47, 190, 138, 16750, 5, 678, 10336, 43240, 14361, 70731, 34292, 2878, 289, ...
[ 0.085693359375, 0.102783203125, 0.046722412109375, 0.14453125, 0.201171875, 0.1202392578125, 0.105712890625, 0.03656005859375, 0.1446533203125, 0.2320556640625, 0.173583984375, 0.1099853515625, 0.030731201171875, 0.0775146484375, 0.05523681640625, 0.1241455078125, 0.05462646484375, ...
embed
66941945_c0
66941945
prolog
0
Title: Descending List From N to 1 Problem title: Descending List From N to 1 Tags: prolog, recursion Problem: Descending List From N to 1 I'm trying to make a predicate desclist(N,L) (N is a natural number and L is a list of natural numbers in descending order from N to 1). Also i can't use is/2, metalogic predicates,...
Descending List From N to 1 Descending List From N to 1 prolog recursion Descending List Descending List From N to 1 I'm trying to make a predicate desclist(N,L) (N is a natural number and L is a list of natural numbers in descending order from N to 1). Also i can't use is/2, metalogic predicates, negation, fails, cuts...
[ 0.0235595703125, -0.0011444091796875, -0.00665283203125, 0.00640869140625, 0.01043701171875, 0.015380859375, 0.00150299072265625, 0.00665283203125, 0.01239013671875, -0.02197265625, 0.016357421875, -0.0279541015625, 0.00014591217041015625, 0.004730224609375, 0.0002899169921875, 0.01721...
[ 68320, 33, 6238, 32036, 28090, 541, 47, 106, 502, 4867, 195625, 1830, 31577, 3249, 1653, 2063, 67, 224, 238, 6562, 839, 4, 866, 83, 6083, 14012, 339, 5303, 101935, 60887, 12989, 1295, 4879, 831, 4527, 12477, 23550, 137043, 108, 125682, ...
[ 0.1866455078125, 0.185791015625, 0.08294677734375, 0.2138671875, 0.0924072265625, 0.199462890625, 0.1624755859375, 0.1600341796875, 0.146484375, 0.1790771484375, 0.156005859375, 0.0399169921875, 0.07122802734375, 0.053253173828125, 0.135009765625, 0.1707763671875, 0.06878662109375, ...
embed
23035186_c0
23035186
prolog
0
Title: Translate list comprehension to Prolog Problem title: Translate list comprehension to Prolog Tags: list-comprehension, haskell, prolog Problem: Translate list comprehension to Prolog I have a list comprehension in Haskell that I want to translate to Prolog. The point of the list comprehension is rotating a 4 by ...
Translate list comprehension to Prolog Translate list comprehension to Prolog list-comprehension haskell prolog Translate Prolog T10 T11 T12 T13 T14 T15 Translate list comprehension to Prolog I have a list comprehension in Haskell that I want to translate to Prolog. The point of the list comprehension is rotating a 4 b...
[ -0.019775390625, 0.0002841949462890625, 0.0225830078125, -0.005401611328125, -0.0013885498046875, -0.007568359375, -0.0216064453125, 0.0159912109375, 0.0038909912109375, -0.01300048828125, -0.00872802734375, 0.0038909912109375, 0.004302978515625, -0.0184326171875, -0.0263671875, 0.0048...
[ 11062, 19309, 5303, 46683, 3220, 6889, 47, 1250, 4867, 277, 4692, 1556, 142508, 502, 963, 1530, 2681, 2592, 1837, 20625, 3444, 3900, 6275, 47014, 1916, 201, 390, 120067, 143, 3674, 1884, 903, 4171, 11522 ]
[ 0.1279296875, 0.16357421875, 0.2073974609375, 0.1722412109375, 0.1798095703125, 0.0615234375, 0.10687255859375, 0.1717529296875, 0.2388916015625, 0.03887939453125, 0.14501953125, 0.113525390625, 0.22802734375, 0.09716796875, 0.047607421875, 0.00457763671875, 0.0158538818359375, 0.0...
embed
14166913_c0
14166913
prolog
0
Title: user defined square predicate Problem title: user defined square predicate Tags: prolog Problem: user defined square predicate I am using SWI-Prolog V 6.2.3 on Windows 7. I have written the following predicates that calculate the absolute value and the square of an integer: myabs(X,X):- X > = 0. myabs(X,Y):- Y i...
user defined square predicate user defined square predicate prolog user defined square predicate I am using SWI-Prolog V 6.2.3 on Windows 7. I have written the following predicates that calculate the absolute value and the square of an integer: I get errors (operator error) for the following lines: I understand there a...
[ 0.01031494140625, -0.02197265625, 0.0091552734375, -0.0023193359375, -0.01385498046875, 0.0198974609375, 0.0155029296875, 0.01318359375, 0.005462646484375, -0.0002880096435546875, 0.019775390625, 0.015380859375, -0.0027008056640625, -0.029052734375, 0.004669189453125, -0.0048828125, ...
[ 38937, 61924, 108047, 1653, 2063, 67, 71, 502, 4867, 17368, 159, 38969, 9, 10752, 310, 2289, 120883, 98, 3773, 2861, 59121, 25632, 1636, 74481, 89931, 34292, 136, 111, 892, 1505, 2046, 18499, 206469, 100, 124519, 28219, 88303, 73, 6097, 3...
[ 0.1885986328125, 0.19384765625, 0.2423095703125, 0.2021484375, 0.2174072265625, 0.052642822265625, 0.0151519775390625, 0.148193359375, 0.202392578125, 0.0830078125, 0.06158447265625, 0.216796875, 0.0213165283203125, 0.1370849609375, 0.134521484375, 0.0830078125, 0.137451171875, 0.0...
embed
41164778_c0
41164778
prolog
0
Title: Trying to program four fours in prolog Problem title: Trying to program four fours in prolog Tags: prolog Problem: Trying to program four fours in prolog Trying to solve the four fours program using prolog. Not sure where to begin. It is similar to the 1996 math problem. Link I can do it in C, but can't figure o...
Trying to program four fours in prolog Trying to program four fours in prolog prolog Trying Trying to program four fours in prolog Trying to solve the four fours program using prolog. Not sure where to begin. It is similar to the 1996 math problem. Link I can do it in C, but can't figure out how to get it to prolog. Do...
[ -0.0013275146484375, 0.00848388671875, -0.01025390625, -0.0050048828125, -0.006591796875, -0.00005984306335449219, -0.00848388671875, 0.009765625, 0.012939453125, -0.042724609375, -0.01318359375, -0.0023651123046875, -0.008056640625, 0.00421142578125, -0.0027313232421875, -0.0043945312...
[ 40858, 214, 1528, 22759, 7, 23, 502, 4867, 47, 86869, 17368, 9077, 7440, 9842, 83, 21373, 11891, 48909, 2967, 12779, 831, 54, 313, 4, 26366, 1810, 3642, 2046, 442, 765, 157666, 172864, 2060, 34475, 10, 5303, 111, 7722, 101935, 617, 1240...
[ 0.121826171875, 0.035430908203125, 0.2132568359375, 0.29443359375, 0.115478515625, 0.07025146484375, 0.1793212890625, 0.239990234375, 0.109130859375, 0.139404296875, 0.071044921875, 0.0318603515625, 0.000518798828125, 0.0762939453125, 0.0184326171875, 0.0731201171875, 0.173583984375,...
embed
4372040_c0
4372040
prolog
0
Title: Filter out large number from list in prolog Problem title: Filter out large number from list in prolog Tags: prolog Problem: Filter out large number from list in prolog I want to write a function which filters a list of numbers by removing everything less than or equal to a specific number. The function will tak...
Filter out large number from list in prolog Filter out large number from list in prolog prolog list Filter filter_num_list test_filter_num_list Filter out large number from list in prolog I want to write a function which filters a list of numbers by removing everything less than or equal to a specific number. The funct...
[ 0.00025177001953125, 0.017578125, -0.00689697265625, -0.017578125, -0.002685546875, -0.002197265625, -0.019775390625, 0.016845703125, 0.01708984375, 0.0260009765625, -0.006927490234375, -0.0260009765625, -0.0191650390625, 0.004791259765625, 0.02685546875, 0.00133514404296875, 0.03149...
[ 128896, 1810, 21334, 14012, 1295, 5303, 23, 502, 4867, 46312, 2606, 6562, 3034, 120337, 3444, 33022, 32354, 7, 101935, 49146, 6496, 26818, 40715, 3501, 105950, 29458, 5646, 6626, 171859, 5608, 30646, 756, 150679, 6032, 1884, 903 ]
[ 0.2236328125, 0.1473388671875, 0.159423828125, 0.1767578125, 0.1033935546875, 0.1953125, 0.04168701171875, 0.156005859375, 0.2144775390625, 0.222900390625, 0.15234375, 0.163330078125, 0.1212158203125, 0.2169189453125, 0.052734375, 0.0704345703125, 0.1531982421875, 0.01104736328125,...
embed
29354203_c0
29354203
prolog
0
Title: Prolog predicate sorting a list with respect to sublist Problem title: Prolog predicate sorting a list with respect to sublist Tags: prolog, sorting Problem: Prolog predicate sorting a list with respect to sublist In prolog I tried to write a predicate which takes three parameters first one is a sublist of secon...
Prolog predicate sorting a list with respect to sublist Prolog predicate sorting a list with respect to sublist prolog sorting Prolog Result First Second Prolog predicate sorting a list with respect to sublist In prolog I tried to write a predicate which takes three parameters first one is a sublist of second one , thi...
[ 0.0037078857421875, 0.0003719329833984375, 0.027099609375, -0.009033203125, -0.01904296875, 0.0111083984375, 0.0010223388671875, 0.017578125, 0.0115966796875, -0.01507568359375, 0.00860595703125, 0.0272216796875, -0.00958251953125, -0.005340576171875, 0.007537841796875, -0.006011962890...
[ 1250, 4867, 1653, 2063, 67, 12096, 214, 5303, 15072, 1614, 6562, 502, 126684, 23972, 77648, 37842, 33022, 51776, 17262, 171859, 5117, 1632, 17932, 50960, 17497, 96853, 5608, 11, 238, 71, 275, 420, 18151, 20697 ]
[ 0.1715087890625, 0.222412109375, 0.18017578125, 0.2188720703125, 0.105712890625, 0.215087890625, 0.01123046875, 0.174072265625, 0.098876953125, 0.177978515625, 0.188720703125, 0.1195068359375, 0.191162109375, 0.06201171875, 0.0750732421875, 0.05035400390625, 0.082763671875, 0.02919...
embed
30251807_c0
30251807
prolog
0
Title: add some member to a list with prolog Problem title: add some member to a list with prolog Tags: prolog, list Problem: add some member to a list with prolog i have some facts.I want to make a list of members of this facts and show these members by function.but i don't know how to do it. i try this code : hasDiab...
add some member to a list with prolog add some member to a list with prolog prolog list add some member to a list with prolog i have some facts.I want to make a list of members of this facts and show these members by function.but i don't know how to do it. i try this code : here i want to make a list of thing that hasv...
[ 0.0269775390625, -0.006561279296875, 0.0223388671875, 0.01116943359375, -0.0250244140625, 0.00250244140625, -0.00970458984375, 0.026123046875, 0.0086669921875, -0.044921875, 0.02734375, 0.005218505859375, 0.0091552734375, 0.0003509521484375, -0.000919342041015625, -0.0155029296875, -...
[ 15190, 3060, 32786, 47, 10, 5303, 678, 502, 4867, 765, 15824, 7, 3444, 3249, 43032, 111, 7639, 390, 32354, 3714, 3642, 54, 9790, 18151, 13580, 1556, 81461, 397, 124111, 136, 56125, 33022, 73203, 10593, 1542, 1284, 3034, 140992, 83, 4358, ...
[ 0.1536865234375, 0.07763671875, 0.2393798828125, 0.1341552734375, 0.0732421875, 0.2335205078125, 0.098876953125, 0.1539306640625, 0.2408447265625, 0.01611328125, 0.150390625, 0.056884765625, 0.06689453125, 0.05145263671875, 0.18408203125, 0.032928466796875, 0.1165771484375, 0.02751...
embed
61919491_c0
61919491
prolog
0
Title: How can I determine centrality in a node graph in Prolog? Problem title: How can I determine centrality in a node graph in Prolog? Tags: prolog Problem: How can I determine centrality in a node graph in Prolog? First of all this is not homework, just trying to learn Prolog on my own :) I've been reading about gr...
How can I determine centrality in a node graph in Prolog? How can I determine centrality in a node graph in Prolog? prolog How Prolog How can I determine centrality in a node graph in Prolog? First of all this is not homework, just trying to learn Prolog on my own :) I've been reading about graph theory and I thought i...
[ -0.011474609375, -0.00064849853515625, 0.00323486328125, 0.0390625, -0.0035400390625, 0.006378173828125, -0.005218505859375, -0.0264892578125, 0.008056640625, -0.0281982421875, 0.0028228759765625, -0.01434326171875, -0.0031280517578125, 0.00592041015625, 0.007171630859375, 0.0079345703...
[ 11249, 83324, 9879, 2481, 23, 110, 112, 41382, 1250, 4867, 831, 502, 18244, 30698, 10002, 154453, 21185, 29479, 17721, 90, 8093, 13452, 5303, 162708, 39210, 16610, 525, 60875, 7722, 9077, 2046, 6626, 26349, 162515, 21771, 79986 ]
[ 0.05023193359375, 0.1751708984375, 0.238525390625, 0.203369140625, 0.04315185546875, 0.1517333984375, 0.132568359375, 0.2144775390625, 0.1416015625, 0.226806640625, 0.04022216796875, 0.06463623046875, 0.052154541015625, 0.0087890625, 0.0042724609375, 0.052490234375, 0.029998779296875...
embed
3542891_c0
3542891
prolog
0
Title: Erlang Programming: Will Learning Prolog Help? Problem title: Erlang Programming: Will Learning Prolog Help? Tags: erlang, prolog Problem: Erlang Programming: Will Learning Prolog Help? Will learning Prolog help to learn Erlang in a way specific to Erlang ? Erlang started as a concurrent Prolog, but is modern Er...
Erlang Programming: Will Learning Prolog Help? Erlang Programming: Will Learning Prolog Help? erlang prolog Erlang Programming Will Learning Prolog Help Erlang Programming: Will Learning Prolog Help? Will learning Prolog help to learn Erlang in a way specific to Erlang ? Erlang started as a concurrent Prolog, but is mo...
[ 0.041259765625, -0.00323486328125, 0.0120849609375, 0.01544189453125, -0.009521484375, 0.0252685546875, -0.01336669921875, -0.01080322265625, 0.00010585784912109375, -0.03662109375, 0.0128173828125, -0.0198974609375, -0.006561279296875, -0.0079345703125, 0.0017242431640625, 0.006408691...
[ 1004, 3066, 27958, 214, 12, 20255, 114344, 1250, 4867, 39527, 72, 502, 52080, 4358, 30698, 29458, 26859, 133244, 5744, 162711, 47, 9480, 6002, 86531, 28219, 13648, 4127, 1261, 7008, 100, 56037, 449, 2499, 46876, 3714, 1221, 183037, 31486, 3...
[ 0.1810302734375, 0.28369140625, 0.1591796875, 0.0791015625, 0.0176239013671875, 0.1024169921875, 0.14697265625, 0.1964111328125, 0.251953125, 0.194580078125, 0.0994873046875, 0.119873046875, 0.1324462890625, 0.1629638671875, 0.133544921875, 0.10498046875, 0.032958984375, 0.13525390...
embed
7738143_c0
7738143
prolog
0
Title: Prolog Insert list as element into another List Problem title: Prolog Insert list as element into another List Tags: list, prolog Problem: Prolog Insert list as element into another List In my program my P = [0,1,2] I want to store it into another LIST, because P will keep changing in a loop so I want to store P...
Prolog Insert list as element into another List Prolog Insert list as element into another List list prolog Prolog Insert List Prolog Insert list as element into another List In my program my P = [0,1,2] I want to store it into another LIST, because P will keep changing in a loop so I want to store P into a LIST, so my...
[ 0.017333984375, 0.0001888275146484375, 0.001190185546875, 0.0269775390625, -0.013427734375, 0.03076171875, -0.037109375, -0.006683349609375, 0.015869140625, -0.0240478515625, 0.02490234375, -0.0179443359375, -0.006561279296875, -0.01025390625, -0.005340576171875, 0.01068115234375, 0....
[ 1250, 4867, 360, 33657, 5303, 237, 12830, 3934, 15700, 32036, 502, 1528, 436, 2203, 2389, 133063, 3444, 4343, 195977, 1221, 13695, 151134, 40956, 1884, 35064, 80389, 910, 136005, 28282, 6562, 724, 841, 683, 9077, 30646, 163, 110, 2046, 1292...
[ 0.1591796875, 0.2127685546875, 0.07086181640625, 0.14697265625, 0.2252197265625, 0.0946044921875, 0.1827392578125, 0.117919921875, 0.119140625, 0.21923828125, 0.1251220703125, 0.115966796875, 0.1309814453125, 0.031585693359375, 0.027618408203125, 0.1202392578125, 0.06707763671875, ...
embed
78123105_c0
78123105
prolog
0
Title: Dependency graph Prolog Problem title: Dependency graph Prolog Tags: dependencies, prolog Problem: Dependency graph Prolog I have a prolog file in which I have predicates of the type: nondet_(A,B,C,D,E,F,G,H) :- (I = 0), summary_5(A,B,C,D,J,K,L,G,H), nondet(I,B,C,D,E,F,K,L). interface_0(A,B,C,D,E) :- (F = 0), su...
Dependency graph Prolog Dependency graph Prolog dependencies prolog Dependency Prolog nondet_ summary_5 block_10 summary_4 interface_0 Dependency graph Prolog I have a prolog file in which I have predicates of the type: How can I make (even using another tool) a dependency graph of predicates? I need to generate the gr...
[ 0.01324462890625, 0.019775390625, -0.0081787109375, 0.0035858154296875, -0.0245361328125, 0.027099609375, -0.01318359375, 0.00579833984375, -0.00543212890625, -0.0291748046875, -0.01348876953125, 0.00860595703125, -0.021728515625, 0.00927734375, 0.0208740234375, 0.033203125, 0.012329...
[ 262, 26885, 27771, 41382, 1250, 4867, 42548, 117538, 502, 351, 3667, 177074, 758, 46389, 963, 617, 101758, 2389, 11435, 1653, 2063, 1636, 10644, 3249, 55516, 111, 3871, 139392, 26698, 28032, 26693, 3900, 143, 3328, 19, 70731, 46876 ]
[ 0.0767822265625, 0.1768798828125, 0.1002197265625, 0.2432861328125, 0.14501953125, 0.209716796875, 0.1966552734375, 0.1044921875, 0.1068115234375, 0.07147216796875, 0.1304931640625, 0.123291015625, 0.0775146484375, 0.1082763671875, 0.07147216796875, 0.04150390625, 0.10400390625, 0....
embed
9088062_c0
9088062
prolog
0
Title: Count the number of occurrences of a number in a list Problem title: Count the number of occurrences of a number in a list Tags: list, prolog Problem: Count the number of occurrences of a number in a list I'm writing a program in prolog that count the number of occurrences of a number in a list count([],X,0). co...
Count the number of occurrences of a number in a list Count the number of occurrences of a number in a list list prolog Count Count the number of occurrences of a number in a list I'm writing a program in prolog that count the number of occurrences of a number in a list and this is the output it's count the same number...
[ 0.0028228759765625, 0.000659942626953125, -0.00029754638671875, -0.00250244140625, 0.01263427734375, -0.00921630859375, -0.0235595703125, 0.01068115234375, 0.0218505859375, -0.03076171875, -0.0181884765625, -0.036865234375, -0.0034332275390625, 0.0225830078125, 0.021484375, -0.00029563...
[ 108210, 70, 14012, 111, 74918, 42, 69098, 10, 23, 5303, 502, 4867, 32562, 1528, 54529, 140992, 5701, 40368, 20028, 4358, 77947 ]
[ 0.1978759765625, 0.02667236328125, 0.186279296875, 0.061279296875, 0.167236328125, 0.1593017578125, 0.1348876953125, 0.036376953125, 0.0927734375, 0.2032470703125, 0.114501953125, 0.1654052734375, 0.0887451171875, 0.1185302734375, 0.1920166015625, 0.1475830078125, 0.1104736328125, ...
embed
4073073_c0
4073073
prolog
0
Title: what algorithm for a scheduling program Problem title: what algorithm for a scheduling program Tags: clpfd, prolog, algorithm, scheduling Problem: what algorithm for a scheduling program I have this problem of scheduling tasks. Each task has a suggested start time T (it needs to start at [T-10, T+10]), takes L m...
what algorithm for a scheduling program what algorithm for a scheduling program clpfd prolog algorithm scheduling what algorithm for a scheduling program I have this problem of scheduling tasks. Each task has a suggested start time T (it needs to start at [T-10, T+10]), takes L minutes to complete and uses a number of ...
[ -0.001007080078125, 0.0198974609375, 0.00286865234375, 0.0142822265625, -0.0263671875, -0.026123046875, -0.0162353515625, 0.004486083984375, -0.01470947265625, -0.062255859375, 0.0022735595703125, 0.0033111572265625, -0.01019287109375, 0.0118408203125, -0.0096435546875, 0.0018234252929...
[ 2367, 234873, 100, 10, 5094, 15246, 2069, 1528, 33139, 39557, 71, 502, 4867, 2967, 66211, 98423, 42459, 4034, 1733, 384, 27117, 618, 9193, 1328, 963, 51776, 339, 14633, 28484, 4527, 14012, 65514, 1052, 627, 304, 177953, 11814, 110, 831, 4...
[ 0.1199951171875, 0.288330078125, 0.1336669921875, 0.04144287109375, 0.182861328125, 0.2227783203125, 0.1199951171875, 0.1895751953125, 0.09649658203125, 0.1251220703125, 0.176025390625, 0.1376953125, 0.2197265625, 0.076904296875, 0.1748046875, 0.05120849609375, 0.111083984375, 0.10...
embed
6762591_c1
6762591
prolog
1
(PROG2,['M'],PROG), p1(A,M,X2,Y2,LO,HO,PROG2) ; false). The program should calculate an appropriate path of additions and multiplications leading from every number between li and hi to a result between lo and ho. An addition corresponds to the letter A and multiplication corresponds to M. At the end of the program we a...
(PROG2,['M'],PROG), p1(A,M,X2,Y2,LO,HO,PROG2) ; false). The program should calculate an appropriate path of additions and multiplications leading from every number between li and hi to a result between lo and ho. An addition corresponds to the letter A and multiplication corresponds to M. At the end of the program we a...
[ -0.000720977783203125, -0.00848388671875, -0.00439453125, 0.0281982421875, -0.006072998046875, 0.028076171875, -0.0167236328125, -0.000904083251953125, 0.026123046875, -0.02490234375, 0.0150146484375, 0.00390625, -0.00836181640625, 0.0024261474609375, 0.01348876953125, 0.00576782226562...
[ 47970, 724, 304, 594, 915, 418, 284, 1542, 1723, 17014, 17933, 10461, 98320, 1528, 5608, 74481, 67, 95307, 60875, 66044, 136, 127664, 105207, 1295, 11907, 14012, 17721, 400, 1274, 16750, 459, 739, 42518, 31330, 62, 1363, 276, 3564, 134598, ...
[ 0.124267578125, 0.1396484375, 0.1353759765625, 0.1136474609375, 0.0233001708984375, 0.0924072265625, 0.0665283203125, 0.030487060546875, 0.052947998046875, 0.1279296875, 0.1390380859375, 0.0693359375, 0.1099853515625, 0.1966552734375, 0.037841796875, 0.19677734375, 0.0261993408203125...
embed
76266118_c0
76266118
prolog
0
Title: Can Prolog-like unification be expressed in a point free way? Problem title: Can Prolog-like unification be expressed in a point free way? Tags: pointfree, prolog, unification, j Problem: Can Prolog-like unification be expressed in a point free way? Pattern matching can be implemented using a point free style, a...
Can Prolog-like unification be expressed in a point free way? Can Prolog-like unification be expressed in a point free way? pointfree prolog unification j Can Prolog-like Can Prolog-like unification be expressed in a point free way? Pattern matching can be implemented using a point free style, and there are many articl...
[ 0.0107421875, 0.026123046875, 0.01397705078125, -0.0223388671875, -0.01025390625, -0.02490234375, -0.0034637451171875, -0.002288818359375, 0.0194091796875, -0.023681640625, -0.006744384765625, 0.01153564453125, 0.00921630859375, -0.012451171875, -0.0196533203125, 0.00592041015625, -0...
[ 4171, 1250, 4867, 5062, 51, 41274, 36510, 297, 6275, 4092, 3917, 32087, 502, 1647, 9876, 22766, 14858, 214, 831, 29479, 20623, 16401, 7722, 46876, 821, 40225, 80728, 43599 ]
[ 0.041534423828125, 0.1512451171875, 0.237548828125, 0.155029296875, 0.1463623046875, 0.1429443359375, 0.17578125, 0.03424072265625, 0.1572265625, 0.1866455078125, 0.07342529296875, 0.1658935546875, 0.1048583984375, 0.12109375, 0.125244140625, 0.1412353515625, 0.2034912109375, 0.066...
embed
37263211_c0
37263211
prolog
0
Title: Prolog: Is there a command to list all built in predicates? Problem title: Prolog: Is there a command to list all built in predicates? Tags: prolog Problem: Prolog: Is there a command to list all built in predicates? Is there a command that can be used in Sicstus Prolog that prints a list of built in predicates ...
Prolog: Is there a command to list all built in predicates? Prolog: Is there a command to list all built in predicates? prolog Prolog Prolog: Is there a command to list all built in predicates? Is there a command that can be used in Sicstus Prolog that prints a list of built in predicates to the console window? Or some...
[ 0.0025787353515625, -0.00113677978515625, 0.01318359375, 0.009033203125, -0.006988525390625, 0.034912109375, 0.009765625, -0.0194091796875, 0.0062255859375, -0.0198974609375, 0.01190185546875, -0.006561279296875, -0.02978515625, -0.01043701171875, 0.00055694580078125, 0.0186767578125, ...
[ 1250, 4867, 2685, 75101, 5303, 756, 88303, 23, 1653, 2063, 1636, 10, 47, 502, 831, 11814, 63457, 18253, 28412, 130250, 76896, 21373, 224833, 3126, 42459, 67, 189461, 318, 33478, 35509, 166117, 38969, 10752, 2452, 3454, 29713, 187694, 19714, ...
[ 0.1649169921875, 0.222412109375, 0.034515380859375, 0.2413330078125, 0.1744384765625, 0.1224365234375, 0.1737060546875, 0.14404296875, 0.1981201171875, 0.2132568359375, 0.150146484375, 0.0648193359375, 0.06146240234375, 0.107666015625, 0.012939453125, 0.10113525390625, 0.117065429687...
embed
43209782_c0
43209782
prolog
0
Title: Finiding sublist with with limit indexes in prolog Problem title: Finiding sublist with with limit indexes in prolog Tags: prolog Problem: Finiding sublist with with limit indexes in prolog The predicate subList(I1,I2,L,Sub) holds if Sub is a sublist of the list L . Sub contains the elements occurring in L from ...
Finiding sublist with with limit indexes in prolog Finiding sublist with with limit indexes in prolog prolog Finiding Sub Acc NewAcc Finiding sublist with with limit indexes in prolog The predicate subList(I1,I2,L,Sub) holds if Sub is a sublist of the list L . Sub contains the elements occurring in L from index: I1 til...
[ -0.005828857421875, -0.00005745887756347656, 0.01055908203125, 0.006439208984375, -0.0234375, 0.0164794921875, -0.0126953125, 0.03515625, 0.030029296875, -0.0079345703125, 0.0181884765625, -0.0013427734375, 0.0034637451171875, 0.00860595703125, 0.01409912109375, 0.010498046875, 0.043...
[ 13316, 86675, 1614, 6562, 678, 17475, 63262, 90, 502, 4867, 8273, 29899, 2356, 10060, 1653, 2063, 67, 154663, 568, 418, 304, 866, 96472, 16401, 2174, 83, 70, 5303, 339, 70541, 80854, 74918, 1295, 87, 570, 29806, 1284, 76199, 22225, 184, ...
[ 0.180419921875, 0.0841064453125, 0.251953125, 0.2437744140625, 0.1103515625, 0.229248046875, 0.1741943359375, 0.07196044921875, 0.14306640625, 0.207763671875, 0.270263671875, 0.07525634765625, 0.08026123046875, 0.0789794921875, 0.1121826171875, 0.124755859375, 0.03594970703125, 0.2...
embed
10001344_c0
10001344
prolog
0
Title: How to solve this puzzle in Prolog? Problem title: How to solve this puzzle in Prolog? Tags: prolog, puzzle Problem: How to solve this puzzle in Prolog? I am trying to solve a puzzle in Prolog that involves taking a square of numbers (a list of a list of numbers) and returning the list of the greatest combinatio...
How to solve this puzzle in Prolog? How to solve this puzzle in Prolog? prolog puzzle How Prolog How to solve this puzzle in Prolog? I am trying to solve a puzzle in Prolog that involves taking a square of numbers (a list of a list of numbers) and returning the list of the greatest combination of numbers starting at th...
[ 0.010986328125, 0.00970458984375, -0.01019287109375, 0.0189208984375, -0.02001953125, 0.019287109375, -0.0111083984375, -0.01068115234375, 0.0004863739013671875, -0.01043701171875, -0.009521484375, -0.00726318359375, 0.0028076171875, 0.00433349609375, -0.00174713134765625, 0.0055541992...
[ 11249, 47, 86869, 903, 104192, 23, 1250, 4867, 32, 502, 87, 31577, 83687, 35971, 108047, 101935, 5303, 30646, 158036, 162515, 72134, 2663, 7730, 7565, 15555, 98423, 25813, 8110, 40101, 7108, 707, 25737, 12960, 5036, 35672, 3687, 5809, 9842, ...
[ 0.138427734375, 0.09210205078125, 0.21435546875, 0.155517578125, 0.2381591796875, 0.142822265625, 0.2174072265625, 0.290283203125, 0.024444580078125, 0.1795654296875, 0.00262451171875, 0.07354736328125, 0.028594970703125, 0.0919189453125, 0.1717529296875, 0.14794921875, 0.11975097656...
embed
30571749_c1
30571749
prolog
1
{ "access_token":"1/fFAGRNJru1FTz70BzhT3Zg", "expires_in":3920, "token_type":"Bearer" } Do I have to do something different because it is https or am I making a mistake somewhere else? Tracing it seems to fail in address/4 for not matching a protocol? Code signals: Google, use_module, http_dispatch, http_error, html_w...
{ "access_token":"1/fFAGRNJru1FTz70BzhT3Zg", "expires_in":3920, "token_type":"Bearer" } Do I have to do something different because it is https or am I making a mistake somewhere else? Tracing it seems to fail in address/4 for not matching a protocol? Code signals: Google, use_module, http_dispatch, http_error, html_w...
[ 0.007598876953125, 0.0272216796875, 0.00799560546875, -0.0206298828125, -0.005035400390625, -0.036865234375, 0.00970458984375, -0.0181884765625, 0.00151824951171875, -0.00390625, 0.0126953125, -0.00811767578125, -0.00921630859375, -0.01239013671875, -0.0096435546875, 0.00897216796875, ...
[ 113041, 6448, 33, 83613, 50964, 1549, 50986, 6766, 147, 56, 765, 54, 12921, 83, 3975, 20662, 121742, 4937, 21896, 37202, 35782, 29823, 17357, 959, 14858, 91363, 28864, 26073, 1815, 4527, 83279, 1621, 4453, 188800, 7693, 18781, 169234, 1647, ...
[ 0.1246337890625, 0.12109375, 0.0728759765625, 0.0595703125, 0.0579833984375, 0.04290771484375, 0.082763671875, 0.01849365234375, 0.0731201171875, 0.0888671875, 0.0272369384765625, 0.0293731689453125, 0.1434326171875, 0.0245513916015625, 0.289306640625, 0.02099609375, 0.1390380859375,...
embed
55726072_c0
55726072
prolog
0
Title: Grouping elements of 4 different lists Problem title: Grouping elements of 4 different lists Tags: list, prolog Problem: Grouping elements of 4 different lists I have the following 4 lists: A= [1,2,3], B=[4,5,6], C=[7,8,9], D=[10,11,12] I want to get another list of lists, whose first element gets the first elem...
Grouping elements of 4 different lists Grouping elements of 4 different lists list prolog Grouping ModifiedList Grouping elements of 4 different lists I have the following 4 lists: I want to get another list of lists, whose first element gets the first element of each list, second element gets the second elements of ea...
[ -0.000728607177734375, 0.0107421875, 0.0027313232421875, 0.01202392578125, -0.0145263671875, 0.0174560546875, -0.03125, 0.000476837158203125, 0.0032806396484375, -0.0042724609375, -0.004058837890625, -0.015380859375, -0.00494384765625, -0.00144195556640625, -0.0206298828125, -0.0021057...
[ 10760, 214, 80854, 111, 201, 12921, 5303, 502, 4867, 16269, 47314, 154663, 7, 765, 25632, 3444, 2046, 15700, 5117, 12830, 62163, 17932, 24209, 37842, 18, 4488, 54, 903, 1250 ]
[ 0.2259521484375, 0.046478271484375, 0.183349609375, 0.0498046875, 0.1826171875, 0.14453125, 0.1998291015625, 0.0966796875, 0.2064208984375, 0.07513427734375, 0.0897216796875, 0.134033203125, 0.01025390625, 0.009063720703125, 0.008819580078125, 0.057861328125, 0.0828857421875, 0.073...
embed
70232374_c0
70232374
prolog
0
Title: SWI Prolog list subtract gives error: Out of local stack Problem title: SWI Prolog list subtract gives error: Out of local stack Tags: prolog Problem: SWI Prolog list subtract gives error: Out of local stack I'm running some Prolog rule which uses the subtract function and in the stack trace, I found the source ...
SWI Prolog list subtract gives error: Out of local stack SWI Prolog list subtract gives error: Out of local stack prolog SWI Prolog Out lists:subtract ERROR SWI Prolog list subtract gives error: Out of local stack I'm running some Prolog rule which uses the subtract function and in the stack trace, I found the source o...
[ 0.01177978515625, 0.0194091796875, 0.00982666015625, 0.015625, -0.02490234375, 0.004180908203125, -0.0269775390625, 0.0118408203125, 0.0005950927734375, -0.0191650390625, 0.0087890625, -0.00372314453125, 0.017578125, 0.01141357421875, 0.017822265625, -0.010498046875, 0.015380859375, ...
[ 159, 38969, 1250, 4867, 5303, 1614, 39989, 18, 76199, 18499, 13538, 111, 4000, 177261, 502, 22144, 151206, 24638, 51042, 79986, 32354, 144851, 31344, 903, 7311, 11782, 84751, 140992, 275, 104, 1690, 28219, 30022, 4358 ]
[ 0.05230712890625, 0.230224609375, 0.1563720703125, 0.188232421875, 0.1773681640625, 0.1702880859375, 0.2005615234375, 0.05084228515625, 0.064697265625, 0.1923828125, 0.211669921875, 0.20166015625, 0.1822509765625, 0.2362060546875, 0.1104736328125, 0.096435546875, 0.127685546875, 0....
embed
11415907_c0
11415907
prolog
0
Title: Prolog - Filter List Problem title: Prolog - Filter List Tags: list, prolog, filter Problem: Prolog - Filter List So I have this homework due tommorow. I have to filter every nth element of a list and return it as a list. So for example: ?- everyNth(3,[a,b,c,d,e,f],Rs). Rs = [c,f]. My Idea was basically: everynt...
Prolog - Filter List Prolog - Filter List list prolog filter Prolog Filter List Prolog - Filter List So I have this homework due tommorow. I have to filter every nth element of a list and return it as a list. So for example: ?- everyNth(3,[a,b,c,d,e,f],Rs). Rs = [c,f]. My Idea was basically: But it does not work this w...
[ 0.017333984375, 0.0030364990234375, -0.00128173828125, -0.000324249267578125, 0.006317138671875, 0.0166015625, -0.00335693359375, 0.00531005859375, 0.01287841796875, -0.033203125, 0.00482177734375, -0.040283203125, -0.02294921875, 0.009765625, -0.007537841796875, 0.017822265625, 0.02...
[ 1250, 4867, 128896, 32036, 5303, 502, 46312, 765, 903, 5368, 18244, 4743, 432, 15555, 11907, 653, 927, 12830, 30646, 237, 705, 9, 839, 86827, 11, 4, 275, 238, 71, 420, 1052, 115034, 2203, 77298, 198343, 14602, 959, 4488, 3917, 50960, 19...
[ 0.148193359375, 0.242431640625, 0.26220703125, 0.193359375, 0.1982421875, 0.11083984375, 0.2548828125, 0.0265350341796875, 0.01611328125, 0.057708740234375, 0.13232421875, 0.0196990966796875, 0.0076904296875, 0.18212890625, 0.1434326171875, 0.130615234375, 0.1929931640625, 0.157104...
embed