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
47241661_c0
47241661
prolog
0
Title: Prolog intersection list of lists Problem title: Prolog intersection list of lists Tags: prolog, matrix, intersection, list Problem: Prolog intersection list of lists I want to create an intersection of lists of lists in prolog. (Matrix, with lists as cells) I have to handle only the case, when number of rows an...
Prolog intersection list of lists Prolog intersection list of lists prolog matrix intersection list Prolog Prolog intersection list of lists I want to create an intersection of lists of lists in prolog. (Matrix, with lists as cells) I have to handle only the case, when number of rows and columns are the same (Rectangul...
[ 0.01068115234375, 0.00994873046875, 0.0205078125, -0.000018358230590820312, -0.008544921875, 0.01312255859375, -0.0133056640625, -0.0162353515625, 0.00162506103515625, -0.0145263671875, -0.00054931640625, 0.00531005859375, 0.00150299072265625, -0.0050048828125, -0.0037078857421875, 0.0...
[ 1250, 4867, 1940, 7, 58994, 5303, 502, 50944, 425, 3444, 28282, 111, 23, 4613, 87427, 237, 38750, 34831, 4734, 7225, 14012, 15555, 136, 3365, 316, 5701, 10393, 320, 12989, 171763, 80854, 8597, 3509, 54, 89536, 6896, 138, 1779, 4358 ]
[ 0.169677734375, 0.249267578125, 0.1729736328125, 0.170654296875, 0.1961669921875, 0.232177734375, 0.1605224609375, 0.14013671875, 0.012115478515625, 0.07037353515625, 0.15576171875, 0.063720703125, 0.0294189453125, 0.0535888671875, 0.138916015625, 0.033416748046875, 0.17626953125, ...
embed
48186888_c0
48186888
prolog
0
Title: json get predicate (v2) Problem title: json get predicate (v2) Tags: swi-prolog, json, prolog Problem: json get predicate (v2) this is the predicatethat i use json_get(json_obj(JSON_obj), Field, Result) :- memberchk((Field,Result), JSON_obj). json_get(JSON_obj, Fields, Result) :- maplist(json_get(JSON_obj), Fiel...
json get predicate (v2) json get predicate (v2) swi-prolog json prolog json_get json_obj Field Result Fields json_parse Arthur Dent Zaphod Head1 Head2 json get predicate (v2) this is the predicatethat i use so with this tests like this are ok. But the predicate not working with tests like this how can i change the pred...
[ -0.005828857421875, -0.00170135498046875, -0.00015163421630859375, 0.00927734375, -0.021728515625, 0.0150146484375, -0.00145721435546875, 0.01708984375, 0.0013427734375, -0.0150146484375, 0.0283203125, 0.046630859375, -0.0238037109375, -0.02490234375, 0.006011962890625, -0.007598876953...
[ 1647, 1681, 2046, 1653, 2063, 67, 334, 10461, 2452, 3454, 4867, 502, 3794, 3522, 170, 117657, 126684, 2500, 79281, 1575, 18, 69132, 7352, 44816, 418, 304, 903, 86673, 4527, 221, 678, 109921, 1884, 3664, 959, 20697, 831, 15549, 70, 103608,...
[ 0.10137939453125, 0.1927490234375, 0.140380859375, 0.2130126953125, 0.234375, 0.162353515625, 0.113037109375, 0.1553955078125, 0.1434326171875, 0.0810546875, 0.1514892578125, 0.07952880859375, 0.06671142578125, 0.0648193359375, 0.1187744140625, 0.1151123046875, 0.109130859375, 0.05...
embed
7304313_c0
7304313
prolog
0
Title: Prolog: add list to set Problem title: Prolog: add list to set Tags: prolog Problem: Prolog: add list to set The below predicate adds item X to list S. It works fine. addToSet(X, S, S) :- atomic(X), member(X, S), !. addToSet(X, S, [X|S]) :- atomic(X). I am trying to extend it to a predicate which adds list [H|T]...
Prolog: add list to set Prolog: add list to set prolog Prolog Prolog: add list to set The below predicate adds item X to list S. It works fine. I am trying to extend it to a predicate which adds list [H|T] to set S. It works perfect if [H|T] is only 2 items long... i.e. if T is also atomic. For example, addToSet([5,6],...
[ 0.010498046875, 0.0223388671875, 0.01611328125, 0.003021240234375, -0.0269775390625, 0.0142822265625, -0.0240478515625, -0.0047607421875, 0.00238037109375, -0.0184326171875, 0.0341796875, 0.00185394287109375, -0.004638671875, 0.00482177734375, 0.000286102294921875, 0.006378173828125, ...
[ 1250, 4867, 15190, 5303, 47, 5423, 502, 35064, 1653, 2063, 67, 35735, 1193, 159, 43240, 5885, 31577, 65042, 841, 58745, 618, 15787, 4734, 116, 55769, 4989, 384, 34627, 1771, 7763, 294, 126, 104629, 133063, 82449, 1542, 104851, 966, 959, 4...
[ 0.144775390625, 0.2208251953125, 0.1646728515625, 0.2198486328125, 0.0858154296875, 0.210693359375, 0.1353759765625, 0.15185546875, 0.136474609375, 0.1724853515625, 0.03887939453125, 0.1619873046875, 0.11572265625, 0.1129150390625, 0.056671142578125, 0.00823974609375, 0.041015625, ...
embed
66201165_c0
66201165
prolog
0
Title: PROLOG list tasks for different elements Problem title: PROLOG list tasks for different elements Tags: prolog, list Problem: PROLOG list tasks for different elements I am struggling with some PROLOG tasks at this moment and I cannot seem to get my predicates working the way I want them to. I was asked to formula...
PROLOG list tasks for different elements PROLOG list tasks for different elements prolog list PROLOG not_el lastbutone_el PROLOG list tasks for different elements I am struggling with some PROLOG tasks at this moment and I cannot seem to get my predicates working the way I want them to. I was asked to formulate two dif...
[ 0.01068115234375, 0.003387451171875, 0.01324462890625, -0.0014495849609375, -0.01220703125, 0.031005859375, 0.00396728515625, -0.00830078125, 0.01190185546875, 0.01373291015625, 0.00131988525390625, -0.014404296875, -0.006805419921875, 0.017333984375, -0.00848388671875, 0.01123046875, ...
[ 10514, 47510, 5303, 66211, 100, 12921, 80854, 502, 4867, 959, 583, 4568, 8789, 3630, 237875, 3095, 53418, 1653, 2063, 1636, 20697, 37170, 26168, 6626, 38679, 2174, 1193, 56112, 18, 12830, 111, 339, 1542, 26458, 1528, 41206, 140992, 19577, 1...
[ 0.177734375, 0.25537109375, 0.1636962890625, 0.2235107421875, 0.070068359375, 0.177001953125, 0.1988525390625, 0.1456298828125, 0.23486328125, 0.1676025390625, 0.1204833984375, 0.1483154296875, 0.0943603515625, 0.1337890625, 0.0562744140625, 0.0253753662109375, 0.004547119140625, 0...
embed
29836096_c0
29836096
prolog
0
Title: List a given number of element in a list prolog Problem title: List a given number of element in a list prolog Tags: prolog Problem: List a given number of element in a list prolog I am trying to list a given number of elements i have stored in List , my code is as follows er(Person,List) :- findall(A, descendan...
List a given number of element in a list prolog List a given number of element in a list prolog prolog List List a given number of element in a list prolog I am trying to list a given number of elements i have stored in List , my code is as follows when i type the code below into prolog i get all of the elements that m...
[ 0.0224609375, 0.0027008056640625, 0.0024566650390625, 0.01031494140625, -0.004730224609375, 0.007598876953125, -0.00567626953125, 0.0157470703125, 0.0194091796875, -0.038330078125, 0.006744384765625, -0.049560546875, -0.010009765625, 0.01611328125, 0.0184326171875, 0.01092529296875, ...
[ 32036, 34475, 14012, 12830, 23, 10, 5303, 502, 4867, 31577, 80854, 765, 4343, 18151, 10644, 35064, 3934, 2046, 756, 111, 14858, 41, 1294, 69307, 26458, 47, 41170, 1250, 4734, 30646, 2684, 138, 1295, 7413, 8748, 7, 64457, 5584, 39933, 1381...
[ 0.1944580078125, 0.1650390625, 0.1719970703125, 0.227783203125, 0.0960693359375, 0.035552978515625, 0.2078857421875, 0.1793212890625, 0.2423095703125, 0.043853759765625, 0.182373046875, 0.0162200927734375, 0.093017578125, 0.0968017578125, 0.08740234375, 0.054412841796875, 0.003051757...
embed
33252498_c0
33252498
prolog
0
Title: Get longest list as goal in prolog Problem title: Get longest list as goal in prolog Tags: list, prolog Problem: Get longest list as goal in prolog I have more possible list as goal,but i need only one longest list.Is this possible to get first longest list? li-->[a]|[b]|[c]. int-->['1']|['2']|['3']. num-->int,n...
Get longest list as goal in prolog Get longest list as goal in prolog list prolog Get num_nl list1 L11 L22 Get longest list as goal in prolog I have more possible list as goal,but i need only one longest list.Is this possible to get first longest list? Here ERROR: Out of local stack.I want only longest list as goal:
[ 0.0194091796875, 0.02490234375, 0.00823974609375, 0.0037384033203125, -0.022216796875, 0.0035400390625, 0.00014019012451171875, -0.003997802734375, 0.018310546875, -0.01226806640625, 0.006011962890625, -0.005340576171875, -0.0133056640625, -0.0027618408203125, 0.008056640625, 0.0031127...
[ 20779, 4989, 525, 5303, 237, 69236, 23, 502, 4867, 13269, 13169, 418, 339, 1662, 4015, 1286, 7722, 3871, 4734, 1632, 2046, 5117, 11853, 151206, 24638, 13538, 111, 4000, 177261, 3444 ]
[ 0.0966796875, 0.1771240234375, 0.18701171875, 0.260009765625, 0.1180419921875, 0.255615234375, 0.0655517578125, 0.157958984375, 0.2449951171875, 0.156494140625, 0.15380859375, 0.0345458984375, 0.05023193359375, 0.13427734375, 0.154296875, 0.0684814453125, 0.149169921875, 0.09771728...
embed
23527658_c0
23527658
prolog
0
Title: How to print all facts? Problem title: How to print all facts? Tags: prolog Problem: How to print all facts? I'm trying to print all facts in my Prolog problem. Have searched the forum for a while and can't seem to find a solution to the problem. I tried the how can I print all database facts in prolog but can't...
How to print all facts? How to print all facts? prolog How if_then_else Print How to print all facts? I'm trying to print all facts in my Prolog problem. Have searched the forum for a while and can't seem to find a solution to the problem. I tried the how can I print all database facts in prolog but can't seem to make ...
[ 0.022216796875, -0.017578125, 0.0133056640625, 0.0223388671875, 0.01385498046875, 0.004974365234375, 0.001007080078125, -0.002288818359375, -0.00054931640625, 0.004974365234375, 0.01416015625, -0.0123291015625, -0.000675201416015625, 0.00799560546875, -0.010986328125, -0.00778198242187...
[ 11249, 47, 28412, 756, 15824, 7, 502, 4867, 2174, 92733, 5557, 39754, 31577, 1250, 2967, 4738, 29806, 3642, 831, 63399, 23, 4488, 8026, 24234, 42518, 22799, 7639, 4420, 903, 14481 ]
[ 0.08172607421875, 0.07421875, 0.2432861328125, 0.193603515625, 0.2149658203125, 0.160400390625, 0.1363525390625, 0.2132568359375, 0.139892578125, 0.080810546875, 0.1075439453125, 0.214599609375, 0.02764892578125, 0.1258544921875, 0.0699462890625, 0.0249481201171875, 0.039031982421875...
embed
24096066_c0
24096066
prolog
0
Title: Prolog separating into two lists issue Problem title: Prolog separating into two lists issue Tags: prolog-dif, prolog Problem: Prolog separating into two lists issue I have a prolog assignment. I need to look at the first item in a list, see if its following items are the same until they are not and separate the...
Prolog separating into two lists issue Prolog separating into two lists issue prolog-dif prolog Prolog Rest Init Prolog separating into two lists issue I have a prolog assignment. I need to look at the first item in a list, see if its following items are the same until they are not and separate the lists by the first i...
[ 0.018798828125, -0.00174713134765625, 0.0186767578125, 0.007110595703125, -0.04052734375, 0.0166015625, -0.0035400390625, 0.0133056640625, 0.01611328125, -0.0009307861328125, 0.015380859375, 0.0238037109375, 0.015625, 0.0018157958984375, -0.005157470703125, 0.00439453125, 0.000774383...
[ 1250, 4867, 38310, 3934, 6626, 5303, 31089, 214, 502, 428, 420, 49756, 360, 7, 95486, 674, 6713, 99, 5117, 35735, 1957, 25632, 55769, 5701, 959, 84797, 390, 171763, 17932, 876, 238, 43581, 29806, 43240, 2704, 14858, 5351, 108975, 23, 6445...
[ 0.167236328125, 0.2335205078125, 0.225341796875, 0.1328125, 0.175048828125, 0.189697265625, 0.12060546875, 0.0509033203125, 0.121826171875, 0.003082275390625, 0.0294342041015625, 0.0826416015625, 0.003387451171875, 0.0293426513671875, 0.08502197265625, 0.00091552734375, 0.07153320312...
embed
15734115_c0
15734115
prolog
0
Title: replacing list elements in sicstus prolog Problem title: replacing list elements in sicstus prolog Tags: prolog, replace, list, prolog-dif Problem: replacing list elements in sicstus prolog I am writing a Prolog predicate that takes arguments (A1, A2, L1, L2) and succeeds if all occurences of A1 within L1 have b...
replacing list elements in sicstus prolog replacing list elements in sicstus prolog prolog replace list prolog-dif Orig Other Repl replacing list elements in sicstus prolog I am writing a Prolog predicate that takes arguments (A1, A2, L1, L2) and succeeds if all occurences of A1 within L1 have been changed to A2 in L2....
[ -0.0185546875, 0.006744384765625, 0.006317138671875, 0.021240234375, -0.0162353515625, -0.006744384765625, -0.0267333984375, 0.0098876953125, 0.01519775390625, 0.0020599365234375, 0.01519775390625, 0.01171875, -0.00145721435546875, -0.015625, 0.006683349609375, 0.004364013671875, 0.0...
[ 456, 133266, 5303, 80854, 26536, 18253, 502, 4867, 214, 23, 91995, 428, 420, 199858, 2424, 32562, 1250, 1653, 2063, 67, 51776, 10750, 284, 418, 62, 304, 339, 10461, 214493, 2174, 756, 74918, 69098, 28032, 98816, 47, 5442, 59121, 43240, 37...
[ 0.08013916015625, 0.1558837890625, 0.1904296875, 0.1837158203125, 0.1219482421875, 0.222900390625, 0.1563720703125, 0.2313232421875, 0.039794921875, 0.0153961181640625, 0.1629638671875, 0.07635498046875, 0.1224365234375, 0.218505859375, 0.1346435546875, 0.0625, 0.1436767578125, 0.1...
embed
43242851_c0
43242851
prolog
0
Title: Prolog predicate that returns a list after checking for element Problem title: Prolog predicate that returns a list after checking for element Tags: prolog, list, predicate Problem: Prolog predicate that returns a list after checking for element I am new to prolog. I am trying to write a predicate that accepts a...
Prolog predicate that returns a list after checking for element Prolog predicate that returns a list after checking for element prolog list predicate Prolog Prolog predicate that returns a list after checking for element I am new to prolog. I am trying to write a predicate that accepts an element and list and checks to...
[ 0.0054931640625, 0.0198974609375, -0.000583648681640625, 0.00799560546875, -0.005859375, 0.048095703125, 0.021484375, 0.01513671875, -0.00885009765625, -0.02490234375, 0.009765625, -0.01611328125, -0.0191650390625, -0.01080322265625, 0.0012664794921875, 0.0181884765625, 0.00823974609...
[ 1250, 4867, 1653, 2063, 67, 450, 30646, 7, 5303, 7103, 175199, 100, 12830, 502, 3525, 31577, 33022, 26946, 136, 12765, 1957, 74918, 10588, 89536, 759, 19714, 86827, 116, 138, 201, 190, 305, 361, 122101, 15673, 73342, 2174, 83, 2685, 79986...
[ 0.1724853515625, 0.2220458984375, 0.1807861328125, 0.206787109375, 0.122802734375, 0.03155517578125, 0.2215576171875, 0.0400390625, 0.20849609375, 0.1590576171875, 0.2340087890625, 0.144775390625, 0.1773681640625, 0.1424560546875, 0.01226806640625, 0.03143310546875, 0.114013671875, ...
embed
14238492_c0
14238492
prolog
0
Title: Prolog anonymous variable Problem title: Prolog anonymous variable Tags: prolog, prolog-toplevel, prolog-anonymous-variable Problem: Prolog anonymous variable Here is what I have understood about Prolog variables. A single underscore stands for anonymous variable, which is like a new variable each time it occurs...
Prolog anonymous variable Prolog anonymous variable prolog prolog-toplevel prolog-anonymous-variable Prolog _G189 Prolog anonymous variable Here is what I have understood about Prolog variables. A single underscore stands for anonymous variable, which is like a new variable each time it occurs. A variable name starting...
[ 0.033447265625, 0.0037994384765625, 0.01416015625, -0.016357421875, 0.004638671875, 0.004791259765625, 0.0079345703125, 0.0152587890625, 0.000762939453125, 0.0022125244140625, 0.013671875, -0.0181884765625, -0.0140380859375, 0.0059814453125, 0.0047607421875, -0.013671875, 0.021606445...
[ 1250, 4867, 52184, 77336, 502, 13784, 67919, 66, 45757, 21690, 724, 142180, 217064, 11001, 1379, 7, 30854, 9157, 1884, 3525, 12638, 1733, 74918, 9351, 72134, 101, 1456, 959, 123055, 139392, 46132, 90698, 10821, 28219, 27781, 57143, 11675, 159...
[ 0.1756591796875, 0.2548828125, 0.2197265625, 0.26708984375, 0.08074951171875, 0.03607177734375, 0.07501220703125, 0.011566162109375, 0.07135009765625, 0.1292724609375, 0.05926513671875, 0.2578125, 0.0584716796875, 0.161865234375, 0.194580078125, 0.0338134765625, 0.1693115234375, 0....
embed
35670478_c0
35670478
prolog
0
Title: Command for calling swi-prolog from php Problem title: Command for calling swi-prolog from php Tags: command, php, prolog, swi-prolog Problem: Command for calling swi-prolog from php I am working with prolog and php. I am using php, to call prolog. I am using swi-prolog Version 7.1.17 and XAMPP 1.7.7 [PHP: 5.3.8...
Command for calling swi-prolog from php Command for calling swi-prolog from php command php prolog swi-prolog php Command Users MyComp Desktop test.pl Command for calling swi-prolog from php I am working with prolog and php. I am using php, to call prolog. I am using swi-prolog Version 7.1.17 and XAMPP 1.7.7 [PHP: 5.3....
[ 0.011962890625, 0.01611328125, 0.01287841796875, 0.00848388671875, -0.0098876953125, 0.018310546875, 0.01202392578125, -0.007537841796875, 0.01177978515625, -0.0625, 0.0098876953125, 0.0341796875, -0.0126953125, -0.0108642578125, 0.01019287109375, -0.00201416015625, 0.0196533203125, ...
[ 123573, 159029, 91, 2452, 3454, 4867, 1295, 3958, 75101, 502, 53400, 2646, 108161, 141423, 3034, 2424, 9, 20697, 136, 17368, 11782, 40647, 115384, 2489, 1193, 81218, 683, 196800, 36599, 1892, 135527, 3931, 71, 864, 1062, 31852, 4657, 13784, ...
[ 0.2462158203125, 0.1746826171875, 0.066650390625, 0.2413330078125, 0.17626953125, 0.2340087890625, 0.15869140625, 0.2440185546875, 0.2220458984375, 0.1546630859375, 0.1085205078125, 0.0836181640625, 0.1611328125, 0.18310546875, 0.20458984375, 0.1827392578125, 0.029632568359375, 0.0...
embed
7175258_c0
7175258
prolog
0
Title: Prolog - generating numbers fitting given range Problem title: Prolog - generating numbers fitting given range Tags: gnu-prolog, prolog Problem: Prolog - generating numbers fitting given range I'd like to use predicates like: range(X,0,5) range(X,4,200) range(X,-1000000,1000000) dom_range(X,-1000000,1000000) wit...
Prolog - generating numbers fitting given range Prolog - generating numbers fitting given range gnu-prolog prolog Prolog dom_range Prolog - generating numbers fitting given range I'd like to use predicates like: with meaning : How to code it in Prolog nicely (taking solution performance into account - depth of recursio...
[ -0.00335693359375, 0.0024261474609375, 0.0185546875, -0.032958984375, -0.01226806640625, 0.0224609375, -0.0062255859375, 0.0098876953125, 0.01904296875, -0.0247802734375, -0.008056640625, -0.000385284423828125, -0.0009918212890625, 0.00830078125, 0.0277099609375, -0.007781982421875, ...
[ 1250, 4867, 12663, 1916, 101935, 809, 19514, 34475, 37457, 20, 104155, 3454, 502, 4539, 94250, 1884, 4527, 1653, 2063, 1636, 678, 91084, 11249, 47, 18151, 442, 23, 26267, 29806, 23718, 15426, 168867, 195625, 187895, 84751, 11675, 98, 165132, ...
[ 0.208984375, 0.28076171875, 0.1973876953125, 0.089599609375, 0.1903076171875, 0.16650390625, 0.14013671875, 0.1119384765625, 0.1998291015625, 0.00384521484375, 0.12255859375, 0.1346435546875, 0.1531982421875, 0.1378173828125, 0.1986083984375, 0.1048583984375, 0.123779296875, 0.1948...
embed
53588615_c0
53588615
prolog
0
Title: I am trying to create a language a^n b^n-1 c^n-2 using DCG but can't make the succ(0) to handle n Problem title: I am trying to create a language a^n b^n-1 c^n-2 using DCG but can't make the succ(0) to handle n Tags: dcg, prolog, successor-arithmetics Problem: I am trying to create a language a^n b^n-1...
I am trying to create a language a^n b^n-1 c^n-2 using DCG but can't make the succ(0) to handle n I am trying to create a language a^n b^n-1 c^n-2 using DCG but can't make the succ(0) to handle n dcg prolog successor-arithmetics DCG n-1 n-2 Count I am trying to create a language a^n b^n-1 c^n-2 using DCG but ...
[ 0.0017852783203125, 0.004913330078125, -0.0140380859375, 0.036865234375, 0.00112152099609375, 0.0078125, 0.00069427490234375, -0.00726318359375, 0.012451171875, -0.0238037109375, -0.01263427734375, -0.023193359375, 0.006683349609375, 0.01513671875, 0.0206298828125, -0.0031585693359375,...
[ 31577, 28282, 46876, 10, 8353, 19, 876, 5759, 501, 5428, 17368, 391, 56367, 1284, 831, 3768, 18, 3249, 166, 10060, 177609, 34831, 653, 104, 238, 177, 502, 4867, 39457, 42, 8962, 41637, 6, 108210, 70, 23468, 1884, 11907, 79986, 285, 53, ...
[ 0.06298828125, 0.1353759765625, 0.2210693359375, 0.05657958984375, 0.09521484375, 0.11767578125, 0.0927734375, 0.17236328125, 0.06640625, 0.2059326171875, 0.03643798828125, 0.10089111328125, 0.22509765625, 0.0277862548828125, 0.06719970703125, 0.0623779296875, 0.0589599609375, 0.05...
embed
6092707_c0
6092707
prolog
0
Title: Inverse sublist Problem title: Inverse sublist Tags: prolog Problem: Inverse sublist I have written code of inverse sublist minv([],_,_,[]). minv(L,N,K,Result):- slist(0,N-1,L,Re1), append(Re1,[],Result1), slist(N-1,K-N+1,L,Re), reverse(Re,Res), append(Result1,Res,Result2), length(L,D), slist(K,D-K,L,Resu), appe...
Inverse sublist Inverse sublist prolog Inverse Result N-1 Re1 Result1 K-N Res Result2 D-K Resu Length List Sublist Length1 Length-1 Offset Offset1 Offset-1 Inverse sublist I have written code of inverse sublist But teacher sad it's not prolog style, because minv so bad. Please help
[ 0.00335693359375, 0.01031494140625, 0.035888671875, -0.000629425048828125, -0.032958984375, 0.0006103515625, -0.006622314453125, 0.0198974609375, 0.0047607421875, -0.00299072265625, 0.0023040771484375, 0.01171875, -0.0040283203125, 0.0284423828125, -0.00933837890625, 0.00958251953125, ...
[ 360, 37676, 1614, 6562, 502, 4867, 126684, 541, 5759, 853, 418, 341, 839, 9624, 391, 605, 34, 77554, 32036, 8273, 9791, 3509, 59121, 18151, 23, 117914, 17110, 442, 959, 20623, 881, 334, 221, 6494, 4358 ]
[ 0.141845703125, 0.277099609375, 0.2393798828125, 0.2379150390625, 0.1484375, 0.211669921875, 0.1627197265625, 0.036346435546875, 0.10736083984375, 0.06683349609375, 0.034515380859375, 0.01739501953125, 0.0158538818359375, 0.08026123046875, 0.00775909423828125, 0.012054443359375, 0.03...
embed
8100656_c0
8100656
prolog
0
Title: Deleting all members of a list without unification in Prolog Problem title: Deleting all members of a list without unification in Prolog Tags: prolog, unification, list, prolog-dif Problem: Deleting all members of a list without unification in Prolog Possible Duplicate: Prolog delete: doesn't delete all elements...
Deleting all members of a list without unification in Prolog Deleting all members of a list without unification in Prolog prolog unification list prolog-dif Deleting Prolog Deleting all members of a list without unification in Prolog In Prolog if you write this: the result will be: What is normal because the _ variable...
[ -0.01397705078125, 0.0133056640625, 0.008544921875, 0.007537841796875, -0.0201416015625, -0.0013885498046875, 0.0057373046875, -0.006500244140625, 0.0036468505859375, -0.003875732421875, 0.004119873046875, 0.004791259765625, 0.0126953125, 0.009765625, 0.002655029296875, 0.0101928710937...
[ 262, 133, 1916, 756, 43032, 5303, 15490, 51, 41274, 1250, 4867, 502, 428, 420, 33022, 16750, 3638, 77336, 68557, 678, 106, 5117, 12830, 33938, 53333, 80854, 8, 74635, 3917, 56282, 1295, 123087, 24674, 3173, 339, 2203, 6896, 13956, 5 ]
[ 0.048675537109375, 0.160888671875, 0.030120849609375, 0.0919189453125, 0.1719970703125, 0.16943359375, 0.1123046875, 0.1375732421875, 0.1307373046875, 0.1514892578125, 0.2330322265625, 0.10400390625, 0.00494384765625, 0.061767578125, 0.03985595703125, 0.10675048828125, 0.144653320312...
embed
31489971_c0
31489971
prolog
0
Title: Check if any solution exists Problem title: Check if any solution exists Tags: prolog Problem: Check if any solution exists I have some code in the form plan([],_). plan([ Item | RemainingItems ], Groups) :- doStuff(Groups, Item, UpdatedGroups), rulesObeyed(UpdatedGroups), plan(RemainingItems, UpdatedGroups). do...
Check if any solution exists Check if any solution exists prolog Check Item RemainingItems Groups UpdatedGroups solution_exists Check if any solution exists I have some code in the form doStuff only have one possible sub tree, but the rulesObeyed can have endless based on the number of groups as the rules can be obeyed...
[ 0.0021514892578125, 0.01544189453125, 0.00738525390625, 0.0224609375, -0.0203857421875, 0.01458740234375, -0.01416015625, -0.002197265625, 0.027587890625, -0.0361328125, 0.003936767578125, -0.005889892578125, 0.0031890869140625, 0.00653076171875, 0.0137939453125, 0.0159912109375, 0.0...
[ 38679, 2174, 2499, 29806, 32316, 502, 4867, 78426, 192, 14653, 2982, 10760, 28641, 205072, 54376, 7, 18151, 3173, 54, 37455, 21493, 4734, 1632, 7722, 1614, 53201, 91736, 670, 31804, 297, 831, 765, 3564, 9393, 35509, 14012, 94407, 36, 40368,...
[ 0.235107421875, 0.13623046875, 0.140625, 0.2440185546875, 0.2154541015625, 0.1212158203125, 0.1878662109375, 0.147216796875, 0.0782470703125, 0.0148162841796875, 0.104736328125, 0.1436767578125, 0.063720703125, 0.1231689453125, 0.1673583984375, 0.01806640625, 0.162841796875, 0.0842...
embed
39725366_c0
39725366
prolog
0
Title: prolog-two lists, do the operation on the corresponding elements Problem title: prolog-two lists, do the operation on the corresponding elements Tags: prolog Problem: prolog-two lists, do the operation on the corresponding elements I'm good at JAVA,now I'm learning Prolog,its so difficult that i need some help.....
prolog-two lists, do the operation on the corresponding elements prolog-two lists, do the operation on the corresponding elements prolog ABs prolog-two lists, do the operation on the corresponding elements I'm good at JAVA,now I'm learning Prolog,its so difficult that i need some help...thank you. each element of ABs i...
[ 0.0162353515625, -0.0003643035888671875, 0.00518798828125, 0.01373291015625, -0.01153564453125, 0.01483154296875, -0.006866455078125, 0.02294921875, 0.00958251953125, -0.000614166259765625, 0.01531982421875, 0.01416015625, -0.00469970703125, 0.00179290771484375, -0.00118255615234375, 0...
[ 502, 4867, 55547, 5303, 7, 54, 41018, 98, 42518, 214, 80854, 11321, 4127, 189950, 52080, 1250, 221, 34844, 4358, 12638, 12830, 83, 13579, 3173, 62, 9, 571, 1301, 136, 335, 68330, 132, 19659, 11040, 27781, 208124, 903, 765, 16940, 464, 7...
[ 0.1754150390625, 0.24365234375, 0.2049560546875, 0.20068359375, 0.1339111328125, 0.044219970703125, 0.1707763671875, 0.1236572265625, 0.1719970703125, 0.0853271484375, 0.180419921875, 0.2298583984375, 0.0633544921875, 0.1932373046875, 0.04412841796875, 0.159912109375, 0.0045776367187...
embed
35828005_c0
35828005
prolog
0
Title: A predicate that checks the output of another predicate? Problem title: A predicate that checks the output of another predicate? Tags: list, predicate, prolog Problem: A predicate that checks the output of another predicate? I have a predicate which checks for duplicates in a list and returns true if there are n...
A predicate that checks the output of another predicate? A predicate that checks the output of another predicate? list predicate prolog A predicate that checks the output of another predicate? I have a predicate which checks for duplicates in a list and returns true if there are no duplicates and false if there are dup...
[ -0.005523681640625, 0.01409912109375, 0.00299072265625, -0.013916015625, -0.01129150390625, 0.032470703125, 0.01092529296875, -0.00439453125, 0.00051116943359375, -0.005859375, -0.0135498046875, 0.031982421875, 0.01202392578125, -0.000850677490234375, -0.006591796875, 0.0234375, -0.0...
[ 1653, 2063, 67, 450, 12765, 7, 140992, 111, 15700, 62, 5303, 502, 4867, 100, 171763, 1636, 30646, 29568, 110, 98320, 2174, 13379, 3444, 33022, 87388, 397, 74854, 65771, 137802, 55769, 7464, 3034, 432, 272, 17726, 52721, 11583, 107730 ]
[ 0.1700439453125, 0.18408203125, 0.1251220703125, 0.033905029296875, 0.2239990234375, 0.038421630859375, 0.2100830078125, 0.045806884765625, 0.105224609375, 0.0197296142578125, 0.158935546875, 0.10675048828125, 0.1656494140625, 0.054229736328125, 0.22802734375, 0.1243896484375, 0.0769...
embed
20481733_c0
20481733
prolog
0
Title: Does Prolog use Eager Evaluation? Problem title: Does Prolog use Eager Evaluation? Tags: prolog, lazy-evaluation Problem: Does Prolog use Eager Evaluation? Because Prolog uses chronological backtracking(from the Prolog Wikipedia page) even after an answer is found(in this example where there can only be one solu...
Does Prolog use Eager Evaluation? Does Prolog use Eager Evaluation? prolog lazy-evaluation Does Prolog Eager Evaluation mother_child father_child parent_child Does Prolog use Eager Evaluation? Because Prolog uses chronological backtracking(from the Prolog Wikipedia page) even after an answer is found(in this example wh...
[ 0.02685546875, 0.0155029296875, 0.01318359375, 0.00482177734375, -0.0242919921875, 0.00225830078125, 0.0025177001953125, 0.002410888671875, 0.01171875, -0.032958984375, 0.004974365234375, -0.0142822265625, -0.0101318359375, -0.00653076171875, 0.01708984375, 0.00174713134765625, 0.014...
[ 1250, 4867, 4527, 241, 33730, 151228, 1363, 502, 21, 3285, 159258, 42732, 206, 38472, 67373, 49129, 101966, 109622, 4420, 125728, 214, 8162, 7103, 35166, 14037, 27781, 1632, 29806, 1660, 40383, 17368, 28, 219836, 140992 ]
[ 0.171142578125, 0.2626953125, 0.114990234375, 0.1055908203125, 0.265869140625, 0.2191162109375, 0.1202392578125, 0.12060546875, 0.085205078125, 0.163818359375, 0.210205078125, 0.11572265625, 0.0728759765625, 0.0753173828125, 0.1436767578125, 0.1136474609375, 0.1134033203125, 0.1206...
embed
41727399_c0
41727399
prolog
0
Title: Prolog - Generate alternating symbols on backtrack: [a] ; [a,b]; [a,b,a]; [a,b,a,b] Problem title: Prolog - Generate alternating symbols on backtrack: [a] ; [a,b]; [a,b,a]; [a,b,a,b] Tags: list, prolog, dcg Problem: Prolog - Generate alternating symbols on backtrack: [a] ; [a,b]; [a,b,a]; [a,b,a,b] I've wrapped ...
Prolog - Generate alternating symbols on backtrack: [a] ; [a,b]; [a,b,a]; [a,b,a,b] Prolog - Generate alternating symbols on backtrack: [a] ; [a,b]; [a,b,a]; [a,b,a,b] list prolog dcg Prolog Generate Prolog - Generate alternating symbols on backtrack: [a] ; [a,b]; [a,b,a]; [a,b,a,b] I've wrapped my mind a lot and could...
[ 0.0162353515625, 0.01324462890625, -0.005096435546875, 0.017822265625, -0.012451171875, 0.005096435546875, 0.00128173828125, 0.01385498046875, 0.0164794921875, -0.015625, -0.00823974609375, 0.00494384765625, 0.01312255859375, 0.018310546875, 0.009765625, 0.00077056884765625, 0.008789...
[ 1250, 4867, 155370, 67, 75939, 214, 26582, 7, 98, 4420, 125728, 11, 275, 5303, 502, 177, 137565, 7086, 5915, 26366, 1810, 7722, 3249, 26499, 678, 139392, 903, 9384, 6626, 80854, 10, 1733, 10336, 103049, 11737 ]
[ 0.1708984375, 0.2239990234375, 0.1490478515625, 0.031280517578125, 0.1591796875, 0.0831298828125, 0.2237548828125, 0.07568359375, 0.0614013671875, 0.168212890625, 0.2705078125, 0.05670166015625, 0.060394287109375, 0.19287109375, 0.12353515625, 0.0634765625, 0.000701904296875, 0.008...
embed
53299951_c0
53299951
prolog
0
Title: Either this or/and that fact in prolog Problem title: Either this or/and that fact in prolog Tags: prolog Problem: Either this or/and that fact in prolog I want do build a expense calculator in prolog. The facts onetime_expense(X). or monthly_expense(X). can be present. To sum up the expenses I use this formula:...
Either this or/and that fact in prolog Either this or/and that fact in prolog prolog Either onetime_expense monthly_expense Value Values Value1 Values1 sum_list Sum Sum1 Either this or/and that fact in prolog I want do build a expense calculator in prolog. The facts onetime_expense(X). or monthly_expense(X). can be pre...
[ 0.0126953125, -0.0108642578125, -0.00823974609375, 0.00506591796875, -0.01708984375, 0.00408935546875, 0.001556396484375, 0.005828857421875, 0.0250244140625, -0.005218505859375, -0.002197265625, 0.0164794921875, -0.004180908203125, 0.0038299560546875, 0.01123046875, 0.0101318359375, ...
[ 4565, 9319, 903, 707, 64, 2940, 450, 15824, 23, 502, 4867, 1632, 6032, 83613, 21161, 176735, 190060, 418, 10554, 6562, 36335, 3444, 45367, 14700, 154993, 1542, 831, 13379, 1257, 47754, 4527, 26168, 185397, 104250, 18499, 1067, 5983, 50491, ...
[ 0.023101806640625, 0.135009765625, 0.1524658203125, 0.1983642578125, 0.07977294921875, 0.152587890625, 0.1478271484375, 0.2374267578125, 0.06182861328125, 0.170166015625, 0.25634765625, 0.0648193359375, 0.2005615234375, 0.14453125, 0.1669921875, 0.18798828125, 0.1396484375, 0.02865...
embed
6103461_c0
6103461
prolog
0
Title: Call prolog predicate from python Problem title: Call prolog predicate from python Tags: swi-prolog, python, ffi, prolog Problem: Call prolog predicate from python I have some .pl file and I want to call predicate declared in it from python script. How can I do that? For example, test.pl rD( [], Ans, Ans ). rD( ...
Call prolog predicate from python Call prolog predicate from python swi-prolog python ffi prolog python Call test.pl Ans Acc AccNew Call prolog predicate from python I have some .pl file and I want to call predicate declared in it from python script. How can I do that? For example, test.pl Working like I want to call r...
[ 0.0128173828125, -0.0002536773681640625, 0.00555419921875, -0.0006256103515625, -0.0169677734375, 0.01495361328125, 0.014404296875, -0.00592041015625, 0.0084228515625, -0.062255859375, 0.0269775390625, 0.01904296875, -0.02392578125, -0.0036163330078125, -0.0023345947265625, -0.00188446...
[ 26265, 502, 4867, 1653, 2063, 67, 1295, 17198, 50828, 2452, 3454, 24500, 3034, 2424, 893, 29899, 46568, 765, 5, 11435, 3444, 11782, 159978, 26499, 831, 54, 1690, 397, 209303, 35166, 16750, 77336, 24014, 27781, 18781, 43581, 1250, 1528 ]
[ 0.191162109375, 0.185546875, 0.2352294921875, 0.185302734375, 0.2333984375, 0.1197509765625, 0.0989990234375, 0.138916015625, 0.171142578125, 0.10369873046875, 0.1485595703125, 0.091796875, 0.2012939453125, 0.1915283203125, 0.008087158203125, 0.06915283203125, 0.0958251953125, 0.00...
embed
61680065_c0
61680065
prolog
0
Title: Does anyone know of Prolog code for formatted input? Problem title: Does anyone know of Prolog code for formatted input? Tags: formatted-input, prolog Problem: Does anyone know of Prolog code for formatted input? I need to read formatted data from files in Prolog, and something much like C-style "freadf"/"sscanf...
Does anyone know of Prolog code for formatted input? Does anyone know of Prolog code for formatted input? formatted-input prolog Does Prolog Does anyone know of Prolog code for formatted input? I need to read formatted data from files in Prolog, and something much like C-style "freadf"/"sscanf" would be ideal. Prolog's...
[ 0.0115966796875, 0.00384521484375, 0.0184326171875, 0.0125732421875, 0.0023193359375, 0.0286865234375, 0.0206298828125, 0.004608154296875, -0.00225830078125, -0.0322265625, 0.035888671875, -0.03369140625, -0.046142578125, -0.0284423828125, 0.020263671875, -0.0036468505859375, -0.0120...
[ 35672, 3714, 111, 1250, 4867, 18151, 100, 9384, 3674, 107730, 73, 7077, 502, 101790, 3871, 12301, 2053, 102158, 313, 40946, 12176, 420, 4398, 6397, 88303, 51727, 12447, 140992, 148814, 95307, 17368, 2143, 109269, 11469, 38969, 10752, 63559, 1...
[ 0.08428955078125, 0.123779296875, 0.08245849609375, 0.18994140625, 0.265625, 0.2413330078125, 0.077880859375, 0.216064453125, 0.137451171875, 0.2191162109375, 0.0921630859375, 0.1094970703125, 0.1397705078125, 0.065673828125, 0.02752685546875, 0.1336669921875, 0.1124267578125, 0.10...
embed
13121564_c0
13121564
prolog
0
Title: Trying to count steps through recursion? Problem title: Trying to count steps through recursion? Tags: clpfd, prolog, non-termination Problem: Trying to count steps through recursion? This is a cube, the edges of which are directional; It can only go left to right, back to front and top to bottom. edge(a,b). edg...
Trying to count steps through recursion? Trying to count steps through recursion? clpfd prolog non-termination Trying move2 Trying to count steps through recursion? This is a cube, the edges of which are directional; It can only go left to right, back to front and top to bottom. With the method below we can check if we...
[ 0.01214599609375, 0.0016937255859375, -0.005126953125, 0.0142822265625, 0.0191650390625, 0.01177978515625, 0.000946044921875, 0.00604248046875, 0.022705078125, -0.034423828125, -0.00811767578125, -0.040771484375, 0.005126953125, 0.01495361328125, 0.019287109375, -0.0036468505859375, ...
[ 40858, 214, 54529, 98441, 8305, 195625, 1830, 32, 47, 33139, 39557, 71, 502, 4867, 351, 720, 91407, 25813, 304, 3293, 83, 10, 314, 372, 121303, 48225, 289, 1650, 831, 4734, 738, 25737, 7108, 4420, 12912, 136, 2663, 103136, 55300, 35064, ...
[ 0.150146484375, 0.062255859375, 0.22314453125, 0.286865234375, 0.1337890625, 0.2310791015625, 0.130126953125, 0.004730224609375, 0.061370849609375, 0.047882080078125, 0.084228515625, 0.103515625, 0.1326904296875, 0.1785888671875, 0.088134765625, 0.1099853515625, 0.10498046875, 0.17...
embed
40900989_c0
40900989
prolog
0
Title: Prolog checking if two lists are identical Problem title: Prolog checking if two lists are identical Tags: prolog Problem: Prolog checking if two lists are identical So I need to write a prolog term called doubleAll7/2 that takes two lists. The program returns true if for every 7 that occurs in the first list, t...
Prolog checking if two lists are identical Prolog checking if two lists are identical prolog Prolog doubleAll7 double7 Prolog checking if two lists are identical So I need to write a prolog term called doubleAll7/2 that takes two lists. The program returns true if for every 7 that occurs in the first list, the second l...
[ 0.0181884765625, -0.000675201416015625, -0.00185394287109375, 0.0299072265625, 0.01171875, 0.018798828125, -0.0123291015625, 0.0084228515625, 0.0201416015625, -0.005035400390625, 0.0341796875, 0.0205078125, -0.01318359375, 0.00640869140625, -0.00090789794921875, -0.00506591796875, 0....
[ 1250, 4867, 175199, 2174, 6626, 5303, 7, 621, 31943, 502, 41929, 43512, 966, 6827, 33022, 13579, 12477, 51776, 1528, 30646, 29568, 100, 11907, 361, 450, 74918, 5117, 17932, 1556, 59671, 15555, 188523, 176129, 76172, 98320, 756, 42, 69098, 1...
[ 0.1773681640625, 0.2071533203125, 0.167236328125, 0.06707763671875, 0.15380859375, 0.2164306640625, 0.010498046875, 0.06793212890625, 0.196533203125, 0.12744140625, 0.16845703125, 0.1590576171875, 0.1866455078125, 0.152587890625, 0.04217529296875, 0.0965576171875, 0.24169921875, 0....
embed
43575753_c1
43575753
prolog
1
solutions. I thought about implementing addsto40/3, then adding one person until sum reaches 40. However, it's not working the way i want it to work. addsto40(X,Y,Sum) :- person(X,A), person(Y,B), Sum is A + B, Sum < 40, addper(P,Sum,Newsum). addsto40(X,Y,Sum) :- person(X,A), person(Y,B), Sum is A + B, Sum > 40. addpe...
solutions. I thought about implementing addsto40/3, then adding one person until sum reaches 40. However, it's not working the way i want it to work. addsto40(X,Y,Sum) :- person(X,A), person(Y,B), Sum is A + B, Sum < 40, addper(P,Sum,Newsum). addsto40(X,Y,Sum) :- person(X,A), person(Y,B), Sum is A + B, Sum > 40. addpe...
[ 0.00701904296875, 0.01483154296875, 0.0262451171875, 0.0213623046875, -0.0380859375, 0.0140380859375, -0.01806640625, 0.0081787109375, 0.0137939453125, -0.03271484375, 0.0045166015625, 0.003387451171875, -0.00049591064453125, 0.000919342041015625, 0.0228271484375, -0.0017547607421875, ...
[ 51347, 17569, 29479, 214, 15190, 2785, 2839, 18113, 154107, 1632, 3445, 24189, 10554, 58359, 90, 1112, 33306, 959, 20697, 70, 3917, 17, 3444, 4488, 1542, 1723, 294, 316, 15772, 571, 36335, 83, 997, 335, 4426, 1264, 683, 22418, 977, 1833, ...
[ 0.163818359375, 0.09918212890625, 0.1832275390625, 0.00994873046875, 0.1904296875, 0.2200927734375, 0.277099609375, 0.2401123046875, 0.2064208984375, 0.0723876953125, 0.1861572265625, 0.0892333984375, 0.22509765625, 0.12255859375, 0.00726318359375, 0.2421875, 0.019866943359375, 0.1...
embed
5793847_c0
5793847
prolog
0
Title: How to interface between C and gprolog? Problem title: How to interface between C and gprolog? Tags: gnu-prolog, prolog, interface, ffi, c Problem: How to interface between C and gprolog? I am in the somewhat unfortunate position of interfacing C and Prolog code. We have some data collection code in C, and some ...
How to interface between C and gprolog? How to interface between C and gprolog? gnu-prolog prolog interface ffi c How How to interface between C and gprolog? I am in the somewhat unfortunate position of interfacing C and Prolog code. We have some data collection code in C, and some analysis code in Gnu-Prolog. So what ...
[ 0.0247802734375, 0.00148773193359375, 0.00439453125, -0.0005340576171875, -0.0033111572265625, 0.0185546875, 0.009765625, -0.000720977783203125, 0.011962890625, -0.060791015625, 0.00830078125, -0.0179443359375, -0.0272216796875, -0.0059814453125, 0.0185546875, -0.0166015625, -0.00653...
[ 11249, 47, 101758, 17721, 313, 136, 706, 3454, 4867, 104155, 502, 24500, 501, 208806, 104272, 19069, 1940, 91468, 1250, 18151, 2053, 42486, 114137, 539, 10752, 2965, 55300, 35773, 99201, 98169, 11782, 1295, 20697, 198996, 116491, 44402, 7808, ...
[ 0.1142578125, 0.0609130859375, 0.2435302734375, 0.15869140625, 0.1964111328125, 0.156005859375, 0.1077880859375, 0.218017578125, 0.2308349609375, 0.1810302734375, 0.1416015625, 0.120849609375, 0.112060546875, 0.00994873046875, 0.064453125, 0.06231689453125, 0.10614013671875, 0.1369...
embed
75103098_c0
75103098
prolog
0
Title: functor vs predicate - definition for students Problem title: functor vs predicate - definition for students Tags: prolog Problem: functor vs predicate - definition for students The question of the difference between a functor and a predicate in prolog is asked often. I am trying to develop an informal definitio...
functor vs predicate - definition for students functor vs predicate - definition for students prolog functor vs predicate - definition for students The question of the difference between a functor and a predicate in prolog is asked often. I am trying to develop an informal definition that is suitable for new students. ...
[ 0.022705078125, -0.0000400543212890625, 0.012451171875, -0.0033721923828125, -0.0023651123046875, 0.0157470703125, 0.01129150390625, -0.01177978515625, -0.004913330078125, -0.0069580078125, 0.01544189453125, 0.0067138671875, -0.0106201171875, 0.0098876953125, 0.0052490234375, 0.0086669...
[ 7477, 18770, 20209, 1653, 2063, 67, 80934, 100, 25921, 502, 4867, 9655, 60212, 17721, 10, 136, 23, 37170, 27983, 152701, 202319, 3293, 33342, 70810, 20174, 2071, 442, 4127, 707, 20531, 13034, 24243, 34735, 85493, 80234, 58868, 33022, 8437, ...
[ 0.225341796875, 0.2646484375, 0.17138671875, 0.2032470703125, 0.2548828125, 0.1719970703125, 0.1976318359375, 0.10699462890625, 0.220947265625, 0.147216796875, 0.1959228515625, 0.00469970703125, 0.1715087890625, 0.11376953125, 0.02777099609375, 0.09521484375, 0.03857421875, 0.02281...
embed
50630925_c0
50630925
prolog
0
Title: prolog how to remove an element from a list? Problem title: prolog how to remove an element from a list? Tags: list, prolog Problem: prolog how to remove an element from a list? I know of the subtract predicate which removes which removes a list of items from a list subtract([a,b,c,a,b], [a,c], X). but is there ...
prolog how to remove an element from a list? prolog how to remove an element from a list? list prolog a prolog how to remove an element from a list? I know of the subtract predicate which removes which removes a list of items from a list but is there anything like I know I can modify the above in To achieve the desired...
[ 0.0140380859375, 0.01806640625, 0.00885009765625, 0.00457763671875, -0.031982421875, 0.01611328125, -0.021728515625, 0.0186767578125, -0.00506591796875, -0.0390625, 0.01019287109375, -0.00457763671875, -0.0220947265625, -0.001495361328125, -0.0079345703125, -0.01104736328125, 0.02893...
[ 502, 4867, 3642, 47, 87388, 142, 12830, 1295, 10, 5303, 1614, 39989, 18, 1653, 2063, 67, 55769, 2811, 40383, 36917, 69307, 104851, 16750, 3917, 1914, 112, 5983, 61924, 27781 ]
[ 0.1787109375, 0.237060546875, 0.078857421875, 0.064208984375, 0.2078857421875, 0.03375244140625, 0.2197265625, 0.1639404296875, 0.041656494140625, 0.201904296875, 0.1011962890625, 0.1390380859375, 0.0526123046875, 0.1038818359375, 0.126220703125, 0.03985595703125, 0.1365966796875, ...
embed
37534871_c0
37534871
prolog
0
Title: prolog - Add elements from terms in a List of Lists Problem title: prolog - Add elements from terms in a List of Lists Tags: prolog, database Problem: prolog - Add elements from terms in a List of Lists I want to add elements recursively to my list of lists from a database. employee(1, max, 1500). employee(2, pe...
prolog - Add elements from terms in a List of Lists prolog - Add elements from terms in a List of Lists prolog database terms Add List Lists Head Name Salary prolog - Add elements from terms in a List of Lists I want to add elements recursively to my list of lists from a database. He creates lists like this: [[1, max, ...
[ 0.0155029296875, 0.0174560546875, -0.006927490234375, 0.00823974609375, -0.02392578125, 0.0302734375, -0.009033203125, 0.01470947265625, 0.004791259765625, -0.0439453125, 0.01708984375, -0.00421142578125, -0.0107421875, 0.01361083984375, 0.0107421875, -0.0169677734375, 0.02392578125,...
[ 502, 4867, 29117, 80854, 1295, 69407, 23, 32036, 111, 63399, 44816, 15757, 13294, 1294, 87, 3444, 15190, 195625, 5844, 47, 759, 5303, 1529, 28282, 1884, 903, 418, 18389, 17551, 6, 1284, 304, 154643, 142483, 3627, 138, 20543, 959, 7722, 39...
[ 0.16748046875, 0.2484130859375, 0.1602783203125, 0.2135009765625, 0.10357666015625, 0.235595703125, 0.039154052734375, 0.2147216796875, 0.102294921875, 0.2171630859375, 0.129150390625, 0.076904296875, 0.2001953125, 0.07763671875, 0.002044677734375, 0.167236328125, 0.189208984375, 0...
embed
53657299_c0
53657299
prolog
0
Title: Prolog first integer exactly 1 greater than second integer Problem title: Prolog first integer exactly 1 greater than second integer Tags: prolog, successor-arithmetics Problem: Prolog first integer exactly 1 greater than second integer The program should return true if the first integer is exactly 1 more than t...
Prolog first integer exactly 1 greater than second integer Prolog first integer exactly 1 greater than second integer prolog successor-arithmetics Prolog greater_than X-Y Prolog first integer exactly 1 greater than second integer The program should return true if the first integer is exactly 1 more than the second inte...
[ 0.0003032684326171875, -0.00787353515625, -0.0040283203125, 0.032470703125, -0.021484375, 0.0223388671875, 0.0211181640625, 0.0230712890625, 0.01611328125, 0.007354736328125, 0.0024566650390625, 0.027587890625, -0.0272216796875, -0.01043701171875, 0.0191650390625, -0.02099609375, 0.0...
[ 1250, 4867, 5117, 892, 1505, 66161, 106, 117396, 3501, 17932, 502, 39457, 42, 8962, 282, 41637, 21732, 1193, 9, 1723, 1528, 5608, 30646, 29568, 2174, 83, 1286, 114063, 18151, 98320, 11907, 1733, 177417, 13315, 43719, 1542, 69112, 20697, 175...
[ 0.1783447265625, 0.253662109375, 0.1551513671875, 0.1611328125, 0.1500244140625, 0.196533203125, 0.1568603515625, 0.178955078125, 0.09002685546875, 0.1717529296875, 0.13623046875, 0.1285400390625, 0.041168212890625, 0.07916259765625, 0.01165771484375, 0.04083251953125, 0.108520507812...
embed
62255941_c0
62255941
prolog
0
Title: How to make &quot;less than&quot; function in Prolog? Problem title: How to make &quot;less than&quot; function in Prolog? Tags: prolog, comparison, operators Problem: How to make "less than" function in Prolog? As i am new to Prolog i made this program but having a lot of troubles can anyone help me? below is m...
How to make &quot;less than&quot; function in Prolog? How to make &quot;less than&quot; function in Prolog? prolog comparison operators How Prolog s10 mate10lite g300 How to make "less than" function in Prolog? As i am new to Prolog i made this program but having a lot of troubles can anyone help me? below is my code: ...
[ 0.00109100341796875, -0.0030364990234375, 0.00634765625, -0.0002536773681640625, -0.00787353515625, -0.0233154296875, -0.005828857421875, 0.00494384765625, -0.00201416015625, 0.0179443359375, 0.005035400390625, 0.0103759765625, -0.0108642578125, -0.0233154296875, 0.01123046875, -0.0163...
[ 11249, 3249, 9393, 3501, 1230, 41502, 32354, 23, 1250, 4867, 502, 225490, 39933, 963, 29968, 27287, 7739, 1528, 5915, 63134, 4358, 35064, 18151, 3229, 17669, 159029, 7477, 30646, 98320 ]
[ 0.027435302734375, 0.1182861328125, 0.2298583984375, 0.26708984375, 0.0204315185546875, 0.043182373046875, 0.2149658203125, 0.04449462890625, 0.1485595703125, 0.251220703125, 0.05621337890625, 0.1165771484375, 0.129150390625, 0.07440185546875, 0.021942138671875, 0.10357666015625, 0.1...
embed
44211881_c0
44211881
prolog
0
Title: Gerrit - additive Verified label (1+1=2)? Problem title: Gerrit - additive Verified label (1+1=2)? Tags: prolog, gerrit Problem: Gerrit - additive Verified label (1+1=2)? For a project I'm working on we run test suites on both a windows and a linux build agent. I'd like to make it so that people can only merge p...
Gerrit - additive Verified label (1+1=2)? Gerrit - additive Verified label (1+1=2)? prolog gerrit Gerrit Verified Gerrit - additive Verified label (1+1=2)? For a project I'm working on we run test suites on both a windows and a linux build agent. I'd like to make it so that people can only merge patches if both test su...
[ 0.010009765625, -0.0031280517578125, 0.004547119140625, 0.01336669921875, 0.0035858154296875, 0.00390625, -0.006317138671875, 0.01202392578125, -0.004364013671875, -0.0020904541015625, 0.0291748046875, -0.007110595703125, 0.004913330078125, 0.005126953125, 0.007781982421875, 0.00154876...
[ 8022, 2783, 20, 171793, 5844, 1446, 47314, 67967, 2858, 21748, 55257, 502, 4867, 4155, 13452, 20697, 3034, 14947, 15044, 54825, 11508, 6077, 45367, 23882, 1884, 3249, 3395, 831, 4734, 42564, 110912, 2174, 27875, 114977, 85689, 6626, 57157, 25...
[ 0.175537109375, 0.305419921875, 0.002166748046875, 0.1795654296875, 0.1417236328125, 0.195068359375, 0.220947265625, 0.268798828125, 0.0731201171875, 0.2257080078125, 0.2626953125, 0.1357421875, 0.185791015625, 0.1171875, 0.034088134765625, 0.0185699462890625, 0.151123046875, 0.152...
embed
63858957_c0
63858957
prolog
0
Title: Recursive succ addition in Prolog Problem title: Recursive succ addition in Prolog Tags: addition, recursion, successor-arithmetics, prolog Problem: Recursive succ addition in Prolog add(0,Y,Y). add(succ(X),Y,succ(Z)) :- add(X,Y,Z). I don't understand how this one works. If I run the query: add(succ(succ(succ(0)...
Recursive succ addition in Prolog Recursive succ addition in Prolog addition recursion successor-arithmetics prolog Recursive Prolog Recursive succ addition in Prolog I don't understand how this one works. If I run the query: How does it remove succ from the first argument? If I run it: This satisfied the body. We inpu...
[ -0.0027313232421875, 0.01953125, 0.0006866455078125, 0.0291748046875, -0.00970458984375, 0.0206298828125, -0.013916015625, -0.00506591796875, 0.01031494140625, -0.025634765625, 0.0255126953125, -0.014892578125, -0.03173828125, 0.00982666015625, 0.037109375, -0.01104736328125, 0.01239...
[ 853, 48650, 5844, 166, 10060, 66044, 1250, 4867, 195625, 39457, 42, 8962, 502, 28219, 43240, 11675, 41, 1294, 11249, 87388, 1295, 5117, 10750, 3293, 214521, 14361, 107730, 2856, 3934, 10336, 33342, 15190, 10422 ]
[ 0.047027587890625, 0.1920166015625, 0.08447265625, 0.179931640625, 0.246826171875, 0.1728515625, 0.1378173828125, 0.234375, 0.177001953125, 0.1456298828125, 0.0106201171875, 0.048828125, 0.07275390625, 0.0821533203125, 0.073486328125, 0.0833740234375, 0.049835205078125, 0.066528320...
embed
15883938_c1
15883938
prolog
1
imposing backtracking avoid the possibility to execute the other rule in the program (that answer true because a snake is also an animal) My question is: it seems me that this use of Prolog falls outside from the logical and declarative paradigm and in some way fall in some sort of procedural paradigm Because: I have ...
imposing backtracking avoid the possibility to execute the other rule in the program (that answer true because a snake is also an animal) My question is: it seems me that this use of Prolog falls outside from the logical and declarative paradigm and in some way fall in some sort of procedural paradigm Because: I have ...
[ 0.0159912109375, 0.01336669921875, 0.0004634857177734375, 0.0245361328125, -0.0057373046875, 0.01385498046875, 0.01055908203125, 0.0022430419921875, 0.02392578125, -0.044189453125, 0.01458740234375, 0.01336669921875, -0.0179443359375, -0.00872802734375, 0.01806640625, 0.01153564453125,...
[ 35439, 6953, 4420, 125728, 214, 71864, 207116, 71924, 3789, 79986, 1528, 16854, 350, 26249, 37202, 4527, 1250, 4867, 123867, 50782, 62775, 21635, 214709, 6817, 59158, 141, 178451, 12989, 116, 1653, 2063, 54433, 2174, 5117, 35782, 9790, 17932, ...
[ 0.1368408203125, 0.062347412109375, 0.1422119140625, 0.252197265625, 0.0947265625, 0.1385498046875, 0.0977783203125, 0.1353759765625, 0.0215911865234375, 0.171875, 0.10498046875, 0.1290283203125, 0.119873046875, 0.1402587890625, 0.04156494140625, 0.0748291015625, 0.1689453125, 0.26...
embed
26984952_c0
26984952
prolog
0
Title: Prolog, grammar parser Problem title: Prolog, grammar parser Tags: dcg, prolog Problem: Prolog, grammar parser I am a very green when it comes to prolog, but essentially what I am trying to do is implement recursion to parse a grammar rule. What I have seems to be correct logically but obviously not because I am...
Prolog, grammar parser Prolog, grammar parser dcg prolog Prolog Prolog, grammar parser I am a very green when it comes to prolog, but essentially what I am trying to do is implement recursion to parse a grammar rule. What I have seems to be correct logically but obviously not because I am not getting the expected outco...
[ 0.0216064453125, 0.02880859375, -0.006256103515625, 0.00811767578125, -0.01153564453125, 0.02685546875, -0.013671875, -0.00003314018249511719, -0.00042724609375, -0.004791259765625, 0.00799560546875, -0.016845703125, -0.017822265625, -0.01409912109375, 0.025634765625, 0.01397705078125,...
[ 1250, 4867, 122092, 147, 366, 2189, 104, 238, 177, 502, 444, 4552, 50997, 85590, 31577, 54, 29479, 195625, 1830, 184, 79986, 765, 37202, 26785, 12684, 171259, 959, 20949, 84751, 184345, 3444, 11853, 18151, 28541, 4358, 100094, 87, 20594, 44...
[ 0.1861572265625, 0.25634765625, 0.13671875, 0.0928955078125, 0.1512451171875, 0.1531982421875, 0.0200958251953125, 0.0288543701171875, 0.0941162109375, 0.1685791015625, 0.0660400390625, 0.0726318359375, 0.095703125, 0.048065185546875, 0.0841064453125, 0.00146484375, 0.1253662109375, ...
embed
2710479_c0
2710479
prolog
0
Title: Prolog program to find equality of two lists in any order Problem title: Prolog program to find equality of two lists in any order Tags: any, prolog, list, failure-slice Problem: Prolog program to find equality of two lists in any order I wanted to write a Prolog program to find equality of two lists, where the ...
Prolog program to find equality of two lists in any order Prolog program to find equality of two lists in any order any prolog list failure-slice Prolog Prolog program to find equality of two lists in any order I wanted to write a Prolog program to find equality of two lists, where the order of elements doesn't matter....
[ 0.0181884765625, 0.023681640625, 0.01177978515625, -0.000308990478515625, -0.0126953125, 0.0054931640625, -0.000652313232421875, -0.0020751953125, 0.00457763671875, -0.0093994140625, 0.021728515625, 0.0045166015625, 0.006591796875, -0.01171875, 0.00408935546875, 0.00616455078125, -0....
[ 1250, 4867, 1528, 47, 7413, 28, 161789, 111, 6626, 5303, 7, 2499, 12989, 502, 137578, 13348, 23, 36663, 33022, 80854, 22027, 18, 26866, 54397, 25632, 4966, 3229, 8337, 107730, 1884, 105950, 133063, 96386, 1542, 7639, 756, 7722, 142424, 1193...
[ 0.168212890625, 0.247314453125, 0.19775390625, 0.0277252197265625, 0.14208984375, 0.125, 0.24658203125, 0.07183837890625, 0.15087890625, 0.2132568359375, 0.0650634765625, 0.0938720703125, 0.182373046875, 0.135009765625, 0.1859130859375, 0.086181640625, 0.060272216796875, 0.03808593...
embed
29950827_c1
29950827
prolog
1
3, 2)). X = "3x^2". ?- write_stuff("3x^2", X). ERROR: number_string/2: Arguments are not sufficiently instantiated Both predicates work only in one way, although they both are obviously bijections, which is pretty sad. The question consists of two parts (there are two requirements: easy to use, easy to maintain): Is th...
3, 2)). X = "3x^2". ?- write_stuff("3x^2", X). ERROR: number_string/2: Arguments are not sufficiently instantiated Both predicates work only in one way, although they both are obviously bijections, which is pretty sad. The question consists of two parts (there are two requirements: easy to use, easy to maintain): Is th...
[ -0.029052734375, 0.0179443359375, -0.0015106201171875, 0.019287109375, -0.00811767578125, 0.041015625, 0.038818359375, -0.00836181640625, 0.0289306640625, -0.00836181640625, 0.0023956298828125, 0.00860595703125, -0.004638671875, -0.005523681640625, 0.006500244140625, 0.009033203125, ...
[ 138, 4, 4958, 1193, 2203, 363, 425, 8353, 304, 33022, 271, 21493, 151206, 24638, 14012, 91693, 12477, 112140, 7, 959, 129980, 34648, 14, 27686, 149766, 1653, 2063, 1636, 4488, 4734, 1632, 3917, 15044, 171259, 1582, 58994, 28875, 17110, 9319...
[ 0.1322021484375, 0.00927734375, 0.123779296875, 0.136962890625, 0.04632568359375, 0.1322021484375, 0.081298828125, 0.10888671875, 0.144287109375, 0.1295166015625, 0.1009521484375, 0.19189453125, 0.09539794921875, 0.0985107421875, 0.160400390625, 0.2403564453125, 0.2032470703125, 0....
embed
36414800_c0
36414800
prolog
0
Title: Prolog - How to sort a list of lists containing numbers by the sum of the numbers in each list Problem title: Prolog - How to sort a list of lists containing numbers by the sum of the numbers in each list Tags: list, prolog, sorting Problem: Prolog - How to sort a list of lists containing numbers by the sum of t...
Prolog - How to sort a list of lists containing numbers by the sum of the numbers in each list Prolog - How to sort a list of lists containing numbers by the sum of the numbers in each list list prolog sorting Prolog How Comp Prolog - How to sort a list of lists containing numbers by the sum of the numbers in each list...
[ -0.00860595703125, 0.017333984375, 0.019287109375, 0.00506591796875, -0.0244140625, 0.02197265625, 0.00726318359375, 0.00567626953125, 0.0123291015625, -0.02880859375, 0.00567626953125, 0.03515625, -0.000873565673828125, -0.01226806640625, 0.009765625, -0.006927490234375, 0.002670288...
[ 1250, 4867, 11249, 47, 12096, 5303, 7, 70541, 214, 101935, 390, 10554, 111, 23, 12638, 502, 15612, 66596, 765, 33342, 1884, 903, 1632, 159, 418, 122101, 305, 138, 617, 427, 63709, 3444, 17497, 71, 186, 2203, 201, 4426, 483, 209, 611, ...
[ 0.1558837890625, 0.2344970703125, 0.0648193359375, 0.04351806640625, 0.257568359375, 0.246826171875, 0.026275634765625, 0.122314453125, 0.0439453125, 0.1864013671875, 0.1097412109375, 0.2103271484375, 0.0035400390625, 0.0261993408203125, 0.10467529296875, 0.1104736328125, 0.151733398...
embed
36817106_c0
36817106
prolog
0
Title: How to return multiple things in Prolog Problem title: How to return multiple things in Prolog Tags: prolog, return, rules Problem: How to return multiple things in Prolog I have been given this question: Create a rule meal(X, Y) where X is lunch or dinner and Y is the food that will be served. For example, meal...
How to return multiple things in Prolog How to return multiple things in Prolog prolog return rules How Prolog How to return multiple things in Prolog I have been given this question: Create a rule meal(X, Y) where X is lunch or dinner and Y is the food that will be served. For example, meal(lunch, X) should return san...
[ 0.006866455078125, -0.001953125, 0.0003032684326171875, 0.0303955078125, -0.00592041015625, 0.01361083984375, 0.003509521484375, -0.0238037109375, 0.01153564453125, -0.0089111328125, -0.0009613037109375, -0.004547119140625, -0.00921630859375, -0.005615234375, 0.01806640625, 0.000125885...
[ 11249, 47, 30646, 48716, 8966, 23, 1250, 4867, 502, 91736, 34475, 151313, 79986, 109911, 990, 7440, 40781, 94000, 83, 15381, 1221, 149976, 12328, 1193, 5608, 19096, 143321, 110537, 107466, 2873, 3525, 2367, 66161, 14602, 29459, 9844, 37170, 2...
[ 0.0950927734375, 0.084716796875, 0.2802734375, 0.269287109375, 0.2061767578125, 0.08746337890625, 0.1829833984375, 0.2685546875, 0.1492919921875, 0.1962890625, 0.00164794921875, 0.1038818359375, 0.17138671875, 0.1719970703125, 0.048065185546875, 0.006744384765625, 0.12939453125, 0....
embed
70959113_c0
70959113
prolog
0
Title: One common hobby between two persons in Prolog Problem title: One common hobby between two persons in Prolog Tags: prolog, prolog-dif Problem: One common hobby between two persons in Prolog I found this old question ( Prolog Predicate to return true when two people have same hobby ) for writing some code to find...
One common hobby between two persons in Prolog One common hobby between two persons in Prolog prolog prolog-dif One Prolog one_common_hobby Tail One common hobby between two persons in Prolog I found this old question ( Prolog Predicate to return true when two people have same hobby ) for writing some code to find the ...
[ 0.01336669921875, 0.00958251953125, 0.02587890625, 0.037841796875, -0.016357421875, 0.0120849609375, -0.0184326171875, 0.001190185546875, 0.005950927734375, -0.04833984375, 0.010498046875, 0.008056640625, 0.0301513671875, 0.01068115234375, 0.00970458984375, -0.0025482177734375, 0.009...
[ 6561, 39210, 63645, 17721, 6626, 3445, 1250, 4867, 502, 428, 420, 1632, 277, 3796, 497, 60060, 1218, 379, 14037, 9655, 7145, 2063, 67, 30646, 29568, 3395, 765, 5701, 32562, 18151, 7413, 17368, 45755, 16648, 44116, 123055, 739, 22155, 90, ...
[ 0.1485595703125, 0.21435546875, 0.28857421875, 0.1356201171875, 0.129638671875, 0.1181640625, 0.166015625, 0.2115478515625, 0.126953125, 0.082763671875, 0.12646484375, 0.13427734375, 0.106201171875, 0.183349609375, 0.154296875, 0.190185546875, 0.040618896484375, 0.0859375, 0.0100...
embed
74239788_c0
74239788
prolog
0
Title: Prolog, give a path from point x to the goal Problem title: Prolog, give a path from point x to the goal Tags: prolog, transitive-closure Problem: Prolog, give a path from point x to the goal This is my code: % A The first link as a predicate link(1,2). link(2,3). link(3,4). link(3,6). link(6,7). link(6,5). So w...
Prolog, give a path from point x to the goal Prolog, give a path from point x to the goal prolog transitive-closure point Prolog Prolog, give a path from point x to the goal This is my code: So what we did with the path predicate is check from a given starting point check if there exists a path from that point to the g...
[ 0.024658203125, 0.017578125, 0.004669189453125, 0.0057373046875, -0.00885009765625, 0.017578125, -0.018310546875, 0.0027008056640625, -0.0028228759765625, -0.05419921875, -0.000606536865234375, -0.0191650390625, -0.0177001953125, 0.0098876953125, -0.00274658203125, 0.01312255859375, ...
[ 1250, 4867, 8337, 60875, 1295, 6275, 1022, 47, 69236, 502, 62621, 5844, 170224, 10, 18151, 6777, 678, 1653, 2063, 67, 12765, 34475, 72134, 2174, 32316, 61924, 2663, 76199, 26785, 184345, 756, 7722, 142424, 3871, 54, 5036, 3714, 83, 35604, ...
[ 0.1650390625, 0.2374267578125, 0.1180419921875, 0.241455078125, 0.1380615234375, 0.1181640625, 0.1158447265625, 0.1212158203125, 0.218994140625, 0.1312255859375, 0.14501953125, 0.068115234375, 0.1722412109375, 0.009857177734375, 0.1331787109375, 0.039764404296875, 0.006927490234375, ...
embed
27574446_c0
27574446
prolog
0
Title: Issue with recursion not hitting base case Problem title: Issue with recursion not hitting base case Tags: recursion, prolog, dcg Problem: Issue with recursion not hitting base case I'm working on the following DCG: zero(1) --> [0], !. zero(N) --> { N < 1 }, [], !. zero(N) --> zero(1), { M is N - 1 }, zero(M). I...
Issue with recursion not hitting base case Issue with recursion not hitting base case recursion prolog dcg Issue Issue with recursion not hitting base case I'm working on the following DCG: It works properly for positive test cases, eg But when I ran negative cases (typically something like phrase(zero(5), [0,0]). ), i...
[ -0.007415771484375, -0.001312255859375, 0.01220703125, -0.0052490234375, -0.0014801025390625, -0.006622314453125, 0.00083160400390625, -0.020751953125, -0.006591796875, 0.005615234375, -0.001617431640625, -0.01153564453125, -0.01007080078125, 0.00482177734375, 0.0286865234375, 0.000413...
[ 223317, 195625, 1830, 959, 5962, 1916, 3647, 7225, 678, 502, 4867, 104, 238, 177, 20697, 391, 56367, 43240, 155965, 24491, 3034, 50218, 13028, 40907, 113860, 80510, 124534, 63527, 3934, 31110, 686, 66, 1152, 21896, 60899, 47, 45234, 27750, ...
[ 0.11328125, 0.2442626953125, 0.1246337890625, 0.1063232421875, 0.14697265625, 0.05877685546875, 0.213134765625, 0.20263671875, 0.012725830078125, 0.095703125, 0.1678466796875, 0.00689697265625, 0.014739990234375, 0.058380126953125, 0.0155181884765625, 0.03936767578125, 0.146240234375...
embed
49846269_c0
49846269
prolog
0
Title: Finding sum of max and min elements of list Swi-prolog Problem title: Finding sum of max and min elements of list Swi-prolog Tags: prolog Problem: Finding sum of max and min elements of list Swi-prolog Please help, i new in Prolog trying to find sum of max and min elements of list , but this code not works. max(...
Finding sum of max and min elements of list Swi-prolog Finding sum of max and min elements of list Swi-prolog prolog Finding Swi-prolog Max Max1 Head Min List Min1 Finding sum of max and min elements of list Swi-prolog Please help, i new in Prolog trying to find sum of max and min elements of list , but this code not w...
[ 0.00616455078125, 0.00396728515625, 0.03125, 0.0137939453125, -0.0299072265625, 0.0201416015625, 0.002166748046875, 0.0230712890625, 0.01519775390625, -0.015869140625, 0.0064697265625, -0.01409912109375, 0.00628662109375, -0.02099609375, 0.03466796875, -0.0037078857421875, 0.01055908...
[ 26040, 214, 10554, 111, 18389, 136, 881, 80854, 5303, 105432, 3454, 4867, 502, 9920, 418, 44816, 4211, 32036, 4358, 3525, 1250, 31577, 7413, 903, 18151, 959, 43240, 5 ]
[ 0.1114501953125, 0.02557373046875, 0.216552734375, 0.05474853515625, 0.2119140625, 0.119384765625, 0.234619140625, 0.19091796875, 0.202880859375, 0.198486328125, 0.1282958984375, 0.200927734375, 0.09619140625, 0.1676025390625, 0.03546142578125, 0.139892578125, 0.1689453125, 0.15417...
embed
44342027_c0
44342027
prolog
0
Title: Prolog. Reverse nodes in a tree Problem title: Prolog. Reverse nodes in a tree Tags: tree, recursion, prolog, binary-tree Problem: Prolog. Reverse nodes in a tree I want to reverse the nodes in a binary tree like this : [[ [ [[],1,[]], 5, []], 7, [ [], 3, [[],4,[]]]], 6, [ [ [], 10, []], 8, [ [[],9,[]], 11, [[],...
Prolog. Reverse nodes in a tree Prolog. Reverse nodes in a tree tree recursion prolog binary-tree Prolog Reverse Prolog. Reverse nodes in a tree I want to reverse the nodes in a binary tree like this : I can only use this ABN representation as lists and the following constructors and selectors of the abstract data type...
[ 0.0010986328125, 0.0162353515625, 0.0025177001953125, 0.00946044921875, -0.00653076171875, 0.0027923583984375, -0.0152587890625, 0.0087890625, -0.00179290771484375, -0.0223388671875, -0.007415771484375, 0.003936767578125, -0.006988525390625, 0.0027008056640625, 0.0301513671875, -0.0081...
[ 1250, 4867, 853, 37676, 110, 988, 23, 53201, 195625, 502, 2394, 6635, 62600, 3444, 39531, 184, 1884, 903, 831, 4734, 4527, 62, 52731, 18811, 237, 5303, 25632, 64549, 36849, 164789, 2053, 10644, 202317, 1653, 2063, 284, 617, 571, 20697 ]
[ 0.151123046875, 0.2008056640625, 0.07568359375, 0.2362060546875, 0.1595458984375, 0.1507568359375, 0.03350830078125, 0.20068359375, 0.1009521484375, 0.0810546875, 0.1265869140625, 0.083984375, 0.1478271484375, 0.0638427734375, 0.21484375, 0.139892578125, 0.0229034423828125, 0.02418...
embed
16562872_c0
16562872
prolog
0
Title: Prolog cut operator behaviour Problem title: Prolog cut operator behaviour Tags: behavior, clause, prolog-cut, prolog Problem: Prolog cut operator behaviour I have these clauses: a(1). a(2). b(a). c(A,B,C) :- a(A),d(B,C). c(A,B,C) :- b(A),d(B,C). d(B,C) :- a(B),!,a(C). d(B,_) :- b(B). When I run the query c(X,Y,...
Prolog cut operator behaviour Prolog cut operator behaviour behavior clause prolog-cut prolog Prolog Prolog cut operator behaviour I have these clauses: When I run the query c(X,Y,Z) the answers are: So basically, the cut operator (in here d(B,C) :- a(B),!,a(C).) ignores the most recent choice points, i.e. it does not ...
[ 0.048583984375, 0.02001953125, 0.03515625, 0.0274658203125, -0.005279541015625, 0.0054931640625, -0.004364013671875, -0.0089111328125, 0.0076904296875, 0.0057373046875, -0.031982421875, -0.01263427734375, -0.01416015625, -0.00909423828125, 0.01409912109375, -0.0022125244140625, -0.00...
[ 1250, 4867, 59226, 39933, 224833, 123166, 70731, 502, 19774, 90, 11675, 41, 1294, 501, 1542, 1723, 1511, 35166, 198343, 3688, 104, 571, 441, 10, 38, 11, 124962, 7, 2684, 17309, 44126, 26847, 14602, 959, 53333, 33938, 100, 132, 136, 21208,...
[ 0.147705078125, 0.196533203125, 0.1953125, 0.2457275390625, 0.1614990234375, 0.14697265625, 0.1553955078125, 0.1024169921875, 0.1846923828125, 0.054229736328125, 0.1085205078125, 0.1082763671875, 0.07171630859375, 0.087890625, 0.02490234375, 0.0611572265625, 0.09130859375, 0.123413...
embed
4837421_c0
4837421
prolog
0
Title: Suggestions for a business application using logic based system like prolog Problem title: Suggestions for a business application using logic based system like prolog Tags: prolog Problem: Suggestions for a business application using logic based system like prolog I need to develop any business application which...
Suggestions for a business application using logic based system like prolog Suggestions for a business application using logic based system like prolog prolog logic Suggestions Suggestions for a business application using logic based system like prolog I need to develop any business application which includes a logic-b...
[ 0.022216796875, 0.013916015625, -0.004913330078125, 0.010986328125, -0.01043701171875, 0.0419921875, -0.0135498046875, 0.00830078125, 0.01519775390625, -0.03173828125, 0.002716064453125, 0.0137939453125, -0.004241943359375, 0.013671875, 0.0184326171875, 0.0009307861328125, 0.00601196...
[ 104235, 141933, 7, 100, 8063, 38415, 17368, 62775, 35509, 5426, 1884, 502, 4867, 3871, 85493, 2499, 96853, 77007, 7639, 3820, 11, 55356, 108858, 81979, 5809, 5351, 104192, 831, 86869, 4527, 157666, 8781, 86685, 7440, 180358 ]
[ 0.1080322265625, 0.1650390625, 0.0160675048828125, 0.059326171875, 0.173095703125, 0.19970703125, 0.0875244140625, 0.2384033203125, 0.1650390625, 0.1639404296875, 0.049835205078125, 0.17431640625, 0.252197265625, 0.06353759765625, 0.10186767578125, 0.009918212890625, 0.01272583007812...
embed
74034002_c0
74034002
prolog
0
Title: SWI-Prolog predicates member and nth1 without unification? Problem title: SWI-Prolog predicates member and nth1 without unification? Tags: unification, swi-prolog, prolog Problem: SWI-Prolog predicates member and nth1 without unification? If I use the predicates member or the nt1 in SWI-Prolog as follows: ?- mem...
SWI-Prolog predicates member and nth1 without unification? SWI-Prolog predicates member and nth1 without unification? unification swi-prolog prolog SWI-Prolog nth1 _member _nth1 SWI-Prolog predicates member and nth1 without unification? If I use the predicates member or the nt1 in SWI-Prolog as follows: or The interpre...
[ -0.001220703125, 0.004669189453125, 0.03369140625, -0.0035858154296875, -0.016845703125, -0.017578125, 0.0181884765625, 0.006622314453125, 0.000926971435546875, -0.032470703125, 0.0260009765625, 0.009521484375, 0.00518798828125, -0.006500244140625, 0.0118408203125, -0.015625, 0.02172...
[ 159, 38969, 10752, 4867, 1653, 2063, 32786, 136, 653, 927, 418, 15490, 51, 41274, 91, 2452, 3454, 502, 39, 27417, 4527, 660, 9, 29481, 56, 27430, 77336, 62, 237, 1193, 30700, 11389, 32354, 959, 11782, 1884, 903, 8337, 4989, 37105, 98320...
[ 0.057861328125, 0.21484375, 0.1348876953125, 0.1796875, 0.15869140625, 0.1885986328125, 0.232177734375, 0.06146240234375, 0.1033935546875, 0.1864013671875, 0.0859375, 0.07879638671875, 0.145263671875, 0.128173828125, 0.003021240234375, 0.152099609375, 0.0869140625, 0.0882568359375,...
embed
11923708_c0
11923708
prolog
0
Title: counting the number of a particular element in a prolog list Problem title: counting the number of a particular element in a prolog list Tags: lambda, logic, prolog Problem: counting the number of a particular element in a prolog list I am trying to count how many times a element appears in a list, so far I have...
counting the number of a particular element in a prolog list counting the number of a particular element in a prolog list lambda logic prolog ERROR Arguments Exception _G393 counting the number of a particular element in a prolog list I am trying to count how many times a element appears in a list, so far I have came u...
[ 0.004180908203125, 0.01531982421875, -0.01495361328125, -0.03369140625, 0.004425048828125, 0.01068115234375, -0.000759124755859375, -0.00151824951171875, 0.01202392578125, -0.041259765625, 0.00494384765625, -0.048095703125, 0.01007080078125, 0.01556396484375, 0.006195068359375, -0.0051...
[ 54529, 214, 14012, 17311, 12830, 502, 4867, 5303, 6492, 85, 62775, 151206, 24638, 112140, 63928, 724, 128877, 23, 31577, 3642, 5941, 20028, 135179, 127918, 14858, 14037, 58359, 3564, 111, 3034, 10750, 7, 132283 ]
[ 0.200439453125, 0.05108642578125, 0.1470947265625, 0.1322021484375, 0.19921875, 0.1611328125, 0.215576171875, 0.1751708984375, 0.1373291015625, 0.0694580078125, 0.09814453125, 0.064208984375, 0.01116943359375, 0.1922607421875, 0.07086181640625, 0.015655517578125, 0.263671875, 0.027...
embed
30153135_c3
30153135
prolog
3
X1, 0, X3, X4, X5, X6, X7, X8, X9], [0, X1, X3, X4, X5, X6, X7, X8, X9]). e([X1, X2, 0, X4, X5, X6, X7, X8, X9], [X1, 0, X2, X4, X5, X6, X7, X8, X9]). e([X1, X2, X3, 0, X5, X6, X7, X8, X9], [X1, X2, X3, X5, 0, X6, X7, X8, X9]). e([X1, X2, X3, X4, 0, X6, X7, X8, X9], [X1, X2, X3, X4, X6, 0, X7, X8, X9]). e([X1, X2, X3, ...
X1, 0, X3, X4, X5, X6, X7, X8, X9], [0, X1, X3, X4, X5, X6, X7, X8, X9]). e([X1, X2, 0, X4, X5, X6, X7, X8, X9], [X1, 0, X2, X4, X5, X6, X7, X8, X9]). e([X1, X2, X3, 0, X5, X6, X7, X8, X9], [X1, X2, X3, X5, 0, X6, X7, X8, X9]). e([X1, X2, X3, X4, 0, X6, X7, X8, X9], [X1, X2, X3, X4, X6, 0, X7, X8, X9]). e([X1, X2, X3, ...
[ -0.015869140625, -0.006805419921875, 0.0113525390625, 0.040771484375, 0.01531982421875, 0.032470703125, -0.0213623046875, 0.013916015625, 0.015869140625, -0.0240478515625, -0.0205078125, -0.005859375, 0.01275634765625, 0.0076904296875, -0.01104736328125, -0.0030975341796875, -0.00040...
[ 1193, 418, 4, 757, 363, 617, 758, 910, 966, 1019, 1126, 2389, 194, 28, 132, 1542, 304, 3949, 35662, 104192, 120197, 1766, 13894, 133, 27559, 2448, 841, 9384, 434, 67, 87, 765, 28282, 30464, 86966, 441, 276, 436, 10461, 501, 113054, 12...
[ 0.19189453125, 0.16748046875, 0.038482666015625, 0.1527099609375, 0.1837158203125, 0.21533203125, 0.197998046875, 0.1900634765625, 0.1380615234375, 0.174072265625, 0.2120361328125, 0.12353515625, 0.012725830078125, 0.1783447265625, 0.03228759765625, 0.193115234375, 0.1982421875, 0....
embed
40708460_c0
40708460
prolog
0
Title: Adding two lists representing numbers in prolog Problem title: Adding two lists representing numbers in prolog Tags: prolog Problem: Adding two lists representing numbers in prolog The task says: the numbers are represented by lists (e.g. 123 = [1, 2, 3]), write a predicate which adds two such numbers. (e.g. sum...
Adding two lists representing numbers in prolog Adding two lists representing numbers in prolog prolog Adding Adding two lists representing numbers in prolog The task says: the numbers are represented by lists (e.g. 123 = [1, 2, 3]), write a predicate which adds two such numbers. (e.g. sum([4, 5, 6], [9], [4, 6, 5]) )....
[ -0.0002346038818359375, 0.0135498046875, -0.006439208984375, 0.015869140625, -0.0206298828125, 0.013916015625, -0.013671875, 0.01611328125, 0.0252685546875, -0.033935546875, 0.020751953125, -0.00714111328125, -0.01214599609375, 0.023193359375, 0.01556396484375, -0.0244140625, 0.01416...
[ 62, 59725, 6626, 5303, 7, 33636, 214, 101935, 502, 4867, 66211, 390, 37638, 2203, 116, 138, 33022, 1653, 2063, 67, 15190, 6044, 10554, 617, 190, 305, 55737, 36510, 195625, 5844, 24745, 13267, 10298, 4778, 285, 53, 8781, 39531, 572, 188328...
[ 0.1307373046875, 0.0919189453125, 0.17138671875, 0.2366943359375, 0.08807373046875, 0.216064453125, 0.009857177734375, 0.17529296875, 0.1695556640625, 0.2408447265625, 0.1392822265625, 0.0159454345703125, 0.221923828125, 0.02142333984375, 0.047882080078125, 0.13037109375, 0.127075195...
embed
36727002_c1
36727002
prolog
1
,13). age(russellWestbrook,27). videogameCover(russellWestbrook). millionsFollowers(russellWestbrook,3). age(dwayneWade,29). championships(dwayneWade,3). millionsFollowers(dwayneWade,4). So what i did was this: superstar(X):- age(X,Y), Y>=30, championships(X,Z), Z>=3,!. superstar(X):- age(X,Y), Y=<30, videogameCover(X)...
,13). age(russellWestbrook,27). videogameCover(russellWestbrook). millionsFollowers(russellWestbrook,3). age(dwayneWade,29). championships(dwayneWade,3). millionsFollowers(dwayneWade,4). So what i did was this: superstar(X):- age(X,Y), Y>=30, championships(X,Z), Z>=3,!. superstar(X):- age(X,Y), Y=<30, videogameCover(X)...
[ 0.0118408203125, -0.0076904296875, 0.00010967254638671875, 0.01953125, 0.010009765625, 0.02685546875, 0.0125732421875, 0.0029144287109375, -0.002716064453125, 0.0035247802734375, -0.0027618408203125, -0.0103759765625, -0.002227783203125, -0.0004673004150390625, -0.00408935546875, 0.010...
[ 63258, 32070, 6563, 93991, 138271, 172525, 80847, 1202, 35311, 441, 5465, 43077, 27591, 41566, 1314, 21320, 7514, 86, 22489, 112, 83679, 102995, 16070, 29557, 17, 6777, 903, 1601, 5613, 1542, 1723, 990, 1197, 1511, 567, 76067, 38, 114997, 9...
[ 0.2235107421875, 0.2412109375, 0.06201171875, 0.1385498046875, 0.1451416015625, 0.262451171875, 0.17041015625, 0.1156005859375, 0.0931396484375, 0.049530029296875, 0.217041015625, 0.1173095703125, 0.07373046875, 0.158935546875, 0.041259765625, 0.0474853515625, 0.12451171875, 0.0755...
embed
19406309_c0
19406309
prolog
0
Title: How to override a user predicate with a module Problem title: How to override a user predicate with a module Tags: swi-prolog, prolog Problem: How to override a user predicate with a module Say I have a module named foo (defined in foo.pl ). This module does term_expansion for instance: :- module(foo,[term_expan...
How to override a user predicate with a module How to override a user predicate with a module swi-prolog prolog foo:term_expansion/2 How foo.pl term_expansion test.pl use_module ERROR Cannot foo:term_expansion How to override a user predicate with a module Say I have a module named foo (defined in foo.pl ). This module...
[ 0.01043701171875, 0.004852294921875, -0.0103759765625, 0.02880859375, -0.00048065185546875, 0.004669189453125, 0.0277099609375, 0.013916015625, 0.004486083984375, -0.042724609375, -0.00185394287109375, 0.01708984375, 0.004608154296875, -0.01556396484375, 0.0172119140625, -0.01843261718...
[ 11249, 645, 416, 112, 38937, 1653, 2063, 67, 678, 88996, 91, 2452, 3454, 4867, 502, 5775, 31, 32166, 83613, 66, 6889, 12477, 2424, 13579, 3034, 4527, 83279, 151206, 24638, 4171, 10869, 5983, 2773, 18151, 96704, 69407, 24927, 35773, 1294, ...
[ 0.037109375, 0.124267578125, 0.1981201171875, 0.1146240234375, 0.21484375, 0.201416015625, 0.2181396484375, 0.1134033203125, 0.1317138671875, 0.2427978515625, 0.0149078369140625, 0.187744140625, 0.1378173828125, 0.186279296875, 0.125, 0.166259765625, 0.2056884765625, 0.215942382812...
embed
5754061_c0
5754061
prolog
0
Title: i am using ancient turbo prolog . and continously facing error in following code :- mis-spelling or not declared predicate Problem title: i am using ancient turbo prolog . and continously facing error in following code :- mis-spelling or not declared predicate Tags: prolog, turbo-prolog Problem: i am using ancie...
i am using ancient turbo prolog . and continously facing error in following code :- mis-spelling or not declared predicate i am using ancient turbo prolog . and continously facing error in following code :- mis-spelling or not declared predicate prolog turbo-prolog ancient A Transfering N-1 i am using ancient turbo pro...
[ 0.01092529296875, 0.0123291015625, -0.0052490234375, 0.0252685546875, -0.0169677734375, 0.01336669921875, 0.004638671875, -0.000270843505859375, 0.006072998046875, -0.028076171875, 0.015625, 0.005889892578125, -0.002777099609375, 0.0024871826171875, 0.011474609375, 0.01068115234375, ...
[ 17368, 142, 45964, 94779, 502, 4867, 102548, 79850, 7808, 18499, 25632, 18151, 1239, 11337, 2069, 707, 959, 159978, 1653, 2063, 67, 71, 3454, 62, 73509, 541, 5759 ]
[ 0.088134765625, 0.03448486328125, 0.176025390625, 0.2213134765625, 0.12060546875, 0.2022705078125, 0.087158203125, 0.045928955078125, 0.1337890625, 0.1593017578125, 0.037628173828125, 0.124267578125, 0.117919921875, 0.1702880859375, 0.09344482421875, 0.0810546875, 0.1376953125, 0.1...
embed
67151966_c1
67151966
prolog
1
(X or Y) A:X = t Y = t Yes 'more' A:X = t Y = f Yes 'more' A:X = f Y = t Yes 'more' No I know how to replace the variables with a specific value (like t) using this code: bool_solve(Expr):- term_variables(Expr,Vars), findall(X,X=t, Vars). term_variables is built-in and finds all the variables in an expression. I know h...
(X or Y) A:X = t Y = t Yes 'more' A:X = t Y = f Yes 'more' A:X = f Y = t Yes 'more' No I know how to replace the variables with a specific value (like t) using this code: bool_solve(Expr):- term_variables(Expr,Vars), findall(X,X=t, Vars). term_variables is built-in and finds all the variables in an expression. I know h...
[ 0.01165771484375, 0.0205078125, 0.0279541015625, 0.00775146484375, -0.00177764892578125, 0.0024566650390625, -0.00109100341796875, 0.0146484375, 0.0150146484375, 0.003448486328125, -0.0019683837890625, 0.02197265625, 0.00592041015625, 0.01507568359375, 0.00156402587890625, 0.0148315429...
[ 1542, 707, 990, 62, 12, 2203, 808, 32635, 17678, 1238, 3714, 3642, 47, 91995, 77336, 7, 678, 29458, 34292, 5062, 17368, 903, 18151, 142484, 86918, 132, 19279, 10287, 13579, 21690, 19736, 81827, 7413, 5584, 18, 3323, 88303, 73, 756, 125195...
[ 0.148193359375, 0.187744140625, 0.202880859375, 0.08160400390625, 0.0174560546875, 0.0755615234375, 0.1673583984375, 0.16357421875, 0.1915283203125, 0.147705078125, 0.040557861328125, 0.06231689453125, 0.0142822265625, 0.209228515625, 0.274658203125, 0.073486328125, 0.0736083984375, ...
embed
47462530_c0
47462530
prolog
0
Title: Longest common prefix (LCP) of a list of strings Problem title: Longest common prefix (LCP) of a list of strings Tags: prolog-cut, logical-purity, prolog-dif, list, prolog Problem: Longest common prefix (LCP) of a list of strings lcs([ H|L1],[ H|L2],[H|Lcs]) :- !, lcs(L1,L2,Lcs). lcs([H1|L1],[H2|L2],Lcs):- lcs( ...
Longest common prefix (LCP) of a list of strings Longest common prefix (LCP) of a list of strings prolog-cut logical-purity prolog-dif list prolog Longest LCP Lcs Lcs1 Lcs2 Length1 Length2 Longest common prefix (LCP) of a list of strings This is my code so far. How could I optimize it so that it prints the prefix, e.g....
[ 0.010009765625, 0.0086669921875, 0.005859375, 0.01214599609375, -0.015380859375, -0.01116943359375, 0.00567626953125, 0.006256103515625, -0.003265380859375, -0.025390625, 0.0021514892578125, 0.0084228515625, 0.0264892578125, 0.007568359375, -0.002288818359375, 0.01470947265625, 0.005...
[ 14407, 525, 39210, 183114, 866, 17854, 111, 5303, 79315, 502, 4867, 19774, 62775, 289, 4717, 2481, 428, 420, 339, 4439, 418, 304, 77554, 18151, 2060, 11249, 5809, 15572, 20650, 28412, 70, 5608, 30646, 6191, 4785, 52648, 1250 ]
[ 0.129638671875, 0.12158203125, 0.167236328125, 0.29443359375, 0.0732421875, 0.2225341796875, 0.018096923828125, 0.1363525390625, 0.204345703125, 0.1099853515625, 0.2095947265625, 0.153076171875, 0.10205078125, 0.011688232421875, 0.121826171875, 0.071044921875, 0.038330078125, 0.085...
embed
41228331_c1
41228331
prolog
1
/7.2.3_2/libexec/lib/swipl-7.2.3/library/filesex, /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/lists, /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/apply, /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/prolog_stack, Library, Cellar, swipl-7.2.3, x86_6...
alk:clause_info prolog_clause prolog_codewalk:initialization_layout prolog_source:directory_file_path files_ex:use_foreign_library record:member files_ex:maplist files_ex:permission_error oset:reverse prolog_debug:backtrace prolog_stack prolog_codewalk:clause_name Autoloader Restarting swi prolog standalone executable ...
[ 0.0311279296875, 0.0072021484375, -0.0086669921875, 0.0263671875, -0.0196533203125, 0.01611328125, 0.0048828125, 0.000896453857421875, 0.007354736328125, -0.02490234375, 0.0014190673828125, 0.0157470703125, -0.00909423828125, 0.016357421875, 0.022216796875, -0.0159912109375, -0.00064...
[ 144, 92, 18347, 4032, 7319, 502, 4867, 40899, 94449, 289, 5259, 6056, 60427, 29822, 128405, 102158, 38529, 150, 2844, 17164, 27417, 1264, 21150, 188800, 126, 37676, 85779, 39989, 4396, 63033, 17137, 91, 2452, 103723, 51684, 71924, 2886, 19138...
[ 0.09375, 0.1202392578125, 0.083251953125, 0.13525390625, 0.145751953125, 0.1669921875, 0.236083984375, 0.0810546875, 0.18017578125, 0.00250244140625, 0.08447265625, 0.0380859375, 0.11328125, 0.0657958984375, 0.0771484375, 0.06494140625, 0.032562255859375, 0.001251220703125, 0.068...
embed
43706374_c0
43706374
prolog
0
Title: Exploring a graph with loops, issue with member predicate Problem title: Exploring a graph with loops, issue with member predicate Tags: prolog Problem: Exploring a graph with loops, issue with member predicate I'm trying to explore a graph that may have loops so i have to put nodes that i already "visited" in a...
Exploring a graph with loops, issue with member predicate Exploring a graph with loops, issue with member predicate prolog Exploring Defs _Defs Exploring a graph with loops, issue with member predicate I'm trying to explore a graph that may have loops so i have to put nodes that i already "visited" in an array. The iss...
[ 0.0093994140625, 0.01025390625, 0.022705078125, 0.03125, -0.005126953125, -0.0234375, 0.00531005859375, -0.00130462646484375, 0.01495361328125, -0.04443359375, 0.01080322265625, 0.02197265625, 0.00506591796875, 0.00567626953125, 0.0245361328125, -0.00390625, -0.0103759765625, 0.003...
[ 98873, 41382, 678, 40956, 31089, 32786, 1653, 2063, 7, 502, 4867, 85535, 187423, 67, 31577, 88898, 1543, 3884, 110, 988, 21771, 169697, 10298, 1250, 14192, 1723, 29568, 35782, 16401, 15400, 33938, 3789, 29806, 30145, 1193, 61475, 112, 5705, ...
[ 0.111328125, 0.173095703125, 0.07061767578125, 0.1956787109375, 0.1214599609375, 0.23095703125, 0.1529541015625, 0.162109375, 0.0323486328125, 0.1099853515625, 0.184326171875, 0.1910400390625, 0.207275390625, 0.052154541015625, 0.009246826171875, 0.1182861328125, 0.037567138671875, ...
embed
59601481_c0
59601481
prolog
0
Title: Amzi Prolog won&#x27;t pass value when being called Problem title: Amzi Prolog won&#x27;t pass value when being called Tags: prolog, amzi-prolog Problem: Amzi Prolog won't pass value when being called /* MAIN PROGRAM */ main:- welcome. numbers:- nl,nl,write('First number: '), read(FIRST),nl, write('Second number...
Amzi Prolog won&#x27;t pass value when being called Amzi Prolog won&#x27;t pass value when being called prolog amzi-prolog Amzi Prolog MAIN PROGRAM Welcome Simple Calculator First Second Addition Subtraction Multiplication Division Exit ANS1 set_op SUM Amzi Prolog won't pass value when being called I'm having trouble d...
[ 0.023193359375, -0.001251220703125, -0.000896453857421875, 0.0106201171875, -0.01031494140625, -0.0196533203125, -0.002288818359375, 0.01025390625, 0.013671875, -0.0218505859375, -0.006378173828125, 0.006195068359375, -0.0164794921875, -0.0023345947265625, 0.03564453125, 0.003784179687...
[ 2022, 708, 1250, 4867, 23742, 3768, 18, 27875, 34292, 3229, 8035, 35839, 502, 444, 3454, 48026, 59677, 91334, 60552, 212467, 4597, 23972, 77648, 29117, 8273, 117474, 182867, 127152, 5443, 48789, 418, 5423, 2146, 127944, 63134, 8781, 154993, 1...
[ 0.1605224609375, 0.2315673828125, 0.1749267578125, 0.249755859375, 0.1033935546875, 0.04901123046875, 0.1036376953125, 0.177490234375, 0.2086181640625, 0.07171630859375, 0.060791015625, 0.1619873046875, 0.1488037109375, 0.0948486328125, 0.0692138671875, 0.064208984375, 0.114990234375...
embed
13208184_c0
13208184
prolog
0
Title: Trivial No in Prolog returns Yes Problem title: Trivial No in Prolog returns Yes Tags: prolog Problem: Trivial No in Prolog returns Yes I have a simple predicate in prolog that when MaxScore >0, it gives yes, otherwise is no. So if MaxScore is 0, then obviously the result is No. But this doesn't happen. Look clo...
Trivial No in Prolog returns Yes Trivial No in Prolog returns Yes prolog Trivial Prolog Yes PlayerNum Board Pos BotType ScoreList MaxScore Trivial No in Prolog returns Yes I have a simple predicate in prolog that when MaxScore >0, it gives yes, otherwise is no. So if MaxScore is 0, then obviously the result is No. But ...
[ -0.01055908203125, 0.012939453125, 0.0164794921875, 0.01092529296875, -0.005279541015625, 0.015869140625, 0.032470703125, -0.00506591796875, 0.000949859619140625, -0.0031280517578125, 0.00244140625, 0.01708984375, -0.03466796875, -0.008056640625, 0.0216064453125, -0.001708984375, 0.0...
[ 4699, 686, 289, 438, 23, 1250, 4867, 30646, 32635, 502, 60560, 62554, 13498, 23674, 196707, 168071, 154663, 9920, 30854, 8781, 1653, 2063, 3229, 294, 2389, 76199, 72272, 120262, 110, 2174, 757, 171259, 16750, 22027, 18, 53383, 18151, 140992, ...
[ 0.11181640625, 0.165283203125, 0.0838623046875, 0.19287109375, 0.0390625, 0.1669921875, 0.208251953125, 0.1473388671875, 0.148193359375, 0.12060546875, 0.054443359375, 0.0665283203125, 0.029571533203125, 0.08038330078125, 0.1270751953125, 0.06280517578125, 0.05096435546875, 0.14721...
embed
14021668_c0
14021668
prolog
0
Title: Why does this Prolog Fibonacci function cause a &quot;instantiation_error&quot;? Problem title: Why does this Prolog Fibonacci function cause a &quot;instantiation_error&quot;? Tags: clpfd, prolog, declarative, fibonacci, logic Problem: Why does this Prolog Fibonacci function cause a "instantiation_error"? I am ...
Why does this Prolog Fibonacci function cause a &quot;instantiation_error&quot;? Why does this Prolog Fibonacci function cause a &quot;instantiation_error&quot;? clpfd prolog declarative fibonacci logic Why Prolog Fibonacci instantiation_error N-1 Sum Result What Why does this Prolog Fibonacci function cause a "instant...
[ 0.028076171875, 0.002044677734375, 0.005340576171875, -0.0037078857421875, -0.013671875, 0.0002803802490234375, 0.000362396240234375, -0.01080322265625, 0.01202392578125, -0.022216796875, 0.0064697265625, -0.031494140625, -0.004150390625, 0.0137939453125, 0.031982421875, 0.002090454101...
[ 44084, 14602, 903, 1250, 4867, 3698, 20990, 52544, 32354, 22304, 143034, 14, 2320, 188800, 10, 39557, 71, 502, 21635, 809, 62775, 34648, 541, 5759, 36335, 126684, 31577, 74481, 36549, 17368, 25632, 179140, 43240, 1884, 9790, 186992, 35672, 28...
[ 0.1446533203125, 0.046875, 0.055694580078125, 0.1947021484375, 0.25146484375, 0.156494140625, 0.185302734375, 0.17724609375, 0.1505126953125, 0.1368408203125, 0.1285400390625, 0.1380615234375, 0.0572509765625, 0.22509765625, 0.04522705078125, 0.0157318115234375, 0.0211639404296875, ...
embed
34112408_c0
34112408
prolog
0
Title: Octal to Binary number conversion in Prolog Problem title: Octal to Binary number conversion in Prolog Tags: prolog, octal, binary Problem: Octal to Binary number conversion in Prolog This is what I tried to convert Octal number to binary. What I wanted to do was to find the remainder of the given octal number w...
Octal to Binary number conversion in Prolog Octal to Binary number conversion in Prolog prolog octal binary Octal Binary Prolog convert_bin atom_concat convert_oct Octal to Binary number conversion in Prolog This is what I tried to convert Octal number to binary. What I wanted to do was to find the remainder of the giv...
[ 0.0166015625, -0.004852294921875, 0.0069580078125, 0.01031494140625, -0.007415771484375, 0.02783203125, -0.0150146484375, -0.0133056640625, 0.006591796875, 0.0166015625, -0.02587890625, -0.0206298828125, 0.00543212890625, 0.0218505859375, 0.00921630859375, 0.00311279296875, 0.0174560...
[ 33649, 289, 47, 54092, 1294, 14012, 142477, 1250, 4867, 502, 154447, 141, 2394, 96760, 7568, 34627, 2271, 4460, 6652, 18, 37842, 6635, 36663, 7413, 47143, 820, 34475, 101637, 209, 12638, 153939, 138, 4785, 4966, 18151, 959, 27024, 2499, 140...
[ 0.2269287109375, 0.1787109375, 0.107421875, 0.1790771484375, 0.134033203125, 0.14794921875, 0.1531982421875, 0.1370849609375, 0.2105712890625, 0.10302734375, 0.2239990234375, 0.1351318359375, 0.15771484375, 0.1507568359375, 0.1171875, 0.1649169921875, 0.04376220703125, 0.1287841796...
embed
7838984_c0
7838984
prolog
0
Title: Strawberry Prolog setof Problem title: Strawberry Prolog setof Tags: prolog Problem: Strawberry Prolog setof I am implementing a family tree using Strawberry Prolog (what the computer labs have at my school) and would like get rid of the duplicate answers. The findall function works in Strawberry Prolog which pu...
Strawberry Prolog setof Strawberry Prolog setof prolog Strawberry Prolog Strawberry Prolog setof I am implementing a family tree using Strawberry Prolog (what the computer labs have at my school) and would like get rid of the duplicate answers. The findall function works in Strawberry Prolog which put all the answers i...
[ 0.02197265625, 0.0028533935546875, 0.027099609375, 0.012451171875, 0.0034027099609375, 0.014892578125, -0.01385498046875, -0.002197265625, 0.007080078125, -0.053955078125, -0.01141357421875, 0.00179290771484375, 0.006256103515625, -0.006378173828125, 0.0098876953125, 0.01300048828125, ...
[ 7832, 434, 53623, 1250, 4867, 5423, 4390, 502, 29479, 14449, 53201, 17368, 13909, 117224, 10696, 1884, 2046, 31351, 171763, 35166, 7413, 5584, 32354, 43240, 3884, 756, 5303, 959, 32316, 903, 9969, 34759, 101089, 15190, 137175, 11522, 52080, 1...
[ 0.1202392578125, 0.0799560546875, 0.2379150390625, 0.1461181640625, 0.229736328125, 0.192626953125, 0.280029296875, 0.12109375, 0.0689697265625, 0.0657958984375, 0.1953125, 0.006988525390625, 0.015167236328125, 0.0908203125, 0.10296630859375, 0.009033203125, 0.0185546875, 0.0953369...
embed
23808673_c0
23808673
prolog
0
Title: Highest integers common factor testing error Problem title: Highest integers common factor testing error Tags: prolog, greatest-common-divisor Problem: Highest integers common factor testing error I would like the following bar/3 predicate to print false if the integers A and B do not have C as highest common fa...
Highest integers common factor testing error Highest integers common factor testing error prolog greatest-common-divisor Highest P-Q ERROR Arithmetic zero_divisor Highest integers common factor testing error I would like the following bar/3 predicate to print false if the integers A and B do not have C as highest commo...
[ 0.002593994140625, -0.0034332275390625, -0.0157470703125, -0.01123046875, -0.00225830078125, -0.00689697265625, -0.004302978515625, -0.019775390625, -0.00360107421875, -0.00653076171875, 0.0159912109375, 0.00689697265625, 0.0198974609375, -0.00604248046875, 0.0027618408203125, -0.04003...
[ 19694, 525, 892, 26255, 39210, 31461, 134234, 18499, 502, 4867, 158036, 277, 3796, 428, 51858, 436, 9, 2737, 151206, 24638, 8962, 45234, 87, 2806, 1884, 70, 25632, 1909, 18113, 1653, 2063, 67, 28412, 98320, 2174, 62, 136, 335, 959, 765, ...
[ 0.18408203125, 0.143310546875, 0.124267578125, 0.09765625, 0.1788330078125, 0.21923828125, 0.16162109375, 0.2041015625, 0.07037353515625, 0.0875244140625, 0.12841796875, 0.0677490234375, 0.1761474609375, 0.110595703125, 0.19091796875, 0.0236968994140625, 0.0194854736328125, 0.09686...
embed
12633851_c0
12633851
prolog
0
Title: Trying to understand a recursive prolog procedure? Problem title: Trying to understand a recursive prolog procedure? Tags: recursion, prolog Problem: Trying to understand a recursive prolog procedure? This was given as an example in a professor's lecture: append([ ], A, A). append([A|B], C, [A|D]) :- append(B,C,...
Trying to understand a recursive prolog procedure? Trying to understand a recursive prolog procedure? recursion prolog Trying Build Break Trying to understand a recursive prolog procedure? This was given as an example in a professor's lecture: I've spent 3 hours trying to grasp it and can't. Hadn't had any trouble with...
[ 0.00154876708984375, 0.01116943359375, 0.00897216796875, 0.015625, -0.01141357421875, 0.0228271484375, -0.0191650390625, 0.00909423828125, 0.02783203125, -0.00518798828125, 0.0059814453125, -0.0224609375, -0.031982421875, 0.009765625, 0.01483154296875, -0.01556396484375, 0.0349121093...
[ 40858, 214, 28219, 195625, 5844, 502, 4867, 50491, 47, 1830, 121137, 131904, 27781, 16030, 59619, 66933, 138, 21974, 31577, 27689, 254, 831, 18, 23755, 107671, 122753, 187136, 4677, 756, 22008, 5809, 35691, 8305, 3642, 43240, 2806, 5161, 139,...
[ 0.102783203125, 0.05743408203125, 0.1551513671875, 0.20751953125, 0.1376953125, 0.16259765625, 0.2264404296875, 0.1873779296875, 0.00347900390625, 0.0811767578125, 0.1544189453125, 0.1689453125, 0.112548828125, 0.0816650390625, 0.10504150390625, 0.0285186767578125, 0.04986572265625, ...
embed
34145086_c0
34145086
prolog
0
Title: Decomposing a matrix to a list of first element and sub list of remaining elements in prolog Problem title: Decomposing a matrix to a list of first element and sub list of remaining elements in prolog Tags: prolog, list Problem: Decomposing a matrix to a list of first element and sub list of remaining elements i...
Decomposing a matrix to a list of first element and sub list of remaining elements in prolog Decomposing a matrix to a list of first element and sub list of remaining elements in prolog prolog list Decomposing Decomposing a matrix to a list of first element and sub list of remaining elements in prolog Test Case I had t...
[ 0.00787353515625, 0.0128173828125, -0.002471923828125, 0.0203857421875, -0.0167236328125, -0.001983642578125, -0.021484375, 0.0166015625, 0.01708984375, -0.0228271484375, 0.0004558563232421875, 0.01055908203125, 0.006805419921875, 0.00701904296875, -0.0028839111328125, -0.0024261474609...
[ 262, 277, 7522, 214, 50944, 425, 47, 5303, 5117, 12830, 136, 1614, 47143, 80854, 502, 4867, 8647, 43731, 37842, 208124, 58269, 24500, 45964 ]
[ 0.1607666015625, 0.131591796875, 0.165771484375, 0.00421142578125, 0.1881103515625, 0.095458984375, 0.07354736328125, 0.13525390625, 0.0806884765625, 0.163330078125, 0.0257568359375, 0.14404296875, 0.1051025390625, 0.1458740234375, 0.1373291015625, 0.1998291015625, 0.10760498046875, ...
embed
46603395_c1
46603395
prolog
1
READING PART*/ read_file(Stream,[]) :- at_end_of_stream(Stream). read_file(Stream,[X|L]) :- \+ at_end_of_stream(Stream), read(Stream,X), read_file(Stream,L). /*PROCESSING PART*/ process([],File). process([X|Xs],File):- numToList(X,List), to_binary(List,Dec), write(File, Dec), process(Xs). /*MAIN*/ main :- open('input....
READING PART*/ read_file(Stream,[]) :- at_end_of_stream(Stream). read_file(Stream,[X|L]) :- \+ at_end_of_stream(Stream), read(Stream,X), read_file(Stream,L). /*PROCESSING PART*/ process([],File). process([X|Xs],File):- numToList(X,List), to_binary(List,Dec), write(File, Dec), process(Xs). /*MAIN*/ main :- open('input....
[ 0.00041961669921875, -0.0015106201171875, -0.0028533935546875, 0.00469970703125, -0.00762939453125, 0.0294189453125, -0.0128173828125, -0.0042724609375, 0.00604248046875, -0.0020294189453125, -0.0118408203125, 0.0029754638671875, -0.014404296875, 0.0238037109375, 0.01806640625, 0.00170...
[ 188300, 23186, 88601, 1639, 64, 12301, 454, 29822, 115061, 1065, 15772, 99, 3611, 4390, 86429, 194, 1542, 58745, 866, 1328, 194695, 9433, 174350, 13269, 7763, 154663, 47, 19155, 1294, 120152, 33022, 25755, 594, 48026, 5201, 9803, 73, 7077, ...
[ 0.22265625, 0.1270751953125, 0.183837890625, 0.0256500244140625, 0.012237548828125, 0.2294921875, 0.064208984375, 0.22607421875, 0.2138671875, 0.0220489501953125, 0.0931396484375, 0.0178375244140625, 0.109130859375, 0.04315185546875, 0.173828125, 0.023193359375, 0.0926513671875, 0....
embed
16437769_c0
16437769
prolog
0
Title: Prolog program to recognize context free grammar a^n b^n Problem title: Prolog program to recognize context free grammar a^n b^n Tags: prolog, dcg, context-free-grammar Problem: Prolog program to recognize context free grammar a^n b^n Using Prolog I'm trying to write a predicate that recognizes context free gram...
Prolog program to recognize context free grammar a^n b^n Prolog program to recognize context free grammar a^n b^n prolog dcg context-free-grammar Prolog Prolog program to recognize context free grammar a^n b^n Using Prolog I'm trying to write a predicate that recognizes context free grammar and returns true if the inpu...
[ 0.0264892578125, 0.01708984375, 0.004119873046875, 0.02099609375, -0.00860595703125, -0.0007781982421875, -0.01422119140625, 0.0203857421875, -0.008056640625, -0.0186767578125, 0.00982666015625, 0.01171875, -0.0191650390625, -0.01397705078125, 0.0206298828125, -0.0081787109375, 0.025...
[ 1250, 4867, 1528, 47, 125296, 43701, 4092, 122092, 147, 10, 8353, 19, 876, 502, 177, 32087, 107415, 31577, 33022, 1653, 2063, 67, 30646, 29568, 2174, 107730, 5303, 14858, 123254, 229231, 58055, 4734, 4, 275, 9077, 29479, 384, 79986, 41, 1...
[ 0.196533203125, 0.247314453125, 0.160400390625, 0.00689697265625, 0.1925048828125, 0.2401123046875, 0.1776123046875, 0.1710205078125, 0.095458984375, 0.057891845703125, 0.095947265625, 0.068359375, 0.08892822265625, 0.1502685546875, 0.035980224609375, 0.141845703125, 0.093994140625, ...
embed
56497518_c0
56497518
prolog
0
Title: Check if first or second element in list are same data type.Prolog Problem title: Check if first or second element in list are same data type.Prolog Tags: prolog Problem: Check if first or second element in list are same data type.Prolog I am beginner in Prolog.I have my custom types bird,fish,animal. So the pro...
Check if first or second element in list are same data type.Prolog Check if first or second element in list are same data type.Prolog prolog Check type.Prolog Check if first or second element in list are same data type.Prolog I am beginner in Prolog.I have my custom types bird,fish,animal. So the problem is I want to p...
[ 0.01312255859375, 0.0035247802734375, 0.00051116943359375, 0.0252685546875, -0.015625, -0.00164794921875, -0.01318359375, 0.01470947265625, 0.006500244140625, -0.032470703125, 0.0146484375, -0.00994873046875, 0.0086669921875, -0.0166015625, 0.01434326171875, -0.0019378662109375, 0.00...
[ 38679, 2174, 5117, 707, 17932, 12830, 23, 5303, 621, 5701, 2053, 10644, 10752, 4867, 502, 1679, 1250, 114122, 52895, 263, 84433, 161834, 2967, 3444, 27875, 32354, 2729, 271, 27751, 134342, 33, 4460, 15592, 16750, 29568, 136, 4568, 27781, 36...
[ 0.135986328125, 0.0855712890625, 0.1732177734375, 0.107421875, 0.2059326171875, 0.17919921875, 0.040252685546875, 0.17333984375, 0.0897216796875, 0.1754150390625, 0.1126708984375, 0.183837890625, 0.093505859375, 0.227294921875, 0.0850830078125, 0.03387451171875, 0.1251220703125, 0....
embed
67018536_c0
67018536
prolog
0
Title: Inclusion function in prolog for multisets Problem title: Inclusion function in prolog for multisets Tags: prolog Problem: Inclusion function in prolog for multisets I want to write a prolog program that checks if a list is included in other list. Multiple elements matter This is what I wrote but it fails for th...
Inclusion function in prolog for multisets Inclusion function in prolog for multisets prolog Inclusion Set Set2 Inclusion function in prolog for multisets I want to write a prolog program that checks if a list is included in other list. Multiple elements matter This is what I wrote but it fails for the input - inclusio...
[ -0.006103515625, 0.027099609375, 0.01007080078125, 0.03271484375, -0.021240234375, 0.002960205078125, -0.0020599365234375, -0.00421142578125, 0.017578125, -0.01373291015625, 0.01239013671875, 0.022216796875, -0.0224609375, -0.0091552734375, 0.0137939453125, 0.0118408203125, -0.002410...
[ 360, 67158, 191, 32354, 502, 4867, 100, 6024, 3509, 23, 19943, 304, 33022, 1528, 12765, 2174, 5303, 99201, 3789, 19335, 8705, 80854, 26866, 54397, 35782, 107730, 190440, 275, 71, 30646, 29568, 27781, 104, 98320, 18151, 62775, 5117, 12830, 1...
[ 0.0606689453125, 0.197021484375, 0.07745361328125, 0.1488037109375, 0.13916015625, 0.203125, 0.010467529296875, 0.1268310546875, 0.2149658203125, 0.09521484375, 0.188720703125, 0.07275390625, 0.044677734375, 0.1014404296875, 0.135009765625, 0.075439453125, 0.1373291015625, 0.182983...
embed
62329257_c1
62329257
prolog
1
[] true What i would like to do is to evaluate Term. I tried to make it work using the is/2 and the call predicates but it doesn't seem to work. using call(Term) (i added in the tail of the main), i had this error : Sandbox restriction! Could not derive which predicate may be called from call(C) main(json([facts=['sic...
[] true What i would like to do is to evaluate Term. I tried to make it work using the is/2 and the call predicates but it doesn't seem to work. using call(Term) (i added in the tail of the main), i had this error : Sandbox restriction! Could not derive which predicate may be called from call(C) main(json([facts=['sic...
[ 0.00787353515625, 0.024169921875, 0.01434326171875, 0.0361328125, -0.01287841796875, 0.007415771484375, 0.03271484375, 0.01434326171875, -0.01239013671875, -0.052734375, 0.01214599609375, 0.01483154296875, -0.0206298828125, -0.00185394287109375, 0.00927734375, -0.0189208984375, 0.014...
[ 29568, 2806, 1884, 54, 151575, 13, 2994, 39, 37842, 4488, 83, 12477, 11782, 1653, 2063, 1636, 35484, 49814, 46741, 5201, 18499, 13552, 11728, 185190, 5844, 67, 1543, 35839, 441, 170, 1681, 114700, 41113, 191712, 13348, 549, 329, 289, 16466,...
[ 0.061370849609375, 0.00372314453125, 0.0704345703125, 0.0153656005859375, 0.206298828125, 0.08795166015625, 0.203857421875, 0.144775390625, 0.000274658203125, 0.044158935546875, 0.111572265625, 0.161865234375, 0.1607666015625, 0.127197265625, 0.1669921875, 0.021942138671875, 0.184204...
embed
63518930_c0
63518930
prolog
0
Title: Append the result from operation on list elements in Prolog Problem title: Append the result from operation on list elements in Prolog Tags: prolog Problem: Append the result from operation on list elements in Prolog I am stuck on this problem for a while now. Suppose I have some facts like so: function([1,2,3],...
Append the result from operation on list elements in Prolog Append the result from operation on list elements in Prolog prolog operation Append Prolog List Result Rest Letter Append the result from operation on list elements in Prolog I am stuck on this problem for a while now. Suppose I have some facts like so: And I ...
[ 0.01171875, 0.0022430419921875, 0.0103759765625, -0.0126953125, -0.002899169921875, 0.00604248046875, 0.000453948974609375, 0.017578125, 0.018798828125, -0.015380859375, 0.01214599609375, -0.007476806640625, -0.017578125, 0.0034942626953125, 0.01007080078125, -0.00628662109375, 0.011...
[ 5659, 3611, 16750, 1295, 41018, 98, 5303, 80854, 1250, 4867, 502, 32036, 126684, 49756, 105451, 179933, 2967, 12960, 121691, 15824, 3444, 33022, 1653, 2063, 1884, 221, 831, 27198, 111, 133063, 96386, 617, 104629, 3934, 284, 571, 11249, 4527, ...
[ 0.1156005859375, 0.0888671875, 0.185791015625, 0.10406494140625, 0.1861572265625, 0.09136962890625, 0.1800537109375, 0.131591796875, 0.168212890625, 0.247314453125, 0.1304931640625, 0.159423828125, 0.196533203125, 0.1220703125, 0.1143798828125, 0.0799560546875, 0.0703125, 0.0251007...
embed
57289046_c0
57289046
prolog
0
Title: &quot;Going back&quot; in a SLD tree in Prolog Problem title: &quot;Going back&quot; in a SLD tree in Prolog Tags: prolog Problem: "Going back" in a SLD tree in Prolog I have created a simple Prolog program and I'm trying to figure our what is the derivation / SLD tree. a(X) :- b(X), c(X). b(Y) :- d(Y), e(Y). c(...
&quot;Going back&quot; in a SLD tree in Prolog &quot;Going back&quot; in a SLD tree in Prolog prolog Going SLD Prolog "Going back" in a SLD tree in Prolog I have created a simple Prolog program and I'm trying to figure our what is the derivation / SLD tree. Below is my failed try. This representation does not make too ...
[ 0.02685546875, 0.03125, 0.006744384765625, 0.024658203125, -0.01153564453125, -0.01080322265625, -0.017822265625, -0.025634765625, -0.0118408203125, -0.0279541015625, 0.0091552734375, 0.00518798828125, -0.0142822265625, -0.00567626953125, 0.0234375, -0.00714111328125, -0.000556945800...
[ 17903, 214, 4420, 41502, 159, 30693, 53201, 1250, 4867, 23, 502, 2016, 75935, 8781, 1528, 26366, 30057, 1363, 165523, 9790, 18811, 10422, 33636, 149307, 17721, 69236, 28, 27750, 14858, 65771, 70731, 501, 425, 5117, 27117, 26548, 10336, 121303...
[ 0.124267578125, 0.1302490234375, 0.262939453125, 0.018951416015625, 0.090087890625, 0.234130859375, 0.259765625, 0.1365966796875, 0.2275390625, 0.0499267578125, 0.0755615234375, 0.108154296875, 0.00390625, 0.0255126953125, 0.116943359375, 0.0865478515625, 0.1837158203125, 0.0609130...
embed
13731995_c0
13731995
prolog
0
Title: adding element into the List with prolog Problem title: adding element into the List with prolog Tags: prolog Problem: adding element into the List with prolog I got a problem with this I want to make a list of target position like if I type ?- extractIndices([5,6,7,8,9,5,6],6,List). it should return List = [1,6...
adding element into the List with prolog adding element into the List with prolog prolog List Item Index Indecis Tail Index1 _G2870 adding element into the List with prolog I got a problem with this I want to make a list of target position like if I type it should return which gives all position of 6 in that list. I wr...
[ 0.003662109375, 0.00811767578125, 0.026123046875, -0.004913330078125, -0.01025390625, 0.00897216796875, -0.0191650390625, 0.00125885009765625, 0.0196533203125, -0.0264892578125, 0.029296875, -0.03662109375, -0.00921630859375, 0.0164794921875, 0.01324462890625, -0.00665283203125, 0.02...
[ 154107, 12830, 3934, 32036, 678, 502, 4867, 78426, 31471, 102627, 10794, 1218, 379, 3882, 5757, 2967, 3444, 3249, 5303, 30388, 19069, 10644, 30646, 76199, 756, 305, 54397, 18151, 1884, 903, 228221, 4358, 30022 ]
[ 0.1207275390625, 0.1729736328125, 0.126708984375, 0.1790771484375, 0.066650390625, 0.1531982421875, 0.239013671875, 0.1134033203125, 0.1561279296875, 0.091796875, 0.144287109375, 0.08026123046875, 0.06878662109375, 0.063720703125, 0.08984375, 0.0855712890625, 0.0318603515625, 0.011...
embed
37330609_c0
37330609
prolog
0
Title: prolog matrix treating column Problem title: prolog matrix treating column Tags: matrix, prolog, row, sublist Problem: prolog matrix treating column I'm working with matrix where each sublist is a row: Matrix =[[-,-,-,-,a,-], [-,-,-,-,b,-], [-,-,-,-,a,-], [-,-,-,-,d,a], [-,-,-,-,a,a], [-,-,a,a,a,a], [-,-,-,-,d,a...
prolog matrix treating column prolog matrix treating column matrix prolog row sublist Matrix prolog matrix treating column I'm working with matrix where each sublist is a row: My goal is to find if there are four consecutive positions in a sublist with the same character that sent. Must return true when a sublist four ...
[ -0.002349853515625, 0.0023956298828125, 0.0224609375, -0.00238037109375, -0.00347900390625, -0.02490234375, 0.00482177734375, 0.0294189453125, 0.0189208984375, 0.000713348388671875, 0.006561279296875, 0.00927734375, -0.0079345703125, 0.0052490234375, -0.03759765625, 0.0019989013671875,...
[ 502, 4867, 50944, 85689, 3365, 316, 15555, 1614, 6562, 194234, 20697, 425, 69236, 7413, 2174, 22759, 148390, 19069, 5701, 62816, 9325, 74275, 30646, 29568, 80854, 65970, 88949, 959, 14037 ]
[ 0.1236572265625, 0.1982421875, 0.1578369140625, 0.14599609375, 0.1185302734375, 0.149169921875, 0.1341552734375, 0.1834716796875, 0.193115234375, 0.1685791015625, 0.034759521484375, 0.032440185546875, 0.106201171875, 0.0888671875, 0.007476806640625, 0.169921875, 0.176025390625, 0.1...
embed
16395014_c0
16395014
prolog
0
Title: How to define a variable domain to be non-continuous range Problem title: How to define a variable domain to be non-continuous range Tags: clpfd, prolog, sicstus-prolog, constraint-programming Problem: How to define a variable domain to be non-continuous range I'm starting with SICStus Prolog and I would like to...
How to define a variable domain to be non-continuous range How to define a variable domain to be non-continuous range clpfd prolog sicstus-prolog constraint-programming How StartingTimes fd_sets How to define a variable domain to be non-continuous range I'm starting with SICStus Prolog and I would like to define a vari...
[ -0.00170135498046875, 0.0125732421875, 0.003448486328125, -0.00823974609375, -0.00909423828125, 0.0159912109375, -0.00823974609375, -0.005859375, -0.00469970703125, -0.04443359375, 0.000583648681640625, 0.004364013671875, -0.0006866455078125, 0.0157470703125, 0.0096435546875, 0.0011520...
[ 11249, 61924, 77336, 77758, 47, 186, 351, 133891, 10821, 37457, 71, 502, 4867, 26536, 18253, 3454, 2816, 28966, 13794, 214, 70059, 3509, 10, 9, 72134, 159, 102198, 2143, 1250, 1884, 765, 5303, 190, 209, 54, 189026, 8781, 454, 16940, 23009...
[ 0.024810791015625, 0.2186279296875, 0.2802734375, 0.247802734375, 0.0693359375, 0.072021484375, 0.191650390625, 0.1488037109375, 0.09759521484375, 0.2108154296875, 0.045745849609375, 0.0794677734375, 0.2081298828125, 0.041290283203125, 0.1729736328125, 0.043365478515625, 0.0861816406...
embed
29620463_c1
29620463
prolog
1
write("Zodiac sign is " , Sign),nl. find_sign(d(Day,Mon,Year)) :- zodiac_month(Sign,da(Day1,Mon1),da(_,_)), Mon1 = Mon, Day >= Day1, write("Zodiac Sign is " ,Sign),nl. find_sign(d(Day,Mon,Year)) :- write("Incorrect Date specified"). when i run this code in prolog/flex it is giving the following error: ERROR: d:/zodiac...
write("Zodiac sign is " , Sign),nl. find_sign(d(Day,Mon,Year)) :- zodiac_month(Sign,da(Day1,Mon1),da(_,_)), Mon1 = Mon, Day >= Day1, write("Zodiac Sign is " ,Sign),nl. find_sign(d(Day,Mon,Year)) :- write("Incorrect Date specified"). when i run this code in prolog/flex it is giving the following error: ERROR: d:/zodiac...
[ -0.00531005859375, 0.00154876708984375, -0.009765625, 0.0174560546875, -0.015380859375, 0.00909423828125, -0.00872802734375, 0.012451171875, -0.01123046875, 0.00909423828125, 0.0034637451171875, -0.0274658203125, 0.0167236328125, -0.01470947265625, 0.005340576171875, 0.00872802734375, ...
[ 33022, 60551, 3390, 238, 24092, 83, 48838, 13169, 7413, 31304, 71, 97141, 46674, 69085, 147, 1602, 15477, 127, 218723, 85, 418, 17727, 7465, 10013, 977, 32399, 25512, 58735, 11675, 903, 18151, 502, 4867, 44289, 25632, 18499, 151206, 104, 61...
[ 0.1048583984375, 0.1510009765625, 0.189697265625, 0.1104736328125, 0.21923828125, 0.155029296875, 0.2171630859375, 0.03564453125, 0.1146240234375, 0.1966552734375, 0.05572509765625, 0.1400146484375, 0.110107421875, 0.09283447265625, 0.0848388671875, 0.14208984375, 0.1060791015625, ...
embed
50918383_c0
50918383
prolog
0
Title: Replacing nth substring occurrence from a String in Prolog Problem title: Replacing nth substring occurrence from a String in Prolog Tags: swi-prolog, prolog Problem: Replacing nth substring occurrence from a String in Prolog Im trying to make a predicate that replaces the nth substring occurrence from a String ...
Replacing nth substring occurrence from a String in Prolog Replacing nth substring occurrence from a String in Prolog swi-prolog prolog a Replacing Prolog replace_word Result Old Orig Replaced atomic_list_concat Split Replacing nth substring occurrence from a String in Prolog Im trying to make a predicate that replaces...
[ -0.0169677734375, -0.00092315673828125, 0.006805419921875, 0.0262451171875, -0.01220703125, 0.009033203125, -0.00994873046875, -0.0000934600830078125, 0.00433349609375, -0.016845703125, 0.0147705078125, -0.00946044921875, -0.008056640625, -0.00885009765625, 0.002227783203125, -0.003479...
[ 853, 133266, 653, 927, 1614, 91693, 74918, 42, 1295, 23351, 214, 1250, 4867, 2452, 3454, 502, 91995, 47416, 126684, 25074, 199858, 23935, 34627, 6562, 4460, 46474, 23, 31577, 1653, 2063, 11782, 169, 1542, 34034, 32189, 116, 97, 30563, 37842...
[ 0.041656494140625, 0.135986328125, 0.193603515625, 0.17138671875, 0.1888427734375, 0.23583984375, 0.1246337890625, 0.06317138671875, 0.052642822265625, 0.1820068359375, 0.057891845703125, 0.1549072265625, 0.2257080078125, 0.1329345703125, 0.1109619140625, 0.10986328125, 0.19311523437...
embed
42748320_c1
42748320
prolog
1
V1, V2, V3). So I have asked for the solution of a crossword puzzle. The result I get is like that: H1 = word(_720, _722, _724, _726, _728, _730, _732, _734), H2 = word(_738, _740, _742, _744, _746, _748, _750, _752), H3 = word(_756, _758, _760, _762, _764, _766, _768, _770), V1 = word(_774, _776, _724, _780, _742, _7...
V1, V2, V3). So I have asked for the solution of a crossword puzzle. The result I get is like that: H1 = word(_720, _722, _724, _726, _728, _730, _732, _734), H2 = word(_738, _740, _742, _744, _746, _748, _750, _752), H3 = word(_756, _758, _760, _762, _764, _766, _768, _770), V1 = word(_774, _776, _724, _780, _742, _7...
[ 0.01446533203125, -0.000518798828125, 0.00787353515625, 0.00653076171875, -0.017333984375, 0.00193023681640625, -0.020263671875, -0.01141357421875, -0.003997802734375, -0.0123291015625, 0.00335693359375, 0.002288818359375, 0.02099609375, 0.00067138671875, -0.00982666015625, 0.003585815...
[ 310, 418, 304, 21320, 1061, 37170, 70, 29806, 41421, 47416, 104192, 16750, 2046, 1884, 450, 572, 2203, 2565, 132, 114988, 191539, 966, 2357, 4046, 4, 3882, 1197, 13574, 189982, 247, 206007, 117525, 184376, 195953, 9271, 9285, 58087, 69622, ...
[ 0.2052001953125, 0.1605224609375, 0.1934814453125, 0.2423095703125, 0.0013427734375, 0.051422119140625, 0.00018310546875, 0.1903076171875, 0.1148681640625, 0.1959228515625, 0.1944580078125, 0.07757568359375, 0.0256500244140625, 0.055419921875, 0.006134033203125, 0.1715087890625, 0.08...
embed
35883578_c0
35883578
prolog
0
Title: Writing a Prolog predicate to supply default parameters to another predicate Problem title: Writing a Prolog predicate to supply default parameters to another predicate Tags: optional-parameters, default-parameters, prolog Problem: Writing a Prolog predicate to supply default parameters to another predicate I'm ...
Writing a Prolog predicate to supply default parameters to another predicate Writing a Prolog predicate to supply default parameters to another predicate optional-parameters default-parameters prolog Writing Prolog Length Length1 Length2 Path Writing a Prolog predicate to supply default parameters to another predicate ...
[ 0.007568359375, 0.03759765625, -0.0023956298828125, 0.01312255859375, -0.005096435546875, 0.00201416015625, -0.02197265625, -0.0264892578125, 0.01361083984375, -0.033935546875, 0.000885009765625, -0.0087890625, -0.01104736328125, 0.013671875, 0.0033111572265625, 0.004791259765625, 0....
[ 213185, 1250, 4867, 1653, 2063, 67, 47, 100677, 114977, 171859, 7, 15700, 35829, 289, 6276, 29089, 502, 77554, 304, 108421, 52080, 134629, 57143, 41382, 18151, 4527, 903, 11782, 33306, 1884, 16610, 33, 442, 12, 831, 4488 ]
[ 0.16162109375, 0.1827392578125, 0.251708984375, 0.1640625, 0.2174072265625, 0.0731201171875, 0.0894775390625, 0.188720703125, 0.2734375, 0.2178955078125, 0.025421142578125, 0.087890625, 0.1307373046875, 0.0445556640625, 0.060577392578125, 0.0902099609375, 0.115966796875, 0.03933715...
embed
30898041_c0
30898041
prolog
0
Title: Why are round brackets not needed for atoms that are high priority operators? Problem title: Why are round brackets not needed for atoms that are high priority operators? Tags: iso-prolog, operators, prolog, syntax Problem: Why are round brackets not needed for atoms that are high priority operators? In older te...
Why are round brackets not needed for atoms that are high priority operators? Why are round brackets not needed for atoms that are high priority operators? iso-prolog operators prolog syntax Why Why are round brackets not needed for atoms that are high priority operators? In older textbooks 1 one frequently encounters ...
[ -0.005767822265625, -0.00139617919921875, 0.00013065338134765625, 0.00799560546875, 0.0126953125, -0.00323486328125, 0.01141357421875, -0.004791259765625, 0.00185394287109375, 0.0308837890625, 0.01025390625, -0.02099609375, -0.01226806640625, -0.006561279296875, 0.01324462890625, -0.00...
[ 44084, 621, 68807, 1620, 27853, 7, 959, 44841, 100, 34627, 11192, 25343, 39933, 13882, 3454, 4867, 502, 6002, 86531, 114210, 7986, 81415, 195409, 190647, 21635, 32255, 11814, 63559, 18925, 110, 51713, 5570, 11757, 20744, 150922, 98501, 11183, ...
[ 0.1163330078125, 0.037567138671875, 0.217529296875, 0.212158203125, 0.2237548828125, 0.0699462890625, 0.1307373046875, 0.1717529296875, 0.0265045166015625, 0.184326171875, 0.0830078125, 0.1568603515625, 0.209716796875, 0.10528564453125, 0.09423828125, 0.1650390625, 0.093994140625, ...
embed
68596288_c0
68596288
prolog
0
Title: Error org.jpl7.JPLException: unsupported blob type passed from Prolog Problem title: Error org.jpl7.JPLException: unsupported blob type passed from Prolog Tags: java, prolog Problem: Error org.jpl7.JPLException: unsupported blob type passed from Prolog Im using java 1.8 with javalin, I'm trying to execute a quer...
Error org.jpl7.JPLException: unsupported blob type passed from Prolog Error org.jpl7.JPLException: unsupported blob type passed from Prolog java prolog org.jpl7.JPLException Prolog Error Query Term Atom prolog-app.pl Error org.jpl7.JPLException: unsupported blob type passed from Prolog Im using java 1.8 with javalin, I...
[ 0.0223388671875, 0.036865234375, -0.008056640625, 0.009521484375, -0.0181884765625, 0.01116943359375, -0.004486083984375, -0.00848388671875, -0.005401611328125, -0.039306640625, -0.0008392333984375, -0.02001953125, 0.0031890869140625, -0.004058837890625, 0.00909423828125, 0.00689697265...
[ 212059, 30910, 170, 2424, 966, 1375, 103084, 63928, 51, 105363, 29695, 275, 10644, 115081, 1295, 1250, 4867, 79, 330, 502, 425, 58836, 2994, 69728, 9007, 3370, 17368, 79875, 1405, 73, 31577, 71924, 41, 4343, 13452, 53201, 5201, 24071, 46132...
[ 0.12890625, 0.167236328125, 0.0279998779296875, 0.1402587890625, 0.162353515625, 0.0634765625, 0.0654296875, 0.148681640625, 0.08953857421875, 0.2354736328125, 0.1552734375, 0.1444091796875, 0.2022705078125, 0.1434326171875, 0.1165771484375, 0.1441650390625, 0.2320556640625, 0.0854...
embed
74463203_c0
74463203
prolog
0
Title: Worst-case exponential runtime for some special terms Problem title: Worst-case exponential runtime for some special terms Tags: prolog Problem: Worst-case exponential runtime for some special terms This question is based on a relatively recent issue on the Scryer Prolog GitHub page . Consider the following pred...
Worst-case exponential runtime for some special terms Worst-case exponential runtime for some special terms prolog Worst-case term_variables Worst-case exponential runtime for some special terms This question is based on a relatively recent issue on the Scryer Prolog GitHub page . Consider the following predicate: Usin...
[ 0.0238037109375, 0.0087890625, -0.0184326171875, -0.0026397705078125, -0.007476806640625, 0.02099609375, -0.006622314453125, -0.002227783203125, 0.031494140625, -0.0478515625, 0.022216796875, 0.01708984375, -0.0031585693359375, 0.0106201171875, 0.0174560546875, 0.01904296875, 0.03735...
[ 145062, 271, 58437, 78643, 80973, 11675, 6032, 3060, 5361, 69407, 502, 4867, 13579, 21690, 19736, 38213, 8889, 1250, 217, 140505, 1653, 2063, 345, 62600, 11583, 831, 72546, 2046, 7, 29367, 1360, 33636, 192617, 32628, 61585, 136, 164, 12477, ...
[ 0.1695556640625, 0.1226806640625, 0.19970703125, 0.165283203125, 0.061126708984375, 0.130859375, 0.1505126953125, 0.0285491943359375, 0.156005859375, 0.2139892578125, 0.13525390625, 0.20166015625, 0.2139892578125, 0.1932373046875, 0.1490478515625, 0.125, 0.19677734375, 0.1026611328...
embed
24306166_c1
24306166
prolog
1
202). borrowed_id(222, 1332). borrowed_id(555, 4556). book_out(333,11_06_2014). book_out(222,15_06_2014). book_out(555,17_06_2014). book_in(333, 19_06_2014). book_in(222, 26_07_2014). book_in(555, 01_07_2014). due_date(D) :- book_in(N, D1), D @< D1. What I want to be able to do is to determine which books are on loan a...
202). borrowed_id(222, 1332). borrowed_id(555, 4556). book_out(333,11_06_2014). book_out(222,15_06_2014). book_out(555,17_06_2014). book_in(333, 19_06_2014). book_in(222, 26_07_2014). book_in(555, 01_07_2014). due_date(D) :- book_in(N, D1), D @< D1. What I want to be able to do is to determine which books are on loan a...
[ 0.02294921875, -0.0157470703125, 0.000247955322265625, 0.0296630859375, 0.00799560546875, 0.023193359375, -0.0274658203125, 0.00055694580078125, 0.00897216796875, -0.0272216796875, 0.0017242431640625, -0.021484375, -0.007720947265625, -0.00014591217041015625, 0.009521484375, -0.0055236...
[ 111845, 194, 3017, 15555, 297, 532, 132537, 91887, 87357, 2678, 74757, 12877, 6056, 66000, 9016, 7360, 73, 4743, 17489, 397, 391, 17727, 16093, 418, 47, 83324, 3129, 42840, 621, 98, 111628, 136565, 959, 645, 693, 92635, 16981, 1250, 4867, ...
[ 0.185302734375, 0.016845703125, 0.13623046875, 0.1949462890625, 0.1046142578125, 0.06475830078125, 0.1458740234375, 0.0653076171875, 0.0782470703125, 0.00714111328125, 0.051177978515625, 0.1817626953125, 0.1353759765625, 0.1309814453125, 0.041473388671875, 0.13671875, 0.1275634765625...
embed
2485711_c0
2485711
prolog
0
Title: PROLOG all different Problem title: PROLOG all different Tags: clpfd, prolog Problem: PROLOG all different I have a very weird problem with PROLOG. I have used it before, but it's been a while and I'm rusty. I have a list of variables and I need to ensure that none of them are the same. I have tried: use_module(...
PROLOG all different PROLOG all different clpfd prolog PROLOG use_module all_different PROLOG all different I have a very weird problem with PROLOG. I have used it before, but it's been a while and I'm rusty. I have a list of variables and I need to ensure that none of them are the same. I have tried: use_module(librar...
[ -0.00165557861328125, -0.0026397705078125, 0.00537109375, 0.01953125, -0.01611328125, 0.00787353515625, -0.01300048828125, 0.00125885009765625, 0.01611328125, -0.033203125, 0.001312255859375, -0.020751953125, 0.01806640625, 0.0264892578125, 0.00494384765625, 0.0020751953125, -0.00848...
[ 10514, 47510, 756, 12921, 71, 502, 4867, 4527, 83279, 238778, 4552, 179459, 2967, 11814, 12960, 52648, 53, 5303, 77336, 63284, 351, 13, 111, 2856, 621, 5701, 37842, 150, 2844, 1294, 99091, 284, 335, 391, 305, 382, 9790, 18499, 20155, 83, ...
[ 0.18896484375, 0.2548828125, 0.1878662109375, 0.296630859375, 0.06121826171875, 0.10888671875, 0.1817626953125, 0.10394287109375, 0.14013671875, 0.31103515625, 0.016876220703125, 0.0845947265625, 0.09130859375, 0.04107666015625, 0.003570556640625, 0.003021240234375, 0.0343017578125, ...
embed
59887634_c1
59887634
prolog
1
do know what I'm trying to do. I'm trying to utilize the addBook() function/predicate to create 5 different books, and store them in a books variable. After that, I'm also trying to experiment with checking if said list has books where the Author is Author 1 , or the year being 2011 . I'm going to guess this isn't rea...
do know what I'm trying to do. I'm trying to utilize the addBook() function/predicate to create 5 different books, and store them in a books variable. After that, I'm also trying to experiment with checking if said list has books where the Author is Author 1 , or the year being 2011 . I'm going to guess this isn't rea...
[ -0.001068115234375, -0.00848388671875, 0.00970458984375, -0.0035552978515625, -0.0181884765625, 0.0164794921875, 0.0093994140625, -0.005279541015625, 0.0230712890625, -0.033935546875, 0.01153564453125, -0.0169677734375, -0.00135040283203125, 0.0021514892578125, 0.0225830078125, -0.0139...
[ 54, 3714, 31577, 121876, 15190, 37975, 132, 32354, 19714, 2063, 28282, 190, 12921, 42840, 4343, 2856, 23, 77336, 28007, 175199, 2174, 5303, 1556, 61804, 83, 106, 6602, 8035, 1392, 57767, 6183, 20594, 756, 41206, 18499, 4205, 26008, 2016, 28...
[ 0.009613037109375, 0.105712890625, 0.123291015625, 0.0643310546875, 0.161865234375, 0.249755859375, 0.0450439453125, 0.133056640625, 0.141357421875, 0.1849365234375, 0.1142578125, 0.1357421875, 0.133056640625, 0.211181640625, 0.133544921875, 0.007293701171875, 0.018218994140625, 0....
embed
15034925_c0
15034925
prolog
0
Title: Decision tree evaluation using Prolog Problem title: Decision tree evaluation using Prolog Tags: prolog Problem: Decision tree evaluation using Prolog To represent the function f(x) = if x < -2 then -1 else if x > 2 then +1 else 0 The decision tree is represented as [-1, [lt, -2], [1, [gt, 2], 0] ] Similarly, to...
Decision tree evaluation using Prolog Decision tree evaluation using Prolog prolog Prolog Decision Decision tree evaluation using Prolog To represent the function The decision tree is represented as Similarly, to represent the function we use the tree: How do I write Prolog code for the evaluate( DT, X, Y ) predicate t...
[ 0.043212890625, 0.010986328125, 0.004150390625, 0.006622314453125, 0.0184326171875, 0.02294921875, 0.00439453125, -0.005706787109375, -0.00494384765625, -0.00616455078125, -0.0208740234375, -0.01141357421875, -0.004364013671875, -0.00457763671875, 0.014892578125, -0.0108642578125, 0....
[ 49132, 6889, 53201, 219836, 17368, 1250, 4867, 502, 33636, 32354, 51957, 297, 237, 209683, 4527, 11249, 33022, 18151, 151575, 13, 41072, 1193, 990, 1653, 2063, 67, 16401, 2174, 83, 34292, 113054, 98, 947, 33209, 107730, 140992, 28960 ]
[ 0.177001953125, 0.07989501953125, 0.251708984375, 0.1871337890625, 0.049560546875, 0.1673583984375, 0.239990234375, 0.102294921875, 0.197265625, 0.1546630859375, 0.199951171875, 0.0625, 0.06439208984375, 0.011810302734375, 0.0843505859375, 0.01043701171875, 0.0968017578125, 0.16271...
embed
17219788_c0
17219788
prolog
0
Title: Adding atoms to lists prolog Problem title: Adding atoms to lists prolog Tags: prolog Problem: Adding atoms to lists prolog I am fairly new to Prolog and I am trying to get my head around the concept of lists. An example that I am trying is: value(a, 1). value(b, 2). value(a, 3). value(a, 4). value(c, 3). I am t...
Adding atoms to lists prolog Adding atoms to lists prolog prolog Adding List Rest Head Adding atoms to lists prolog I am fairly new to Prolog and I am trying to get my head around the concept of lists. An example that I am trying is: I am trying to create a predicate which when queried find(a, List) results in: List = ...
[ 0.00933837890625, 0.0009613037109375, 0.01416015625, 0.00090789794921875, -0.019287109375, 0.0172119140625, -0.01513671875, 0.01904296875, 0.01129150390625, -0.044677734375, 0.0140380859375, 0.005157470703125, -0.008544921875, -0.01287841796875, 0.0087890625, -0.00011777877807617188, ...
[ 62, 59725, 34627, 7, 47, 5303, 502, 4867, 32036, 49756, 44816, 180663, 3525, 1250, 10336, 23755, 27781, 31577, 28282, 1653, 2063, 41, 46572, 7413, 11, 50339, 23, 2203, 68252, 138, 201, 42856, 645, 756, 15824, 15190, 14858, 214, 37842, 188...
[ 0.0819091796875, 0.0791015625, 0.220703125, 0.059112548828125, 0.0904541015625, 0.21728515625, 0.1279296875, 0.2076416015625, 0.20166015625, 0.15625, 0.154541015625, 0.003814697265625, 0.000244140625, 0.1221923828125, 0.0258941650390625, 0.046783447265625, 0.1170654296875, 0.067687...
embed
40821462_c2
40821462
prolog
2
as_polynomial(X, poly(Gs)), compress_polynomial([G| Gs], C), !. as_polynomial(X, poly([X])) :- is_monomial(X), !. as_polynomial(X, poly([Q])) :- as_monomial(X, Q), !. compress_polynomial([], []) :- !. compress_polynomial([X| Xs], A2) :- compress_polynomial(Xs, A), compress_polynomial2(X, A, A2), !. compress_polynomial...
as_polynomial(X, poly(Gs)), compress_polynomial([G| Gs], C), !. as_polynomial(X, poly([X])) :- is_monomial(X), !. as_polynomial(X, poly([Q])) :- as_monomial(X, Q), !. compress_polynomial([], []) :- !. compress_polynomial([X| Xs], A2) :- compress_polynomial(Xs, A), compress_polynomial2(X, A, A2), !. compress_polynomial...
[ -0.01458740234375, 0.0126953125, 0.0172119140625, 0.007232666015625, 0.01483154296875, 0.02392578125, 0.021240234375, -0.0186767578125, 0.02197265625, -0.01251220703125, 0.01409912109375, 0.013916015625, -0.0025177001953125, 0.011474609375, -0.033935546875, 0.0034942626953125, -0.008...
[ 237, 454, 135545, 1687, 15403, 1542, 4, 35874, 724, 7, 247, 375, 11856, 58745, 527, 313, 711, 5, 15772, 83, 64176, 266, 289, 2737, 2396, 1193, 62, 10461, 304, 39, 990, 567, 997, 17727, 1723, 28864, 26073, 12, 44084, 1250, 4867, 3323, ...
[ 0.17578125, 0.025482177734375, 0.1932373046875, 0.1776123046875, 0.188232421875, 0.1453857421875, 0.0233154296875, 0.24755859375, 0.0841064453125, 0.0546875, 0.055908203125, 0.1190185546875, 0.2152099609375, 0.034576416015625, 0.047515869140625, 0.047088623046875, 0.077392578125, 0...
embed
30575615_c0
30575615
prolog
0
Title: Split list in prolog, produce two separate lists Problem title: Split list in prolog, produce two separate lists Tags: prolog, list Problem: Split list in prolog, produce two separate lists The Question: Define a predicate split/4 which, when provided with a list L and integer N returns two lists, A and B, where...
Split list in prolog, produce two separate lists Split list in prolog, produce two separate lists prolog list Split Split list in prolog, produce two separate lists The Question: Sample query with expected result: My code: Rather than producing A and B as required, my code simply returns false . I'm not sure why.
[ -0.0084228515625, 0.010986328125, -0.000919342041015625, -0.001708984375, -0.037353515625, 0.017333984375, -0.005279541015625, 0.01171875, 0.020751953125, 0.0247802734375, 0.021240234375, 0.010498046875, -0.013916015625, 0.00799560546875, 0.01458740234375, -0.00038909912109375, 0.022...
[ 46474, 5303, 23, 502, 4867, 27489, 6626, 84797, 68185, 947, 33209, 41, 1294, 84751, 16750, 18151, 27024, 62, 136, 335, 56065, 759, 42856, 30646, 98320, 15400 ]
[ 0.2366943359375, 0.2249755859375, 0.016265869140625, 0.14306640625, 0.207763671875, 0.1507568359375, 0.1328125, 0.1383056640625, 0.03564453125, 0.0211029052734375, 0.1297607421875, 0.07403564453125, 0.05291748046875, 0.1016845703125, 0.030792236328125, 0.12310791015625, 0.11322021484...
embed
41796873_c0
41796873
prolog
0
Title: Two different paths from X to Y in a graph Problem title: Two different paths from X to Y in a graph Tags: prolog-dif, prolog, graph-theory Problem: Two different paths from X to Y in a graph I am stuck with the following Prolog question: Given the edges of a graph with no cycles as facts. e.g: edge(a, b). edge(...
Two different paths from X to Y in a graph Two different paths from X to Y in a graph prolog-dif prolog graph-theory X Two two_paths Two different paths from X to Y in a graph I am stuck with the following Prolog question: Given the edges of a graph with no cycles as facts. e.g: I have to write a predicate that tests w...
[ 0.0186767578125, -0.00188446044921875, 0.006805419921875, 0.0198974609375, 0.0004634857177734375, 0.0185546875, -0.0167236328125, -0.0004520416259765625, 0.026123046875, -0.03125, 0.011474609375, -0.009521484375, 0.006378173828125, 0.0162353515625, 0.00970458984375, 0.029052734375, 0...
[ 32964, 12921, 60875, 7, 1295, 1193, 47, 990, 23, 41382, 502, 4867, 428, 420, 2347, 6626, 128405, 179933, 1250, 9655, 121303, 110, 105823, 15824, 33022, 1653, 2063, 109921, 36766, 2685, 17721, 95378, 5170, 136, 11782, 11, 501, 30646, 29568, ...
[ 0.1719970703125, 0.19189453125, 0.23095703125, 0.0924072265625, 0.118408203125, 0.126953125, 0.1551513671875, 0.1658935546875, 0.0487060546875, 0.1905517578125, 0.07366943359375, 0.1458740234375, 0.016448974609375, 0.07891845703125, 0.017303466796875, 0.197998046875, 0.227294921875, ...
embed
23473155_c0
23473155
prolog
0
Title: Prolog members of lists Problem title: Prolog members of lists Tags: prolog Problem: Prolog members of lists Prolog newbie here who would like to know why these rules cannot stand on their own if I want to find out if something is the member of a list. member(X, [X|_]). member(X, [_|Y]) :- member(X,Y). If I ask ...
Prolog members of lists Prolog members of lists prolog Prolog Prolog members of lists Prolog newbie here who would like to know why these rules cannot stand on their own if I want to find out if something is the member of a list. If I ask the following for the above rules: I get true, however if I remove: Just leaving ...
[ 0.0177001953125, 0.01531982421875, 0.0211181640625, 0.0167236328125, -0.01904296875, 0.0242919921875, 0.0015716552734375, 0.01165771484375, 0.0047607421875, -0.0341796875, 0.0147705078125, -0.0157470703125, 0.01226806640625, 0.00946044921875, 0.0185546875, -0.004302978515625, 0.00469...
[ 1250, 4867, 43032, 111, 5303, 502, 9014, 15400, 91736, 53418, 9157, 10002, 7413, 1810, 2174, 83, 32786, 26458, 36917, 29568, 87388, 137802, 17932, 79986, 98320, 44084, 117249, 1542, 1193, 46741, 110641, 831, 75447, 14192, 3229, 10336 ]
[ 0.1353759765625, 0.2076416015625, 0.1710205078125, 0.0849609375, 0.1953125, 0.0792236328125, 0.0435791015625, 0.07598876953125, 0.16796875, 0.1497802734375, 0.1312255859375, 0.134521484375, 0.06195068359375, 0.06451416015625, 0.049041748046875, 0.0217132568359375, 0.2017822265625, ...
embed
4721958_c0
4721958
prolog
0
Title: map function in Erlang Problem title: map function in Erlang Tags: list, prolog, lambda, functional-programming, erlang Problem: map function in Erlang In addition to having the map function available with many arities (up to 4), Prolog allows you (under certain circumstances) to map a multiple arity function on...
map function in Erlang map function in Erlang list prolog lambda functional-programming erlang Erlang map function in Erlang In addition to having the map function available with many arities (up to 4), Prolog allows you (under certain circumstances) to map a multiple arity function onto a single list. Say you want to ...
[ 0.015869140625, 0.006011962890625, 0.0223388671875, -0.010009765625, -0.03076171875, 0.004608154296875, 0.00457763671875, 0.01806640625, 0.0036773681640625, -0.037109375, 0.00064849853515625, -0.0196533203125, -0.01141357421875, 0.0111083984375, 0.01611328125, 0.0032501220703125, -0....
[ 22288, 32354, 1004, 3066, 23, 5303, 502, 4867, 6492, 85, 123309, 28966, 72, 19882, 678, 5941, 187, 31075, 2037, 13956, 1250, 114864, 47, 48716, 2481, 188, 11001, 3444, 3034, 36766, 425, 83, 32786, 5117, 10750, 99201, 28271, 291, 48398, 98...
[ 0.274169921875, 0.201416015625, 0.1715087890625, 0.288330078125, 0.0330810546875, 0.2017822265625, 0.06427001953125, 0.2225341796875, 0.1131591796875, 0.06890869140625, 0.13037109375, 0.08502197265625, 0.09698486328125, 0.09344482421875, 0.043121337890625, 0.06378173828125, 0.1505126...
embed
49962018_c0
49962018
prolog
0
Title: Analyze rule body in different rule Problem title: Analyze rule body in different rule Tags: reflection, prolog Problem: Analyze rule body in different rule I need to be able to access the body of a rule in a different rule. For example, in the following, I want to be able to use the facts of rule in myRule when...
Analyze rule body in different rule Analyze rule body in different rule reflection prolog Analyze fact1 fact2 fact3 RuleName Analyze rule body in different rule I need to be able to access the body of a rule in a different rule. For example, in the following, I want to be able to use the facts of rule in myRule when I ...
[ 0.03125, 0.0218505859375, 0.005523681640625, 0.04443359375, -0.004547119140625, 0.0189208984375, 0.0004558563232421875, 0.0125732421875, 0.0037994384765625, -0.0299072265625, 0.0021209716796875, 0.0091552734375, -0.0103759765625, -0.0140380859375, 0.015625, -0.004150390625, -0.004364...
[ 33326, 53, 731, 79986, 14361, 23, 12921, 44961, 502, 4867, 15824, 304, 363, 139118, 163612, 3871, 19048, 47, 17203, 111, 25632, 3444, 4527, 7, 759, 26951, 133, 11782, 882, 36917, 18151, 959, 4488, 113292, 6305, 3525, 1250, 62775, 56037, 3...
[ 0.1365966796875, 0.158447265625, 0.0833740234375, 0.2093505859375, 0.224365234375, 0.0936279296875, 0.2010498046875, 0.19140625, 0.10113525390625, 0.1900634765625, 0.1771240234375, 0.011505126953125, 0.08734130859375, 0.1881103515625, 0.13427734375, 0.04779052734375, 0.065185546875, ...
embed
67410250_c0
67410250
prolog
0
Title: Is there a function that checks if a variable is a member of a list without unifying it? Problem title: Is there a function that checks if a variable is a member of a list without unifying it? Tags: prolog Problem: Is there a function that checks if a variable is a member of a list without unifying it? I want to...
Is there a function that checks if a variable is a member of a list without unifying it? Is there a function that checks if a variable is a member of a list without unifying it? prolog Is there a function that checks if a variable is a member of a list without unifying it? I want to implement a predicate in my cod that...
[ -0.01263427734375, 0.00494384765625, 0.01263427734375, -0.0033416748046875, -0.0167236328125, 0.00836181640625, -0.000385284423828125, 0.006500244140625, 0.00016880035400390625, -0.050048828125, 0.016845703125, 0.0027618408203125, 0.01361083984375, -0.01275634765625, 0.0106201171875, 0...
[ 32354, 12765, 7, 2174, 77336, 83, 32786, 111, 5303, 15490, 51, 151138, 442, 502, 4867, 2685, 10, 450, 3444, 29479, 1653, 2063, 67, 27044, 7413, 756, 70541, 12830, 436, 363, 2967, 17368, 4488, 13695, 80854, 96386, 418, 29568, 30646, 87599,...
[ 0.19287109375, 0.20751953125, 0.05474853515625, 0.110595703125, 0.2705078125, 0.09051513671875, 0.2352294921875, 0.073486328125, 0.19091796875, 0.1177978515625, 0.1029052734375, 0.1217041015625, 0.0146484375, 0.0653076171875, 0.135009765625, 0.01971435546875, 0.021026611328125, 0.0...
embed
58330737_c0
58330737
prolog
0
Title: Installing Prolog via Eclipse Problem title: Installing Prolog via Eclipse Tags: installation, homebrew, prolog, swi-prolog, eclipse Problem: Installing Prolog via Eclipse A colleague at university suggested I install swi-Prolog via Eclipse. I wish to install prolog in order to understand some code written in it...
Installing Prolog via Eclipse Installing Prolog via Eclipse installation homebrew prolog swi-prolog eclipse Installing Prolog Eclipse HEAD Installing Prolog via Eclipse A colleague at university suggested I install swi-Prolog via Eclipse. I wish to install prolog in order to understand some code written in it, such as ...
[ 0.02392578125, 0.0164794921875, 0.01519775390625, 0.0147705078125, -0.0233154296875, -0.00421142578125, -0.006927490234375, -0.0026092529296875, -0.00022411346435546875, -0.01495361328125, 0.028564453125, -0.0260009765625, -0.007232666015625, -0.00421142578125, 0.0206298828125, -0.0005...
[ 107951, 1250, 4867, 1829, 234962, 59720, 5368, 143006, 502, 91, 2452, 3454, 106371, 184, 572, 188328, 62975, 11, 6261, 152363, 42459, 20600, 10752, 32599, 28219, 18151, 32102, 148477, 109189, 62600, 47327, 831, 4727, 33949, 678, 2005, 11417, ...
[ 0.191650390625, 0.2115478515625, 0.29150390625, 0.1279296875, 0.244873046875, 0.102294921875, 0.08154296875, 0.2281494140625, 0.1741943359375, 0.03997802734375, 0.21728515625, 0.1593017578125, 0.186767578125, 0.047393798828125, 0.0113525390625, 0.1456298828125, 0.03704833984375, 0....
embed
8290103_c0
8290103
prolog
0
Title: Reading list elements to another list until a special character is encountered Problem title: Reading list elements to another list until a special character is encountered Tags: prolog Problem: Reading list elements to another list until a special character is encountered I'm reading a file containing context f...
Reading list elements to another list until a special character is encountered Reading list elements to another list until a special character is encountered prolog Reading List First Rest Reading list elements to another list until a special character is encountered I'm reading a file containing context free grammar a...
[ 0.0012664794921875, 0.007415771484375, 0.00726318359375, 0.0086669921875, -0.0177001953125, 0.0107421875, -0.00677490234375, 0.0038299560546875, -0.0031585693359375, -0.0081787109375, 0.0225830078125, -0.00665283203125, -0.0002079010009765625, -0.0086669921875, -0.00164794921875, -0.00...
[ 104951, 5303, 80854, 47, 15700, 24189, 5361, 62816, 190647, 502, 4867, 32036, 23972, 49756, 16454, 11435, 43701, 4092, 122092, 147, 1098, 12638, 13315, 12663, 3173, 74, 26950, 3525, 65042, 36663, 2878, 1363, 100, 11907, 242, 297, 16916, 79986...
[ 0.1942138671875, 0.20166015625, 0.1497802734375, 0.06524658203125, 0.054779052734375, 0.0845947265625, 0.1221923828125, 0.1422119140625, 0.18505859375, 0.12890625, 0.183837890625, 0.2042236328125, 0.04931640625, 0.23046875, 0.1458740234375, 0.099365234375, 0.07562255859375, 0.05471...
embed
23491537_c0
23491537
prolog
0
Title: Count the occurence of a string in a string Problem title: Count the occurence of a string in a string Tags: prolog Problem: Count the occurence of a string in a string So I want to give a list of keywords and, whenever a word is encountered in a string, I will increment my counter. So I've been playing around f...
Count the occurence of a string in a string Count the occurence of a string in a string prolog Count ERROR Arguments Title Acc sub_string case_insensitive Acc1 Count the occurence of a string in a string So I want to give a list of keywords and, whenever a word is encountered in a string, I will increment my counter. S...
[ 0.006103515625, 0.00119781494140625, -0.00185394287109375, 0.01104736328125, -0.0019683837890625, 0.0024261474609375, 0.0030364990234375, 0.0128173828125, 0.0198974609375, -0.0234375, -0.00335693359375, 0.00092315673828125, -0.0004863739013671875, 0.0233154296875, 0.03076171875, -0.007...
[ 108210, 70, 74918, 6620, 111, 79315, 23, 502, 4867, 151206, 24638, 112140, 48962, 29899, 1614, 91693, 7225, 73, 176302, 418, 3444, 8337, 5303, 166117, 217684, 2565, 190647, 158661, 105416, 75169, 12960, 4488, 30441, 11675, 9655, 10644, 18499, ...
[ 0.2113037109375, 0.011627197265625, 0.22802734375, 0.1546630859375, 0.0307159423828125, 0.258544921875, 0.079833984375, 0.1370849609375, 0.1514892578125, 0.1402587890625, 0.0902099609375, 0.250244140625, 0.043670654296875, 0.1153564453125, 0.1304931640625, 0.1500244140625, 0.09655761...
embed
61028457_c2
61028457
prolog
2
] ==> [a,b,c,d,e,f,g,h,i,j,k] l [] . done % All 8 tests passed true. Ok, so it works. But: Is it efficient? Why isn't this in library(lists) for example? Maybe it is, possibly some indirect way of doing this? Addendum The predicate is barely legible. How about the tactical use of dicts? split_list(L,N,Elem,Front,Back) ...
] ==> [a,b,c,d,e,f,g,h,i,j,k] l [] . done % All 8 tests passed true. Ok, so it works. But: Is it efficient? Why isn't this in library(lists) for example? Maybe it is, possibly some indirect way of doing this? Addendum The predicate is barely legible. How about the tactical use of dicts? split_list(L,N,Elem,Front,Back) ...
[ -0.006134033203125, 0.01513671875, 0.00225830078125, -0.006256103515625, -0.0230712890625, -0.01177978515625, 0.0035552978515625, 0.01300048828125, 0.0081787109375, -0.0021514892578125, 0.005126953125, 0.002532958984375, -0.015869140625, 0.017578125, 0.00970458984375, 0.003280639648437...
[ 10114, 69112, 2740, 11, 275, 71, 13, 420, 177, 127, 14, 170, 92, 268, 96, 16940, 1745, 3164, 382, 109921, 115081, 29568, 9972, 442, 43240, 4966, 2071, 93766, 44084, 56112, 18, 903, 23, 35773, 1294, 6562, 116361, 20594, 23013, 1653, 2063...
[ 0.007354736328125, 0.0226287841796875, 0.053192138671875, 0.05572509765625, 0.015625, 0.01214599609375, 0.03399658203125, 0.046539306640625, 0.0181427001953125, 0.03662109375, 0.0068359375, 0.074462890625, 0.03436279296875, 0.019561767578125, 0.1287841796875, 0.1512451171875, 0.15270...
embed