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
70059633_c1
70059633
prolog
1
seeEachVal(P, Q, R, X, F, Res). I am trying to run seeEachVal(...) on every list in tvals . My final goal is to see P, Q, R when checkGoal gets satisfied given a user input F and desiderata R, but I only manage to get through one iteration. F can only contain variables, while R can only be t or f. Here is the output o...
seeEachVal(P, Q, R, X, F, Res). I am trying to run seeEachVal(...) on every list in tvals . My final goal is to see P, Q, R when checkGoal gets satisfied given a user input F and desiderata R, but I only manage to get through one iteration. F can only contain variables, while R can only be t or f. Here is the output o...
[ 0.0113525390625, -0.00421142578125, 0.01214599609375, -0.00506591796875, 0.0034942626953125, 0.0027618408203125, 0.0081787109375, -0.003143310546875, 0.01153564453125, 0.01373291015625, 0.01708984375, 0.01275634765625, 0.01312255859375, -0.015869140625, -0.0164794921875, -0.01275634765...
[ 1957, 647, 934, 42272, 683, 4, 2396, 627, 1193, 563, 9624, 31577, 11675, 139666, 11907, 5303, 5044, 16765, 2704, 69236, 436, 3229, 12765, 17903, 289, 214521, 38937, 107730, 77844, 102, 4734, 111240, 8305, 1632, 720, 831, 70541, 77336, 808, ...
[ 0.235595703125, 0.04254150390625, 0.1898193359375, 0.288330078125, 0.100341796875, 0.003143310546875, 0.1644287109375, 0.123291015625, 0.09100341796875, 0.1322021484375, 0.161376953125, 0.0828857421875, 0.1201171875, 0.10186767578125, 0.0975341796875, 0.1884765625, 0.1688232421875, ...
embed
32920502_c0
32920502
prolog
0
Title: Prolog: averages of items in two lists at corresponding indices Problem title: Prolog: averages of items in two lists at corresponding indices Tags: prolog, list, division, addition Problem: Prolog: averages of items in two lists at corresponding indices I am working on a Prolog program that would take two lists...
Prolog: averages of items in two lists at corresponding indices Prolog: averages of items in two lists at corresponding indices prolog list division addition Prolog Arguments Head Tail Head2 Tail2 Tail3 Prolog: averages of items in two lists at corresponding indices I am working on a Prolog program that would take two ...
[ 0.00390625, -0.0093994140625, 0.00421142578125, 0.002471923828125, -0.009765625, 0.02099609375, 0.01165771484375, -0.0052490234375, 0.024169921875, -0.0098876953125, 0.03076171875, -0.0057373046875, -0.007568359375, 0.01385498046875, 0.0024871826171875, -0.00640869140625, 0.024902343...
[ 1250, 4867, 83080, 55769, 6626, 5303, 99, 42518, 136044, 12, 502, 91853, 66044, 112140, 44816, 1218, 379, 304, 363, 23, 20697, 1528, 5646, 74481, 80854, 30646, 237, 18151, 20949, 83, 12477, 959, 129980, 34648, 18499, 44084, 33342, 1884, 560...
[ 0.2066650390625, 0.26904296875, 0.247314453125, 0.177490234375, 0.14501953125, 0.185302734375, 0.03167724609375, 0.1126708984375, 0.1651611328125, 0.003387451171875, 0.17041015625, 0.13818359375, 0.115966796875, 0.2646484375, 0.11376953125, 0.0584716796875, 0.038238525390625, 0.037...
embed
55025327_c0
55025327
prolog
0
Title: Prolog: Finding 2 times of a list numbers and putting the number and its double in a list Problem title: Prolog: Finding 2 times of a list numbers and putting the number and its double in a list Tags: recursion, prolog, nested-lists, list Problem: Prolog: Finding 2 times of a list numbers and putting the number ...
Prolog: Finding 2 times of a list numbers and putting the number and its double in a list Prolog: Finding 2 times of a list numbers and putting the number and its double in a list recursion prolog nested-lists list Prolog Finding double_list List Prolog: Finding 2 times of a list numbers and putting the number and its ...
[ 0.00885009765625, 0.00762939453125, 0.017578125, -0.00823974609375, 0.00885009765625, 0.041748046875, -0.0277099609375, 0.00616455078125, -0.000823974609375, -0.0186767578125, 0.010498046875, -0.032958984375, -0.0106201171875, 0.002166748046875, -0.001922607421875, 0.017822265625, 0....
[ 1250, 4867, 12, 26040, 116, 20028, 111, 5303, 101935, 136, 118620, 14012, 6863, 41929, 214, 195625, 1830, 502, 8512, 71, 6562, 32036, 3525, 31577, 28282, 1653, 2063, 67, 7413, 1632, 11001, 18151, 16940, 2060, 2301, 18, 3714, 23409, 44691, ...
[ 0.183349609375, 0.2568359375, 0.011810302734375, 0.1163330078125, 0.1700439453125, 0.2100830078125, 0.035552978515625, 0.1768798828125, 0.16162109375, 0.09100341796875, 0.10400390625, 0.1318359375, 0.03729248046875, 0.2066650390625, 0.0156707763671875, 0.153564453125, 0.013671875, ...
embed
15466142_c0
15466142
prolog
0
Title: tracing a simple prolog code to fully understand the CUT (!) Problem title: tracing a simple prolog code to fully understand the CUT (!) Tags: prolog-dif, prolog Problem: tracing a simple prolog code to fully understand the CUT (!) member(X,[X|T]). member(X,[H|T]):-member(X,T). delfstocc(X,[X|T],T). delfstocc(X,...
tracing a simple prolog code to fully understand the CUT (!) tracing a simple prolog code to fully understand the CUT (!) prolog-dif prolog CUT tracing a simple prolog code to fully understand the CUT (!) ـــــــــــ first , i wrote this code without using the cut , then i tried to put the cut operator after each predi...
[ 0.0260009765625, 0.0186767578125, 0.0238037109375, 0.01519775390625, 0.0002841949462890625, -0.003082275390625, 0.0017547607421875, 0.007171630859375, 0.01416015625, -0.03125, -0.00151824951171875, -0.00115966796875, 0.01153564453125, -0.00201416015625, 0.02880859375, -0.01165771484375...
[ 1152, 21896, 8781, 502, 4867, 18151, 89554, 28219, 313, 17632, 72896, 428, 420, 203754, 5117, 54397, 903, 15490, 17368, 59226, 39933, 7103, 12638, 1653, 2063, 15787, 35166, 20653, 43240, 7279, 1295, 172337, 14858, 6, 4527, 4358, 10777, 154109...
[ 0.17724609375, 0.105224609375, 0.161376953125, 0.183837890625, 0.2276611328125, 0.2088623046875, 0.048828125, 0.1446533203125, 0.092529296875, 0.2420654296875, 0.09649658203125, 0.1134033203125, 0.163818359375, 0.0145111083984375, 0.000030517578125, 0.04608154296875, 0.02066040039062...
embed
37610341_c1
37610341
prolog
1
sure it is well researched. Q: What is a bed-assignment problem called in the literature? Time-based assignments I also have a conceptual problem. I can see how I solve for one night, but how do I think of modelling multiple nights? The constraint solver (or other technique) is unaware of time (and won't know 2016-09-...
sure it is well researched. Q: What is a bed-assignment problem called in the literature? Time-based assignments I also have a conceptual problem. I can see how I solve for one night, but how do I think of modelling multiple nights? The constraint solver (or other technique) is unaware of time (and won't know 2016-09-...
[ -0.00201416015625, 0.0218505859375, 0.003204345703125, 0.02001953125, -0.0185546875, 0.005218505859375, -0.008056640625, 0.00186920166015625, 0.0028228759765625, -0.025634765625, 0.00592041015625, 0.000492095947265625, 0.0009918212890625, -0.0001773834228515625, -0.015625, 0.0139160156...
[ 9077, 442, 83, 5299, 25188, 297, 2396, 4865, 11958, 162, 31304, 674, 2967, 35839, 163136, 19055, 77007, 95486, 9035, 765, 228113, 831, 1957, 86869, 1632, 17431, 3642, 5351, 3299, 2069, 48716, 158, 2816, 4288, 3115, 814, 61353, 15876, 1733, ...
[ 0.0921630859375, 0.097900390625, 0.0804443359375, 0.091064453125, 0.197021484375, 0.116943359375, 0.0831298828125, 0.0008544921875, 0.20703125, 0.09405517578125, 0.2030029296875, 0.045166015625, 0.1865234375, 0.0567626953125, 0.1275634765625, 0.11474609375, 0.1328125, 0.21166992187...
embed
21895116_c0
21895116
prolog
0
Title: Creating a predicate that detects if a list contains repeated elements in Prolog Problem title: Creating a predicate that detects if a list contains repeated elements in Prolog Tags: duplicates, prolog Problem: Creating a predicate that detects if a list contains repeated elements in Prolog I need to define a pr...
Creating a predicate that detects if a list contains repeated elements in Prolog Creating a predicate that detects if a list contains repeated elements in Prolog duplicates prolog Creating Prolog Creating a predicate that detects if a list contains repeated elements in Prolog I need to define a predicate which detects ...
[ -0.01116943359375, 0.0174560546875, 0.00567626953125, 0.0164794921875, -0.000698089599609375, 0.0159912109375, 0.0120849609375, -0.01116943359375, -0.00958251953125, -0.00579833984375, -0.0174560546875, 0.00154876708984375, -0.015869140625, -0.01519775390625, -0.0025634765625, 0.033935...
[ 56781, 1653, 2063, 67, 96391, 2174, 5303, 70541, 119140, 297, 80854, 1250, 4867, 171763, 1636, 502, 3871, 61924, 53418, 4527, 7413, 5584, 18113, 154109, 1884, 26366, 12830, 140992, 63736, 5423, 157, 959, 3525, 903, 17368, 21771, 35405, 11583,...
[ 0.1258544921875, 0.1666259765625, 0.2037353515625, 0.1278076171875, 0.184814453125, 0.08203125, 0.15576171875, 0.1097412109375, 0.26318359375, 0.108154296875, 0.1651611328125, 0.15966796875, 0.2039794921875, 0.2325439453125, 0.0282135009765625, 0.1015625, 0.02783203125, 0.146850585...
embed
20181039_c1
20181039
prolog
1
([X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16]) :- groupof4([X1, X2, X3, X4]), groupof4([X5, X6, X7, X8]), %snip.... validnumbers4([X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16]) :- validnumber4(X1), validnumber4(X2), %..... kenken([X1, X2, X3, X4, X5, X6, X7, X8, X9, ...
([X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16]) :- groupof4([X1, X2, X3, X4]), groupof4([X5, X6, X7, X8]), %snip.... validnumbers4([X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16]) :- validnumber4(X1), validnumber4(X2), %..... kenken([X1, X2, X3, X4, X5, X6, X7, X8, X9, ...
[ -0.006256103515625, -0.01239013671875, 0.0034332275390625, 0.00885009765625, -0.01397705078125, -0.00225830078125, -0.04541015625, 0.0028533935546875, 0.015625, 0.01068115234375, -0.0040283203125, 0.015380859375, 0.00811767578125, -0.007598876953125, -0.004974365234375, 0.0084228515625...
[ 15, 1542, 418, 1193, 304, 4, 363, 617, 758, 910, 966, 1019, 1126, 963, 1662, 1530, 2681, 2592, 1837, 2485, 15772, 21115, 4390, 132, 1745, 93, 27, 35604, 2606, 1297, 7, 17727, 10461, 2591, 12785, 1098, 661, 116, 12071, 43315, 8962, 230...
[ 0.032012939453125, 0.1824951171875, 0.15283203125, 0.1737060546875, 0.1790771484375, 0.003082275390625, 0.180419921875, 0.22705078125, 0.1875, 0.1741943359375, 0.1292724609375, 0.147216796875, 0.1697998046875, 0.14306640625, 0.1644287109375, 0.1026611328125, 0.160400390625, 0.16528...
embed
24739397_c0
24739397
prolog
0
Title: Strawberry Prolog - recursive issue Problem title: Strawberry Prolog - recursive issue Tags: prolog Problem: Strawberry Prolog - recursive issue I am new to Prolog and I have an issue using this code of finding if a number is prime. finddivs(N,L) :- helpdivs(N,1,L). helpdivs(N,I,L) :- I > N. helpdivs(N,I,[Lm|Lk]...
Strawberry Prolog - recursive issue Strawberry Prolog - recursive issue prolog Strawberry Prolog Lrst is_prime is_primeh Strawberry Prolog - recursive issue I am new to Prolog and I have an issue using this code of finding if a number is prime. The result is: I tried !,fail. at the end of the function, but still doesn'...
[ -0.0079345703125, 0.022705078125, 0.0272216796875, 0.01116943359375, 0.0068359375, 0.00579833984375, 0.0062255859375, 0.00823974609375, 0.0162353515625, -0.0439453125, 0.006103515625, 0.00102996826171875, 0.006011962890625, -0.007476806640625, 0.02392578125, 0.0022735595703125, 0.010...
[ 7832, 434, 53623, 1250, 4867, 195625, 5844, 31089, 502, 339, 30541, 83, 114654, 127, 3525, 17368, 903, 18151, 90791, 2174, 14012, 20809, 16750, 87, 37842, 711, 4, 120540, 5, 3564, 32354, 1284, 7464, 22027, 18, 4358, 4171, 73342, 15400, 96...
[ 0.1326904296875, 0.114990234375, 0.251953125, 0.1658935546875, 0.2469482421875, 0.2142333984375, 0.152587890625, 0.1954345703125, 0.1158447265625, 0.034393310546875, 0.1768798828125, 0.20166015625, 0.254638671875, 0.1846923828125, 0.0677490234375, 0.00836181640625, 0.038177490234375,...
embed
23685087_c0
23685087
prolog
0
Title: Prolog counting using s(0) and p(0) Problem title: Prolog counting using s(0) and p(0) Tags: prolog, successor-arithmetics Problem: Prolog counting using s(0) and p(0) I am having some issues with a part of my revision for my prolog exam. I need to create a recursive statement that will be called simplify/2. An ...
Prolog counting using s(0) and p(0) Prolog counting using s(0) and p(0) prolog successor-arithmetics s Prolog Prolog counting using s(0) and p(0) I am having some issues with a part of my revision for my prolog exam. I need to create a recursive statement that will be called simplify/2. An example use would be which wo...
[ 0.00933837890625, 0.01251220703125, -0.0185546875, 0.01495361328125, 0.003448486328125, 0.006988525390625, -0.004730224609375, -0.004608154296875, 0.019287109375, -0.01531982421875, 0.01239013671875, -0.0272216796875, -0.008056640625, -0.01416015625, 0.013427734375, 0.0074462890625, ...
[ 1250, 4867, 54529, 214, 17368, 91, 177609, 136, 915, 502, 39457, 42, 8962, 37348, 2831, 111666, 42276, 28282, 195625, 5844, 63805, 112892, 18929, 12477, 27781, 4527, 16750, 567, 8035, 159, 9157, 436, 1653, 13, 26531, 748, 83, 106, 116, 68...
[ 0.1767578125, 0.235107421875, 0.20068359375, 0.03759765625, 0.0433349609375, 0.146240234375, 0.263916015625, 0.0565185546875, 0.105712890625, 0.1541748046875, 0.2073974609375, 0.1014404296875, 0.07537841796875, 0.03240966796875, 0.0830078125, 0.0911865234375, 0.10693359375, 0.03216...
embed
26488105_c0
26488105
prolog
0
Title: SWI Prolog - variable name and variable value Problem title: SWI Prolog - variable name and variable value Tags: prolog Problem: SWI Prolog - variable name and variable value I got a little problem with Prolog. I hope you guys can help me! 'Find' does look in List for the Index (e.g. 4) and puts the answer in Re...
SWI Prolog - variable name and variable value SWI Prolog - variable name and variable value prolog SWI Prolog List Output Element N-1 SWI Prolog - variable name and variable value I got a little problem with Prolog. I hope you guys can help me! 'Find' does look in List for the Index (e.g. 4) and puts the answer in Retu...
[ -0.002655029296875, 0.0064697265625, -0.0033721923828125, 0.0025177001953125, -0.01153564453125, 0.010498046875, -0.005523681640625, 0.012939453125, 0.006744384765625, -0.00347900390625, 0.012451171875, -0.006011962890625, -0.0142822265625, 0.00347900390625, 0.0189208984375, 0.00017642...
[ 159, 38969, 1250, 4867, 77336, 9351, 136, 34292, 502, 32036, 13538, 48325, 541, 5759, 4163, 10176, 2967, 678, 15673, 4358, 204582, 6713, 23, 100, 31471, 13956, 3884, 35166, 173340, 7413, 154663, 140992, 1884, 57767, 724, 304, 38230, 83, 707...
[ 0.07232666015625, 0.239990234375, 0.1512451171875, 0.2413330078125, 0.271240234375, 0.1405029296875, 0.06878662109375, 0.171630859375, 0.0816650390625, 0.1334228515625, 0.0904541015625, 0.1663818359375, 0.055816650390625, 0.1309814453125, 0.0248870849609375, 0.055755615234375, 0.1308...
embed
40744734_c0
40744734
prolog
0
Title: My prolog program doesn't stop when my list is empty Problem title: My prolog program doesn't stop when my list is empty Tags: prolog, list Problem: My prolog program doesn't stop when my list is empty I don't get why my program doesn't stop when my input list is empty eventhough there's a fact which c...
My prolog program doesn't stop when my list is empty My prolog program doesn't stop when my list is empty prolog list build_vps atom_number My prolog program doesn't stop when my list is empty I don't get why my program doesn't stop when my input list is empty eventhough there's a fact which can handle that c...
[ -0.0103759765625, 0.00127410888671875, -0.0004119873046875, 0.00958251953125, -0.003173828125, 0.030517578125, -0.00048828125, 0.0021514892578125, 0.00136566162109375, -0.023681640625, 0.0250244140625, -0.0007781982421875, -0.007354736328125, -0.0037078857421875, -0.0159912109375, 0.02...
[ 2646, 502, 4867, 1528, 22027, 3768, 18, 7279, 3229, 759, 5303, 83, 201505, 45367, 334, 6423, 34627, 2606, 1297, 15400, 107730, 15824, 34831, 7225, 18151, 62816, 13331, 96386, 3884, 124850, 45646, 81, 86827, 1022, 159029, 113, 363, 627, 3157...
[ 0.0291748046875, 0.1676025390625, 0.2276611328125, 0.172119140625, 0.06158447265625, 0.03533935546875, 0.084716796875, 0.1878662109375, 0.0860595703125, 0.0089111328125, 0.2152099609375, 0.04034423828125, 0.22900390625, 0.1597900390625, 0.1279296875, 0.1602783203125, 0.1734619140625,...
embed
15388454_c0
15388454
prolog
0
Title: Prolog ancestor clause using lists Problem title: Prolog ancestor clause using lists Tags: prolog Problem: Prolog ancestor clause using lists I am struggling to get my head around this basic Prolog concept. I understand that the basic clause for determining the ancestor of a person is as follows: ancestor(X, Y) ...
Prolog ancestor clause using lists Prolog ancestor clause using lists prolog lists Prolog parent_of father_of List my_member Prolog ancestor clause using lists I am struggling to get my head around this basic Prolog concept. I understand that the basic clause for determining the ancestor of a person is as follows: Howe...
[ 0.012451171875, 0.0078125, 0.001861572265625, 0.018798828125, -0.031005859375, 0.008544921875, 0.00927734375, 0.00506591796875, 0.0157470703125, -0.05908203125, 0.01190185546875, -0.013671875, -0.000377655029296875, 0.004852294921875, 0.0074462890625, -0.0189208984375, 0.007568359375...
[ 1250, 4867, 60502, 1290, 70731, 13, 17368, 5303, 502, 49129, 4390, 67373, 32036, 759, 39, 27417, 237875, 10336, 10932, 62822, 23755, 28219, 72694, 214, 111, 3445, 28960, 43240, 1528, 29479, 83324, 20020, 717, 642, 9319, 959, 176256, 83, 169...
[ 0.1732177734375, 0.2271728515625, 0.1971435546875, 0.196533203125, 0.1844482421875, 0.0838623046875, 0.06494140625, 0.2132568359375, 0.14453125, 0.2008056640625, 0.1474609375, 0.2078857421875, 0.168212890625, 0.0640869140625, 0.02825927734375, 0.1705322265625, 0.04864501953125, 0.0...
embed
10677519_c0
10677519
prolog
0
Title: Check if the Nth number of Fibonacci is NthFib or not - arithmetic error fail Problem title: Check if the Nth number of Fibonacci is NthFib or not - arithmetic error fail Tags: arithmetic-expressions, fibonacci, prolog, math, function Problem: Check if the Nth number of Fibonacci is NthFib or not - arithmetic er...
Check if the Nth number of Fibonacci is NthFib or not - arithmetic error fail Check if the Nth number of Fibonacci is NthFib or not - arithmetic error fail arithmetic-expressions fibonacci prolog math function Check Nth Fibonacci NthFib Tmp Ans Check if the Nth number of Fibonacci is NthFib or not - arithmetic error fa...
[ -0.0029296875, -0.0235595703125, 0.007049560546875, -0.000934600830078125, 0.00106048583984375, -0.000873565673828125, 0.01007080078125, -0.006622314453125, 0.004974365234375, 0.00799560546875, 0.0142822265625, 0.0027923583984375, -0.0159912109375, 0.01171875, 0.015869140625, -0.007873...
[ 38679, 2174, 541, 927, 14012, 3698, 20990, 52544, 83, 6159, 275, 959, 8962, 282, 9523, 18499, 35782, 204629, 809, 502, 4867, 48909, 32354, 384, 2676, 893, 707, 1653, 2063, 12765, 5675, 944, 138, 190, 382, 17480, 21416, 11832, 6626, 96362,...
[ 0.1376953125, 0.02593994140625, 0.2119140625, 0.21875, 0.1552734375, 0.1461181640625, 0.191162109375, 0.236083984375, 0.059906005859375, 0.225341796875, 0.1712646484375, 0.101318359375, 0.0841064453125, 0.05322265625, 0.044525146484375, 0.131103515625, 0.13427734375, 0.053588867187...
embed
20895795_c0
20895795
prolog
0
Title: Prolog date_time_stamp Problem title: Prolog date_time_stamp Tags: prolog Problem: Prolog date_time_stamp Trying to make a rule within prolog, which would ask if any messages where sent between 2 individuals (where both individuals can be the recipient or the sender of the message) before a given date. After cal...
Prolog date_time_stamp Prolog date_time_stamp prolog Prolog date_time_stamp Prolog date_time_stamp Trying to make a rule within prolog, which would ask if any messages where sent between 2 individuals (where both individuals can be the recipient or the sender of the message) before a given date. After calling whether i...
[ 0.025634765625, 0.01123046875, -0.0037841796875, 0.03125, -0.0020294189453125, -0.00009632110595703125, -0.0201416015625, 0.0234375, -0.0022735595703125, -0.0634765625, 0.0023651123046875, -0.008056640625, -0.016357421875, -0.01275634765625, 0.00994873046875, 0.0068359375, 0.00793457...
[ 1250, 4867, 5622, 6032, 590, 2676, 502, 79986, 28032, 26458, 2174, 2499, 89914, 9325, 17721, 116, 79165, 15044, 831, 134003, 59146, 26008, 8108, 34475, 159029, 36766, 29568, 959, 442, 28412, 12684, 72095, 121122, 1733, 2060, 17569, 63399, 580...
[ 0.1898193359375, 0.2489013671875, 0.15966796875, 0.1776123046875, 0.175537109375, 0.167724609375, 0.1448974609375, 0.1810302734375, 0.048919677734375, 0.104736328125, 0.006317138671875, 0.00299072265625, 0.178466796875, 0.1171875, 0.09814453125, 0.10296630859375, 0.1246337890625, 0...
embed
27306453_c1
27306453
prolog
1
and an instantiated argument or component is required. It has the form instantiation_error . ... Note that this implicit combination of instantiation testing and type testing leads to many errors in Prolog programs and also here on SO. A quick fix to this situation would be to add an explicit test in front of every te...
and an instantiated argument or component is required. It has the form instantiation_error . ... Note that this implicit combination of instantiation testing and type testing leads to many errors in Prolog programs and also here on SO. A quick fix to this situation would be to add an explicit test in front of every te...
[ 0.006195068359375, 0.00103759765625, 0.02197265625, 0.01177978515625, 0.0000820159912109375, 0.005401611328125, 0.01507568359375, -0.0179443359375, 0.0026397705078125, -0.04931640625, 0.01239013671875, 0.003265380859375, -0.0087890625, 0.0279541015625, 0.037109375, -0.00830078125, 0....
[ 34648, 14, 27686, 10750, 707, 82761, 83, 56065, 3173, 2320, 188800, 165164, 162515, 134234, 10644, 37105, 5941, 18499, 1250, 4867, 103391, 3688, 15969, 63773, 30022, 16648, 15190, 143726, 3034, 12912, 11907, 88303, 73, 57823, 351, 1961, 618, ...
[ 0.181396484375, 0.1585693359375, 0.0894775390625, 0.226806640625, 0.008544921875, 0.1595458984375, 0.040863037109375, 0.18505859375, 0.08935546875, 0.0748291015625, 0.2041015625, 0.1810302734375, 0.0699462890625, 0.1944580078125, 0.16943359375, 0.035888671875, 0.0433349609375, 0.15...
embed
33425143_c0
33425143
prolog
0
Title: Prolog recursing endlessly in getList predicate Problem title: Prolog recursing endlessly in getList predicate Tags: list, prolog Problem: Prolog recursing endlessly in getList predicate This predicate is intended to tell if the list has the element in it and add it to a new list. However, once I finish recursin...
Prolog recursing endlessly in getList predicate Prolog recursing endlessly in getList predicate list prolog Prolog Side Others NewList Others1 Prolog recursing endlessly in getList predicate This predicate is intended to tell if the list has the element in it and add it to a new list. However, once I finish recursing t...
[ 0.0069580078125, 0.0228271484375, 0.004974365234375, -0.01220703125, -0.0113525390625, -0.00421142578125, -0.006927490234375, 0.0208740234375, 0.0260009765625, -0.017822265625, 0.037353515625, -0.00185394287109375, -0.005859375, -0.0029754638671875, 0.0135498046875, 0.002471923828125, ...
[ 1250, 4867, 195625, 214, 3564, 9393, 538, 2046, 154663, 1653, 2063, 23, 5303, 502, 24383, 64511, 2356, 67, 179140, 14192, 2174, 1556, 12830, 15190, 3525, 24145, 67229, 8305, 26785, 176377, 442, 90, 4420, 19364, 24189, 86595, 13438, 83324, 9...
[ 0.172119140625, 0.25146484375, 0.2462158203125, 0.07867431640625, 0.09759521484375, 0.1134033203125, 0.00518798828125, 0.1112060546875, 0.2156982421875, 0.157958984375, 0.18896484375, 0.0149078369140625, 0.1483154296875, 0.1177978515625, 0.0904541015625, 0.011505126953125, 0.02775573...
embed
28182825_c0
28182825
prolog
0
Title: Predicate Prints Out "Unexpected" false Problem title: Predicate Prints Out "Unexpected" false Tags: prolog, prolog-toplevel Problem: Predicate Prints Out "Unexpected" false I am trying to write a predicate, likes/2 , in a manner where it runs like the following: ?- likes(A,alan). A = lindsay...
Predicate Prints Out "Unexpected" false Predicate Prints Out "Unexpected" false prolog prolog-toplevel Predicate Prints Out Unexpected Define Predicate Prints Out "Unexpected" false I am trying to write a predicate, likes/2 , in a manner where it runs like the following: Here is how I am tackling th...
[ 0.00885009765625, 0.019287109375, -0.01416015625, 0.0419921875, -0.01953125, 0.0201416015625, 0.0189208984375, 0.0101318359375, -0.003326416015625, -0.00311279296875, -0.00543212890625, 0.025146484375, 0.0174560546875, 0.006011962890625, -0.00118255615234375, 0.015869140625, 0.023071...
[ 7145, 2063, 67, 39754, 13538, 14256, 83613, 13, 89829, 98320, 502, 4867, 13784, 67919, 992, 262, 64552, 31577, 33022, 1653, 1884, 12477, 144996, 127877, 25632, 36461, 2967, 31089, 7808, 12960, 1528, 32354, 237, 134598, 2684, 2831, 28412, 1810...
[ 0.208984375, 0.2464599609375, 0.1300048828125, 0.1917724609375, 0.1494140625, 0.08447265625, 0.1209716796875, 0.109130859375, 0.1409912109375, 0.250244140625, 0.1025390625, 0.1649169921875, 0.04254150390625, 0.1158447265625, 0.06683349609375, 0.010589599609375, 0.1387939453125, 0.0...
embed
19450671_c1
19450671
prolog
1
to rewrite MIndiGolog so that it is still an offline planner, with the nice representation of time and duration of actions, but with the causes_val predicate of IndiGolog to change the values of the fluents. I find this extremely hard to do, as my knowledge in Prolog and of situation calculus only covers the basics, b...
to rewrite MIndiGolog so that it is still an offline planner, with the nice representation of time and duration of actions, but with the causes_val predicate of IndiGolog to change the values of the fluents. I find this extremely hard to do, as my knowledge in Prolog and of situation calculus only covers the basics, b...
[ -0.0022735595703125, -0.0135498046875, 0.01318359375, -0.002410888671875, -0.01116943359375, 0.0032958984375, 0.002685546875, -0.0027923583984375, 0.0023956298828125, -0.04541015625, -0.00750732421875, 0.0196533203125, -0.0089111328125, 0.0013275146484375, -0.0050048828125, 0.006622314...
[ 456, 434, 18781, 276, 159310, 724, 14071, 7464, 96083, 1774, 1679, 26267, 18811, 1733, 115, 30494, 61972, 678, 113660, 454, 1405, 1653, 2063, 22420, 15549, 142424, 155283, 7413, 111531, 7941, 54, 51359, 1250, 4867, 16648, 44805, 29256, 1957, ...
[ 0.1318359375, 0.145263671875, 0.1505126953125, 0.0928955078125, 0.1959228515625, 0.1343994140625, 0.27001953125, 0.10791015625, 0.242431640625, 0.1986083984375, 0.158935546875, 0.0328369140625, 0.11669921875, 0.09832763671875, 0.037109375, 0.0141754150390625, 0.0972900390625, 0.024...
embed
70539113_c0
70539113
prolog
0
Title: mergesort in prolog - infinite recursion? Problem title: mergesort in prolog - infinite recursion? Tags: mergesort, prolog, infinite, recursion Problem: mergesort in prolog - infinite recursion? I am attempting to implement mergesort in prolog (swi prolog on raspberry pi). I'm very new to the language and what I...
mergesort in prolog - infinite recursion? mergesort in prolog - infinite recursion? mergesort prolog infinite recursion use_module list_util split_at Lst MergedLst MergedLst2 Only SortedLst LstLen HalfWay FirstHalf SecondHalf Call _5322 Exit Action Redo _3038 mergesort in prolog - infinite recursion? I am attempting to...
[ 0.0042724609375, 0.003692626953125, 0.016357421875, -0.02880859375, -0.013427734375, -0.010986328125, -0.01409912109375, -0.011962890625, 0.01171875, -0.0234375, 0.01043701171875, 0.0167236328125, 0.015380859375, -0.0128173828125, 0.0301513671875, 0.0069580078125, 0.00885009765625, ...
[ 42564, 62351, 23, 502, 4867, 54241, 13, 195625, 1830, 4527, 83279, 5303, 65450, 257, 271, 6035, 17704, 304, 87293, 53666, 33, 151500, 22489, 106670, 77648, 26265, 14226, 4015, 5443, 217, 57945, 6096, 31, 1197, 10991, 29479, 2452, 61375, 536...
[ 0.2369384765625, 0.262939453125, 0.03814697265625, 0.1561279296875, 0.2139892578125, 0.1512451171875, 0.0704345703125, 0.1927490234375, 0.061492919921875, 0.0601806640625, 0.09814453125, 0.1099853515625, 0.10986328125, 0.0718994140625, 0.05877685546875, 0.1534423828125, 0.07318115234...
embed
31719651_c0
31719651
prolog
0
Title: difference list (Prolog)(Logic Programming) Problem title: difference list (Prolog)(Logic Programming) Tags: difference-lists, prolog Problem: difference list (Prolog)(Logic Programming) I have a problem solving the difference list problem with paper-pencil not by the helping of SWI Prolog ( in these days i am p...
difference list (Prolog)(Logic Programming) difference list (Prolog)(Logic Programming) difference-lists prolog Prolog Logic Programming difference list (Prolog)(Logic Programming) I have a problem solving the difference list problem with paper-pencil not by the helping of SWI Prolog ( in these days i am preparing my l...
[ 0.032958984375, 0.0308837890625, -0.001678466796875, 0.01068115234375, -0.004119873046875, 0.0115966796875, -0.0157470703125, 0.016357421875, -0.0047607421875, -0.0264892578125, 0.01422119140625, -0.0030517578125, -0.0074462890625, -0.0002727508544921875, -0.00543212890625, 0.026489257...
[ 60212, 5303, 10752, 4867, 113972, 1771, 27958, 214, 6562, 502, 1250, 50592, 2967, 3115, 678, 15122, 2278, 13003, 120592, 159, 38969, 13312, 58172, 62775, 56037, 42276, 9655, 60075, 60923, 8337, 5423, 756, 61585, 69407, 808, 3129, 41, 1294, ...
[ 0.26953125, 0.2626953125, 0.1177978515625, 0.224853515625, 0.11474609375, 0.0236053466796875, 0.1484375, 0.0209808349609375, 0.250244140625, 0.1077880859375, 0.134521484375, 0.1522216796875, 0.169189453125, 0.1116943359375, 0.0226593017578125, 0.1458740234375, 0.093017578125, 0.146...
embed
74704016_c0
74704016
prolog
0
Title: How would you go about implementing this example of Resolution in Prolog? Problem title: How would you go about implementing this example of Resolution in Prolog? Tags: prolog, first-order-logic Problem: How would you go about implementing this example of Resolution in Prolog? This is perhaps one of the simpler ...
How would you go about implementing this example of Resolution in Prolog? How would you go about implementing this example of Resolution in Prolog? prolog first-order-logic How Resolution Prolog GradStudent Student HardWorker How would you go about implementing this example of Resolution in Prolog? This is perhaps one ...
[ 0.007293701171875, 0.018798828125, -0.004852294921875, 0.009765625, -0.005523681640625, 0.001373291015625, -0.0103759765625, -0.011962890625, 0.00921630859375, -0.01519775390625, -0.01080322265625, 0.01202392578125, -0.0106201171875, 0.0224609375, 0.002777099609375, -0.0010833740234375...
[ 2806, 1672, 29479, 903, 27781, 853, 166589, 23, 1250, 4867, 502, 5117, 80596, 137043, 11249, 22453, 239825, 26696, 39391, 108259, 56, 8781, 172155, 6713, 59121, 41, 1294, 30742, 1159, 23009, 20594, 72856, 179933, 1653, 2063, 143726, 80934, 35...
[ 0.0298614501953125, 0.0577392578125, 0.15966796875, 0.04608154296875, 0.1932373046875, 0.1148681640625, 0.215576171875, 0.05615234375, 0.18896484375, 0.222900390625, 0.1119384765625, 0.059722900390625, 0.1663818359375, 0.13623046875, 0.03863525390625, 0.09649658203125, 0.15234375, ...
embed
66402447_c0
66402447
prolog
0
Title: Difficulty with propositional logic in prolog Problem title: Difficulty with propositional logic in prolog Tags: prolog, propositional-calculus Problem: Difficulty with propositional logic in prolog I need to convert the following propositions into prolog code and I have do not understand how the operators work....
Difficulty with propositional logic in prolog Difficulty with propositional logic in prolog prolog propositional-calculus Difficulty dress_pants black_socks Difficulty with propositional logic in prolog I need to convert the following propositions into prolog code and I have do not understand how the operators work. I ...
[ 0.02734375, 0.009765625, 0.00836181640625, -0.00244140625, -0.003326416015625, 0.02197265625, -0.006195068359375, 0.00909423828125, -0.0150146484375, -0.020751953125, 0.00177764892578125, 0.0064697265625, -0.010009765625, 0.017333984375, -0.000301361083984375, 0.002960205078125, 0.00...
[ 191144, 71333, 939, 678, 89261, 289, 62775, 502, 4867, 6827, 94739, 40989, 95945, 22556, 991, 22824, 3871, 96760, 25632, 7, 3934, 18151, 959, 28219, 3642, 39933, 4488, 56104, 4527, 79, 330, 11670, 10133, 4734, 63044, 2652, 23113, 19500, 361...
[ 0.1171875, 0.1533203125, 0.026702880859375, 0.038421630859375, 0.228515625, 0.1243896484375, 0.2275390625, 0.1671142578125, 0.243408203125, 0.1307373046875, 0.1895751953125, 0.152587890625, 0.1778564453125, 0.1348876953125, 0.136962890625, 0.06146240234375, 0.0265045166015625, 0.14...
embed
74664451_c0
74664451
prolog
0
Title: Add one element at the end of every sub list of a list Problem title: Add one element at the end of every sub list of a list Tags: prolog, list Problem: Add one element at the end of every sub list of a list So another prolog question here. As the title indicated, I tried to add one element on each sublist of a ...
Add one element at the end of every sub list of a list Add one element at the end of every sub list of a list prolog list Add add_char Char Motif NewM add_all Pred NewH NewRE Add one element at the end of every sub list of a list So another prolog question here. As the title indicated, I tried to add one element on eac...
[ 0.0008087158203125, 0.01141357421875, 0.009033203125, 0.0037689208984375, -0.01025390625, 0.0162353515625, 0.0020751953125, 0.013427734375, 0.0084228515625, -0.015625, 0.03564453125, -0.01953125, 0.00579833984375, 0.030029296875, -0.002838134765625, -0.00665283203125, 0.02880859375, ...
[ 29117, 1632, 12830, 99, 3564, 11907, 1614, 5303, 502, 4867, 15190, 9254, 21656, 2501, 7737, 2356, 594, 5584, 7145, 841, 11766, 111, 9655, 37842, 12638, 6562, 4966, 8966, 6183, 2301, 18, 738, 5299, 18151, 2060, 1660, 6165, 76, 30646, 10336...
[ 0.13916015625, 0.16357421875, 0.1966552734375, 0.0157318115234375, 0.18359375, 0.1324462890625, 0.2047119140625, 0.205322265625, 0.10498046875, 0.1527099609375, 0.165283203125, 0.115478515625, 0.081298828125, 0.059722900390625, 0.0946044921875, 0.0258331298828125, 0.030792236328125, ...
embed
37363525_c0
37363525
prolog
0
Title: prolog - bst tree to list Problem title: prolog - bst tree to list Tags: prolog, dcg Problem: prolog - bst tree to list I am pracising dcg technique, but I have a problem. I am going to implement converting BST tree to list (each possible) and in reversed side - list ot bst (each possible). (List means set in re...
prolog - bst tree to list prolog - bst tree to list prolog dcg Root prolog - bst tree to list I am pracising dcg technique, but I have a problem. I am going to implement converting BST tree to list (each possible) and in reversed side - list ot bst (each possible). (List means set in real here). However, this grammar s...
[ 0.02392578125, 0.0086669921875, 0.0019683837890625, -0.0289306640625, 0.01275634765625, 0.017578125, -0.0096435546875, -0.00457763671875, -0.01019287109375, -0.057373046875, -0.00787353515625, -0.0030975341796875, 0.016845703125, 0.0023345947265625, 0.01165771484375, 0.01611328125, 0...
[ 502, 4867, 876, 271, 53201, 47, 5303, 104, 238, 177, 150948, 17823, 61353, 2967, 29479, 96760, 335, 8545, 41581, 7722, 39531, 5609, 18, 154663, 26950, 5423, 23, 2773, 3688, 122092, 147, 3664, 139392, 4552, 5045, 171763, 1636, 22304, 17324, ...
[ 0.165771484375, 0.2210693359375, 0.06756591796875, 0.1617431640625, 0.257080078125, 0.1180419921875, 0.20654296875, 0.022003173828125, 0.050384521484375, 0.1212158203125, 0.1949462890625, 0.009124755859375, 0.10223388671875, 0.07647705078125, 0.080810546875, 0.10125732421875, 0.03097...
embed
29132911_c0
29132911
prolog
0
Title: Prolog. Does not create a list Problem title: Prolog. Does not create a list Tags: visual-prolog, prolog Problem: Prolog. Does not create a list I want to create a list consisting of N elements. I write the following code: DOMAINS list = integer* PREDICATES create(integer, integer, list) CLAUSES create(_, 0, [])...
Prolog. Does not create a list Prolog. Does not create a list visual-prolog prolog Prolog Does DOMAINS PREDICATES CLAUSES Start End Counter GOAL Solution Prolog. Does not create a list I want to create a list consisting of N elements. I write the following code: But it returns me No Solution . On the other hand if I ch...
[ 0.016845703125, 0.00927734375, 0.01220703125, 0.026611328125, -0.0040283203125, 0.0225830078125, -0.0029754638671875, 0.00567626953125, 0.0125732421875, -0.0201416015625, -0.00185394287109375, -0.001251220703125, -0.0020904541015625, 0.00347900390625, 0.019775390625, -0.009033203125, ...
[ 1250, 4867, 101790, 959, 28282, 5303, 21176, 3454, 502, 69285, 48026, 134366, 30941, 31273, 129636, 78441, 13794, 18878, 197956, 25052, 7842, 187895, 3444, 58055, 541, 80854, 33022, 18151, 30646, 163, 438, 15549, 48225, 106, 339, 758, 617, 36...
[ 0.2012939453125, 0.27294921875, 0.03485107421875, 0.122802734375, 0.170166015625, 0.18701171875, 0.1927490234375, 0.1385498046875, 0.1524658203125, 0.0732421875, 0.04730224609375, 0.1148681640625, 0.098876953125, 0.00762939453125, 0.052398681640625, 0.0183563232421875, 0.063110351562...
embed
65535795_c0
65535795
prolog
0
Title: Define a predicate that holds of both numeral and their negative and enumerate them Problem title: Define a predicate that holds of both numeral and their negative and enumerate them Tags: prolog Problem: Define a predicate that holds of both numeral and their negative and enumerate them I need to define a predi...
Define a predicate that holds of both numeral and their negative and enumerate them Define a predicate that holds of both numeral and their negative and enumerate them prolog Define Define a predicate that holds of both numeral and their negative and enumerate them I need to define a predicate plusminus(X). that holds ...
[ 0, 0.01214599609375, -0.0205078125, 0.0233154296875, -0.01416015625, 0.0299072265625, 0.0093994140625, 0.01177978515625, 0.0118408203125, -0.0245361328125, 0.004486083984375, 0.006561279296875, -0.013671875, 0.004608154296875, -0.0024871826171875, 0.0140380859375, 0.0106201171875, ...
[ 262, 64552, 1653, 2063, 67, 450, 16401, 7, 111, 15044, 22542, 289, 136, 2363, 40907, 189085, 2856, 502, 4867, 3871, 61924, 1001, 34731, 1542, 116, 16765, 91, 177609, 39457, 42, 757, 91084, 138, 915, 33636, 68940, 254, 20, 363, 831, 3674...
[ 0.076171875, 0.1884765625, 0.2012939453125, 0.244873046875, 0.164794921875, 0.031097412109375, 0.1444091796875, 0.114013671875, 0.02862548828125, 0.07159423828125, 0.1600341796875, 0.0965576171875, 0.016326904296875, 0.0151824951171875, 0.20849609375, 0.207275390625, 0.00009155273437...
embed
69150886_c0
69150886
prolog
0
Title: Prolog How to use get_code in a pl file Problem title: Prolog How to use get_code in a pl file Tags: prolog, gnu-prolog Problem: Prolog How to use get_code in a pl file I want to print a ASCII value of a character. I am using GNU prolog. Everything I have tried during 1h hasn't worked. So I came here and I have ...
Prolog How to use get_code in a pl file Prolog How to use get_code in a pl file prolog gnu-prolog Prolog How get_code my_get_code get_linedit_prompt lower_case Prolog How to use get_code in a pl file I want to print a ASCII value of a character. I am using GNU prolog. Everything I have tried during 1h hasn't worked. So...
[ -0.01080322265625, 0.00107574462890625, 0.0167236328125, 0.006591796875, 0.00191497802734375, -0.0045166015625, 0.0225830078125, 0.0028839111328125, 0.023681640625, -0.0299072265625, 0.0108642578125, -0.01544189453125, -0.02978515625, 0.00628662109375, -0.01019287109375, -0.01342773437...
[ 1250, 4867, 11249, 4527, 2046, 454, 40899, 23, 6456, 11435, 502, 104155, 3454, 759, 3794, 2256, 7564, 2676, 18, 92319, 58437, 3444, 28412, 125429, 10001, 34292, 111, 62816, 165132, 171581, 37842, 20271, 106, 127, 79786, 51592, 11583, 15490, ...
[ 0.151611328125, 0.2376708984375, 0.014923095703125, 0.133544921875, 0.1719970703125, 0.047149658203125, 0.29150390625, 0.036834716796875, 0.18359375, 0.1761474609375, 0.1090087890625, 0.119384765625, 0.110107421875, 0.05950927734375, 0.1746826171875, 0.0736083984375, 0.1690673828125,...
embed
43898817_c1
43898817
prolog
1
solve(List, Solution) :- does_something_here Which I don't know what to do. I have the idea that I need to do some sort of DFS (I guess?) to transverse for every option of choices until I find one that fits but I've still not fully grasped the Prolog way of thinking. Can anyone help with this problem? EDIT: To get a l...
solve(List, Solution) :- does_something_here Which I don't know what to do. I have the idea that I need to do some sort of DFS (I guess?) to transverse for every option of choices until I find one that fits but I've still not fully grasped the Prolog way of thinking. Can anyone help with this problem? EDIT: To get a l...
[ -0.01007080078125, 0.0257568359375, 0.0272216796875, -0.003662109375, -0.0179443359375, -0.007171630859375, -0.037109375, 0.00185394287109375, 0.0159912109375, -0.0115966796875, -0.0030670166015625, 0.01385498046875, 0.01251220703125, 0.0103759765625, -0.01416015625, -0.003433227539062...
[ 86869, 132, 154663, 4, 187895, 15772, 14602, 43452, 64113, 35593, 130078, 2301, 18, 3714, 2367, 54, 6528, 3871, 12096, 391, 36381, 57767, 3900, 37676, 100, 11907, 35829, 44126, 24189, 7413, 11177, 7464, 959, 89554, 27689, 20051, 1250, 4867, ...
[ 0.239501953125, 0.001312255859375, 0.2418212890625, 0.0312347412109375, 0.252197265625, 0.038909912109375, 0.1580810546875, 0.09466552734375, 0.1873779296875, 0.272705078125, 0.029937744140625, 0.05657958984375, 0.09210205078125, 0.1287841796875, 0.040985107421875, 0.06494140625, 0.0...
embed
27405844_c0
27405844
prolog
0
Title: Reasoning in prolog issue Problem title: Reasoning in prolog issue Tags: declarative-programming, prolog Problem: Reasoning in prolog issue foo([], Res). foo([schedule(_, X)|Tail], Res) :- append(Res, X, Res2), foo(Tail, Res2). Expected result: X is a list of values, Res is where the result should be stored. Ima...
Reasoning in prolog issue Reasoning in prolog issue declarative-programming prolog Reasoning Res Tail Res2 _G6951 _G6957 _G6963 _G6969 _G6975 _G6981 _G6987 Reasoning in prolog issue Expected result: X is a list of values, Res is where the result should be stored. Imagine that I call: What the result should be is: But t...
[ 0.0079345703125, 0.00592041015625, 0.01300048828125, -0.00732421875, -0.01171875, -0.002197265625, -0.0185546875, 0.005340576171875, 0.0115966796875, -0.0235595703125, 0.0244140625, -0.00823974609375, -0.01495361328125, 0.00360107421875, 0.003173828125, -0.01397705078125, 0.020874023...
[ 236267, 214, 502, 4867, 31089, 23, 21635, 4935, 28966, 9624, 1218, 379, 304, 176004, 418, 14212, 12243, 196325, 363, 6873, 174543, 60075, 13, 16750, 1193, 83, 5303, 142424, 7440, 5608, 4343, 133196, 11782, 4966, 44691, 18151, 31635, 28219, ...
[ 0.2230224609375, 0.093017578125, 0.1488037109375, 0.237060546875, 0.18212890625, 0.026580810546875, 0.10205078125, 0.0496826171875, 0.064697265625, 0.2130126953125, 0.1312255859375, 0.1383056640625, 0.1021728515625, 0.160400390625, 0.02264404296875, 0.1199951171875, 0.0960693359375, ...
embed
20452050_c0
20452050
prolog
0
Title: count repeated terms in prolog Problem title: count repeated terms in prolog Tags: prolog, count Problem: count repeated terms in prolog I want to ask about prolog programming. I have: byCar(auckland,hamilton). byCar(valmont,metz). byTrain(metz,frankfurt). byPlane(frankfurt,bangkok). byPlane(bangkok,auckland). t...
count repeated terms in prolog count repeated terms in prolog prolog count Step Via count repeated terms in prolog I want to ask about prolog programming. I have: Then I ask in winprolog: It answered My question is, is it possible to count how many 'go' it have? like my example before it has 5 'go'
[ 0.019775390625, 0.013427734375, -0.01141357421875, 0.016357421875, 0.01361083984375, -0.00799560546875, 0.01043701171875, -0.00604248046875, -0.0022430419921875, -0.07861328125, -0.006591796875, -0.0230712890625, -0.00555419921875, 0.01708984375, -0.0087890625, -0.00131988525390625, ...
[ 54529, 119140, 297, 69407, 23, 502, 4867, 50478, 15502, 26458, 56037, 19916, 3454, 83, 7722, 47, 3642, 5941, 519, 442, 765, 27781, 8108, 190 ]
[ 0.1986083984375, 0.266357421875, 0.103515625, 0.274658203125, 0.05792236328125, 0.1500244140625, 0.2237548828125, 0.12841796875, 0.1119384765625, 0.0264434814453125, 0.0980224609375, 0.0653076171875, 0.10418701171875, 0.003116607666015625, 0.1383056640625, 0.0249176025390625, 0.04559...
embed
22470106_c0
22470106
prolog
0
Title: SWI-Prolog and filename extensions: Why won't swipl recognize a file with an extension? Problem title: SWI-Prolog and filename extensions: Why won't swipl recognize a file with an extension? Tags: swi-prolog, prolog Problem: SWI-Prolog and filename extensions: Why won't swipl recognize a file with an e...
SWI-Prolog and filename extensions: Why won't swipl recognize a file with an extension? SWI-Prolog and filename extensions: Why won't swipl recognize a file with an extension? swi-prolog prolog SWI-Prolog Why test.pro ERROR Syntax Operator SWI-Prolog and filename extensions: Why won't swipl recognize a file w...
[ 0.01336669921875, 0.018310546875, 0.0167236328125, 0.017822265625, -0.01953125, -0.0189208984375, -0.014892578125, 0.00811767578125, -0.0201416015625, -0.0291748046875, 0.0091552734375, 0.0137939453125, -0.039306640625, -0.0098876953125, 0.01031494140625, 0.0093994140625, 0.016845703...
[ 159, 38969, 10752, 4867, 136, 11435, 11627, 111938, 44084, 23742, 18, 91, 2452, 2424, 125296, 678, 3454, 502, 3034, 5, 151206, 24638, 19010, 150922, 75101, 2256, 29481, 56, 11675, 46132, 14364, 11782, 6954, 13986, 18499, 84751, 3688, 87388, ...
[ 0.04052734375, 0.2225341796875, 0.1378173828125, 0.1705322265625, 0.0255126953125, 0.164794921875, 0.09521484375, 0.2353515625, 0.0943603515625, 0.06396484375, 0.056060791015625, 0.034912109375, 0.1795654296875, 0.191650390625, 0.1578369140625, 0.09967041015625, 0.2264404296875, 0....
embed
71390576_c0
71390576
prolog
0
Title: Compare two solution in a prolog call Problem title: Compare two solution in a prolog call Tags: prolog Problem: Compare two solution in a prolog call I write prolog program as below. Now, when I run halfsister predicate as halfsister(X,Y) . I got result X = ann Y = sylvia ? ; X = sylvia Y = ann ? ; but both are...
Compare two solution in a prolog call Compare two solution in a prolog call prolog Compare Compare two solution in a prolog call I write prolog program as below. Now, when I run halfsister predicate as halfsister(X,Y) . I got result but both are the same result but showing twice. How can I make the program to show the ...
[ 0.0120849609375, -0.00396728515625, 0.01385498046875, 0.01177978515625, -0.0206298828125, -0.00714111328125, 0.008544921875, 0.00396728515625, 0.01806640625, -0.021728515625, 0.0028533935546875, 0.0169677734375, 0.006195068359375, 0.00970458984375, 0.0115966796875, -0.00049972534179687...
[ 113307, 13, 6626, 29806, 502, 4867, 11782, 23, 33022, 1528, 35064, 11675, 23552, 7, 19656, 1653, 2063, 67, 237, 1542, 1723, 16750, 1284, 15044, 5701, 141377, 186351, 3249, 7639, 24145, 4734, 18151, 167224, 1733 ]
[ 0.1781005859375, 0.0285491943359375, 0.13232421875, 0.1907958984375, 0.1619873046875, 0.2135009765625, 0.1705322265625, 0.0224609375, 0.07012939453125, 0.1424560546875, 0.02886962890625, 0.08349609375, 0.1309814453125, 0.0645751953125, 0.147216796875, 0.0987548828125, 0.126708984375,...
embed
34324064_c0
34324064
prolog
0
Title: Prolog printing all solutions and wanting to get yes/no output Problem title: Prolog printing all solutions and wanting to get yes/no output Tags: prolog Problem: Prolog printing all solutions and wanting to get yes/no output I just started learning Prolog and my task is to write a predicate poklapanje(M,V) whic...
Prolog printing all solutions and wanting to get yes/no output Prolog printing all solutions and wanting to get yes/no output prolog Prolog Prolog printing all solutions and wanting to get yes/no output I just started learning Prolog and my task is to write a predicate poklapanje(M,V) which returns yes if all the eleme...
[ -0.021484375, 0.0126953125, 0.031982421875, 0.00653076171875, -0.00775146484375, 0.0257568359375, -0.00616455078125, -0.00116729736328125, -0.00537109375, 0.003997802734375, 0.008544921875, -0.01116943359375, -0.00836181640625, -0.00665283203125, -0.00457763671875, -0.01080322265625, ...
[ 1250, 4867, 2448, 756, 51347, 3444, 2046, 72272, 64, 157, 140992, 1916, 502, 52080, 66211, 33022, 1653, 2063, 67, 160, 4704, 139831, 594, 856, 30646, 2174, 80854, 5303, 276, 5117, 310, 133063, 96386, 9655, 60212, 17721, 29568, 136, 20949, ...
[ 0.1768798828125, 0.23046875, 0.1629638671875, 0.1087646484375, 0.1932373046875, 0.05914306640625, 0.06951904296875, 0.212890625, 0.067626953125, 0.163330078125, 0.1669921875, 0.0311279296875, 0.140869140625, 0.061767578125, 0.06561279296875, 0.07025146484375, 0.1195068359375, 0.141...
embed
56543855_c0
56543855
prolog
0
Title: Prolog list arithmetic average Problem title: Prolog list arithmetic average Tags: prolog Problem: Prolog list arithmetic average I have to write a program with the following content: "Using the built-in Prolog predicates, define a predicate operation (L1, L2) met when list L2 is derived from list L1 by adding a...
Prolog list arithmetic average Prolog list arithmetic average prolog Prolog Prolog list arithmetic average I have to write a program with the following content: "Using the built-in Prolog predicates, define a predicate operation (L1, L2) met when list L2 is derived from list L1 by adding as the last element of the arit...
[ 0.004638671875, -0.0078125, -0.00421142578125, -0.0086669921875, -0.01324462890625, 0.02099609375, 0.0062255859375, 0.01129150390625, 0.00848388671875, -0.0029754638671875, 0.033935546875, -0.00921630859375, -0.00897216796875, -0.023681640625, 0.000568389892578125, 0.00421142578125, ...
[ 1250, 4867, 5303, 8962, 282, 83080, 502, 765, 33022, 1528, 10941, 88303, 1653, 2063, 1636, 61924, 41018, 866, 418, 339, 10461, 435, 3229, 304, 16406, 154107, 4568, 12830, 29459, 142105, 19336, 19713, 12765, 202567, 116, 5423, 10750, 50339, ...
[ 0.198486328125, 0.2423095703125, 0.1688232421875, 0.1353759765625, 0.0667724609375, 0.2271728515625, 0.1419677734375, 0.004241943359375, 0.0858154296875, 0.17578125, 0.0224456787109375, 0.0654296875, 0.1546630859375, 0.192138671875, 0.107177734375, 0.125732421875, 0.1971435546875, ...
embed
67458424_c0
67458424
prolog
0
Title: Prolog simple rules Problem title: Prolog simple rules Tags: prolog Problem: Prolog simple rules Started learning Prolog 2 days ago and came across this problem, I'm trying to program both rules at the end but they don't seem to work correctly. What am I doing wrong? % gender/2: identifies the gender of a person...
Prolog simple rules Prolog simple rules prolog Prolog Rule has_fFriend Prolog simple rules Started learning Prolog 2 days ago and came across this problem, I'm trying to program both rules at the end but they don't seem to work correctly. What am I doing wrong?
[ 0.0255126953125, -0.01275634765625, 0.01519775390625, 0.01104736328125, -0.016845703125, 0.00421142578125, -0.0194091796875, 0.00159454345703125, 0.00885009765625, -0.0167236328125, -0.005218505859375, -0.030517578125, 0.01446533203125, 0.0054931640625, 0.0107421875, -0.001167297363281...
[ 1250, 4867, 8781, 91736, 502, 139118, 1556, 420, 919, 416, 3611, 52080, 36880, 2967, 31577, 1528, 15044, 99, 3564, 18, 48903, 4488, 26785, 444, 87, 20594, 44691 ]
[ 0.1517333984375, 0.23583984375, 0.189453125, 0.215576171875, 0.10089111328125, 0.170654296875, 0.10235595703125, 0.08843994140625, 0.0975341796875, 0.14599609375, 0.1766357421875, 0.054595947265625, 0.0124664306640625, 0.05401611328125, 0.0380859375, 0.159423828125, 0.11749267578125,...
embed
33574606_c0
33574606
prolog
0
Title: Is there a way to avoid to prefix every predicate of a module in the SWI-Prolog console? Problem title: Is there a way to avoid to prefix every predicate of a module in the SWI-Prolog console? Tags: swi-prolog, prolog, module Problem: Is there a way to avoid to prefix every predicate of a module in the SWI-Prolo...
Is there a way to avoid to prefix every predicate of a module in the SWI-Prolog console? Is there a way to avoid to prefix every predicate of a module in the SWI-Prolog console? swi-prolog prolog module SWI-Prolog p.pl use_module chr_constraint p:red Is there a way to avoid to prefix every predicate of a module in the ...
[ -0.01611328125, -0.00946044921875, 0.01116943359375, 0.017333984375, -0.00482177734375, -0.005645751953125, 0.0164794921875, -0.00970458984375, -0.0020599365234375, -0.0576171875, 0.02197265625, 0.01434326171875, 0.004974365234375, -0.0220947265625, 0.015869140625, -0.00173187255859375...
[ 3917, 71864, 183114, 11907, 1653, 2063, 67, 88996, 159, 38969, 9, 10752, 4867, 130250, 91, 2452, 3454, 502, 2424, 4527, 83279, 17656, 2271, 2816, 915, 2822, 27781, 10644, 3714, 26818, 11782, 2886, 31255, 21635, 8, 978, 60042, 5792, 5045, ...
[ 0.049102783203125, 0.1878662109375, 0.255615234375, 0.145751953125, 0.1534423828125, 0.1912841796875, 0.0689697265625, 0.2088623046875, 0.057952880859375, 0.2032470703125, 0.008544921875, 0.1259765625, 0.171630859375, 0.221435546875, 0.01361083984375, 0.1483154296875, 0.0999755859375...
embed
24575374_c0
24575374
prolog
0
Title: Prolog Binary Tree Problem title: Prolog Binary Tree Tags: binary-tree, predicate, prolog Problem: Prolog Binary Tree I have an assignment in which I have to design a binary tree in Prolog and then implement some predicates for it(E.g. Insert, traversal, search and height.) I am confident enough to implement the...
Prolog Binary Tree Prolog Binary Tree binary-tree predicate prolog Prolog Binary Tree Prolog Binary Tree I have an assignment in which I have to design a binary tree in Prolog and then implement some predicates for it(E.g. Insert, traversal, search and height.) I am confident enough to implement them but as a starting ...
[ 0.041015625, 0.013671875, 0.0054931640625, -0.01483154296875, 0.01214599609375, 0.0274658203125, -0.011474609375, -0.018310546875, -0.0001068115234375, -0.038818359375, -0.004791259765625, -0.00823974609375, -0.025634765625, -0.0033111572265625, 0.0179443359375, 0.013427734375, 0.027...
[ 1250, 4867, 54092, 1294, 101344, 2394, 6635, 62600, 1653, 2063, 67, 502, 95486, 4331, 53201, 29479, 33657, 37317, 33938, 155955, 158863, 72134, 62, 831, 61924, 69407, 116, 201505, 52681, 876, 18, 62731, 13, 839, 618, 418, 10461, 29568, 2174...
[ 0.148193359375, 0.2039794921875, 0.172607421875, 0.043975830078125, 0.2296142578125, 0.19580078125, 0.1727294921875, 0.21240234375, 0.166015625, 0.2059326171875, 0.002410888671875, 0.14306640625, 0.07666015625, 0.12158203125, 0.273681640625, 0.124755859375, 0.085205078125, 0.082763...
embed
22812691_c0
22812691
prolog
0
Title: Prolog replace each instance of a constant in a list with a variable Problem title: Prolog replace each instance of a constant in a list with a variable Tags: prolog Problem: Prolog replace each instance of a constant in a list with a variable Given list of constants, how can you replace each instance of a const...
Prolog replace each instance of a constant in a list with a variable Prolog replace each instance of a constant in a list with a variable prolog Prolog Seen0 Out Out0 Var0 Out1 Seen1 _G31 _G58 _G118 _G311 _G338 _G398 Prolog replace each instance of a constant in a list with a variable Given list of constants, how can y...
[ 0.0030364990234375, 0.01300048828125, 0.004852294921875, -0.0101318359375, -0.000946044921875, -0.01385498046875, -0.014404296875, 0.037353515625, 0.01312255859375, -0.002044677734375, -0.00885009765625, 0.000125885009765625, 0.0120849609375, 0.0230712890625, 0.0150146484375, 0.0015258...
[ 1250, 4867, 91995, 12638, 110527, 53697, 23, 10, 5303, 678, 77336, 502, 503, 33, 2389, 13538, 3323, 418, 5016, 10057, 116329, 363, 1662, 128222, 151616, 19, 3642, 831, 398, 18852, 221, 2203, 3293, 83, 759, 11389, 127877, 1884, 372, 3055, ...
[ 0.178466796875, 0.2607421875, 0.203857421875, 0.1658935546875, 0.243896484375, 0.249267578125, 0.038482666015625, 0.0076904296875, 0.21142578125, 0.150390625, 0.28076171875, 0.1314697265625, 0.1458740234375, 0.1693115234375, 0.09033203125, 0.1402587890625, 0.1314697265625, 0.039367...
embed
23281245_c0
23281245
prolog
0
Title: Why is prolog confused by my input file Problem title: Why is prolog confused by my input file Tags: prolog Problem: Why is prolog confused by my input file I'm writing a list of lists to a file with choice(2, X):- nl, write('\tRead roster from a file:'),nl, write('\tEnter file name: '),read(N), open(N,write,Str...
Why is prolog confused by my input file Why is prolog confused by my input file prolog a Why Stream ERROR r2:1:44 Syntax Unexpected Why is prolog confused by my input file I'm writing a list of lists to a file with then I'm reading it with this is the contents of a sample from choice(2,X) that I tried to read with choi...
[ 0.0185546875, 0.0048828125, -0.01177978515625, 0.01214599609375, -0.0269775390625, 0.018310546875, -0.00250244140625, 0.0091552734375, 0.00116729736328125, 0.0159912109375, 0.012451171875, 0.013671875, -0.0064697265625, -0.0189208984375, 0.0203857421875, -0.0174560546875, 0.025512695...
[ 44084, 83, 502, 4867, 55681, 5281, 390, 107730, 11435, 115061, 151206, 24638, 1690, 304, 19721, 32705, 19010, 86531, 83613, 13, 759, 32562, 5303, 16454, 10941, 121413, 44126, 54753, 1542, 37842, 12301, 9790, 18499 ]
[ 0.1065673828125, 0.0157470703125, 0.156005859375, 0.24072265625, 0.1885986328125, 0.1251220703125, 0.0280609130859375, 0.1943359375, 0.1517333984375, 0.184814453125, 0.114501953125, 0.10003662109375, 0.0208740234375, 0.069091796875, 0.0196685791015625, 0.173583984375, 0.075927734375,...
embed
24630245_c2
24630245
prolog
2
eH + CosteI + CosteJ + CosteK + CosteL + CosteM + CosteN + CosteO + CosteP. evaluarCoste(Tablero,Coste) :- hamming_distance(Tablero,Coste). mover(TableroInicial,TableroFinal,moverArriba) :- moverArriba(TableroInicial,TableroFinal). mover(TableroInicial,TableroFinal,moverAbajo) :- moverAbajo(TableroInicial,TableroFinal)...
eH + CosteI + CosteJ + CosteK + CosteL + CosteM + CosteN + CosteO + CosteP. evaluarCoste(Tablero,Coste) :- hamming_distance(Tablero,Coste). mover(TableroInicial,TableroFinal,moverArriba) :- moverArriba(TableroInicial,TableroFinal). mover(TableroInicial,TableroFinal,moverAbajo) :- moverAbajo(TableroInicial,TableroFinal)...
[ 0.017578125, 0.00115966796875, 0.0012359619140625, 0.01080322265625, 0.004974365234375, 0.0012359619140625, -0.002227783203125, 0.01397705078125, -0.010009765625, -0.030517578125, -0.000732421875, 0.0020751953125, 0.01416015625, -0.0037689208984375, -0.02294921875, -0.015869140625, -...
[ 28, 841, 997, 63099, 13, 568, 1375, 605, 866, 594, 839, 670, 683, 5, 202043, 10625, 824, 618, 2886, 516, 15772, 256, 58838, 454, 56883, 329, 148665, 114683, 6159, 39, 5465, 104141, 24988, 21168, 1436, 124608, 85, 194, 28864, 26073, 12, ...
[ 0.122314453125, 0.1807861328125, 0.2061767578125, 0.260498046875, 0.18798828125, 0.1329345703125, 0.138916015625, 0.08526611328125, 0.0843505859375, 0.06915283203125, 0.03179931640625, 0.079833984375, 0.04998779296875, 0.098388671875, 0.26904296875, 0.22265625, 0.269775390625, 0.13...
embed
21793572_c0
21793572
prolog
0
Title: Is there a way to annotate the parameter and return value in Prolog? Problem title: Is there a way to annotate the parameter and return value in Prolog? Tags: prolog Problem: Is there a way to annotate the parameter and return value in Prolog? parent(mel, joan). parent(jane, betty). parent(jane, tom). parent(ric...
Is there a way to annotate the parameter and return value in Prolog? Is there a way to annotate the parameter and return value in Prolog? prolog Prolog Is there a way to annotate the parameter and return value in Prolog? For example someone asks me to find all ancestors of a parent. I give him the code: But my friend s...
[ 0.0107421875, 0.0203857421875, -0.003753662109375, 0.01177978515625, -0.012451171875, 0.0245361328125, 0.004974365234375, -0.0026092529296875, -0.0152587890625, -0.0289306640625, 0.0137939453125, -0.0245361328125, -0.0076904296875, 0.013671875, 0.0169677734375, -0.0198974609375, -0.0...
[ 3917, 8668, 19888, 171859, 136, 30646, 34292, 23, 1250, 4867, 10, 502, 2685, 47, 26458, 7413, 756, 60502, 22230, 49129, 8337, 18151, 34391, 18, 3714, 3642, 4527, 1653, 2063, 67, 11782, 1884, 1290, 26932, 5861, 313, 98870, 436, 27140, 1636...
[ 0.1171875, 0.19091796875, 0.209716796875, 0.2496337890625, 0.077880859375, 0.2191162109375, 0.15771484375, 0.0341796875, 0.168701171875, 0.25146484375, 0.03717041015625, 0.0955810546875, 0.0188140869140625, 0.0139617919921875, 0.042572021484375, 0.1070556640625, 0.07427978515625, 0...
embed
55852254_c0
55852254
prolog
0
Title: CLP: Efficient model of 'not three same values' Problem title: CLP: Efficient model of 'not three same values' Tags: clp, constraint-programming, eclipse-clp, prolog Problem: CLP: Efficient model of 'not three same values' I need to model this (simple) constraint in Eclipse CLP: Given three d...
CLP: Efficient model of 'not three same values' CLP: Efficient model of 'not three same values' clp constraint-programming eclipse-clp prolog CLP Efficient CLP: Efficient model of 'not three same values' I need to model this (simple) constraint in Eclipse CLP: Given three domain variables, lets say ...
[ -0.0201416015625, 0.0037841796875, 0.002349853515625, 0.002227783203125, 0.0025482177734375, 0.0030364990234375, -0.005523681640625, 0.005615234375, 0.00970458984375, -0.01092529296875, -0.013427734375, -0.000522613525390625, 0.01446533203125, 0.01043701171875, 0.004913330078125, 0.035...
[ 313, 37352, 24500, 45964, 3299, 3768, 10869, 17262, 5701, 142424, 33139, 254, 158, 2816, 4288, 28966, 106371, 184, 26775, 502, 4867, 3871, 191560, 234962, 77758, 77336, 391, 418, 304, 363, 63284, 1221, 959, 3564, 34292, 32964, 831, 105950, ...
[ 0.0367431640625, 0.2607421875, 0.1485595703125, 0.06402587890625, 0.2227783203125, 0.05364990234375, 0.1710205078125, 0.2052001953125, 0.18896484375, 0.219970703125, 0.05108642578125, 0.123291015625, 0.079345703125, 0.1988525390625, 0.138427734375, 0.0496826171875, 0.1123046875, 0....
embed
14145546_c0
14145546
prolog
0
Title: Include prolog file in another file, but by calling it in specific order? Problem title: Include prolog file in another file, but by calling it in specific order? Tags: swi-prolog, prolog Problem: Include prolog file in another file, but by calling it in specific order? I have two files, file1 and file2 with pro...
Include prolog file in another file, but by calling it in specific order? Include prolog file in another file, but by calling it in specific order? swi-prolog prolog Include consult_File Users Prolog file2.pl Include prolog file in another file, but by calling it in specific order? I have two files, file1 and file2 wit...
[ 0.03662109375, -0.01611328125, 0.0031585693359375, 0.02490234375, -0.003631591796875, 0.01104736328125, -0.0040283203125, 0.021240234375, 0.00445556640625, -0.03369140625, 0.02587890625, 0.0220947265625, -0.031494140625, -0.00250244140625, 0.0301513671875, -0.001190185546875, 0.00149...
[ 8942, 822, 112, 502, 4867, 11435, 23, 15700, 1284, 159029, 29458, 12989, 91, 2452, 3454, 75463, 174350, 53400, 1250, 5442, 2424, 442, 6626, 102158, 304, 111938, 114689, 1653, 2063, 16128, 12921, 123166, 35431, 11782, 104272, 28032, 3789, 1815...
[ 0.0675048828125, 0.1453857421875, 0.0182952880859375, 0.19091796875, 0.2423095703125, 0.1728515625, 0.0633544921875, 0.087158203125, 0.007781982421875, 0.1220703125, 0.1424560546875, 0.1644287109375, 0.00152587890625, 0.1436767578125, 0.140380859375, 0.201904296875, 0.1871337890625, ...
embed
58149743_c0
58149743
prolog
0
Title: How to write all paths in a directed graph with no cycles? (Prolog) Problem title: How to write all paths in a directed graph with no cycles? (Prolog) Tags: prolog Problem: How to write all paths in a directed graph with no cycles? (Prolog) I'm testing out graph-searching for paths in prolog using information fr...
How to write all paths in a directed graph with no cycles? (Prolog) How to write all paths in a directed graph with no cycles? (Prolog) prolog How Prolog Curr Stop Next How to write all paths in a directed graph with no cycles? (Prolog) I'm testing out graph-searching for paths in prolog using information from https://...
[ 0.016845703125, 0.017578125, -0.005340576171875, 0.0130615234375, 0.0025787353515625, 0.01483154296875, -0.002838134765625, -0.0093994140625, -0.0048828125, -0.03125, -0.0126953125, -0.006988525390625, -0.01220703125, 0.0274658203125, 0.03955078125, 0.00701904296875, 0.01080322265625...
[ 11249, 33022, 756, 60875, 7, 8951, 41382, 678, 110, 105823, 10752, 4867, 502, 1250, 17065, 42, 42284, 4997, 23, 134234, 86250, 100, 2783, 73, 3454, 11, 617, 15483, 37348, 32562, 1295, 195625, 5844, 7477, 18151, 7413, 7722, 112, 47, 304, ...
[ 0.052398681640625, 0.17138671875, 0.1448974609375, 0.236083984375, 0.0826416015625, 0.15771484375, 0.2130126953125, 0.0447998046875, 0.1046142578125, 0.1505126953125, 0.10791015625, 0.2197265625, 0.126220703125, 0.1195068359375, 0.0555419921875, 0.07257080078125, 0.1346435546875, 0...
embed
26544693_c0
26544693
prolog
0
Title: Prolog program to return atoms in a proposition formula Problem title: Prolog program to return atoms in a proposition formula Tags: prolog Problem: Prolog program to return atoms in a proposition formula I am a newbie to prolog and am trying to write a program which returns the atoms in a well formed propositio...
Prolog program to return atoms in a proposition formula Prolog program to return atoms in a proposition formula prolog Prolog logical_atom atom_codes Prolog program to return atoms in a proposition formula I am a newbie to prolog and am trying to write a program which returns the atoms in a well formed propositional fo...
[ 0.01708984375, -0.01507568359375, -0.00689697265625, 0.0087890625, -0.0272216796875, 0.0034637451171875, 0.0084228515625, 0.00101470947265625, -0.0164794921875, -0.04296875, 0.01361083984375, 0.001220703125, -0.009521484375, 0.00168609619140625, -0.0026397705078125, 0.00897216796875, ...
[ 1250, 4867, 1528, 30646, 34627, 7, 23, 89261, 26168, 502, 62775, 289, 5928, 40899, 47, 3525, 9014, 31577, 33022, 5299, 100, 41, 1294, 99, 2940, 864, 21980, 748, 254, 8096, 108, 177, 1301, 5608, 17336, 18151, 237, 13319, 3714, 65450, 110...
[ 0.154296875, 0.2183837890625, 0.169921875, 0.189453125, 0.2139892578125, 0.0667724609375, 0.06036376953125, 0.22412109375, 0.188720703125, 0.11669921875, 0.1138916015625, 0.030487060546875, 0.115234375, 0.1507568359375, 0.010986328125, 0.0164337158203125, 0.07830810546875, 0.032531...
embed
10234992_c0
10234992
prolog
0
Title: Prolog, Finding the best match Problem title: Prolog, Finding the best match Tags: prolog, pattern-matching, intersection Problem: Prolog, Finding the best match I have several prolog facts: relation('Kitchen', [item(spoon), item(fork), item(knife) ]). relation('Lounge', [item(sofa), item(chair), item(table) ])....
Prolog, Finding the best match Prolog, Finding the best match prolog pattern-matching intersection Prolog Finding Kitchen Lounge Bedroom Prolog, Finding the best match I have several prolog facts: And a list that is generated at runtime, for example: From this list, in this case, I would like 'Kitchen' to be returned a...
[ -0.00970458984375, -0.01177978515625, 0.01416015625, -0.00014972686767578125, 0.0030517578125, 0.016357421875, -0.015625, -0.0054931640625, 0.02587890625, -0.0274658203125, 0.012451171875, 0.0233154296875, -0.001617431640625, -0.00933837890625, 0.01019287109375, -0.01190185546875, -0...
[ 1250, 4867, 26040, 214, 2965, 14858, 502, 103510, 98753, 1940, 7, 58994, 147405, 159369, 873, 75846, 15824, 5303, 139392, 11675, 6032, 1884, 605, 217, 4834, 176377, 237, 83, 4527, 18113, 1653, 2063, 2046, 54529, 5941, 30646, 116, 27060, 757...
[ 0.1368408203125, 0.218994140625, 0.0789794921875, 0.034698486328125, 0.144775390625, 0.25830078125, 0.119873046875, 0.168212890625, 0.1763916015625, 0.1336669921875, 0.1259765625, 0.1083984375, 0.278076171875, 0.1552734375, 0.03021240234375, 0.14697265625, 0.097412109375, 0.1467285...
embed
1315194_c0
1315194
prolog
0
Title: Hash tables in prolog Problem title: Hash tables in prolog Tags: dictionary, hashtable, prolog, data-structures Problem: Hash tables in prolog I was solving a puzzle in prolog the other day and realized that were I using another programming language, I would have made use of a hash table/dictionary, but as far a...
Hash tables in prolog Hash tables in prolog dictionary hashtable prolog data-structures Hash Hash tables in prolog I was solving a puzzle in prolog the other day and realized that were I using another programming language, I would have made use of a hash table/dictionary, but as far as I know this isn't really possible...
[ 0.02490234375, -0.0008087158203125, -0.0050048828125, -0.007476806640625, -0.0150146484375, -0.0069580078125, 0.0027923583984375, -0.0029754638671875, -0.00445556640625, -0.028076171875, 0.003662109375, 0.031982421875, -0.0242919921875, 0.025390625, 0.018310546875, 0.02587890625, -0....
[ 162087, 23180, 23, 502, 4867, 45, 10763, 1556, 127, 22819, 2053, 137656, 3115, 104192, 185171, 17368, 15700, 56037, 46876, 4527, 428, 18, 6183, 7722, 8060, 6635, 5062, 45646, 23718, 62816, 48242, 2684, 4343, 1653, 2063, 5809, 33022, 137565, ...
[ 0.2257080078125, 0.247802734375, 0.031341552734375, 0.14892578125, 0.20458984375, 0.059326171875, 0.1304931640625, 0.171875, 0.12548828125, 0.1773681640625, 0.09344482421875, 0.1502685546875, 0.046295166015625, 0.10186767578125, 0.011474609375, 0.010650634765625, 0.02178955078125, ...
embed
70792554_c0
70792554
prolog
0
Title: How to solve this exercise on Prolog? Problem title: How to solve this exercise on Prolog? Tags: prolog Problem: How to solve this exercise on Prolog? I'm currently trying to this exercise, but I'm stuck. My predicate is Something(Number_Line,List,Islands) . The response of this predicate is the structure island...
How to solve this exercise on Prolog? How to solve this exercise on Prolog? prolog How Prolog Something Number_Line List Islands Numb_bridge Column How to solve this exercise on Prolog? I'm currently trying to this exercise, but I'm stuck. My predicate is Something(Number_Line,List,Islands) . The response of this predi...
[ -0.00323486328125, -0.011474609375, 0.00494384765625, 0.0230712890625, -0.00823974609375, 0.041259765625, -0.005157470703125, -0.009033203125, 0.013916015625, -0.044677734375, -0.0084228515625, -0.02587890625, -0.02197265625, 0.0213623046875, -0.00176239013671875, -0.0174560546875, 0...
[ 11249, 47, 86869, 903, 81979, 98, 1250, 4867, 32, 502, 200905, 103332, 93232, 32036, 18481, 7, 1429, 6492, 80728, 233987, 82424, 31577, 1284, 179933, 2646, 1653, 2063, 67, 18444, 26278, 154663, 29598, 15534, 57553, 45646, 90695, 2256, 78457, ...
[ 0.1236572265625, 0.06719970703125, 0.232666015625, 0.148681640625, 0.2288818359375, 0.1468505859375, 0.203125, 0.27392578125, 0.0159912109375, 0.1402587890625, 0.1611328125, 0.180908203125, 0.218994140625, 0.1630859375, 0.214599609375, 0.0299835205078125, 0.134033203125, 0.15332031...
embed
1730253_c0
1730253
prolog
0
Title: prolog cut off in method Problem title: prolog cut off in method Tags: logic, prolog Problem: prolog cut off in method I have a question I would like to ask you something about a code snippet: insert_pq(State, [], [State]) :- !. insert_pq(State, [H|Tail], [State, H|Tail]) :- precedes(State, H). insert_pq(State, ...
prolog cut off in method prolog cut off in method logic prolog insert_pq State Tail Tnew prolog cut off in method I have a question I would like to ask you something about a code snippet: the function quite clearly adds an item to a priority queue. The problem I have is the cut off operator in the first line. Presumabl...
[ 0.016357421875, 0.007781982421875, 0.0216064453125, 0.01953125, -0.00689697265625, -0.00543212890625, -0.023193359375, -0.032470703125, 0.01611328125, -0.03271484375, -0.0012359619140625, -0.0040283203125, 0.0011749267578125, -0.01611328125, -0.00762939453125, -0.003326416015625, 0.0...
[ 502, 4867, 59226, 5773, 55300, 23, 62775, 183540, 254, 864, 22836, 1218, 379, 54936, 9655, 26458, 18151, 93, 58134, 32354, 32233, 123019, 15190, 35735, 47, 25343, 53, 41, 13388, 2967, 39933, 5117, 13315, 217684, 70, 11782, 58359, 903, 4734,...
[ 0.1627197265625, 0.2314453125, 0.1534423828125, 0.209716796875, 0.2373046875, 0.031951904296875, 0.123779296875, 0.16259765625, 0.037872314453125, 0.15234375, 0.114501953125, 0.1236572265625, 0.0845947265625, 0.0848388671875, 0.004058837890625, 0.01947021484375, 0.0899658203125, 0....
embed
50979115_c1
50979115
prolog
1
] ; X = [a, a, b, b] ; (etc) ?- compress2(X, Y). X = Y, Y = [] ; X = Y, Y = [_658] ; X = [_658, _658], Y = [_658] ; X = Y, Y = [_1162, _1168], dif(_1162, _1168) ; X = [_658, _658, _658], Y = [_658] ; Both of the above eventually generate every alternative. However, this predicate fails on the original queries: compress...
] ; X = [a, a, b, b] ; (etc) ?- compress2(X, Y). X = Y, Y = [] ; X = Y, Y = [_658] ; X = [_658, _658], Y = [_658] ; X = Y, Y = [_1162, _1168], dif(_1162, _1168) ; X = [_658, _658, _658], Y = [_658] ; Both of the above eventually generate every alternative. However, this predicate fails on the original queries: compress...
[ -0.00506591796875, 0.0062255859375, 0.0242919921875, 0.02197265625, -0.002716064453125, 0.02099609375, -0.0029449462890625, -0.0026702880859375, 0.025634765625, 0.018310546875, 0.010986328125, 0.026123046875, 0.01153564453125, -0.0032501220703125, -0.000690460205078125, 0.0034332275390...
[ 10114, 2819, 1193, 2203, 11, 10, 876, 111879, 705, 375, 11856, 304, 1542, 990, 192066, 10837, 16028, 45755, 90419, 149766, 155605, 139392, 11907, 30700, 1653, 2063, 67, 35782, 7311, 41, 10484, 30646, 29568, 40956, 136993, 48281, 136, 3034, ...
[ 0.0190277099609375, 0.011322021484375, 0.1492919921875, 0.116455078125, 0.011871337890625, 0.04840087890625, 0.0859375, 0.029876708984375, 0.03173828125, 0.1785888671875, 0.254150390625, 0.1640625, 0.1279296875, 0.1181640625, 0.2181396484375, 0.15380859375, 0.181640625, 0.110839843...
embed
70281408_c0
70281408
prolog
0
Title: Swap last two elements of a list in Prolog Problem title: Swap last two elements of a list in Prolog Tags: list, prolog Problem: Swap last two elements of a list in Prolog I've been trying to write a program that compares two lists hat are the same except the last two elements of List 2 are in reverse order, i.e...
Swap last two elements of a list in Prolog Swap last two elements of a list in Prolog list prolog Swap Prolog SwapLastTwo Swap last two elements of a list in Prolog I've been trying to write a program that compares two lists hat are the same except the last two elements of List 2 are in reverse order, i.e [4,5,6] and [...
[ 0.000148773193359375, 0.018798828125, 0.00872802734375, 0.0181884765625, -0.0167236328125, 0.02001953125, -0.012939453125, 0.017333984375, 0.021240234375, 0.025146484375, 0.0284423828125, 0.018310546875, -0.0062255859375, 0.0096435546875, 0.005767822265625, 0.0211181640625, 0.0142211...
[ 43062, 254, 4568, 6626, 80854, 5303, 23, 1250, 4867, 111, 502, 2729, 271, 618, 3613, 31577, 33022, 1528, 69101, 1256, 5701, 40494, 32036, 116, 39531, 184, 12989, 617, 104629, 129678, 30646, 68062, 48398, 5608, 2060, 18151, 1653, 2063, 67, ...
[ 0.2156982421875, 0.1099853515625, 0.21533203125, 0.178466796875, 0.1943359375, 0.1693115234375, 0.029083251953125, 0.15771484375, 0.21875, 0.0006103515625, 0.112060546875, 0.1632080078125, 0.1102294921875, 0.0179443359375, 0.1700439453125, 0.0171051025390625, 0.018524169921875, 0.1...
embed
41527522_c1
41527522
prolog
1
+ SumOfTail. For instance: total_time(reds,T). Returns:T=77 total_time(blue,T). Return: T=78 So obviously the reds team has finished the race in the shortest time so they are the winners (1st place) and the blue team -in the 2ed place. And it should look like that: rank_teams(_list_o_ranks):- /*The logic that ranks th...
+ SumOfTail. For instance: total_time(reds,T). Returns:T=77 total_time(blue,T). Return: T=78 So obviously the reds team has finished the race in the shortest time so they are the winners (1st place) and the blue team -in the 2ed place. And it should look like that: rank_teams(_list_o_ranks):- /*The logic that ranks th...
[ 0.0111083984375, 0.003936767578125, -0.00384521484375, -0.0003757476806640625, -0.0174560546875, -0.0057373046875, -0.000530242919921875, -0.019287109375, 0.0059814453125, -0.009521484375, 0.0126953125, -0.001129150390625, 0.0230712890625, -0.01544189453125, -0.0096435546875, 0.0130004...
[ 997, 36335, 132887, 9874, 379, 110527, 3622, 6032, 2822, 7, 618, 173340, 14546, 143802, 384, 19051, 171259, 4842, 7175, 122799, 70, 45712, 16610, 525, 1733, 159690, 271, 3687, 57571, 116, 297, 5608, 6713, 1884, 30648, 44420, 6562, 31, 36467...
[ 0.1534423828125, 0.2059326171875, 0.2259521484375, 0.1875, 0.163330078125, 0.030487060546875, 0.1297607421875, 0.1290283203125, 0.150390625, 0.035400390625, 0.06585693359375, 0.1444091796875, 0.1368408203125, 0.1712646484375, 0.054901123046875, 0.1492919921875, 0.056640625, 0.14245...
embed
2387871_c0
2387871
prolog
0
Title: Prolog homework help Problem title: Prolog homework help Tags: list, prolog Problem: Prolog homework help Okay, my last prolog question. It's the common geneaology problem. I am suppose to take a list of facts and have a function called descendant that will return a list that has all the descendants. For example...
Prolog homework help Prolog homework help list prolog Prolog Bob Tim Joe Recursive DList NewDList Base Prolog homework help Okay, my last prolog question. It's the common geneaology problem. I am suppose to take a list of facts and have a function called descendant that will return a list that has all the descendants. ...
[ 0.03466796875, 0.007080078125, 0.0107421875, 0.01007080078125, -0.01348876953125, 0.02978515625, -0.00323486328125, 0.000020265579223632812, 0.0012664794921875, -0.03076171875, 0.016357421875, -0.03662109375, -0.0123291015625, 0.0078125, -0.00994873046875, 0.00555419921875, 0.0245361...
[ 1250, 4867, 5368, 18244, 4358, 5303, 502, 25027, 13320, 40207, 48650, 391, 154663, 2356, 1419, 44978, 4568, 9655, 39210, 22293, 11, 25443, 2967, 139124, 5646, 15824, 32354, 35839, 60887, 1236, 30646, 1556, 756, 70, 10840, 91736, 11782, 5608, ...
[ 0.1636962890625, 0.2164306640625, 0.0767822265625, 0.115234375, 0.0716552734375, 0.191162109375, 0.1337890625, 0.1002197265625, 0.1241455078125, 0.2156982421875, 0.0870361328125, 0.025543212890625, 0.1822509765625, 0.013885498046875, 0.1300048828125, 0.07879638671875, 0.0362854003906...
embed
55789419_c0
55789419
prolog
0
Title: Is there a way to sum only the integers in a list of pairs that contain a letter and an integer in Prolog? Problem title: Is there a way to sum only the integers in a list of pairs that contain a letter and an integer in Prolog? Tags: list, prolog Problem: Is there a way to sum only the integers in a list of pai...
Is there a way to sum only the integers in a list of pairs that contain a letter and an integer in Prolog? Is there a way to sum only the integers in a list of pairs that contain a letter and an integer in Prolog? list prolog Prolog Head Tail Sum Sum2 Total Is there a way to sum only the integers in a list of pairs tha...
[ -0.00186920166015625, 0.0167236328125, 0.0108642578125, 0.022705078125, -0.0303955078125, 0.0245361328125, -0.01904296875, 0.0142822265625, 0.003143310546875, -0.000926971435546875, 0.007354736328125, -0.0211181640625, -0.006072998046875, -0.00738525390625, 0.004425048828125, 0.0081176...
[ 3917, 47, 10554, 4734, 892, 26255, 5303, 80836, 7, 70541, 31330, 136, 1505, 23, 1250, 4867, 502, 44816, 1218, 379, 36335, 304, 33867, 63134, 26747, 7413, 1884, 221, 37842, 20324, 32354, 11782, 18, 4488, 28412, 98320, 1810, 209 ]
[ 0.0853271484375, 0.043670654296875, 0.219970703125, 0.1280517578125, 0.14697265625, 0.1490478515625, 0.156005859375, 0.198974609375, 0.01324462890625, 0.07464599609375, 0.177490234375, 0.10009765625, 0.1005859375, 0.041351318359375, 0.13623046875, 0.2208251953125, 0.06219482421875, ...
embed
36457577_c0
36457577
prolog
0
Title: Anyone can help me apply this on my database? Problem title: Anyone can help me apply this on my database? Tags: prolog Problem: Anyone can help me apply this on my database? query(USER, PWD, DB, QUERY, Columns, Rows) :- atom_concat('-p', PWD, PPWD), process_create(path(mysql), ['-u', USER, PPWD, '-D', DB, '-e',...
Anyone can help me apply this on my database? Anyone can help me apply this on my database? prolog Anyone USER PWD QUERY Columns Rows atom_concat PPWD process_create Out read_record read_records Fields read_line_to_codes Codes end_of_file atom_codes Line atomic_list_concat Record Clause Anyone can help me apply this on...
[ 0.031005859375, 0.00701904296875, 0.018310546875, 0.0262451171875, -0.00885009765625, 0.020263671875, -0.0126953125, -0.0277099609375, 0.0185546875, -0.06982421875, 0.020751953125, -0.00848388671875, -0.02001953125, -0.007659912109375, -0.0054931640625, -0.0111083984375, 0.0082397460...
[ 28541, 3630, 831, 4358, 163, 59911, 903, 98, 759, 63399, 502, 4867, 345, 50184, 87390, 21389, 34388, 233987, 96190, 34627, 2271, 4460, 12211, 9433, 7612, 13538, 12301, 32271, 117657, 7, 2256, 188, 40899, 28864, 3564, 4390, 29822, 16777, 656...
[ 0.06195068359375, 0.140869140625, 0.04876708984375, 0.1011962890625, 0.001739501953125, 0.18115234375, 0.1107177734375, 0.082763671875, 0.0291748046875, 0.2353515625, 0.1202392578125, 0.1922607421875, 0.0372314453125, 0.0887451171875, 0.16796875, 0.0660400390625, 0.05108642578125, ...
embed
63675306_c1
63675306
prolog
1
/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl-ld" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux" CMake Error at src/cmake_install.cmake:509 (EXECUTE_PROCESS): EXECUTE_PROCESS given unknown argument "command"....
/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl-ld" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux" CMake Error at src/cmake_install.cmake:509 (EXECUTE_PROCESS): EXECUTE_PROCESS given unknown argument "command"....
[ -0.00069427490234375, -0.0096435546875, 0.0150146484375, -0.003936767578125, -0.01953125, 0.01092529296875, -0.00897216796875, -0.0294189453125, 0.0050048828125, 0.0230712890625, 0.006744384765625, -0.0213623046875, 0.0103759765625, 0.00579833984375, -0.003387451171875, -0.009094238281...
[ 3454, 4867, 7, 2452, 2424, 112, 2601, 177149, 80383, 24658, 75101, 959, 14037, 5612, 7568, 15276, 13307, 2397, 6077, 7344, 47, 29552, 67127, 44932, 28088, 212059, 19437, 55898, 23837, 1126, 16546, 194695, 69723, 10750, 277, 12018, 26265, 6512...
[ 0.08953857421875, 0.2032470703125, 0.003631591796875, 0.173095703125, 0.21630859375, 0.025787353515625, 0.190673828125, 0.121337890625, 0.15576171875, 0.227294921875, 0.240966796875, 0.1041259765625, 0.1484375, 0.12939453125, 0.1112060546875, 0.1824951171875, 0.147705078125, 0.0728...
embed
6524603_c0
6524603
prolog
0
Title: PROLOG / All paths in a directed graph with loops Problem title: PROLOG / All paths in a directed graph with loops Tags: prolog, loops, path Problem: PROLOG / All paths in a directed graph with loops I've got the following diagram given: Diagram here The first gateway/connector is an OR-gateway/connector (it has...
PROLOG / All paths in a directed graph with loops PROLOG / All paths in a directed graph with loops prolog loops path PROLOG All PROLOG / All paths in a directed graph with loops I've got the following diagram given: Diagram here The first gateway/connector is an OR-gateway/connector (it has a circle in it). The gatewa...
[ 0.030517578125, -0.0016937255859375, -0.000545501708984375, -0.00439453125, -0.0185546875, -0.01165771484375, 0.0074462890625, 0.003509521484375, 0.0057373046875, -0.035888671875, 0.00787353515625, -0.0033111572265625, -0.019287109375, 0.01025390625, 0.0233154296875, 0.00921630859375, ...
[ 10514, 47510, 3164, 60875, 7, 8951, 41382, 678, 40956, 23, 502, 4867, 4163, 25632, 117233, 34475, 4512, 25561, 3688, 5117, 70836, 7514, 64, 135457, 748, 33172, 9, 42118, 42154, 425, 1193, 24638, 58735, 1286, 19882, 39958, 33636, 51957, 5646...
[ 0.1746826171875, 0.2392578125, 0.09637451171875, 0.206298828125, 0.0615234375, 0.1455078125, 0.169677734375, 0.04803466796875, 0.17919921875, 0.009185791015625, 0.1441650390625, 0.2469482421875, 0.0164337158203125, 0.04290771484375, 0.1978759765625, 0.016357421875, 0.0755615234375, ...
embed
39228607_c0
39228607
prolog
0
Title: Prolog: Predicate that tells if given integer is a power of two and is usable as a generator Problem title: Prolog: Predicate that tells if given integer is a power of two and is usable as a generator Tags: clpfd, prolog, instantiation-error Problem: Prolog: Predicate that tells if given integer is a power of tw...
Prolog: Predicate that tells if given integer is a power of two and is usable as a generator Prolog: Predicate that tells if given integer is a power of two and is usable as a generator clpfd prolog instantiation-error Prolog Predicate ERROR Arguments Prolog: Predicate that tells if given integer is a power of two and ...
[ -0.003265380859375, -0.009033203125, 0.020751953125, 0.002105712890625, 0.01507568359375, 0.034912109375, -0.016357421875, -0.015869140625, 0.0120849609375, -0.021240234375, 0.00311279296875, -0.0037689208984375, 0.005340576171875, 0.00775146484375, 0.0220947265625, 0.0007171630859375,...
[ 1250, 4867, 7145, 2063, 67, 14192, 2174, 34475, 892, 1505, 83, 14537, 111, 6626, 1821, 2886, 237, 145823, 39557, 71, 502, 34648, 188800, 151206, 112140, 1884, 1653, 7192, 434, 618, 3613, 11583, 16401, 100, 11907, 51515, 43240, 4127, 8337, ...
[ 0.1624755859375, 0.232177734375, 0.1644287109375, 0.2266845703125, 0.11962890625, 0.107421875, 0.049957275390625, 0.06060791015625, 0.1248779296875, 0.08917236328125, 0.1395263671875, 0.19921875, 0.1370849609375, 0.2252197265625, 0.111328125, 0.1112060546875, 0.08221435546875, 0.23...
embed
27251123_c0
27251123
prolog
0
Title: How can I modify the following Prolog program Problem title: How can I modify the following Prolog program Tags: prolog Problem: How can I modify the following Prolog program I have written the following program to compute all pairs of members in a list. Here is my code: select_pair(X, Y, [X|[Y|T]], T). select_p...
How can I modify the following Prolog program How can I modify the following Prolog program prolog How Prolog select_pair Head Rest How can I modify the following Prolog program I have written the following program to compute all pairs of members in a list. Here is my code: I am supposed to call my code with this 3-mem...
[ -0.0186767578125, 0.02783203125, 0.0150146484375, 0.0162353515625, -0.0157470703125, 0.0130615234375, -0.033447265625, 0.00167083740234375, 0.0169677734375, -0.01409912109375, 0.0216064453125, 0.00238037109375, 0.0037994384765625, -0.009765625, -0.000606536865234375, -0.000210762023925...
[ 11249, 831, 2811, 40383, 25632, 1250, 4867, 1528, 502, 36849, 109637, 44816, 49756, 59121, 9969, 6743, 756, 80836, 43032, 5303, 18151, 134598, 11782, 5691, 39, 27417, 4734, 22027, 18, 139392, 7722, 162515, 1284, 14602, 959, 3642, 116, 138 ]
[ 0.04290771484375, 0.07110595703125, 0.1754150390625, 0.2010498046875, 0.1234130859375, 0.1771240234375, 0.249755859375, 0.181396484375, 0.1544189453125, 0.1629638671875, 0.229736328125, 0.19921875, 0.20849609375, 0.057891845703125, 0.072021484375, 0.0958251953125, 0.0567626953125, ...
embed
73186673_c0
73186673
prolog
0
Title: Calculations in lists in PROLOG Problem title: Calculations in lists in PROLOG Tags: prolog Problem: Calculations in lists in PROLOG I try to create an emergency system to find people on time and those late. so my list now looks like: [ [patient(204,4,2),patient(203,3,2)] , [patient(303,7,3),patient(302,6,3)] , ...
Calculations in lists in PROLOG Calculations in lists in PROLOG prolog Calculations PROLOG Calculations in lists in PROLOG I try to create an emergency system to find people on time and those late. so my list now looks like: [ [patient(204,4,2),patient(203,3,2)] , [patient(303,7,3),patient(302,6,3)] , [patient(404,12,4...
[ 0.006134033203125, -0.0128173828125, 0.004302978515625, -0.009521484375, -0.0228271484375, -0.00555419921875, -0.0125732421875, 0.0250244140625, 0.0130615234375, -0.051513671875, 0.01422119140625, -0.015380859375, -0.01129150390625, 0.000946044921875, 0.0091552734375, -0.0185546875, ...
[ 212467, 21094, 23, 5303, 7, 10514, 47510, 502, 4867, 9790, 28282, 161203, 5426, 7413, 3395, 1733, 8382, 72399, 5036, 33342, 1884, 170250, 1549, 124093, 10461, 139911, 363, 9513, 2485, 43317, 1837, 3444, 12638, 47, 98, 25632, 32354, 30854, 1...
[ 0.2354736328125, 0.0826416015625, 0.06561279296875, 0.251708984375, 0.0704345703125, 0.182861328125, 0.26416015625, 0.1361083984375, 0.2357177734375, 0.0723876953125, 0.09332275390625, 0.1575927734375, 0.1170654296875, 0.1265869140625, 0.06243896484375, 0.1551513671875, 0.02691650390...
embed
40332045_c0
40332045
prolog
0
Title: How code generation works for Ait-Kaci's WAM L1? Problem title: How code generation works for Ait-Kaci's WAM L1? Tags: warren-abstract-machine, prolog Problem: How code generation works for Ait-Kaci's WAM L1? Hassan Aït-Kaci's "Warren's Abstract Machine: A Tutorial Reconstruction" Section 2.4 extends L...
How code generation works for Ait-Kaci's WAM L1? How code generation works for Ait-Kaci's WAM L1? warren-abstract-machine prolog How Ait-Kaci WAM put_variable put_value get_variable get_value How code generation works for Ait-Kaci's WAM L1? Hassan Aït-Kaci's "Warren's Abstract Machine: A Tutorial Reconstructi...
[ 0.01287841796875, 0.010986328125, -0.0166015625, 0.00677490234375, -0.0037841796875, 0.0067138671875, -0.0022430419921875, 0.0019683837890625, 0.002655029296875, -0.0322265625, 0.0025787353515625, -0.00360107421875, -0.0184326171875, -0.004425048828125, -0.000919342041015625, -0.008605...
[ 11249, 18151, 58093, 43240, 100, 62, 217, 8139, 318, 4336, 594, 339, 418, 3768, 1631, 982, 2055, 2816, 15390, 103149, 502, 4867, 9, 3884, 21690, 2886, 27494, 2046, 48652, 55860, 71947, 233973, 68311, 183447, 238478, 66207, 65042, 2389, 47, ...
[ 0.069580078125, 0.2314453125, 0.2081298828125, 0.1475830078125, 0.0499267578125, 0.0638427734375, 0.1326904296875, 0.088623046875, 0.14794921875, 0.110107421875, 0.1368408203125, 0.105712890625, 0.1280517578125, 0.00067138671875, 0.036865234375, 0.1427001953125, 0.0288543701171875, ...
embed
24172735_c0
24172735
prolog
0
Title: Workaround ensure_loaded/1 GNU Prolog? Problem title: Workaround ensure_loaded/1 GNU Prolog? Tags: prolog, gnu-prolog Problem: Workaround ensure_loaded/1 GNU Prolog? Is there a workaround to make ensure_loaded/1 work in GNU Prolog as it works in many other Prolog systems? The goal is to have a preamble so that t...
Workaround ensure_loaded/1 GNU Prolog? Workaround ensure_loaded/1 GNU Prolog? prolog gnu-prolog Workaround ensure_loaded GNU Prolog term_expansion atom_concat suite.p Workaround ensure_loaded/1 GNU Prolog? Is there a workaround to make ensure_loaded/1 work in GNU Prolog as it works in many other Prolog systems? The goa...
[ 0.014892578125, 0.0235595703125, -0.0050048828125, 0.0155029296875, -0.0126953125, 0.0120849609375, 0.00433349609375, 0.006927490234375, 0.0022735595703125, -0.050537109375, 0.0216064453125, 0.0179443359375, -0.028076171875, -0.0218505859375, 0.010009765625, 0.0245361328125, 0.011962...
[ 27985, 11, 67688, 63284, 63033, 297, 11583, 165132, 1250, 4867, 502, 104155, 3454, 13579, 83613, 66, 34627, 2271, 4460, 14947, 254, 4488, 3249, 454, 23, 43240, 76519, 69236, 40099, 18151, 4527, 41371, 5426, 37842, 25632, 41, 1294, 22027, 18...
[ 0.1240234375, 0.066650390625, 0.19677734375, 0.30712890625, 0.248291015625, 0.17626953125, 0.234619140625, 0.2015380859375, 0.1937255859375, 0.2210693359375, 0.1279296875, 0.138671875, 0.152099609375, 0.1553955078125, 0.0677490234375, 0.1195068359375, 0.1844482421875, 0.06121826171...
embed
12885646_c0
12885646
prolog
0
Title: print customized result in prolog Problem title: print customized result in prolog Tags: prolog Problem: print customized result in prolog I am working on a simple prolog program. Here is my problem. Say I already have a fact fruit(apple). I want the program take a input like this ?- input([what,is,apple]). and ...
print customized result in prolog print customized result in prolog prolog Text Query Thing Category print customized result in prolog I am working on a simple prolog program. Here is my problem. Say I already have a fact fruit(apple). I want the program take a input like this ?- input([what,is,apple]). and output appl...
[ 0.01324462890625, 0.0198974609375, 0.000431060791015625, 0.01123046875, -0.0048828125, 0.01025390625, 0.00927734375, -0.0064697265625, 0.006591796875, -0.0081787109375, 0.0126953125, -0.01104736328125, -0.044189453125, -0.00958251953125, -0.00144195556640625, 0.0064697265625, 0.00433...
[ 28412, 178036, 297, 16750, 23, 502, 4867, 24129, 58836, 6003, 214, 49057, 20697, 8781, 1528, 2967, 21771, 15824, 41896, 9007, 133, 3444, 5646, 107730, 1884, 903, 124409, 164, 140992, 108787, 83, 10, 100, 705, 11, 23129, 217, 64457, 114977, ...
[ 0.2333984375, 0.26123046875, 0.1097412109375, 0.223876953125, 0.0771484375, 0.178466796875, 0.250244140625, 0.1551513671875, 0.1219482421875, 0.041259765625, 0.0139923095703125, 0.09405517578125, 0.05145263671875, 0.06903076171875, 0.1290283203125, 0.07684326171875, 0.0753173828125, ...
embed
33454552_c0
33454552
prolog
0
Title: what about (SWI) Prolog as NoSQL platform? Problem title: what about (SWI) Prolog as NoSQL platform? Tags: swi-prolog, database, plgi, rdf, prolog Problem: what about (SWI) Prolog as NoSQL platform? I'd like to see (SWI)Prolog advertised as a NoSQL 'serious contender'. (SWI)Prolog has awesome data bindings featu...
what about (SWI) Prolog as NoSQL platform? what about (SWI) Prolog as NoSQL platform? swi-prolog database plgi rdf prolog SWI Prolog NoSQL what about (SWI) Prolog as NoSQL platform? I'd like to see (SWI)Prolog advertised as a NoSQL 'serious contender'. (SWI)Prolog has awesome data bindings features, and lot of power - ...
[ 0.0120849609375, 0.029296875, 0.0042724609375, -0.002593994140625, -0.0035858154296875, 0.00543212890625, -0.0011444091796875, -0.01483154296875, 0.01214599609375, -0.030517578125, 0.023681640625, -0.0172119140625, -0.03955078125, -0.014404296875, 0, -0.007293701171875, -0.0041503906...
[ 2367, 1672, 294, 38969, 1250, 4867, 237, 438, 158897, 13651, 16, 91, 2452, 3454, 63399, 6456, 735, 4216, 420, 502, 159, 1884, 10752, 200316, 184, 93905, 25212, 820, 79929, 2053, 128239, 66139, 5915, 14537, 33022, 62775, 26548, 6044, 6957, ...
[ 0.0120849609375, 0.04205322265625, 0.053314208984375, 0.2176513671875, 0.1763916015625, 0.261474609375, 0.09747314453125, 0.170654296875, 0.308349609375, 0.2142333984375, 0.0406494140625, 0.0238037109375, 0.183837890625, 0.136474609375, 0.1541748046875, 0.087890625, 0.1610107421875, ...
embed
50669664_c0
50669664
prolog
0
Title: How to print all possible grades in a recursive or any other way? Problem title: How to print all possible grades in a recursive or any other way? Tags: prolog Problem: How to print all possible grades in a recursive or any other way? Ok,i have implemented the predicate show(Name,Grade). which works like this ?-...
How to print all possible grades in a recursive or any other way? How to print all possible grades in a recursive or any other way? prolog How Name Grade Jim Ann Bob Max Pete How to print all possible grades in a recursive or any other way? Ok,i have implemented the predicate show(Name,Grade). which works like this I w...
[ 0.0054931640625, 0.01019287109375, -0.00191497802734375, 0.0002956390380859375, -0.0022125244140625, 0.0235595703125, -0.0172119140625, -0.009765625, -0.01287841796875, 0.0108642578125, 0.006622314453125, -0.020263671875, 0.0023345947265625, 0.0223388671875, 0.0017852783203125, -0.0072...
[ 11249, 47, 28412, 756, 7722, 44000, 7, 195625, 5844, 3789, 3917, 23, 707, 502, 4867, 15757, 22453, 13, 41994, 35512, 25027, 9920, 1460, 67, 10, 2499, 765, 29479, 1653, 2063, 7639, 163612, 37878, 112, 43240, 1884, 903, 3444, 45367, 130481,...
[ 0.1107177734375, 0.0654296875, 0.2218017578125, 0.1524658203125, 0.1829833984375, 0.26123046875, 0.1434326171875, 0.1959228515625, 0.1456298828125, 0.048431396484375, 0.074462890625, 0.039794921875, 0.015594482421875, 0.06390380859375, 0.09930419921875, 0.1190185546875, 0.21606445312...
embed
61066233_c0
61066233
prolog
0
Title: retrieve one element from knowledge base in Prolog Problem title: retrieve one element from knowledge base in Prolog Tags: prolog Problem: retrieve one element from knowledge base in Prolog i have this knowledge base. It represent a subway line. I want to retrieve one element from the base if the element exist. ...
retrieve one element from knowledge base in Prolog retrieve one element from knowledge base in Prolog prolog knowledge Prolog de_la_concorde enter_station retrieve one element from knowledge base in Prolog i have this knowledge base. It represent a subway line. I want to retrieve one element from the base if the elemen...
[ 0.0186767578125, -0.01104736328125, 0.024169921875, 0.007537841796875, 0.00897216796875, 0.01312255859375, -0.0016937255859375, 0.0098876953125, 0.00970458984375, -0.05029296875, 0.01544189453125, 0.01904296875, -0.0255126953125, 0.0076904296875, -0.0023956298828125, 0.004364013671875,...
[ 456, 3996, 3134, 1632, 12830, 1295, 51359, 3647, 23, 1250, 4867, 502, 8, 143, 2271, 32271, 30957, 41311, 33636, 1614, 7514, 13315, 3444, 47, 2174, 32316, 903, 18151, 4420, 28271, 5303, 17311, 29398, 3034, 30646, 1884 ]
[ 0.098876953125, 0.1683349609375, 0.148193359375, 0.1649169921875, 0.21826171875, 0.1177978515625, 0.196533203125, 0.241943359375, 0.06158447265625, 0.158203125, 0.252197265625, 0.087158203125, 0.1778564453125, 0.09991455078125, 0.059814453125, 0.1607666015625, 0.17626953125, 0.1704...
embed
39507277_c0
39507277
prolog
0
Title: Prolog First Steps: What is wrong about this code? Problem title: Prolog First Steps: What is wrong about this code? Tags: prolog Problem: Prolog First Steps: What is wrong about this code? I just started learning Prolog and can not find my mistake. When I want to find sisters (and parents) of jana with sister(j...
Prolog First Steps: What is wrong about this code? Prolog First Steps: What is wrong about this code? prolog Prolog First Steps What Person Sister Father Mother Prolog First Steps: What is wrong about this code? I just started learning Prolog and can not find my mistake. When I want to find sisters (and parents) of jan...
[ 0.0235595703125, -0.002349853515625, 0.0115966796875, 0.00439453125, -0.0277099609375, 0.0067138671875, -0.00897216796875, 0.01519775390625, -0.0174560546875, -0.05126953125, -0.0036773681640625, -0.01287841796875, -0.0213623046875, 0.0162353515625, 0.0244140625, 0.01507568359375, 0....
[ 1250, 4867, 23972, 50478, 7, 4865, 83, 44691, 1672, 903, 18151, 502, 15270, 602, 1515, 160960, 115217, 52080, 959, 7413, 121742, 3444, 114015, 2940, 27863, 16, 30938, 678, 13938, 1660, 30646, 29568 ]
[ 0.171142578125, 0.2423095703125, 0.1041259765625, 0.1815185546875, 0.01373291015625, 0.055938720703125, 0.074951171875, 0.1702880859375, 0.049896240234375, 0.064453125, 0.182373046875, 0.126220703125, 0.12060546875, 0.145263671875, 0.111328125, 0.154541015625, 0.1427001953125, 0.06...
embed
10078824_c0
10078824
prolog
0
Title: Replace term with a variable in Prolog Problem title: Replace term with a variable in Prolog Tags: prolog, dcg Problem: Replace term with a variable in Prolog I have a DCG in Prolog that I can query like so: q(Tree, [name, of, company], []). and get a response that shows me the path taken to parse the query: Tre...
Replace term with a variable in Prolog Replace term with a variable in Prolog prolog dcg Replace Prolog Tree Attribute Acme Replace term with a variable in Prolog I have a DCG in Prolog that I can query like so: q(Tree, [name, of, company], []). and get a response that shows me the path taken to parse the query: Tree =...
[ 0.009033203125, 0.01141357421875, -0.010986328125, 0.0108642578125, -0.0024566650390625, 0.01104736328125, -0.01202392578125, 0.016357421875, -0.006988525390625, -0.0478515625, 0.015380859375, -0.0015716552734375, 0.00396728515625, 0.01068115234375, 0.00897216796875, 0.0174560546875, ...
[ 853, 23935, 13579, 678, 77336, 23, 1250, 4867, 10, 502, 104, 238, 177, 101344, 1913, 191145, 9852, 282, 391, 56367, 831, 41, 1294, 1884, 8096, 62731, 11627, 111, 14380, 57553, 60875, 366, 146365, 140803, 28848, 19064, 1030, 35782, 14858, ...
[ 0.0631103515625, 0.1654052734375, 0.254150390625, 0.1080322265625, 0.3017578125, 0.011627197265625, 0.1590576171875, 0.2489013671875, 0.01336669921875, 0.111083984375, 0.004547119140625, 0.017333984375, 0.07525634765625, 0.2288818359375, 0.056640625, 0.1878662109375, 0.1473388671875,...
embed
55483768_c0
55483768
prolog
0
Title: Solutions for sum in Prolog Problem title: Solutions for sum in Prolog Tags: prolog Problem: Solutions for sum in Prolog I'm an absolute beginner to prolog. I've just read a basic tutorial and tried to solve a quick problem on my own. The problem is this, find possible number combinations that lead to a sum. I'm...
Solutions for sum in Prolog Solutions for sum in Prolog prolog Solutions Prolog ERROR Arguments _3302 _3304 Note Re-run Solutions for sum in Prolog I'm an absolute beginner to prolog. I've just read a basic tutorial and tried to solve a quick problem on my own. The problem is this, find possible number combinations tha...
[ 0.0089111328125, 0.0277099609375, 0.0238037109375, 0.033935546875, -0.0220947265625, 0.004302978515625, -0.009033203125, 0.00004482269287109375, 0.0257568359375, -0.03271484375, 0.004669189453125, -0.020751953125, -0.01055908203125, 0.00762939453125, 0.010009765625, 0.0031585693359375,...
[ 109339, 100, 10554, 23, 1250, 4867, 502, 151206, 24638, 112140, 94375, 304, 617, 18622, 16428, 89931, 9842, 1679, 12301, 62822, 57143, 37842, 86869, 63773, 2967, 10002, 7413, 7722, 14012, 162515, 37105, 41206, 1884, 5608, 16750, 142424, 62, 1...
[ 0.182373046875, 0.08624267578125, 0.2335205078125, 0.032745361328125, 0.167724609375, 0.254150390625, 0.1171875, 0.09716796875, 0.0740966796875, 0.153564453125, 0.125732421875, 0.08599853515625, 0.085205078125, 0.0189971923828125, 0.078857421875, 0.019927978515625, 0.0219573974609375...
embed
41102912_c1
41102912
prolog
1
we move from one structure to the next like a monkey swinging from a vine, instead of continually mutating a time-varying data structure as we do in imperative programming. We just hope that the garbage collector is faster than we are! The map-related predicates that we offer could be: map_new(?Map) ...to unify Map wi...
we move from one structure to the next like a monkey swinging from a vine, instead of continually mutating a time-varying data structure as we do in imperative programming. We just hope that the garbage collector is faster than we are! The map-related predicates that we offer could be: map_new(?Map) ...to unify Map wi...
[ 0.002685546875, 0.01031494140625, 0.0037994384765625, 0.00848388671875, -0.0033721923828125, -0.006988525390625, -0.0028839111328125, 0.003265380859375, 0.02685546875, -0.0361328125, 0.01446533203125, 0.02001953125, -0.0189208984375, 0, 0.014892578125, 0.002777099609375, -0.011413574...
[ 642, 25813, 1295, 1632, 45646, 47, 11737, 1884, 2667, 19770, 144291, 214, 27888, 64457, 9454, 31158, 1733, 1961, 2053, 222530, 56037, 449, 1401, 1660, 15673, 450, 3671, 402, 429, 43799, 748, 83, 4271, 56, 3501, 621, 38, 22288, 174822, 165...
[ 0.1295166015625, 0.2061767578125, 0.1143798828125, 0.0836181640625, 0.2078857421875, 0.0946044921875, 0.108642578125, 0.109375, 0.049224853515625, 0.1307373046875, 0.115234375, 0.0579833984375, 0.1566162109375, 0.114501953125, 0.0616455078125, 0.1522216796875, 0.10687255859375, 0.0...
embed
41992142_c1
41992142
prolog
1
domain and search for elements that weren't handled yet, and find that the simplest way is to create a second predicate for YCount > 0. Remembering that using just X as the first argument can cover all XCount >= 0, I create a case for YCount = 1 and all Xes, which is: concat(X,[Y|_],[Y|X]). And this is the place where...
domain and search for elements that weren't handled yet, and find that the simplest way is to create a second predicate for YCount > 0. Remembering that using just X as the first argument can cover all XCount >= 0, I create a case for YCount = 1 and all Xes, which is: concat(X,[Y|_],[Y|X]). And this is the place where...
[ -0.0029296875, -0.00592041015625, 0.006683349609375, 0.003265380859375, -0.00958251953125, 0.01513671875, 0.01177978515625, -0.016845703125, 0.0216064453125, -0.0439453125, 0.0184326171875, 0.0050048828125, 0.0033111572265625, -0.0111083984375, -0.006591796875, 0.0031280517578125, -0...
[ 77758, 136, 33938, 100, 80854, 450, 3542, 19, 18, 34831, 14373, 7413, 30362, 3917, 28282, 17932, 1653, 2063, 67, 990, 108210, 977, 757, 1193, 5117, 10750, 29256, 7225, 106, 756, 90, 158, 4460, 1542, 1723, 3687, 759, 234873, 62163, 78574, ...
[ 0.177001953125, 0.0214996337890625, 0.18115234375, 0.1192626953125, 0.16064453125, 0.0233001708984375, 0.060638427734375, 0.06134033203125, 0.13525390625, 0.144775390625, 0.101318359375, 0.16259765625, 0.1104736328125, 0.050811767578125, 0.07989501953125, 0.1558837890625, 0.160034179...
embed
26719774_c1
26719774
prolog
1
20 , r , 22 , 23 , 23 ] ] It is noticeable why this happens, since it replaces the value with Index = 1 on each sublist. In order to fix it, I thought about implementing a counter. By incrementing the index by 5 each iteration (size of each sub list), the predicate should now output the following (desired) list: Desire...
20 , r , 22 , 23 , 23 ] ] It is noticeable why this happens, since it replaces the value with Index = 1 on each sublist. In order to fix it, I thought about implementing a counter. By incrementing the index by 5 each iteration (size of each sub list), the predicate should now output the following (desired) list: Desire...
[ -0.01348876953125, 0.01123046875, 0.01275634765625, 0.000942230224609375, -0.0191650390625, 0.007110595703125, -0.0022735595703125, 0.01708984375, 0.0206298828125, 0.0017852783203125, 0.0123291015625, 0.00482177734375, 0.00145721435546875, 0.00112152099609375, 0.01153564453125, 0.00567...
[ 387, 4, 1690, 1039, 1105, 10114, 60322, 2886, 15400, 903, 96276, 442, 91995, 7, 70, 34292, 678, 31471, 2203, 106, 12638, 1614, 6562, 30022, 17569, 29479, 10, 105416, 158661, 214, 63262, 390, 190, 17, 720, 2320, 15, 62539, 111, 5303, 247...
[ 0.1998291015625, 0.035186767578125, 0.1182861328125, 0.1605224609375, 0.2181396484375, 0.008941650390625, 0.07135009765625, 0.05047607421875, 0.07208251953125, 0.07171630859375, 0.1065673828125, 0.0280609130859375, 0.2000732421875, 0.007354736328125, 0.037200927734375, 0.198486328125, ...
embed
52729401_c1
52729401
prolog
1
person( louie, fox, date(5,may,1993), unemployed) ] ). husband(X) :- family(X, _, _). wife(X) :- family(_, X, _). child(X) :- family(_, _, Children), member(X, Children). salary(person(_, _, _, works(_, S)), S). salary(person(_, _, _, unemployed), 0). The format is: family(husband,wife,[children]). Each person in the f...
person( louie, fox, date(5,may,1993), unemployed) ] ). husband(X) :- family(X, _, _). wife(X) :- family(_, X, _). child(X) :- family(_, _, Children), member(X, Children). salary(person(_, _, _, works(_, S)), S). salary(person(_, _, _, unemployed), 0). The format is: family(husband,wife,[children]). Each person in the f...
[ 0.012451171875, 0.0032196044921875, 0.00238037109375, 0.01031494140625, -0.0245361328125, 0.00848388671875, -0.0089111328125, 0.01104736328125, 0.0233154296875, -0.0301513671875, -0.00122833251953125, -0.0205078125, -0.020263671875, 0.007415771484375, 0.0205078125, -0.0010833740234375,...
[ 3445, 459, 34, 478, 4, 147797, 5622, 104116, 11354, 76545, 51, 212423, 71390, 1542, 15772, 14449, 194, 58386, 29041, 91345, 32786, 4559, 30816, 43240, 1294, 757, 9384, 132, 6378, 8262, 2452, 2242, 237052, 98423, 23, 1556, 10, 9351, 127319, ...
[ 0.131103515625, 0.0738525390625, 0.1593017578125, 0.205322265625, 0.026275634765625, 0.2042236328125, 0.0357666015625, 0.01171875, 0.0872802734375, 0.1734619140625, 0.03802490234375, 0.1767578125, 0.2076416015625, 0.055267333984375, 0.062469482421875, 0.203125, 0.02996826171875, 0....
embed
13758809_c0
13758809
prolog
0
Title: Prolog rule - False? Problem title: Prolog rule - False? Tags: prolog-toplevel, prolog Problem: Prolog rule - False? I have facts: /**--(course,time,location)--*/ ctl('course1', 'time1','location1'). ctl('course2', 'time1','location2'). ctl('course3', 'time2','location3'). /**--Lecturer,course-*/ lc('lecturer1',...
Prolog rule - False? Prolog rule - False? prolog-toplevel prolog Prolog course1 time1 location1 course2 location2 course3 time2 location3 Lecturer lecturer1 lecturer2 Prolog rule - False? I have facts: and my rule for lecturer's schedule(course,time,location) is: If I do: ?- schedule('lecturer1',C,T,L). to check what i...
[ 0.034423828125, 0.0189208984375, 0.00177001953125, 0.0145263671875, -0.03271484375, -0.01507568359375, -0.00396728515625, -0.00153350830078125, -0.009521484375, -0.0240478515625, -0.015625, -0.0167236328125, 0.00738525390625, 0.0076904296875, -0.0072021484375, 0.00799560546875, 0.006...
[ 1250, 4867, 79986, 22225, 184, 20, 502, 13784, 67919, 15411, 1733, 418, 31913, 363, 75625, 87643, 59619, 42, 304, 765, 15824, 25, 80889, 100599, 6032, 87632, 54, 8996, 12765, 140992, 116, 94407, 35166, 1284, 705, 9, 238, 2750, 83, 94957, ...
[ 0.1878662109375, 0.270751953125, 0.209228515625, 0.1871337890625, 0.171875, 0.0151824951171875, 0.1104736328125, 0.054443359375, 0.120849609375, 0.086669921875, 0.127685546875, 0.052032470703125, 0.08282470703125, 0.041778564453125, 0.06488037109375, 0.1068115234375, 0.1549072265625,...
embed
20387977_c0
20387977
prolog
0
Title: Library system in prolog Problem title: Library system in prolog Tags: prolog, rules Problem: Library system in prolog I need help with a library system in prolog. I tried to define all the books in my library this way: book(['programming in logic'], [nm(k, clark), nm(f, mcCabe)], ['programation'], ['editorial 1...
Library system in prolog Library system in prolog prolog rules Library Title Autgor Genre Editorial Library system in prolog I need help with a library system in prolog. I tried to define all the books in my library this way: And I tried to do a query for all programming books this way: but I need to suggest books by g...
[ 0.021484375, 0.01092529296875, -0.0003299713134765625, 0.0211181640625, -0.005035400390625, -0.000926971435546875, -0.023681640625, -0.00970458984375, -0.01904296875, -0.05078125, 0.004852294921875, -0.003173828125, -0.01507568359375, 0.00732421875, 0.016357421875, 0.006072998046875, ...
[ 103835, 5426, 23, 502, 4867, 91736, 48962, 52236, 6504, 15937, 162946, 3871, 4358, 35773, 1294, 37842, 61924, 756, 42840, 3917, 41, 56037, 42459, 390, 30773, 42179, 80835, 2684, 36663, 12877, 33938, 10484, 27781, 7413, 8966, 14449, 53201, 282...
[ 0.218994140625, 0.17431640625, 0.052886962890625, 0.149169921875, 0.23681640625, 0.1893310546875, 0.09124755859375, 0.0538330078125, 0.160400390625, 0.1282958984375, 0.1644287109375, 0.031036376953125, 0.0738525390625, 0.1866455078125, 0.1527099609375, 0.0093994140625, 0.124389648437...
embed
65908113_c0
65908113
prolog
0
Title: CHR: managing "constraint stores" Problem title: CHR: managing "constraint stores" Tags: chr, constraints, prolog, store Problem: CHR: managing "constraint stores" Is there a way to manage Constraint stores in CHR ? What I have in mind ? Let say I do a query. I want the result set, set aside ...
CHR: managing "constraint stores" CHR: managing "constraint stores" chr constraints prolog store CHR CHR: managing "constraint stores" Is there a way to manage Constraint stores in CHR ? What I have in mind ? Let say I do a query. I want the result set, set aside (may be with different scope than us...
[ 0.006591796875, 0.01409912109375, 0.0184326171875, 0.00193023681640625, 0.01226806640625, -0.00140380859375, -0.005615234375, 0.00018405914306640625, 0.00020885467529296875, -0.01416015625, 0.004974365234375, 0.0233154296875, -0.006072998046875, 0.0174560546875, 0.0303955078125, 0.0064...
[ 313, 29562, 332, 66398, 2271, 2816, 4288, 4343, 7, 17656, 158, 502, 4867, 3917, 47, 111240, 1657, 23, 7086, 41, 1294, 3444, 16750, 5423, 8752, 12921, 70820, 38937, 156883, 11675, 134071, 2046, 75281, 137107, 50339, 49119, 8, 85779, 106117, ...
[ 0.07476806640625, 0.217529296875, 0.06781005859375, 0.06689453125, 0.07177734375, 0.2105712890625, 0.1702880859375, 0.232666015625, 0.09625244140625, 0.1396484375, 0.0628662109375, 0.1109619140625, 0.1767578125, 0.07281494140625, 0.0191650390625, 0.1986083984375, 0.0843505859375, 0...
embed
42737638_c0
42737638
prolog
0
Title: Count empty list in Prolog list of list Problem title: Count empty list in Prolog list of list Tags: list, prolog Problem: Count empty list in Prolog list of list Learning Prolog still, I made the predicate empties(L,R) that accepts a list of groups in L (i.e.: [ [ 2 ] ,[ 1 ] ,[ ] ] ) and the R indicates the num...
Count empty list in Prolog list of list Count empty list in Prolog list of list list prolog Count Prolog Count empty list in Prolog list of list Learning Prolog still, I made the predicate empties(L,R) that accepts a list of groups in L (i.e.: [ [ 2 ] ,[ 1 ] ,[ ] ] ) and the R indicates the number of empty groups withi...
[ 0.006622314453125, -0.002899169921875, 0.002105712890625, 0.000530242919921875, -0.003997802734375, 0.03564453125, -0.000823974609375, -0.0108642578125, 0.0230712890625, 0.005523681640625, 0.00142669677734375, -0.01202392578125, 0.0013885498046875, 0.028076171875, 0.0086669921875, 0.02...
[ 108210, 201505, 5303, 1250, 4867, 111, 23, 502, 114344, 7464, 1653, 2063, 67, 20244, 2449, 866, 1052, 26946, 94407, 339, 116, 106, 627, 117414, 14012, 28032, 21115, 5608, 76199, 63736, 10422, 26458, 35166, 1193, 2203, 91995, 757, 72272, 154...
[ 0.1796875, 0.271728515625, 0.228271484375, 0.174560546875, 0.2088623046875, 0.034881591796875, 0.014923095703125, 0.07769775390625, 0.0316162109375, 0.004058837890625, 0.10791015625, 0.1153564453125, 0.02203369140625, 0.160400390625, 0.12255859375, 0.042022705078125, 0.078125, 0.08...
embed
51916367_c0
51916367
prolog
0
Title: How to express synonyms in Prolog? Problem title: How to express synonyms in Prolog? Tags: prolog Problem: How to express synonyms in Prolog? Let's say I have a rulebase which says that if our cake is bad than we should not eat it: do_not_eat(cake) :- is_bad(cake). Let's further say that that our brownie has gon...
How to express synonyms in Prolog? How to express synonyms in Prolog? prolog How Prolog do_not_eat is_bad Cake How to express synonyms in Prolog? Let's say I have a rulebase which says that if our cake is bad than we should not eat it: Let's further say that that our brownie has gone bad: How do I express in Prolog tha...
[ 0.01397705078125, 0.01214599609375, 0.033447265625, 0.0133056640625, -0.006622314453125, 0.0128173828125, 0.0079345703125, 0.01495361328125, 0.014892578125, -0.02880859375, -0.01275634765625, -0.007232666015625, -0.006103515625, 0.00152587890625, 0.01068115234375, -0.0078125, 0.00331...
[ 11249, 36510, 164661, 7, 23, 1250, 4867, 502, 10869, 13, 257, 83, 12283, 2041, 350, 79986, 37382, 2174, 2446, 86963, 6494, 5608, 959, 73203, 442, 119455, 478, 1556, 74955, 191607, 10821, 678, 33, 179665, 77336, 26818, 51, 40383, 7722, 515...
[ 0.04803466796875, 0.1845703125, 0.232666015625, 0.10498046875, 0.0640869140625, 0.14990234375, 0.23876953125, 0.06268310546875, 0.075439453125, 0.0615234375, 0.04437255859375, 0.049346923828125, 0.1529541015625, 0.1541748046875, 0.0672607421875, 0.1417236328125, 0.12109375, 0.03329...
embed
70414559_c0
70414559
prolog
0
Title: Python: Is there a way a swipl query results in value true not {}? Problem title: Python: Is there a way a swipl query results in value true not {}? Tags: boolean, rules, prolog, python Problem: Python: Is there a way a swipl query results in value true not {}? To call prolog programs in python there is the liba...
Python: Is there a way a swipl query results in value true not {}? Python: Is there a way a swipl query results in value true not {}? boolean rules prolog python pyswip Prolog Python prolog.assertz prolog.query Python: Is there a way a swipl query results in value true not {}? To call prolog programs in python there is...
[ 0.0257568359375, 0.0186767578125, -0.001312255859375, 0.0235595703125, -0.0240478515625, -0.003936767578125, -0.004241943359375, -0.003997802734375, -0.004791259765625, -0.0201416015625, 0.01470947265625, 0.01409912109375, -0.029541015625, -0.0034942626953125, 0.0181884765625, 0.004699...
[ 145581, 2685, 3917, 91, 2452, 2424, 41, 1294, 50339, 34292, 29568, 959, 10, 23, 31, 34677, 91736, 502, 4867, 17198, 50828, 57756, 254, 1250, 33657, 169, 944, 10666, 8152, 11782, 103391, 25474, 6635, 207116, 47, 2046, 4677, 2174, 79986, 10...
[ 0.27490234375, 0.0302886962890625, 0.1083984375, 0.04803466796875, 0.233642578125, 0.2418212890625, 0.1806640625, 0.1663818359375, 0.1453857421875, 0.2261962890625, 0.223388671875, 0.179443359375, 0.0177459716796875, 0.029296875, 0.0240478515625, 0.08966064453125, 0.117431640625, 0...
embed
74780942_c0
74780942
prolog
0
Title: prolog predicate logic(negation) Problem title: prolog predicate logic(negation) Tags: prolog Problem: prolog predicate logic(negation) I have the following logical task: If David is interested in logic, then he will either enroll in the Logic course next semester, or he is lazy. If David studied logic literatur...
prolog predicate logic(negation) prolog predicate logic(negation) prolog prolog predicate logic(negation) I have the following logical task: If David is interested in logic, then he will either enroll in the Logic course next semester, or he is lazy. If David studied logic literature on his own, then he is interested i...
[ 0.005859375, -0.01214599609375, 0.0052490234375, 0.0172119140625, -0.01470947265625, 0.0341796875, 0.01318359375, 0.010498046875, 0.0054931640625, -0.0093994140625, -0.00634765625, 0.004058837890625, -0.0174560546875, -0.0184326171875, 0.01007080078125, -0.003662109375, 0.00007867813...
[ 502, 4867, 1653, 2063, 67, 62775, 3331, 1363, 25632, 289, 66211, 4263, 6765, 60892, 23, 1221, 40101, 22, 27722, 50592, 238, 15411, 11737, 49345, 707, 764, 83, 21, 3285, 22282, 163136, 1919, 10002, 71, 959, 8121, 10, 1723, 1193, 61112, 9...
[ 0.1593017578125, 0.2003173828125, 0.1224365234375, 0.1729736328125, 0.017608642578125, 0.2149658203125, 0.219970703125, 0.1036376953125, 0.0035400390625, 0.0234375, 0.13720703125, 0.030853271484375, 0.1954345703125, 0.1656494140625, 0.032928466796875, 0.01446533203125, 0.014007568359...
embed
46902653_c0
46902653
prolog
0
Title: Prolog - How to count the number of elements in a list that satisfy a specific condition? Problem title: Prolog - How to count the number of elements in a list that satisfy a specific condition? Tags: list, prolog Problem: Prolog - How to count the number of elements in a list that satisfy a specific condition? ...
Prolog - How to count the number of elements in a list that satisfy a specific condition? Prolog - How to count the number of elements in a list that satisfy a specific condition? list prolog Prolog How Prolog - How to count the number of elements in a list that satisfy a specific condition? for example, if I have a li...
[ 0.002166748046875, 0.0072021484375, -0.0093994140625, 0.0025177001953125, 0.0068359375, 0.007568359375, -0.01239013671875, 0.0128173828125, 0.0123291015625, -0.02294921875, -0.005279541015625, -0.0301513671875, -0.0067138671875, 0.010986328125, 0.00872802734375, -0.0015869140625, 0.0...
[ 1250, 4867, 11249, 47, 54529, 14012, 80854, 5303, 40407, 53, 29458, 35431, 23, 450, 502, 70, 133063, 92714, 3444, 106, 25, 903, 3642, 54, 54397, 195625, 1830, 2174, 44816, 105950, 214, 997, 959, 24765, 5701, 30646, 98320, 8966, 2967, 3578...
[ 0.18505859375, 0.263427734375, 0.07489013671875, 0.0821533203125, 0.255859375, 0.1702880859375, 0.2266845703125, 0.2210693359375, 0.1741943359375, 0.0897216796875, 0.148193359375, 0.1922607421875, 0.0665283203125, 0.04266357421875, 0.0941162109375, 0.0288848876953125, 0.0784912109375...
embed
60709066_c0
60709066
prolog
0
Title: Predicate retruns false when callled from other predicate Problem title: Predicate retruns false when callled from other predicate Tags: prolog Problem: Predicate retruns false when callled from other predicate I have this program in Prolog su([], Counter, Counter). su([G|O], N, Count) :- Counter is Count + G, s...
Predicate retruns false when callled from other predicate Predicate retruns false when callled from other predicate prolog other file Predicate Counter Count custom_sum write_file Type file.txt read_file Reading Sum my_sum Predicate retruns false when callled from other predicate I have this program in Prolog When I tr...
[ 0.00457763671875, -0.00518798828125, 0.00640869140625, 0.00775146484375, -0.0252685546875, 0.01531982421875, 0.0189208984375, 0.004974365234375, 0.0142822265625, -0.0218505859375, 0.0033111572265625, 0.00872802734375, -0.0120849609375, -0.01123046875, 0.03125, 0.006927490234375, -0.0...
[ 7145, 2063, 67, 10267, 16428, 98320, 11782, 6259, 1295, 3789, 1653, 502, 4867, 11435, 197956, 108210, 114122, 11832, 33022, 29822, 60457, 124326, 12301, 104951, 36335, 759, 3229, 1528, 1250, 5885, 30646, 7103, 18781, 111, 5303, 80854, 2967 ]
[ 0.15283203125, 0.206787109375, 0.07666015625, 0.1087646484375, 0.1556396484375, 0.1953125, 0.0948486328125, 0.064453125, 0.07958984375, 0.06671142578125, 0.11865234375, 0.06915283203125, 0.1778564453125, 0.0933837890625, 0.1265869140625, 0.110595703125, 0.1607666015625, 0.218139648...
embed
4077490_c0
4077490
prolog
0
Title: Prolog - Difference between two lists BUT Problem title: Prolog - Difference between two lists BUT Tags: prolog Problem: Prolog - Difference between two lists BUT Using SWI-Prolog's listing predicate (or SICStus' predicate in its list library), we have: lists:subtract([], _, []) :- !. lists:subtract([A|C], B, D)...
Prolog - Difference between two lists BUT Prolog - Difference between two lists BUT prolog Prolog Difference BUT lists:subtract new_subtract Prolog - Difference between two lists BUT Using SWI-Prolog's listing predicate (or SICStus' predicate in its list library), we have: which does this successfully: BUT, what if I w...
[ 0.01409912109375, 0.0242919921875, 0.0230712890625, 0.01092529296875, -0.01806640625, 0.0235595703125, -0.015869140625, 0.0118408203125, 0.02197265625, -0.0145263671875, 0.00086212158203125, -0.000362396240234375, -0.009765625, 0.0162353515625, -0.0027618408203125, -0.00531005859375, ...
[ 1250, 4867, 803, 18234, 6620, 17721, 6626, 5303, 151654, 502, 7, 22144, 39989, 18, 3525, 159, 38969, 10752, 214, 1653, 2063, 67, 102198, 2143, 35773, 765, 3129, 14602, 65771, 2367, 2174, 3444, 990, 1556, 17262, 51347, 35971, 1193, 1295, 1...
[ 0.197265625, 0.2457275390625, 0.0830078125, 0.159423828125, 0.0792236328125, 0.14404296875, 0.1124267578125, 0.2352294921875, 0.1549072265625, 0.169921875, 0.0045166015625, 0.1064453125, 0.1641845703125, 0.06329345703125, 0.10028076171875, 0.04962158203125, 0.173828125, 0.163940429...
embed
54766026_c0
54766026
prolog
0
Title: How to find Nephew in Prolog Family Code? Problem title: How to find Nephew in Prolog Family Code? Tags: prolog Problem: How to find Nephew in Prolog Family Code? I'm trying to get Prolog to output people in the family trees nephew, as in nephew(X,Y) will list X = the nephew Y = Aunt/ Uncle I've tried writing so...
How to find Nephew in Prolog Family Code? How to find Nephew in Prolog Family Code? prolog How Nephew Prolog Family Aunt Uncle How to find Nephew in Prolog Family Code? I'm trying to get Prolog to output people in the family trees nephew, as in nephew(X,Y) will list I've tried writing some of the code already, I'm pret...
[ 0.0257568359375, -0.01025390625, 0.0260009765625, 0.018310546875, -0.01483154296875, 0.01953125, 0.015625, -0.001495361328125, -0.01611328125, -0.0291748046875, -0.01019287109375, -0.02734375, -0.00067901611328125, 0.000812530517578125, 0.007171630859375, -0.007659912109375, 0.015502...
[ 11249, 47, 7413, 799, 20133, 434, 23, 1250, 4867, 59745, 28864, 502, 62, 9109, 992, 11030, 140992, 3395, 14449, 1360, 53297, 145204, 1542, 1723, 5303, 37842, 18151, 21771, 158863, 775, 75101, 43240, 18822, 78, 79298, 375, 964, 34844 ]
[ 0.057647705078125, 0.0153656005859375, 0.142822265625, 0.1519775390625, 0.241455078125, 0.1993408203125, 0.041900634765625, 0.16064453125, 0.2484130859375, 0.148681640625, 0.1820068359375, 0.11181640625, 0.0330810546875, 0.130615234375, 0.0836181640625, 0.11865234375, 0.11962890625, ...
embed
17400598_c0
17400598
prolog
0
Title: Select N elements from a List in Prolog Problem title: Select N elements from a List in Prolog Tags: prolog Problem: Select N elements from a List in Prolog I'm trying to write a Prolog predicate (SWI) that would select N elements from a List, like this: selectn ( +N , ?Elems , ?List1 , ?List2 ) is true when Lis...
Select N elements from a List in Prolog Select N elements from a List in Prolog prolog a Select List Prolog Lps L1s L2s L0s N-1 Solutions Select N elements from a List in Prolog I'm trying to write a Prolog predicate (SWI) that would select N elements from a List, like this: selectn ( +N , ?Elems , ?List1 , ?List2 ) is...
[ -0.0096435546875, 0.016845703125, 0.016357421875, 0.01214599609375, -0.0277099609375, -0.006591796875, -0.01153564453125, 0.0089111328125, 0.013916015625, -0.028564453125, 0.01806640625, 0.006805419921875, -0.000640869140625, 0.01275634765625, -0.01092529296875, 0.0169677734375, 0.01...
[ 51620, 541, 80854, 1295, 32036, 23, 1250, 4867, 502, 6423, 339, 304, 2389, 5759, 109339, 31577, 33022, 1653, 2063, 67, 38969, 36849, 19, 997, 839, 705, 7623, 195, 154663, 418, 29568, 756, 540, 184750, 50339, 2967, 3060, 50218, 171763, 367...
[ 0.197265625, 0.233154296875, 0.2186279296875, 0.0823974609375, 0.1817626953125, 0.05413818359375, 0.17333984375, 0.2381591796875, 0.1263427734375, 0.06866455078125, 0.001678466796875, 0.0826416015625, 0.009613037109375, 0.046051025390625, 0.1234130859375, 0.034820556640625, 0.0595092...
embed
28920816_c0
28920816
prolog
0
Title: Recognize sentence structure in Prolog Problem title: Recognize sentence structure in Prolog Tags: nlp, prolog Problem: Recognize sentence structure in Prolog I have a situation where I'm reading in three different types of sentences. They will be of one of the following forms: _ is a _ A _ is a _ Is _ a _? I ne...
Recognize sentence structure in Prolog Recognize sentence structure in Prolog nlp prolog Recognize Prolog Fido Recognize sentence structure in Prolog I have a situation where I'm reading in three different types of sentences. They will be of one of the following forms: I need to be able to recognize which type of sente...
[ 0.02587890625, 0.0036163330078125, 0.0013427734375, 0.0277099609375, -0.00634765625, 0.0255126953125, 0.0167236328125, 0.0101318359375, -0.004547119140625, -0.011474609375, 0.01068115234375, -0.00074005126953125, -0.0267333984375, -0.0135498046875, 0.0152587890625, 0.00970458984375, ...
[ 853, 115558, 731, 149357, 45646, 23, 1250, 4867, 26775, 502, 3698, 246, 16648, 16454, 17262, 12921, 52895, 3173, 3871, 19048, 125296, 10644, 30957, 15190, 41, 51359, 3647, 38937, 1543, 107730, 15824, 1528, 35166, 72272, 6528, 75530, 19, 84382...
[ 0.049774169921875, 0.1783447265625, 0.06536865234375, 0.2205810546875, 0.2391357421875, 0.03924560546875, 0.1632080078125, 0.2353515625, 0.1209716796875, 0.09521484375, 0.10791015625, 0.15087890625, 0.035888671875, 0.1534423828125, 0.08721923828125, 0.0810546875, 0.13330078125, 0.0...
embed
19049376_c0
19049376
prolog
0
Title: Stackoverflow in Prolog Peano Arithmetic Problem title: Stackoverflow in Prolog Peano Arithmetic Tags: prolog, failure-slice, stack-overflow, successor-arithmetics Problem: Stackoverflow in Prolog Peano Arithmetic I'm writing some Peano arithmetic to better learn Prolog. The following is the code I've come up wi...
Stackoverflow in Prolog Peano Arithmetic Stackoverflow in Prolog Peano Arithmetic prolog failure-slice stack-overflow successor-arithmetics Stackoverflow Prolog Peano Arithmetic Fatal Error GLOBALSZ Stackoverflow in Prolog Peano Arithmetic I'm writing some Peano arithmetic to better learn Prolog. The following is the c...
[ 0.01153564453125, 0.0279541015625, -0.0089111328125, 0.004913330078125, -0.006988525390625, -0.00860595703125, -0.0211181640625, 0.0031280517578125, 0.0033721923828125, -0.05029296875, 0.02734375, 0.01043701171875, -0.00921630859375, -0.0177001953125, 0.02685546875, 0.005584716796875, ...
[ 6512, 2594, 5465, 118664, 23, 1250, 4867, 1460, 3922, 1172, 8962, 282, 502, 137578, 13348, 177261, 39457, 42, 3036, 212059, 240597, 19934, 32562, 187, 9523, 11522, 30698, 581, 25632, 18151, 37202, 183234, 51592, 1118, 9790, 3249, 8781, 41, ...
[ 0.0989990234375, 0.094970703125, 0.149658203125, 0.226318359375, 0.0208740234375, 0.175048828125, 0.25244140625, 0.1802978515625, 0.2451171875, 0.0153350830078125, 0.136962890625, 0.094482421875, 0.121337890625, 0.1768798828125, 0.1317138671875, 0.150634765625, 0.07781982421875, 0....
embed
48356547_c0
48356547
prolog
0
Title: Single clause with if-the-else vs multiple clause predicates Problem title: Single clause with if-the-else vs multiple clause predicates Tags: performance, prolog Problem: Single clause with if-the-else vs multiple clause predicates Let's say I want to implement a predicate that 'returns' a list of all elements ...
Single clause with if-the-else vs multiple clause predicates Single clause with if-the-else vs multiple clause predicates performance prolog Single shared_members Members Lists Single clause with if-the-else vs multiple clause predicates Let's say I want to implement a predicate that 'returns' a list of all elements sh...
[ 0.020751953125, 0.015869140625, 0.02978515625, 0.0106201171875, -0.0264892578125, -0.002899169921875, 0.01043701171875, 0.0037384033203125, 0.015625, -0.0257568359375, 0.0128173828125, 0.01611328125, -0.002197265625, 0.006988525390625, 0.01416015625, 0.0196533203125, 0.00241088867187...
[ 43609, 70731, 13, 678, 2174, 2347, 5557, 20209, 48716, 1653, 2063, 23718, 502, 4867, 99764, 39, 27417, 74057, 32036, 3444, 29479, 67, 65395, 1779, 5303, 756, 80854, 237, 1632, 64747, 4785, 110608, 62775, 1528, 5423, 208124, 90698, 1286, 937...
[ 0.2296142578125, 0.2366943359375, 0.0811767578125, 0.06927490234375, 0.1700439453125, 0.0860595703125, 0.1832275390625, 0.09735107421875, 0.1976318359375, 0.1702880859375, 0.204345703125, 0.1568603515625, 0.0869140625, 0.183349609375, 0.2088623046875, 0.023529052734375, 0.14038085937...
embed
36097420_c0
36097420
prolog
0
Title: Proper flow control in Prolog without using the non-declarative if-then-else syntax Problem title: Proper flow control in Prolog without using the non-declarative if-then-else syntax Tags: flow-control, prolog, logical-purity, if-statement Problem: Proper flow control in Prolog without using the non-declarative ...
Proper flow control in Prolog without using the non-declarative if-then-else syntax Proper flow control in Prolog without using the non-declarative if-then-else syntax flow-control prolog logical-purity if-statement the Proper Prolog something_else Proper flow control in Prolog without using the non-declarative if-then...
[ 0.0185546875, 0.007232666015625, 0.00921630859375, 0.00830078125, -0.011962890625, -0.00086212158203125, 0.0133056640625, -0.001922607421875, 0.01318359375, -0.0294189453125, 0.00958251953125, 0.0028533935546875, -0.025390625, 0.004730224609375, 0.027099609375, 0.009521484375, 0.0161...
[ 1250, 1264, 86608, 6226, 4867, 15490, 351, 320, 45023, 2174, 92733, 5557, 6002, 86531, 23, 81988, 502, 62775, 4717, 2481, 61340, 9844, 50718, 1884, 47, 12765, 100, 61799, 15824, 54, 51359, 3647, 37076, 959, 87, 33079, 384, 2819, 241, 3447...
[ 0.15869140625, 0.174072265625, 0.2305908203125, 0.239013671875, 0.226318359375, 0.1007080078125, 0.030670166015625, 0.08636474609375, 0.021270751953125, 0.106201171875, 0.0811767578125, 0.09698486328125, 0.09423828125, 0.17431640625, 0.00689697265625, 0.2265625, 0.13134765625, 0.09...
embed
31611202_c0
31611202
prolog
0
Title: How to share an object state between java and prolog with JPL? Problem title: How to share an object state between java and prolog with JPL? Tags: prolog, java, jpl Problem: How to share an object state between java and prolog with JPL? I want to create an object in java: MyObject obj = new MyObject (); and I wa...
How to share an object state between java and prolog with JPL? How to share an object state between java and prolog with JPL? prolog java jpl How JPL MyObject jpl_new my_package.MyObject Object jpl_call How to share an object state between java and prolog with JPL? I want to create an object in java: and I want to pass...
[ 0.0126953125, 0.0189208984375, -0.00787353515625, 0.0089111328125, -0.0198974609375, -0.00775146484375, -0.00579833984375, -0.0035552978515625, -0.00055694580078125, -0.039794921875, 0.0169677734375, 0.017822265625, -0.015625, 0.01220703125, 0, -0.004547119140625, 0.0087890625, 0.0...
[ 11249, 12008, 36746, 11341, 17721, 79, 330, 136, 502, 4867, 678, 821, 21130, 1647, 2424, 2646, 46471, 75161, 54936, 759, 29102, 31852, 134549, 85763, 3444, 28282, 27875, 47, 41, 163846, 452, 6953, 5809, 4527, 11435, 1884, 903, 71864, 11782,...
[ 0.0706787109375, 0.1995849609375, 0.211181640625, 0.18994140625, 0.13232421875, 0.1639404296875, 0.203125, 0.088134765625, 0.1832275390625, 0.2183837890625, 0.118896484375, 0.145263671875, 0.2347412109375, 0.0867919921875, 0.1868896484375, 0.048583984375, 0.10113525390625, 0.139648...
embed
54299853_c0
54299853
prolog
0
Title: prolog, exshell, known predicate? Problem title: prolog, exshell, known predicate? Tags: prolog, expert-system Problem: prolog, exshell, known predicate? I am trying to implement an expert system with ExShell under Gprolog using the code I obtained from https://www.cs.unm.edu/~luger/ai-final/code/PROLOG.exshell_...
prolog, exshell, known predicate? prolog, exshell, known predicate? prolog expert-system existence_error write_premise Premise prolog, exshell, known predicate? I am trying to implement an expert system with ExShell under Gprolog using the code I obtained from https://www.cs.unm.edu/~luger/ai-final/code/PROLOG.exshell_...
[ 0.0113525390625, 0.00592041015625, 0.0084228515625, 0.037353515625, -0.0211181640625, 0.048828125, 0.004241943359375, -0.0042724609375, -0.00140380859375, -0.0157470703125, 0.0002841949462890625, 0.01214599609375, 0.006744384765625, -0.005615234375, 0.0274658203125, 0.0108642578125, ...
[ 502, 4867, 4, 1119, 128019, 51529, 1653, 2063, 67, 26808, 16751, 116311, 188800, 33022, 41707, 184, 38394, 31577, 29479, 5426, 5443, 294, 79544, 1379, 527, 3454, 18151, 39, 15246, 822, 1505, 508, 33870, 40899, 47970, 47510, 3355, 25724, 769...
[ 0.2073974609375, 0.27099609375, 0.01092529296875, 0.210205078125, 0.3095703125, 0.221923828125, 0.1663818359375, 0.2113037109375, 0.12060546875, 0.2027587890625, 0.1915283203125, 0.196533203125, 0.2095947265625, 0.1480712890625, 0.1654052734375, 0.06353759765625, 0.1595458984375, 0...
embed
64669601_c0
64669601
prolog
0
Title: How to generate all words of length N from an alphabet with condition Problem title: How to generate all words of length N from an alphabet with condition Tags: prolog Problem: How to generate all words of length N from an alphabet with condition Generate all words of length N from an alphabet {a,b,c,d,e,f} wher...
How to generate all words of length N from an alphabet with condition How to generate all words of length N from an alphabet with condition prolog an How N-1 atomic_list_concat count_occurrences List Occ How to generate all words of length N from an alphabet with condition Generate all words of length N from an alphabe...
[ 0.00012493133544921875, -0.0029144287109375, -0.0108642578125, 0.00775146484375, 0.004608154296875, 0.006561279296875, 0.0087890625, 0.0059814453125, 0.00164031982421875, -0.037841796875, -0.00921630859375, -0.0137939453125, 0.034423828125, 0.0164794921875, 0.0035552978515625, -0.00002...
[ 11249, 47, 139392, 756, 34153, 140909, 541, 1295, 229231, 678, 35431, 111, 502, 4867, 5759, 34627, 6562, 2271, 4460, 54529, 6652, 64240, 32036, 180, 10060, 155370, 11, 275, 238, 420, 201, 120820, 108975, 186351, 3789, 24145, 959, 5, 18151, ...
[ 0.06732177734375, 0.0164031982421875, 0.218017578125, 0.09765625, 0.20703125, 0.1436767578125, 0.1826171875, 0.109130859375, 0.2193603515625, 0.06744384765625, 0.228515625, 0.0247650146484375, 0.108642578125, 0.165283203125, 0.1143798828125, 0.1134033203125, 0.123779296875, 0.01745...
embed
66313720_c0
66313720
prolog
0
Title: How to swap the result of a predicate to the opposite? True to False, and vise versa Problem title: How to swap the result of a predicate to the opposite? True to False, and vise versa Tags: prolog Problem: How to swap the result of a predicate to the opposite? True to False, and vise versa I need to make a func...
How to swap the result of a predicate to the opposite? True to False, and vise versa How to swap the result of a predicate to the opposite? True to False, and vise versa prolog How no_duplicates List Start Current End How to swap the result of a predicate to the opposite? True to False, and vise versa I need to make a ...
[ -0.0137939453125, 0.0223388671875, 0.0247802734375, -0.02099609375, -0.0157470703125, 0.00848388671875, 0.028076171875, 0.00909423828125, 0.007171630859375, 0.00154876708984375, -0.01123046875, 0.0216064453125, 0.0030975341796875, 0.0057373046875, 0.000629425048828125, 0.00473022460937...
[ 11249, 47, 202317, 16750, 1653, 2063, 67, 70, 198274, 87599, 22225, 184, 18920, 105274, 111, 502, 4867, 110, 693, 52721, 1636, 32036, 13794, 114063, 18878, 10, 3871, 3249, 32354, 30646, 2174, 5303, 171763, 14602, 114689, 71, 7763, 81678, 12...
[ 0.09393310546875, 0.10174560546875, 0.26220703125, 0.200927734375, 0.177978515625, 0.206787109375, 0.123046875, 0.0228424072265625, 0.2381591796875, 0.2181396484375, 0.20263671875, 0.203125, 0.13427734375, 0.151123046875, 0.04278564453125, 0.05902099609375, 0.088623046875, 0.133422...
embed
23176840_c0
23176840
prolog
0
Title: Easily replicate an element in Prolog :) Problem title: Easily replicate an element in Prolog :) Tags: duplicates, list, prolog, replicate Problem: Easily replicate an element in Prolog :) I am working on a longer problem that has me duplicate an element N times in list form, and I believe that using append is t...
Easily replicate an element in Prolog :) Easily replicate an element in Prolog :) duplicates list prolog replicate Easily Prolog N-1 Easily replicate an element in Prolog :) I am working on a longer problem that has me duplicate an element N times in list form, and I believe that using append is the right way to go for...
[ -0.01409912109375, 0.0166015625, 0.004364013671875, 0.0203857421875, -0.01177978515625, 0.007659912109375, -0.000690460205078125, 0.006011962890625, 0.0166015625, -0.02880859375, -0.00054931640625, -0.017578125, -0.01123046875, 0.005889892578125, 0.01214599609375, 0.0033111572265625, ...
[ 241, 1544, 538, 143126, 67, 142, 12830, 23, 1250, 4867, 1094, 171763, 1636, 5303, 502, 541, 5759, 20697, 51713, 2967, 20028, 3173, 18822, 17368, 114689, 71, 7108, 3917, 57278, 1653, 2063, 5608, 3790, 2264, 27992, 6305, 1118, 456, 182867, ...
[ 0.003143310546875, 0.173828125, 0.0770263671875, 0.28369140625, 0.1441650390625, 0.00494384765625, 0.219482421875, 0.0648193359375, 0.180419921875, 0.26171875, 0.04217529296875, 0.233642578125, 0.0723876953125, 0.1544189453125, 0.134033203125, 0.12646484375, 0.1473388671875, 0.0698...
embed
64092046_c1
64092046
prolog
1
[1] recursiveAppend(T, NewOutput). recursiveAppend([H|T], Output):- % H is 2, Output is [1] append(H, Output, NewOutput), % NewOutput is [1, 2] recursiveAppend(T, NewOutput). recursiveAppend([H|T], Output):- % H is 3, Output is [1, 2] append(H, Output, NewOutput), % NewOutput is [1, 2, 3] recursiveAppend(T, NewOutput)...
[1] recursiveAppend(T, NewOutput). recursiveAppend([H|T], Output):- % H is 2, Output is [1] append(H, Output, NewOutput), % NewOutput is [1, 2] recursiveAppend(T, NewOutput). recursiveAppend([H|T], Output):- % H is 3, Output is [1, 2] append(H, Output, NewOutput), % NewOutput is [1, 2, 3] recursiveAppend(T, NewOutput)...
[ -0.006256103515625, 0.022216796875, 0.00872802734375, 0.005401611328125, 0.00494384765625, 0.019775390625, 0.00634765625, 0.02978515625, 0.00189208984375, -0.00113677978515625, 0.015380859375, -0.03759765625, -0.007568359375, 0.0079345703125, 0.01025390625, -0.0224609375, 0.030761718...
[ 17550, 195625, 5844, 39179, 3611, 618, 4, 2356, 79858, 7077, 132, 841, 58745, 13538, 1745, 572, 83, 116, 114689, 71, 68252, 138, 201, 190, 23972, 10750, 6562, 201505, 17932, 27623, 76228, 1528, 16940, 4358, 9655, 37170, 19879, 20028, 8108, ...
[ 0.04254150390625, 0.267822265625, 0.215576171875, 0.1583251953125, 0.21533203125, 0.1614990234375, 0.01849365234375, 0.197265625, 0.2445068359375, 0.1776123046875, 0.0069580078125, 0.1544189453125, 0.146240234375, 0.204833984375, 0.07183837890625, 0.1824951171875, 0.06121826171875, ...
embed
70370728_c0
70370728
prolog
0
Title: Prolog how to get adjacent numbers in rule Problem title: Prolog how to get adjacent numbers in rule Tags: rules, prolog, database Problem: Prolog how to get adjacent numbers in rule Very new to prolog, Anyways I have a database with names,road number,address. habite('Name', Num, 'Address'). I want to create a r...
Prolog how to get adjacent numbers in rule Prolog how to get adjacent numbers in rule rules prolog database Prolog Name Num Address ANum BNum Num-1 Prolog how to get adjacent numbers in rule Very new to prolog, Anyways I have a database with names,road number,address. I want to create a rule voisins(X,Y) which returns ...
[ 0.004058837890625, -0.00860595703125, 0.01055908203125, 0.0341796875, 0.007232666015625, 0.0228271484375, -0.01904296875, 0.022705078125, 0.01434326171875, -0.056396484375, -0.00775146484375, 0.004669189453125, -0.01458740234375, -0.006195068359375, 0.0174560546875, -0.01348876953125, ...
[ 1250, 4867, 3642, 47, 2046, 123594, 16797, 101935, 23, 79986, 91736, 502, 63399, 15757, 52782, 49990, 14368, 316, 5759, 123055, 52562, 14012, 107421, 3444, 28282, 119434, 7, 1542, 1723, 30646, 3395, 678, 5701, 29823, 990, 8035, 21748, 110218,...
[ 0.1695556640625, 0.2296142578125, 0.044281005859375, 0.00811767578125, 0.131591796875, 0.2073974609375, 0.242919921875, 0.213134765625, 0.118408203125, 0.1881103515625, 0.1763916015625, 0.1239013671875, 0.1556396484375, 0.06768798828125, 0.167724609375, 0.1246337890625, 0.00088500976...
embed
10596829_c0
10596829
prolog
0
Title: Prolog: sister/brother relationship Problem title: Prolog: sister/brother relationship Tags: relationship, prolog Problem: Prolog: sister/brother relationship I am trying to establish a relationship model in Prolog but the sister relationship turns out to be a fail. I am wondering what a good solution would be t...
Prolog: sister/brother relationship Prolog: sister/brother relationship relationship prolog Prolog Prolog: sister/brother relationship I am trying to establish a relationship model in Prolog but the sister relationship turns out to be a fail. I am wondering what a good solution would be to this. I am a beginner and thi...
[ 0.027587890625, 0.0089111328125, 0.01153564453125, -0.01214599609375, -0.0247802734375, 0.00860595703125, -0.006195068359375, 0.00110626220703125, -0.004669189453125, -0.0341796875, 0.003143310546875, -0.00970458984375, -0.0166015625, -0.0115966796875, 0.024169921875, 0.01043701171875,...
[ 1250, 4867, 12, 114015, 64, 6369, 9319, 76755, 502, 31577, 137633, 3299, 23, 1284, 15504, 1810, 186, 10, 35782, 87, 149016, 4127, 29806, 2806, 47, 903, 9842, 1679, 5117, 26693, 4358, 81907 ]
[ 0.1546630859375, 0.240966796875, 0.007598876953125, 0.2333984375, 0.043548583984375, 0.150146484375, 0.13330078125, 0.197509765625, 0.0992431640625, 0.06158447265625, 0.093505859375, 0.2105712890625, 0.034881591796875, 0.018402099609375, 0.007598876953125, 0.005950927734375, 0.023040...
embed
29880697_c0
29880697
prolog
0
Title: Write error in prolog Problem title: Write error in prolog Tags: prolog Problem: Write error in prolog My program(in SWI-Prolog) : has_ram('one-v',512-mb-ram). has_ram('one-s',1-gb-ram). has_ram('m8',2-gb-ram). has_ram('one-sv',1-gb-ram). has_processor('one-v',1-ghz). has_processor('one-s',1.5-ghz). has_processo...
Write error in prolog Write error in prolog prolog Write has_ram has_processor one-m8 has_brand get_phone_details Name Brand Ram Processor ERROR Domain stream_or_alias Write error in prolog My program(in SWI-Prolog) : ERROR Which i got : I would like to get the details of the phone as output.
[ 0.01171875, 0.01904296875, -0.006500244140625, 0.011474609375, 0.003509521484375, 0.0235595703125, -0.0164794921875, -0.00677490234375, -0.0106201171875, -0.00799560546875, 0.00775146484375, -0.005950927734375, 0.022216796875, -0.0274658203125, -0.000934600830078125, 0.0123291015625, ...
[ 601, 18781, 18499, 502, 4867, 23, 1556, 2198, 63923, 748, 1632, 39, 1019, 43264, 2046, 26551, 119514, 15757, 23243, 8446, 170582, 42, 151206, 24638, 93702, 75973, 41763, 1528, 159, 38969, 10752, 1884, 41653, 24089, 237, 140992 ]
[ 0.1031494140625, 0.1708984375, 0.2100830078125, 0.138671875, 0.213134765625, 0.0305023193359375, 0.0970458984375, 0.1708984375, 0.11669921875, 0.0816650390625, 0.135498046875, 0.0638427734375, 0.19970703125, 0.1773681640625, 0.0740966796875, 0.1524658203125, 0.174560546875, 0.01879...
embed
42468128_c1
42468128
prolog
1
- ...or at least for a suitable <ONE-LETTER RESPONSE> I could give to SWI-Prolog so that it arrives at the conclusion false . IOW, so that ?- w(x). ERROR: w/1: Undefined procedure: y/1 Exception: (7) y(x) ? <ONE-LETTER RESPONSE> false. ?- I know of at least one answer to my question, namely simply to delete or comment ...
- ...or at least for a suitable <ONE-LETTER RESPONSE> I could give to SWI-Prolog so that it arrives at the conclusion false . IOW, so that ?- w(x). ERROR: w/1: Undefined procedure: y/1 Exception: (7) y(x) ? <ONE-LETTER RESPONSE> false. ?- I know of at least one answer to my question, namely simply to delete or comment ...
[ 0.00041961669921875, 0.0245361328125, 0.01434326171875, 0.0023956298828125, -0.0113525390625, 0.01165771484375, 0.0230712890625, -0.0181884765625, -0.00787353515625, -0.0118408203125, 0.0004024505615234375, 0.007598876953125, -0.0185546875, -0.006378173828125, 0.00946044921875, 0.01757...
[ 748, 19713, 100, 202319, 31261, 866, 227403, 61661, 79347, 9127, 5809, 8337, 159, 38969, 9, 10752, 4867, 54410, 99, 93192, 98320, 54979, 148, 132, 425, 151206, 24638, 11583, 79912, 5983, 50491, 113, 5443, 63928, 8696, 3714, 35166, 154109, 6...
[ 0.022979736328125, 0.033355712890625, 0.006591796875, 0.2208251953125, 0.111083984375, 0.0623779296875, 0.1068115234375, 0.07696533203125, 0.1314697265625, 0.071533203125, 0.02392578125, 0.0653076171875, 0.07318115234375, 0.250732421875, 0.0227203369140625, 0.1278076171875, 0.1862792...
embed
40763884_c0
40763884
prolog
0
Title: Prolog - Issue using math operators Problem title: Prolog - Issue using math operators Tags: prolog Problem: Prolog - Issue using math operators I have a set of rules that consist of; family(Mother,Father,Children), where children is a list (e.g. [ag,bg]) and person/6. The date is person in set out as Day,Month,...
Prolog - Issue using math operators Prolog - Issue using math operators prolog math Prolog Issue bad_children F-1 Y-K K-Y Prolog - Issue using math operators I have a set of rules that consist of; family(Mother,Father,Children), where children is a list (e.g. [ag,bg]) and person/6. The date is person in set out as Day,...
[ 0.0228271484375, -0.005706787109375, -0.003326416015625, 0.0025634765625, -0.00860595703125, 0.003143310546875, -0.01348876953125, 0.023193359375, 0.0223388671875, -0.0247802734375, -0.0027313232421875, 0.00244140625, -0.00811767578125, 0.0059814453125, 0.013427734375, -0.015380859375,...
[ 1250, 4867, 223317, 17368, 48909, 39933, 502, 6494, 237052, 563, 5759, 990, 605, 341, 9, 1723, 765, 5423, 91736, 58055, 14449, 126340, 17647, 9319, 102656, 982, 20020, 83, 5303, 2703, 11821, 3445, 20155, 5622, 23, 1810, 237, 10013, 146794, ...
[ 0.1634521484375, 0.2274169921875, 0.181396484375, 0.068359375, 0.142578125, 0.2054443359375, 0.1103515625, 0.1956787109375, 0.1905517578125, 0.1014404296875, 0.12841796875, 0.052093505859375, 0.06689453125, 0.042449951171875, 0.004425048828125, 0.123046875, 0.0150909423828125, 0.07...
embed