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
56138401_c0
56138401
prolog
0
Title: I want to sum in SWI-Prolog depending on certain user answers Problem title: I want to sum in SWI-Prolog depending on certain user answers Tags: prolog Problem: I want to sum in SWI-Prolog depending on certain user answers I need to sum in a variable depending on certain user answers and I'm starting to know Pro...
I want to sum in SWI-Prolog depending on certain user answers I want to sum in SWI-Prolog depending on certain user answers prolog SWI-Prolog You Risk Term Terms I want to sum in SWI-Prolog depending on certain user answers I need to sum in a variable depending on certain user answers and I'm starting to know Prolog sy...
[ 0.005126953125, 0.01116943359375, 0.0096435546875, 0.0255126953125, -0.01116943359375, 0.0213623046875, 0.0035858154296875, 0.017578125, 0.015625, -0.03662109375, 0.0279541015625, 0.009765625, -0.0262451171875, 0.005218505859375, 0.0211181640625, 0.00323486328125, 0.02685546875, -0...
[ 3444, 47, 10554, 23, 159, 38969, 10752, 4867, 96819, 38937, 35166, 24233, 502, 2583, 114588, 2994, 39, 165504, 3871, 77336, 3714, 1250, 6002, 86531, 214709, 831, 12301, 2053, 28412, 92635, 183278, 50339, 25553, 6892 ]
[ 0.06689453125, 0.004058837890625, 0.2275390625, 0.050048828125, 0.039337158203125, 0.1900634765625, 0.130859375, 0.2037353515625, 0.13134765625, 0.1485595703125, 0.1412353515625, 0.027130126953125, 0.1080322265625, 0.0487060546875, 0.2362060546875, 0.134765625, 0.0166778564453125, ...
embed
9503515_c0
9503515
prolog
0
Title: How do I return unique results from a knowledge base in Prolog? Problem title: How do I return unique results from a knowledge base in Prolog? Tags: predicate, prolog, unique Problem: How do I return unique results from a knowledge base in Prolog? Complete prolog beginner here. Let's say I have a prolog knowledg...
How do I return unique results from a knowledge base in Prolog? How do I return unique results from a knowledge base in Prolog? predicate prolog unique a How Prolog How do I return unique results from a knowledge base in Prolog? Complete prolog beginner here. Let's say I have a prolog knowledge base which contains food...
[ 0.0113525390625, 0.01318359375, 0.0208740234375, -0.01361083984375, 0.01806640625, 0.0093994140625, 0.00860595703125, 0.0020294189453125, 0.0218505859375, -0.033935546875, 0.00138092041015625, 0.02197265625, 0.00726318359375, 0.004791259765625, 0.0048828125, 0.0177001953125, 0.005462...
[ 11249, 54, 30646, 36998, 50339, 1295, 51359, 3647, 23, 1250, 4867, 1653, 2063, 67, 502, 10, 87, 70541, 15381, 27167, 31577, 33022, 29568, 2174, 6626, 1286, 55769, 5701, 2967, 190647, 41, 1294, 59121, 1221, 4734, 1632, 35735, 63399, 678, 1...
[ 0.1375732421875, 0.045318603515625, 0.266357421875, 0.28955078125, 0.2337646484375, 0.1097412109375, 0.1702880859375, 0.214111328125, 0.05780029296875, 0.1693115234375, 0.266845703125, 0.1370849609375, 0.1715087890625, 0.06451416015625, 0.1458740234375, 0.046142578125, 0.028030395507...
embed
25966861_c1
25966861
prolog
1
of these properties seem to apply to Prolog numbers, and I can't think of a way so far to adapt the same basic approach to use actual numbers in place of these lists. I've seen a few examples in Prolog using Peano-style numbers, so my question is - is this normal practice? Or is there some way to avoid the issue that ...
of these properties seem to apply to Prolog numbers, and I can't think of a way so far to adapt the same basic approach to use actual numbers in place of these lists. I've seen a few examples in Prolog using Peano-style numbers, so my question is - is this normal practice? Or is there some way to avoid the issue that ...
[ 0.0162353515625, 0.012939453125, 0.005889892578125, -0.01434326171875, 0.006439208984375, 0.01239013671875, 0.004669189453125, -0.0047607421875, 0.0244140625, -0.05029296875, -0.01495361328125, 0.0169677734375, 0.01397705078125, 0.01324462890625, 0.0157470703125, -0.0001010894775390625...
[ 111, 6097, 183871, 59911, 1250, 4867, 101935, 39908, 62822, 51515, 4527, 8561, 3687, 5303, 27781, 17368, 1460, 3922, 40946, 3638, 41361, 71864, 31089, 3917, 96760, 47, 161063, 18811, 36356, 333, 936, 58994, 25632, 2301, 18, 4488, 162520, 8939...
[ 0.042205810546875, 0.02972412109375, 0.1585693359375, 0.048187255859375, 0.1591796875, 0.2509765625, 0.1905517578125, 0.103271484375, 0.0633544921875, 0.08489990234375, 0.0833740234375, 0.17919921875, 0.07928466796875, 0.1890869140625, 0.0251312255859375, 0.029296875, 0.165283203125,...
embed
16845177_c0
16845177
prolog
0
Title: Delete from one index element to another in a list Problem title: Delete from one index element to another in a list Tags: prolog, list, indexing Problem: Delete from one index element to another in a list I need to delete from one element index to another in a list. So it should look like: ?-delm(2,4,[5,6,-3,6,...
Delete from one index element to another in a list Delete from one index element to another in a list prolog list indexing one Delete del1 Buf Error Delete from one index element to another in a list I need to delete from one element index to another in a list. So it should look like: So I've done this. But I also need...
[ -0.0140380859375, 0.0257568359375, 0.002716064453125, 0.015380859375, 0.0029296875, 0.015625, -0.0081787109375, 0.0194091796875, 0.0225830078125, -0.0125732421875, 0.0089111328125, -0.00555419921875, -0.0013275146484375, 0.005859375, 0.012451171875, -0.009765625, 0.0264892578125, 0...
[ 262, 46485, 1295, 1632, 63262, 12830, 47, 15700, 23, 5303, 502, 4867, 146, 418, 667, 420, 212059, 10, 3871, 154109, 5608, 6713, 1884, 16940, 903, 15190, 2174, 111, 101935, 40715, 106, 117396, 3501, 140909, 33022, 26008, 18468, 31611, 3714, ...
[ 0.1295166015625, 0.1973876953125, 0.1336669921875, 0.111572265625, 0.21875, 0.1685791015625, 0.19775390625, 0.15771484375, 0.0751953125, 0.200927734375, 0.1187744140625, 0.18408203125, 0.1590576171875, 0.102294921875, 0.109619140625, 0.1417236328125, 0.1671142578125, 0.021347045898...
embed
40579232_c0
40579232
prolog
0
Title: JPL7, list of strings in prolog-query Problem title: JPL7, list of strings in prolog-query Tags: jpl, prolog, swi-prolog, java Problem: JPL7, list of strings in prolog-query i have a prolog-query which needs an array as atom: searchEventsOnCategory(Categories,Events) Categories is a list of strings. Example inpu...
JPL7, list of strings in prolog-query JPL7, list of strings in prolog-query jpl prolog swi-prolog java JPL7 Categories Events List Events1 ArrayList Persons Budget Variable Compound Bar Query Term JPL7, list of strings in prolog-query i have a prolog-query which needs an array as atom: searchEventsOnCategory(Categories...
[ 0.01806640625, 0.00946044921875, 0.00167083740234375, 0.008056640625, -0.02783203125, -0.00958251953125, 0.0068359375, 0.00555419921875, -0.00152587890625, -0.0361328125, 0.0009002685546875, -0.01422119140625, -0.0260009765625, 0.002593994140625, -0.0233154296875, 0.0086669921875, 0....
[ 821, 21130, 966, 5303, 111, 79315, 7, 23, 502, 4867, 944, 1294, 1647, 2424, 2452, 3454, 79, 330, 106584, 123560, 32036, 418, 69253, 154663, 15270, 95457, 84572, 3253, 58836, 2994, 27117, 10298, 34627, 33938, 192134, 20320, 76775, 3081, 1616...
[ 0.0738525390625, 0.189453125, 0.173583984375, 0.1368408203125, 0.053192138671875, 0.22900390625, 0.06103515625, 0.05328369140625, 0.128173828125, 0.2139892578125, 0.1185302734375, 0.1009521484375, 0.026214599609375, 0.1524658203125, 0.1170654296875, 0.1063232421875, 0.083251953125, ...
embed
19756272_c0
19756272
prolog
0
Title: Prolog Family Tree Issues Problem title: Prolog Family Tree Issues Tags: prolog Problem: Prolog Family Tree Issues I've been having a novice issue with setting up a family tree in Prolog. For some reason, I can't seem to get 'sibling' to return true. % male(+Person) % Specifies the Person is a male. % male(abrah...
Prolog Family Tree Issues Prolog Family Tree Issues prolog Prolog Family Tree Issues Person Specifies Parent Child Person1 Person2 Prolog Family Tree Issues I've been having a novice issue with setting up a family tree in Prolog. For some reason, I can't seem to get 'sibling' to return true. Thanks very much in advance...
[ 0.033203125, 0.00390625, 0.01019287109375, 0.008544921875, -0.033935546875, 0.0128173828125, -0.016357421875, -0.00958251953125, -0.0152587890625, -0.0225830078125, 0.0111083984375, -0.0263671875, -0.004486083984375, 0.00958251953125, 0.026611328125, -0.004058837890625, 0.01361083984...
[ 1250, 4867, 59745, 101344, 223317, 502, 15270, 24990, 27430, 170918, 123829, 418, 304, 19441, 95968, 31089, 53550, 1257, 14449, 53201, 23, 831, 18, 48903, 2046, 172, 79298, 47, 30646, 29568, 129745, 132442, 315, 933 ]
[ 0.172607421875, 0.2587890625, 0.1341552734375, 0.26513671875, 0.175537109375, 0.090087890625, 0.1441650390625, 0.1026611328125, 0.0867919921875, 0.1224365234375, 0.1287841796875, 0.049530029296875, 0.0911865234375, 0.00994873046875, 0.06768798828125, 0.0931396484375, 0.06976318359375...
embed
43500776_c1
43500776
prolog
1
language(W). %interpreter(I2,S2), language(Z2), language(W2). %not(X1=X2), %((Z1=Z2) -> not(W1=W2)). %rule 3 rule3([X,Y,Z,W]):- interpreter(X,Y), language(Z1), language(W), interpreter(X,Y), language(Z1), language(W), interpreter(X,Y), language(Z2), language(W), not(Z1=Z2). %rule 4 OK rule4([X,Y,Z,W]):- (X=spike -> Z=...
language(W). %interpreter(I2,S2), language(Z2), language(W2). %not(X1=X2), %((Z1=Z2) -> not(W1=W2)). %rule 3 rule3([X,Y,Z,W]):- interpreter(X,Y), language(Z1), language(W), interpreter(X,Y), language(Z1), language(W), interpreter(X,Y), language(Z2), language(W), not(Z1=Z2). %rule 4 OK rule4([X,Y,Z,W]):- (X=spike -> Z=...
[ -0.004425048828125, 0.01611328125, 0.005584716796875, 0.033203125, -0.0186767578125, 0.01513671875, -0.01129150390625, 0.00013446807861328125, 0.01141357421875, -0.0032196044921875, -0.0069580078125, -0.005279541015625, -0.01397705078125, -0.0233154296875, -0.0011749267578125, 0.012573...
[ 46876, 1456, 1745, 158288, 56, 568, 304, 294, 10461, 1511, 10869, 1542, 418, 33079, 959, 882, 133, 138, 79986, 363, 1723, 29481, 132, 17727, 201, 14315, 617, 44689, 567, 46993, 1505, 669, 190, 758, 34740, 305, 910, 11, 56975, 275, 41086...
[ 0.244384765625, 0.19970703125, 0.0633544921875, 0.231689453125, 0.1312255859375, 0.045440673828125, 0.1104736328125, 0.0250091552734375, 0.10888671875, 0.107666015625, 0.177490234375, 0.0904541015625, 0.10888671875, 0.0107421875, 0.171875, 0.121826171875, 0.04052734375, 0.161132812...
embed
46176866_c0
46176866
prolog
0
Title: Aggregation in Prolog Problem title: Aggregation in Prolog Tags: aggregation, prolog, swi-prolog Problem: Aggregation in Prolog i try to understand, how the aggregation in swi-Prolog works. Therefore i use the table works_on with the attributs Employee_Id, Projectnumber, Hours. In Prolog a fact of this table wou...
Aggregation in Prolog Aggregation in Prolog aggregation prolog swi-prolog Aggregation Prolog Aggregation in Prolog i try to understand, how the aggregation in swi-Prolog works. Therefore i use the table works_on with the attributs Employee_Id, Projectnumber, Hours. In Prolog a fact of this table would look like works_o...
[ 0.006439208984375, 0.00194549560546875, -0.01226806640625, 0.0145263671875, -0.0208740234375, -0.014404296875, -0.01397705078125, 0.0022735595703125, -0.0081787109375, -0.034912109375, -0.014892578125, -0.02001953125, -0.0047607421875, 0.01220703125, 0.00701904296875, 0.00543212890625,...
[ 12342, 68722, 2320, 23, 1250, 4867, 197564, 1830, 502, 2452, 3454, 28219, 3642, 91, 10752, 43240, 4527, 23180, 191, 150380, 365, 1033, 71, 27331, 2606, 1297, 133250, 15824, 6713, 155761, 7413, 5941, 21974, 1556, 2809, 79786, 12638, 13452, 7...
[ 0.10418701171875, 0.2568359375, 0.0682373046875, 0.029083251953125, 0.163818359375, 0.2430419921875, 0.255859375, 0.12060546875, 0.1102294921875, 0.1644287109375, 0.08319091796875, 0.061309814453125, 0.05718994140625, 0.0230255126953125, 0.1522216796875, 0.156494140625, 0.07275390625...
embed
13219151_c1
13219151
prolog
1
1 is Y - 1, Y1 >= 1. nonmember returns true if a given element doesn't occur in a given list. add adds an element to a given list, and returns the list with that element in it. Another thing to know about VisitedPoints: Initially the BeginPosition and EndPosition are stored in that list. For example, if I want to find ...
1 is Y - 1, Y1 >= 1. nonmember returns true if a given element doesn't occur in a given list. add adds an element to a given list, and returns the list with that element in it. Another thing to know about VisitedPoints: Initially the BeginPosition and EndPosition are stored in that list. For example, if I want to find ...
[ 0.0157470703125, 0.01531982421875, 0.0145263671875, 0.018798828125, -0.010498046875, 0.01275634765625, 0.00531005859375, -0.0211181640625, 0.0224609375, -0.02783203125, 0.0238037109375, 0.00750732421875, -0.0084228515625, -0.00408935546875, -0.0140380859375, -0.005859375, 0.003936767...
[ 106, 83, 990, 20, 418, 977, 1369, 615, 351, 39, 27417, 30646, 29568, 2174, 34475, 12830, 22027, 18, 74918, 5303, 15190, 3714, 98684, 297, 147534, 7, 1890, 121427, 7192, 172, 1363, 136, 18878, 4343, 7413, 60875, 116, 425, 304, 120067, 71...
[ 0.09613037109375, 0.0745849609375, 0.1341552734375, 0.04742431640625, 0.0853271484375, 0.033966064453125, 0.026611328125, 0.044952392578125, 0.1092529296875, 0.037506103515625, 0.2042236328125, 0.1160888671875, 0.1163330078125, 0.013153076171875, 0.0186767578125, 0.1312255859375, 0.0...
embed
15875460_c0
15875460
prolog
0
Title: how to stochastic search n-queen in prolog? Problem title: how to stochastic search n-queen in prolog? Tags: n-queens, artificial-intelligence, prolog Problem: how to stochastic search n-queen in prolog? i'm implement stochastic search in prolog. code is queens_rand([],Qs,Qs) :- !. queens_rand(UnplacedQs,SafeQs,...
how to stochastic search n-queen in prolog? how to stochastic search n-queen in prolog? n-queens artificial-intelligence prolog queens_rand UnplacedQs SafeQs random_sort UnplacedQs1 not_attack queen_solve_rand rnd_select remove_at Y-N how to stochastic search n-queen in prolog? i'm implement stochastic search in prolog...
[ 0.01129150390625, 0.0023345947265625, 0.0341796875, -0.011962890625, -0.01385498046875, 0.00127410888671875, 0.00970458984375, -0.01483154296875, -0.01373291015625, -0.03466796875, 0.01129150390625, 0.026611328125, -0.005401611328125, -0.0093994140625, 0.002166748046875, -0.00384521484...
[ 3642, 3474, 1436, 28692, 33938, 653, 944, 33, 23, 502, 4867, 1755, 66733, 130687, 41, 37214, 23935, 2737, 115527, 96759, 62351, 959, 102, 86918, 2208, 100184, 87388, 257, 990, 839, 9, 29479, 18151, 30646, 98320, 28219, 44691 ]
[ 0.041046142578125, 0.0999755859375, 0.19091796875, 0.152099609375, 0.20947265625, 0.1724853515625, 0.1768798828125, 0.1531982421875, 0.043731689453125, 0.1453857421875, 0.2183837890625, 0.07586669921875, 0.059814453125, 0.06427001953125, 0.0936279296875, 0.1090087890625, 0.0830078125...
embed
23144337_c0
23144337
prolog
0
Title: Prolog negation with more solutions Problem title: Prolog negation with more solutions Tags: prolog, negation, backtracking Problem: Prolog negation with more solutions I've got a little problem and don't know where to find a solution. You probably heard of problem of flying birds: bird(eagle). bird(penguin). ca...
Prolog negation with more solutions Prolog negation with more solutions prolog negation backtracking Prolog can_fly Prolog negation with more solutions I've got a little problem and don't know where to find a solution. You probably heard of problem of flying birds: I tried to modify and use this knowledge for some "lov...
[ 0.00543212890625, 0.02001953125, 0.0023040771484375, 0.03466796875, -0.0235595703125, -0.005340576171875, 0.00408935546875, -0.00775146484375, 0.01300048828125, -0.0296630859375, -0.03173828125, -0.015625, 0.01055908203125, -0.003936767578125, 0.0181884765625, -0.00360107421875, 0.01...
[ 1250, 4867, 108, 125682, 678, 1286, 51347, 502, 4420, 125728, 831, 35121, 10176, 2967, 29806, 49782, 12403, 214, 263, 6468, 37842, 2811, 40383, 4527, 51359, 25003, 13765, 133196, 5154, 91306, 5786, 990, 567, 100306, 18, 1884, 1284, 43240, 1...
[ 0.18212890625, 0.25537109375, 0.18994140625, 0.1778564453125, 0.07720947265625, 0.1810302734375, 0.21728515625, 0.130615234375, 0.1500244140625, 0.2337646484375, 0.08319091796875, 0.19970703125, 0.0322265625, 0.1129150390625, 0.1075439453125, 0.002716064453125, 0.1083984375, 0.0516...
embed
64316169_c0
64316169
prolog
0
Title: Convert a list from findall predicate to a string prolog Problem title: Convert a list from findall predicate to a string prolog Tags: transitive-closure, prolog Problem: Convert a list from findall predicate to a string prolog I am struggling to identify a way to convert a list to string. This list is the outpu...
Convert a list from findall predicate to a string prolog Convert a list from findall predicate to a string prolog transitive-closure prolog findall Convert with_output_to atomic_list_concat Convert a list from findall predicate to a string prolog I am struggling to identify a way to convert a list to string. This list ...
[ 0.0125732421875, -0.019287109375, 0.006805419921875, 0.042236328125, -0.00750732421875, 0.0186767578125, -0.00457763671875, 0.01104736328125, 0.00154876708984375, -0.0244140625, 0.00628662109375, -0.00531005859375, 0.01153564453125, 0.010009765625, -0.0003223419189453125, 0.01977539062...
[ 1657, 11549, 5303, 1295, 7413, 5584, 1653, 2063, 67, 47, 79315, 502, 4867, 10, 62621, 5844, 170224, 678, 6056, 7077, 188, 34627, 1771, 6562, 2271, 4460, 237875, 135812, 3917, 96760, 140992, 35064, 18151, 84751, 37842, 12921, 48322, 33720, 4...
[ 0.036224365234375, 0.1424560546875, 0.2286376953125, 0.038055419921875, 0.1531982421875, 0.212890625, 0.131591796875, 0.1708984375, 0.06817626953125, 0.1053466796875, 0.2384033203125, 0.127197265625, 0.2158203125, 0.0140533447265625, 0.098388671875, 0.09423828125, 0.1588134765625, ...
embed
65488156_c0
65488156
prolog
0
Title: How would you express mutual exclusion of facts in Prolog? Problem title: How would you express mutual exclusion of facts in Prolog? Tags: prolog Problem: How would you express mutual exclusion of facts in Prolog? Suppose you are working with a genealogy database. Some records are missing. You might know that pe...
How would you express mutual exclusion of facts in Prolog? How would you express mutual exclusion of facts in Prolog? prolog How Prolog first_name John Mary How would you express mutual exclusion of facts in Prolog? Suppose you are working with a genealogy database. Some records are missing. You might know that people ...
[ 0.0142822265625, -0.003265380859375, 0.0205078125, 0.00885009765625, -0.013427734375, 0.00909423828125, 0.005096435546875, 0.0069580078125, -0.001068115234375, -0.01312255859375, -0.017822265625, -0.010009765625, 0.00750732421875, 0.00482177734375, 0.0223388671875, 0.00909423828125, ...
[ 11249, 2806, 36510, 199849, 39041, 6889, 111, 15824, 7, 1250, 4867, 502, 5117, 11627, 4939, 23213, 23, 121691, 20697, 22293, 7779, 63399, 115923, 132283, 13648, 3714, 3395, 24, 98385, 11280, 16305, 53, 117776, 188768, 110613, 123055, 127501, ...
[ 0.0648193359375, 0.032470703125, 0.162841796875, 0.1927490234375, 0.228271484375, 0.1160888671875, 0.1004638671875, 0.199951171875, 0.1143798828125, 0.2008056640625, 0.286376953125, 0.1246337890625, 0.13818359375, 0.1907958984375, 0.19970703125, 0.23486328125, 0.0650634765625, 0.01...
embed
15063544_c0
15063544
prolog
0
Title: Prolog grandfather(i,i) Problem title: Prolog grandfather(i,i) Tags: prolog Problem: Prolog grandfather(i,i) A (very) strange story: I married a widow(W) who has a daughter(D). My father(F) married my stepdaughter (D). My wife gave birth to a son(s1). The wife of my father (the stepdaughter) also had a son (s2)....
Prolog grandfather(i,i) Prolog grandfather(i,i) prolog Prolog f_in_law b_in_law Prolog grandfather(i,i) A (very) strange story: I married a widow(W) who has a daughter(D). My father(F) married my stepdaughter (D). My wife gave birth to a son(s1). The wife of my father (the stepdaughter) also had a son (s2). The goal of...
[ -0.0007476806640625, 0.0203857421875, 0.00408935546875, 0.01104736328125, -0.0294189453125, 0.00421142578125, -0.00171661376953125, 0.0128173828125, 0.0014190673828125, -0.039794921875, -0.005828857421875, -0.0184326171875, -0.0157470703125, 0.004547119140625, 0.0018463134765625, -0.00...
[ 1250, 4867, 9963, 1021, 9319, 14, 4, 502, 1238, 73, 19729, 876, 104643, 114453, 13765, 87, 139505, 64685, 8770, 1456, 1556, 10, 76849, 397, 2646, 67373, 919, 759, 29954, 85, 46526, 58386, 26038, 127319, 47, 775, 17727, 581, 1902, 10461, ...
[ 0.16015625, 0.21826171875, 0.140380859375, 0.1976318359375, 0.133056640625, 0.1629638671875, 0.057586669921875, 0.1519775390625, 0.0928955078125, 0.09857177734375, 0.1561279296875, 0.07696533203125, 0.05072021484375, 0.1424560546875, 0.134765625, 0.01617431640625, 0.1632080078125, ...
embed
13757261_c0
13757261
prolog
0
Title: Using \==/2 or dif/2 Problem title: Using \==/2 or dif/2 Tags: logical-purity, prolog, prolog-dif Problem: Using \==/2 or dif/2 If I want to make sure that two variables do not instantiate to the same term, what is the preferred way to do it? Let's say I need to find directed edges in a graph, and a node cannot ...
Using \==/2 or dif/2 Using \==/2 or dif/2 logical-purity prolog prolog-dif Using Using \==/2 or dif/2 If I want to make sure that two variables do not instantiate to the same term, what is the preferred way to do it? Let's say I need to find directed edges in a graph, and a node cannot have an edge to itself: (the edge...
[ 0.004791259765625, 0.005767822265625, 0.00823974609375, 0.01226806640625, -0.0118408203125, -0.0096435546875, -0.0252685546875, 0.00153350830078125, 0.01953125, -0.02880859375, 0.00994873046875, -0.01318359375, 0.013427734375, 0.00250244140625, 0.010986328125, -0.010009765625, -0.007...
[ 345, 6953, 41872, 69112, 12477, 707, 45755, 62775, 289, 4717, 2481, 502, 4867, 428, 420, 3444, 3249, 9077, 6626, 77336, 54, 959, 34648, 101426, 47, 5701, 13579, 12601, 2822, 3917, 7413, 8951, 297, 121303, 41382, 110, 112, 53418, 765, 6803...
[ 0.08221435546875, 0.02783203125, 0.05810546875, 0.2198486328125, 0.2783203125, 0.0711669921875, 0.251220703125, 0.13037109375, 0.00726318359375, 0.1497802734375, 0.08251953125, 0.1326904296875, 0.1915283203125, 0.1103515625, 0.1478271484375, 0.002288818359375, 0.0950927734375, 0.16...
embed
69956176_c0
69956176
prolog
0
Title: PROLOG- Predicate that prevents doctor from having more than 8 appointments per day Problem title: PROLOG- Predicate that prevents doctor from having more than 8 appointments per day Tags: prolog Problem: PROLOG- Predicate that prevents doctor from having more than 8 appointments per day I'm writing a code in wh...
PROLOG- Predicate that prevents doctor from having more than 8 appointments per day PROLOG- Predicate that prevents doctor from having more than 8 appointments per day prolog having PROLOG Predicate IdAct IdPatient Idinstitution Iddoctor Description Cost PROLOG- Predicate that prevents doctor from having more than 8 ap...
[ 0.0125732421875, 0.0115966796875, 0.01507568359375, 0.02783203125, -0.0211181640625, 0.010986328125, -0.0172119140625, -0.00836181640625, 0.00506591796875, -0.06201171875, -0.01287841796875, -0.0211181640625, -0.009765625, -0.00482177734375, -0.00604248046875, 0.01519775390625, 0.027...
[ 10514, 47510, 9, 7145, 2063, 67, 450, 56282, 22072, 1295, 19441, 1286, 3501, 382, 164306, 117, 5155, 7, 502, 4867, 24799, 39450, 118, 165264, 246, 18770, 70643, 63099, 32562, 18151, 36663, 15190, 23, 21690, 5792, 5941, 1884, 9844, 831, 54...
[ 0.1805419921875, 0.2313232421875, 0.03411865234375, 0.1539306640625, 0.1827392578125, 0.079345703125, 0.03790283203125, 0.2021484375, 0.1937255859375, 0.06829833984375, 0.07073974609375, 0.07501220703125, 0.04351806640625, 0.2091064453125, 0.2303466796875, 0.105224609375, 0.156127929...
embed
73529322_c1
73529322
prolog
1
]) :- A is X + 1, B is Y - 1, square([X,Y], white), square([A,B], white). neighbour([X,Y],[A,B]) :- A is X - 1, B is Y + 1, square([X,Y], white), square([A,B], white). neighbour([X,Y],[A,B]) :- square([X,Y], white), square([A,B], white), A is X + 1; square([X,Y], white), square([A,B], white), B is Y + 1. neighbour([X,Y...
]) :- A is X + 1, B is Y - 1, square([X,Y], white), square([A,B], white). neighbour([X,Y],[A,B]) :- A is X - 1, B is Y + 1, square([X,Y], white), square([A,B], white). neighbour([X,Y],[A,B]) :- square([X,Y], white), square([A,B], white), A is X + 1; square([X,Y], white), square([A,B], white), B is Y + 1. neighbour([X,Y...
[ 0.027587890625, 0.004119873046875, 0.0130615234375, 0.006103515625, 0.01220703125, 0.000591278076171875, -0.01446533203125, 0.0142822265625, 0.026611328125, -0.035400390625, 0.00213623046875, 0.01202392578125, -0.01165771484375, 0.003936767578125, 0.0062255859375, -0.0016021728515625, ...
[ 10114, 16, 15772, 62, 83, 1193, 997, 106, 4, 335, 990, 20, 108047, 1542, 1723, 35011, 571, 194, 108, 6958, 38648, 615, 6, 36439, 567, 106015, 4966, 3229, 87, 11782, 678, 5154, 363, 96386, 57626, 3564, 1257, 214552, 5303, 5, 35672, 256...
[ 0.0745849609375, 0.0771484375, 0.1275634765625, 0.12158203125, 0.110595703125, 0.1751708984375, 0.2403564453125, 0.130615234375, 0.005615234375, 0.1588134765625, 0.2020263671875, 0.1107177734375, 0.1898193359375, 0.09417724609375, 0.130859375, 0.1546630859375, 0.099853515625, 0.038...
embed
29716064_c0
29716064
prolog
0
Title: Finding all values Problem title: Finding all values Tags: prolog Problem: Finding all values I'm new in world of prolog and I'm currently stuck on one problem in school project. I have facts: family ( person(_,_,_,_), %father person(_,_,_,_), %mother []). %array with children First three fields are name, surnam...
Finding all values Finding all values prolog Finding Name_of_company Salary Person Finding all values I'm new in world of prolog and I'm currently stuck on one problem in school project. I have facts: First three fields are name, surname and date_of_birth and fourth field can be either: unemployed , benefit , employed(...
[ 0.0064697265625, 0.001953125, -0.013427734375, -0.0089111328125, -0.0220947265625, 0.0024871826171875, -0.0098876953125, 0.0284423828125, 0.006683349609375, -0.04052734375, 0.00096893310546875, 0.0120849609375, -0.00372314453125, 0.000804901123046875, 0.00677490234375, -0.0096435546875...
[ 26040, 214, 756, 142424, 502, 4867, 15757, 4390, 146365, 13294, 1294, 15270, 3525, 8999, 111, 82424, 179933, 1632, 2967, 23, 10696, 13452, 15824, 7, 23972, 17262, 44457, 621, 9351, 613, 11627, 136, 5622, 5720, 22759, 927, 831, 51, 212423, ...
[ 0.1636962890625, 0.0982666015625, 0.2091064453125, 0.2568359375, 0.1717529296875, 0.2467041015625, 0.08013916015625, 0.1270751953125, 0.160400390625, 0.1873779296875, 0.1478271484375, 0.159423828125, 0.050079345703125, 0.0977783203125, 0.00787353515625, 0.014739990234375, 0.08984375,...
embed
56301960_c0
56301960
prolog
0
Title: Prolog: How to find out which part of code is failing and write a specific message depending on that part? Problem title: Prolog: How to find out which part of code is failing and write a specific message depending on that part? Tags: prolog Problem: Prolog: How to find out which part of code is failing and writ...
Prolog: How to find out which part of code is failing and write a specific message depending on that part? Prolog: How to find out which part of code is failing and write a specific message depending on that part? prolog Prolog How Length its_ok not_ok_cuz_of_y NOT not_ok_cuz_of_z Prolog: How to find out which part of ...
[ 0.006072998046875, 0.0186767578125, -0.0025482177734375, 0.010986328125, -0.00628662109375, 0.0093994140625, 0.0031280517578125, 0.0157470703125, 0.004180908203125, 0.01116943359375, 0.01068115234375, 0.0004215240478515625, 0.0025482177734375, 0.01416015625, 0.02294921875, 0.0178222656...
[ 1250, 4867, 11249, 7413, 1810, 3129, 2831, 18151, 83, 35782, 214, 33022, 29458, 26008, 96819, 111, 502, 77554, 927, 6863, 685, 959, 1010, 169, 4390, 53, 86725, 3444, 2806, 4904, 28219, 23755, 12921, 3871, 7639, 47, 38937, 37842, 1884, 903...
[ 0.15087890625, 0.2330322265625, 0.04296875, 0.111083984375, 0.12109375, 0.05499267578125, 0.1275634765625, 0.1837158203125, 0.0582275390625, 0.1981201171875, 0.124755859375, 0.1085205078125, 0.092041015625, 0.09912109375, 0.123779296875, 0.0286102294921875, 0.0931396484375, 0.10455...
embed
75844607_c1
75844607
prolog
1
ecta_a_internet). sintoma_de_problema("sobrecalentamiento", sobrecalentamiento). sintoma_de_problema("bajo rendimiento", bajo_rendimiento). % agregar nuevos problemas y soluciones % problema(lentitud_al_navegar, "Verificar la velocidad de la conexión a internet y limpiar el caché del navegador."). % sintoma_de_problema...
ecta_a_internet). sintoma_de_problema("sobrecalentamiento", sobrecalentamiento). sintoma_de_problema("bajo rendimiento", bajo_rendimiento). % agregar nuevos problemas y soluciones % problema(lentitud_al_navegar, "Verificar la velocidad de la conexión a internet y limpiar el caché del navegador."). % sintoma_de_problema...
[ 0.0184326171875, 0.0177001953125, 0.002532958984375, 0.032470703125, -0.0238037109375, 0.030029296875, -0.01318359375, 0.011474609375, 0.00162506103515625, -0.0419921875, 0.025146484375, 0.0027313232421875, -0.0302734375, -0.00011539459228515625, 0.0029296875, 0.01263427734375, 0.010...
[ 53875, 11, 116153, 194, 106658, 192, 112, 38953, 53571, 408, 22042, 32903, 1028, 402, 513, 132683, 29830, 24149, 65511, 1745, 75099, 49835, 12234, 113, 120529, 4105, 21753, 289, 76, 272, 1970, 15896, 14486, 122171, 126475, 1820, 144853, 377, ...
[ 0.23681640625, 0.1473388671875, 0.2064208984375, 0.006195068359375, 0.1837158203125, 0.1234130859375, 0.07818603515625, 0.1749267578125, 0.1226806640625, 0.132568359375, 0.1866455078125, 0.07977294921875, 0.1363525390625, 0.0992431640625, 0.115234375, 0.1759033203125, 0.18701171875, ...
embed
10268086_c1
10268086
prolog
1
is a follower of Alfredo and the barber. Fact 5: Given any male inhabitant X, if Bernardo is a fol- lower of Alfredo and X, then the barber is a follower of X alone. Alfredo wears only black wigs; Bernardo wears only white wigs; Benito wears only gray wigs; Roberto wears only red wigs; and Ramano wears only brown wigs...
is a follower of Alfredo and the barber. Fact 5: Given any male inhabitant X, if Bernardo is a fol- lower of Alfredo and X, then the barber is a follower of X alone. Alfredo wears only black wigs; Bernardo wears only white wigs; Benito wears only gray wigs; Roberto wears only red wigs; and Ramano wears only brown wigs...
[ 0.010986328125, 0.0072021484375, -0.0086669921875, 0.0218505859375, -0.0162353515625, 0.004791259765625, -0.00933837890625, 0.0157470703125, 0.0072021484375, -0.0216064453125, -0.0140380859375, 0.025390625, 0.0107421875, 0.004547119140625, -0.00897216796875, -0.0086669921875, 0.00479...
[ 83, 10, 28960, 56, 74733, 31, 136, 125017, 132640, 190, 2499, 11280, 109261, 1193, 2174, 163764, 18344, 92319, 70, 111, 75447, 95549, 4734, 22556, 41044, 35011, 65124, 188, 4224, 59629, 4842, 15517, 157, 119455, 24453, 42141, 51592, 179493, ...
[ 0.094482421875, 0.05059814453125, 0.2498779296875, 0.1551513671875, 0.168212890625, 0.169921875, 0.04205322265625, 0.26318359375, 0.07952880859375, 0.037567138671875, 0.02294921875, 0.1015625, 0.1058349609375, 0.06683349609375, 0.007720947265625, 0.2470703125, 0.07037353515625, 0.1...
embed
33056283_c0
33056283
prolog
0
Title: creating a shallow binary predicate in Prolog to replace all the number in a list by atom 'number' Problem title: creating a shallow binary predicate in Prolog to replace all the number in a list by atom 'number' Tags: prolog, list Problem: creating a shallow binary predicate in Prolog to rep...
creating a shallow binary predicate in Prolog to replace all the number in a list by atom 'number' creating a shallow binary predicate in Prolog to replace all the number in a list by atom 'number' prolog list Prolog SGETTOK Pred InListHead InListTail OutListHead OutListTail Term creating a shallow ...
[ 0.00830078125, -0.01214599609375, 0.026611328125, 0.020751953125, 0.00173187255859375, 0.0250244140625, 0.002716064453125, 0.01043701171875, 0.00311279296875, -0.01031494140625, 0.007171630859375, -0.00592041015625, -0.0235595703125, -0.0029296875, 0.032958984375, 0.00799560546875, 0...
[ 105233, 35299, 8770, 2394, 6635, 1653, 2063, 67, 1250, 4867, 91995, 756, 14012, 5303, 390, 34627, 3768, 2606, 1297, 23, 70, 502, 79794, 72071, 7145, 360, 154663, 13025, 712, 9874, 379, 13538, 2994, 31577, 28282, 53894, 7986, 12477, 9433, ...
[ 0.1031494140625, 0.177001953125, 0.19384765625, 0.126953125, 0.10040283203125, 0.171630859375, 0.197265625, 0.0989990234375, 0.15380859375, 0.2347412109375, 0.1441650390625, 0.0386962890625, 0.1494140625, 0.15478515625, 0.0154876708984375, 0.2021484375, 0.06915283203125, 0.12316894...
embed
53399969_c0
53399969
prolog
0
Title: lists intersection in prolog Problem title: lists intersection in prolog Tags: prolog, list, intersection Problem: lists intersection in prolog i'am new in Prolog , i tried to write 5 lists and get the intersection between them , how i can achieve that, ** lists will be defined in file so it's not input from the...
lists intersection in prolog lists intersection in prolog prolog list intersection take_umbrella lists intersection in prolog i'am new in Prolog , i tried to write 5 lists and get the intersection between them , how i can achieve that, ** lists will be defined in file so it's not input from the user . i see many resour...
[ 0.004241943359375, -0.00860595703125, 0.0213623046875, 0.021240234375, -0.0179443359375, 0.020751953125, -0.0074462890625, 0.0185546875, 0.004547119140625, -0.02734375, 0.0034027099609375, 0.01904296875, 0.01239013671875, 0.0157470703125, 0.015869140625, 0.00665283203125, 0.015258789...
[ 5303, 7, 1940, 58994, 502, 4867, 5646, 316, 4134, 1165, 1250, 37842, 33022, 190, 2046, 17721, 69307, 61924, 11435, 959, 107730, 38937, 65514, 29479, 6626, 4488, 41, 1294, 9790, 479, 112, 5983, 13452, 8026, 44116, 36849, 12638, 34003, 92949,...
[ 0.2459716796875, 0.19091796875, 0.1722412109375, 0.1875, 0.1533203125, 0.2135009765625, 0.14990234375, 0.05157470703125, 0.1546630859375, 0.124755859375, 0.136962890625, 0.025360107421875, 0.06170654296875, 0.0982666015625, 0.05859375, 0.1322021484375, 0.07232666015625, 0.172119140...
embed
35087702_c0
35087702
prolog
0
Title: Finding all cube roots with a number as a limit Problem title: Finding all cube roots with a number as a limit Tags: prolog, clpfd Problem: Finding all cube roots with a number as a limit I want to find all of the cube roots that their cubes + their remainder add up to a number to user inputs. So for example, th...
Finding all cube roots with a number as a limit Finding all cube roots with a number as a limit prolog clpfd Finding B-X1 Finding all cube roots with a number as a limit I want to find all of the cube roots that their cubes + their remainder add up to a number to user inputs. So for example, the query: Would give the r...
[ -0.0068359375, 0.0057373046875, 0.000934600830078125, 0.0133056640625, 0.01513671875, 0.0098876953125, 0.010009765625, 0.00160980224609375, 0.0244140625, 0.004425048828125, 0.003021240234375, -0.003692626953125, -0.00665283203125, -0.001129150390625, 0.005645751953125, -0.0189208984375...
[ 26040, 756, 314, 372, 74855, 7, 678, 14012, 237, 17475, 502, 4867, 39557, 71, 335, 1542, 418, 3444, 7413, 111, 7438, 997, 47143, 820, 15190, 1257, 38937, 107730, 41, 1294, 154559, 16750, 106, 8353, 363, 2203, 107, 24931, 953, 116, 382, ...
[ 0.09912109375, 0.107177734375, 0.148681640625, 0.1451416015625, 0.2357177734375, 0.0860595703125, 0.03485107421875, 0.1378173828125, 0.0277862548828125, 0.22119140625, 0.06378173828125, 0.117919921875, 0.013427734375, 0.049163818359375, 0.06988525390625, 0.084716796875, 0.04656982421...
embed
58573905_c0
58573905
prolog
0
Title: Is there a command to show the search pointer of every step in Prolog? Problem title: Is there a command to show the search pointer of every step in Prolog? Tags: prolog Problem: Is there a command to show the search pointer of every step in Prolog? I'm trying to understand the exact search order of Prolog. In m...
Is there a command to show the search pointer of every step in Prolog? Is there a command to show the search pointer of every step in Prolog? prolog Prolog Is there a command to show the search pointer of every step in Prolog? I'm trying to understand the exact search order of Prolog. In my university course script the...
[ 0.00927734375, 0.0198974609375, 0.0179443359375, 0.019775390625, -0.0159912109375, -0.00238037109375, -0.00064849853515625, -0.01190185546875, -0.003692626953125, -0.030029296875, -0.0036773681640625, -0.00119781494140625, -0.01409912109375, -0.007415771484375, -0.000865936279296875, 0...
[ 75101, 7639, 33938, 6275, 56, 111, 11907, 29954, 23, 1250, 4867, 2685, 10, 502, 47, 28219, 24763, 12989, 152363, 15411, 26499, 127887, 144851, 66161, 7440, 38496, 3095, 63399, 140992, 1957, 157318, 5036, 51, 41274, 7722, 21455, 98893, 91736, ...
[ 0.2412109375, 0.1700439453125, 0.2198486328125, 0.1968994140625, 0.1571044921875, 0.03692626953125, 0.149658203125, 0.2059326171875, 0.039215087890625, 0.1658935546875, 0.260986328125, 0.009429931640625, 0.05322265625, 0.1038818359375, 0.0261077880859375, 0.03033447265625, 0.06353759...
embed
53264779_c0
53264779
prolog
0
Title: Prolog remove parenthesis when transforming list in polynomial Problem title: Prolog remove parenthesis when transforming list in polynomial Tags: prolog Problem: Prolog remove parenthesis when transforming list in polynomial Basically when I try to transform a list into a polynomial or vice-versa, it always sho...
Prolog remove parenthesis when transforming list in polynomial Prolog remove parenthesis when transforming list in polynomial prolog Prolog poly2list Prolog remove parenthesis when transforming list in polynomial Basically when I try to transform a list into a polynomial or vice-versa, it always shows up with parenthes...
[ -0.0003108978271484375, 0.00506591796875, -0.00165557861328125, 0.0157470703125, 0.0003108978271484375, 0.0233154296875, -0.0003337860107421875, 0.004150390625, 0.011962890625, -0.01495361328125, 0.025634765625, -0.00946044921875, -0.00787353515625, -0.00439453125, -0.0120849609375, 0....
[ 1250, 4867, 87388, 49129, 160291, 7, 27198, 5303, 35874, 1687, 15403, 23, 502, 304, 6562, 9790, 3934, 22925, 28784, 11343, 45831, 1257, 678, 18151, 32354, 959, 20697, 61924, 22460, 266, 289, 22232, 26458, 1542, 155761, 53, 16750, 1193, 116,...
[ 0.145263671875, 0.21044921875, 0.11083984375, 0.177734375, 0.2276611328125, 0.054718017578125, 0.1622314453125, 0.174072265625, 0.18994140625, 0.1488037109375, 0.111328125, 0.011749267578125, 0.1004638671875, 0.138427734375, 0.20166015625, 0.042724609375, 0.0184326171875, 0.0183715...
embed
30701642_c0
30701642
prolog
0
Title: Backwards Chaining With Variables Problem title: Backwards Chaining With Variables Tags: logic, datalog, prolog Problem: Backwards Chaining With Variables I have been reading up about inference in Prolog/Datalog and while forward chaining seems fairly simple to grasp, I have some issues with backward chaining wi...
Backwards Chaining With Variables Backwards Chaining With Variables logic datalog prolog Backwards Chaining Variables Backwards Chaining With Variables I have been reading up about inference in Prolog/Datalog and while forward chaining seems fairly simple to grasp, I have some issues with backward chaining with any sor...
[ 0.01422119140625, 0.03955078125, -0.00604248046875, 0.00823974609375, 0.0028228759765625, 0.0255126953125, -0.01312255859375, -0.00848388671875, 0.01239013671875, -0.02392578125, -0.0072021484375, 0.01080322265625, -0.0167236328125, 0.0174560546875, 0.0213623046875, 0.00885009765625, ...
[ 26828, 19364, 4841, 14653, 17106, 111477, 13566, 62775, 2053, 4867, 502, 53498, 6620, 1250, 137989, 40225, 1608, 8781, 37348, 4420, 27140, 27781, 89261, 289, 83324, 29568, 98320, 34292, 16454, 121691, 41, 1294, 93170, 11, 1456, 10, 53697, 601...
[ 0.1861572265625, 0.2666015625, 0.2225341796875, 0.16015625, 0.1522216796875, 0.2119140625, 0.126220703125, 0.1044921875, 0.050750732421875, 0.2083740234375, 0.0877685546875, 0.176025390625, 0.0640869140625, 0.1602783203125, 0.06640625, 0.216796875, 0.1917724609375, 0.00839233398437...
embed
70209467_c0
70209467
prolog
0
Title: Find all paths and sum the length of each path in the graph Problem title: Find all paths and sum the length of each path in the graph Tags: prolog Problem: Find all paths and sum the length of each path in the graph I have the following graph database: edge(v1, v2, 3). edge(v1, v3, 5). edge(v1, v4, 13). edge(v1...
Find all paths and sum the length of each path in the graph Find all paths and sum the length of each path in the graph prolog Find PathAB Length PathCB LengthCB find_paths Path Total Find all paths and sum the length of each path in the graph I have the following graph database: And here is my code to understand the o...
[ 0.018798828125, 0.00689697265625, 0.002044677734375, 0.016357421875, 0.0002384185791015625, 0.004638671875, -0.026611328125, 0.009033203125, -0.0003719329833984375, -0.037841796875, -0.0020904541015625, -0.011474609375, -0.00634765625, 0.01080322265625, 0.0211181640625, 0.0097045898437...
[ 26040, 756, 60875, 7, 10554, 140909, 12638, 41382, 136, 70, 111, 23, 502, 4867, 108421, 11040, 77554, 47307, 7413, 128405, 33867, 63399, 18151, 28219, 140992, 35064, 56656, 2822, 50339, 63134, 959, 141377, 104851 ]
[ 0.107421875, 0.142333984375, 0.2384033203125, 0.05255126953125, 0.2017822265625, 0.1744384765625, 0.1259765625, 0.17529296875, 0.0153350830078125, 0.00897216796875, 0.032806396484375, 0.0062255859375, 0.1156005859375, 0.1531982421875, 0.1923828125, 0.15771484375, 0.097900390625, 0....
embed
16585730_c1
16585730
prolog
1
tree is build only using the previous DCG grammar form and not about how Prolog translate this grammar into a set of rules (because, for me this thing is difficult and maybe because doing so I'd be adding a further step) Is it a good thing read it by DCG grammar and not by the automatic converted rules? So I read in t...
tree is build only using the previous DCG grammar form and not about how Prolog translate this grammar into a set of rules (because, for me this thing is difficult and maybe because doing so I'd be adding a further step) Is it a good thing read it by DCG grammar and not by the automatic converted rules? So I read in t...
[ 0.02734375, 0.015380859375, -0.003082275390625, 0.0223388671875, 0.020751953125, 0.004180908203125, -0.005584716796875, -0.00408935546875, 0.0185546875, -0.04443359375, 0.005706787109375, -0.020263671875, -0.010986328125, 0.0068359375, 0.00848388671875, 0.0177001953125, 0.00854492187...
[ 53201, 83, 45367, 4734, 17368, 96362, 391, 56367, 122092, 147, 3173, 1250, 4867, 3900, 19309, 3934, 91736, 34844, 29954, 4127, 13580, 12301, 442, 101038, 117176, 71, 3917, 149357, 150350, 110, 309, 179665, 390, 42792, 5117, 882, 133, 40140, ...
[ 0.22998046875, 0.124755859375, 0.2215576171875, 0.013519287109375, 0.0396728515625, 0.036956787109375, 0.0938720703125, 0.2091064453125, 0.156005859375, 0.11181640625, 0.111572265625, 0.10174560546875, 0.205078125, 0.05950927734375, 0.06842041015625, 0.0177001953125, 0.122802734375, ...
embed
28967407_c0
28967407
prolog
0
Title: Prolog - Lotto Machine Problem title: Prolog - Lotto Machine Tags: random, rules, prolog, list Problem: Prolog - Lotto Machine This is my first post. I have been teaching myself Prolog for a university project and I am tasked with generating a program that simulates the lotto and compares the random numbers (6 i...
Prolog - Lotto Machine Prolog - Lotto Machine random rules prolog list Prolog Lotto Machine Prolog - Lotto Machine This is my first post. I have been teaching myself Prolog for a university project and I am tasked with generating a program that simulates the lotto and compares the random numbers (6 in this case) with t...
[ 0.0167236328125, 0.0067138671875, 0.009033203125, 0.00081634521484375, -0.004547119140625, 0.030517578125, -0.006591796875, 0.000263214111328125, -0.003387451171875, -0.0595703125, 0.0157470703125, -0.01129150390625, -0.0167236328125, 0.0030975341796875, 0.0208740234375, -0.01550292968...
[ 1250, 4867, 20, 185632, 68311, 96759, 91736, 502, 5303, 5117, 1305, 128169, 35978, 100, 152363, 13452, 66211, 12663, 1528, 40226, 5915, 188, 69101, 101935, 16156, 7225, 38937, 1556, 4263, 756, 14858, 195, 159690, 2174, 959, 30646, 25612, 8443...
[ 0.1923828125, 0.274658203125, 0.029296875, 0.2410888671875, 0.21875, 0.234130859375, 0.2105712890625, 0.16455078125, 0.1927490234375, 0.07861328125, 0.0855712890625, 0.1285400390625, 0.0714111328125, 0.00091552734375, 0.075927734375, 0.0606689453125, 0.0830078125, 0.1116943359375, ...
embed
78298384_c0
78298384
prolog
0
Title: Sister Predicate Duplicates in Prolog Problem title: Sister Predicate Duplicates in Prolog Tags: prolog-setof, prolog Problem: Sister Predicate Duplicates in Prolog I need a predicate to find the sister sister(X, Y) - " X is Y's sister if they have a common parent W , X is a woman and X is not Y ". The problem i...
Sister Predicate Duplicates in Prolog Sister Predicate Duplicates in Prolog prolog-setof prolog Sister Predicate Duplicates Prolog Sister Predicate Duplicates in Prolog I need a predicate to find the sister sister(X, Y) - " X is Y's sister if they have a common parent W , X is a woman and X is not Y ". The problem is t...
[ 0.01116943359375, -0.0098876953125, 0.0164794921875, -0.0115966796875, -0.0196533203125, 0.005462646484375, -0.01458740234375, -0.0026397705078125, -0.01220703125, -0.0576171875, -0.01446533203125, 0.017578125, 0.01214599609375, -0.01483154296875, -0.0033111572265625, 0.0279541015625, ...
[ 602, 1515, 7145, 2063, 67, 786, 52721, 1636, 23, 1250, 4867, 502, 3509, 3871, 1653, 7413, 70, 114015, 1542, 990, 1193, 83, 2174, 39210, 49129, 601, 46667, 959, 2967, 11907, 206, 38472, 1556, 6626, 27863, 2046, 171763, 16750, 71924, 27169,...
[ 0.1708984375, 0.177978515625, 0.178466796875, 0.1671142578125, 0.0738525390625, 0.1649169921875, 0.2489013671875, 0.1304931640625, 0.018585205078125, 0.15771484375, 0.1815185546875, 0.1112060546875, 0.011962890625, 0.06903076171875, 0.162353515625, 0.1156005859375, 0.007354736328125,...
embed
12364367_c0
12364367
prolog
0
Title: Categorise List in Prolog Problem title: Categorise List in Prolog Tags: prolog, dcg Problem: Categorise List in Prolog Alright so I am coding a parser for arithmetic equations. I get the input in a list, e.g. "10+20" = [49,48,43,50,48] and then I convert all the digits to there corresponding numbers e.g. [49,48...
Categorise List in Prolog Categorise List in Prolog prolog dcg Categorise List Prolog number_codes Categorise List in Prolog Alright so I am coding a parser for arithmetic equations. I get the input in a list, e.g. "10+20" = [49,48,43,50,48] and then I convert all the digits to there corresponding numbers e.g. [49,48,4...
[ 0.0069580078125, -0.01055908203125, 0.0081787109375, 0.020751953125, -0.00958251953125, 0.0181884765625, 0.00299072265625, 0.0003299713134765625, -0.001708984375, -0.021728515625, -0.019775390625, -0.0216064453125, -0.017822265625, 0.01409912109375, -0.01373291015625, -0.0098876953125,...
[ 161637, 184, 32036, 1250, 4867, 502, 104, 238, 177, 14012, 40899, 54969, 552, 6238, 366, 2189, 8962, 13722, 2046, 107730, 5303, 963, 1328, 1549, 12977, 9285, 11548, 2525, 96760, 756, 153939, 42518, 101935, 206808, 216969, 3444, 3884, 892, 2...
[ 0.183349609375, 0.1287841796875, 0.2236328125, 0.1513671875, 0.233642578125, 0.09814453125, 0.013824462890625, 0.012481689453125, 0.095947265625, 0.09783935546875, 0.183837890625, 0.023345947265625, 0.1005859375, 0.04864501953125, 0.06256103515625, 0.11376953125, 0.030120849609375, ...
embed
43819834_c0
43819834
prolog
0
Title: What does the number at each step in debug mode mean in SWI Prolog? Problem title: What does the number at each step in debug mode mean in SWI Prolog? Tags: swi-prolog, prolog, debugging Problem: What does the number at each step in debug mode mean in SWI Prolog? In SWI Prolog you can enable tracing via trace. ....
What does the number at each step in debug mode mean in SWI Prolog? What does the number at each step in debug mode mean in SWI Prolog? swi-prolog prolog debugging What SWI Prolog Call _G1752 Exit Fail Redo What does the number at each step in debug mode mean in SWI Prolog? In SWI Prolog you can enable tracing via trac...
[ 0.017333984375, 0.01055908203125, -0.0030975341796875, 0.0279541015625, 0.014892578125, 0.01507568359375, -0.0050048828125, 0.0189208984375, 0.01287841796875, -0.0026397705078125, 0.00933837890625, -0.0150146484375, -0.0225830078125, 0.0238037109375, 0.0206298828125, 0.01177978515625, ...
[ 4865, 14602, 14012, 99, 12638, 29954, 23, 8, 85779, 13736, 29459, 159, 38969, 1250, 4867, 91, 2452, 3454, 502, 978, 26265, 724, 2489, 12744, 5443, 217, 190355, 6096, 31, 360, 22, 2886, 1152, 21896, 1829, 144851, 27781, 2485, 112, 36659, ...
[ 0.05859375, 0.0277252197265625, 0.2259521484375, 0.100830078125, 0.178955078125, 0.2415771484375, 0.0843505859375, 0.1641845703125, 0.259765625, 0.1494140625, 0.1544189453125, 0.064208984375, 0.2115478515625, 0.1728515625, 0.1846923828125, 0.010894775390625, 0.1514892578125, 0.1132...
embed
34237046_c1
34237046
prolog
1
automotive,_], [_,_,crankmotoroil,_],[_,_,napaautoparts,_],[_,_,fleetbodyworks,_], [_,_,tredcotires,_],[_,_,_,1],[_,_,_,2],[_,_,_,3],[_,_,_,4],[_,_,_,5]], member([barry,straight,C,D], Drivers), C \= fleetbodyworks, C \= napaautoparts, D \= 4, member([howard,_,G,H], Drivers), G \= crankmotoroil, H \= 5, H =:= X - 1, mem...
automotive,_], [_,_,crankmotoroil,_],[_,_,napaautoparts,_],[_,_,fleetbodyworks,_], [_,_,tredcotires,_],[_,_,_,1],[_,_,_,2],[_,_,_,3],[_,_,_,4],[_,_,_,5]], member([barry,straight,C,D], Drivers), C \= fleetbodyworks, C \= napaautoparts, D \= 4, member([howard,_,G,H], Drivers), G \= crankmotoroil, H \= 5, H =:= X - 1, mem...
[ 0.024658203125, -0.000827789306640625, 0.0032501220703125, 0.01141357421875, -0.00433349609375, 0.01043701171875, -0.00909423828125, 0.00087738037109375, 0.005126953125, -0.01531982421875, 0.00014591217041015625, -0.003875732421875, -0.0157470703125, -0.0087890625, -0.01007080078125, 0...
[ 1809, 31494, 13, 36467, 26541, 38173, 76, 763, 8913, 17365, 34334, 37873, 18244, 2822, 47924, 50964, 617, 758, 32786, 1299, 1294, 2816, 131470, 18738, 32597, 201, 527, 190, 572, 1193, 1643, 821, 7108, 11073, 10186, 12830, 2396, 31786, 106, ...
[ 0.0853271484375, 0.1685791015625, 0.05377197265625, 0.1676025390625, 0.051727294921875, 0.19580078125, 0.09442138671875, 0.10302734375, 0.05755615234375, 0.1102294921875, 0.04071044921875, 0.0755615234375, 0.1097412109375, 0.08209228515625, 0.01287841796875, 0.097900390625, 0.0788574...
embed
62567036_c0
62567036
prolog
0
Title: WAM book: How is code generated when dealing with argument registers (L1)? Problem title: WAM book: How is code generated when dealing with argument registers (L1)? Tags: prolog, warren-abstract-machine Problem: WAM book: How is code generated when dealing with argument registers (L1)? I am working through Hassa...
WAM book: How is code generated when dealing with argument registers (L1)? WAM book: How is code generated when dealing with argument registers (L1)? prolog warren-abstract-machine WAM How put_variable put_structure set_value set_variable WAM book: How is code generated when dealing with argument registers (L1)? I am w...
[ 0.0169677734375, 0.015869140625, -0.0196533203125, 0.0289306640625, 0.00150299072265625, 0.00732421875, -0.0272216796875, 0.0030059814453125, 0.01611328125, -0.0291748046875, -0.0011444091796875, -0.004638671875, -0.0179443359375, -0.0159912109375, 0.0174560546875, -0.01275634765625, ...
[ 4336, 594, 12877, 11249, 18151, 139392, 71, 184017, 10750, 68067, 866, 17727, 502, 4867, 982, 2816, 103149, 3884, 21690, 2886, 137656, 5423, 27494, 48652, 217, 8139, 318, 171458, 233973, 68311, 183447, 853, 238478, 179933, 40059, 66207, 7614, ...
[ 0.1163330078125, 0.1134033203125, 0.1014404296875, 0.054351806640625, 0.240966796875, 0.1903076171875, 0.027374267578125, 0.057373046875, 0.2083740234375, 0.22119140625, 0.043304443359375, 0.060516357421875, 0.04327392578125, 0.0870361328125, 0.047943115234375, 0.094482421875, 0.0807...
embed
30956489_c0
30956489
prolog
0
Title: In GNU-Prolog, can I 'catch' a linux signal? Problem title: In GNU-Prolog, can I 'catch' a linux signal? Tags: gnu-prolog, prolog, linux Problem: In GNU-Prolog, can I 'catch' a linux signal? Is there a way to 'trap' (e.g. 'catch') an operating system signal within GNU Prolog? (I'm using Ubunt...
In GNU-Prolog, can I 'catch' a linux signal? In GNU-Prolog, can I 'catch' a linux signal? gnu-prolog prolog linux GNU-Prolog Long_Running_Goal on_signal In GNU-Prolog, can I 'catch' a linux signal? Is there a way to 'trap' (e.g. 'catch') an operating system signal within GNU Prolog? (I'm using Ubunt...
[ 0.01171875, 0.0194091796875, 0.007537841796875, -0.0198974609375, -0.021240234375, -0.004638671875, 0.004791259765625, 0.0233154296875, 0.00830078125, -0.059814453125, -0.010009765625, 0.0036468505859375, -0.041015625, 0.0240478515625, 0.0224609375, 0.01434326171875, 0.00279235839843...
[ 360, 165132, 10752, 4867, 831, 3768, 4460, 206, 11508, 6077, 26073, 104155, 3454, 502, 14407, 163321, 592, 17903, 289, 98, 165992, 9, 87, 10, 3917, 47, 107617, 142, 172852, 5426, 28032, 1250, 116890, 150040, 11814, 51515, 4336, 13709, 17885...
[ 0.0243072509765625, 0.2042236328125, 0.1629638671875, 0.2027587890625, 0.09930419921875, 0.0272674560546875, 0.1739501953125, 0.16259765625, 0.1380615234375, 0.1929931640625, 0.25048828125, 0.1192626953125, 0.1319580078125, 0.0828857421875, 0.0645751953125, 0.05267333984375, 0.019989...
embed
40701624_c2
40701624
prolog
2
(-1,4),(4,4),(1,4),(-5,4),(2,4),(-3,6),(-6,6)],[(3,8),(6,8),(-3,8),(0,8),(-6,8)]). findall(A,veiculos_troncos(A),NTr). what I get is above. until I get this error: Exception: (13) setup_call_catcher_cleanup('$bags':'$new_findall_bag', '$bags':findall_loop Here is the full programm(Source File): :- dynamic(nenufares_liv...
(-1,4),(4,4),(1,4),(-5,4),(2,4),(-3,6),(-6,6)],[(3,8),(6,8),(-3,8),(0,8),(-6,8)]). findall(A,veiculos_troncos(A),NTr). what I get is above. until I get this error: Exception: (13) setup_call_catcher_cleanup('$bags':'$new_findall_bag', '$bags':findall_loop Here is the full programm(Source File): :- dynamic(nenufares_liv...
[ -0.00946044921875, -0.012451171875, 0.01043701171875, 0.0238037109375, 0.0118408203125, -0.00994873046875, -0.0201416015625, -0.005401611328125, 0.01092529296875, -0.0400390625, 0.000576019287109375, 0.0162353515625, 0.016357421875, -0.01190185546875, 0.011962890625, -0.002517700195312...
[ 15, 9, 163324, 124093, 10342, 29557, 8316, 59690, 140447, 86827, 50490, 151664, 2389, 7413, 5584, 284, 24461, 42779, 36867, 7840, 42, 87, 2046, 36917, 24189, 903, 18499, 5443, 63928, 28261, 169581, 85763, 4460, 5372, 11030, 66, 2037, 4369, ...
[ 0.021270751953125, 0.12109375, 0.2127685546875, 0.2381591796875, 0.047943115234375, 0.12060546875, 0.0924072265625, 0.070556640625, 0.1622314453125, 0.027313232421875, 0.1151123046875, 0.181640625, 0.011749267578125, 0.14599609375, 0.22412109375, 0.07379150390625, 0.1319580078125, ...
embed
46402836_c0
46402836
prolog
0
Title: Why do these similar programs have different outcomes? Problem title: Why do these similar programs have different outcomes? Tags: prolog Problem: Why do these similar programs have different outcomes? I was doing an exercise that asked to implement from_to/3 , where you give two numbers as the first two argumen...
Why do these similar programs have different outcomes? Why do these similar programs have different outcomes? prolog Why from_to TailResult O-1 Why do these similar programs have different outcomes? I was doing an exercise that asked to implement from_to/3 , where you give two numbers as the first two arguments and Pro...
[ 0.0091552734375, 0.0113525390625, 0.00445556640625, 0.0034637451171875, -0.0106201171875, 0.01519775390625, 0.0072021484375, 0.003448486328125, -0.000843048095703125, -0.003570556640625, 0.0125732421875, -0.031005859375, -0.00238037109375, 0.0286865234375, 0.004547119140625, -0.0256347...
[ 44084, 6097, 21373, 103391, 765, 12921, 184345, 7, 502, 4867, 1295, 188, 1218, 379, 4332, 7136, 180, 5759, 81979, 29479, 18113, 8337, 6626, 101935, 5117, 10750, 1250, 76199, 5303, 26818, 17721, 16750, 57626, 1052, 627, 1369, 363, 80389, 543...
[ 0.1287841796875, 0.0797119140625, 0.198486328125, 0.2156982421875, 0.04571533203125, 0.2047119140625, 0.248779296875, 0.1534423828125, 0.1419677734375, 0.26611328125, 0.2216796875, 0.18212890625, 0.162841796875, 0.144287109375, 0.1025390625, 0.1998291015625, 0.1815185546875, 0.1308...
embed
9059572_c0
9059572
prolog
0
Title: Flatten a list in Prolog Problem title: Flatten a list in Prolog Tags: prolog, flatten, list, difference-lists, dcg Problem: Flatten a list in Prolog I've only been working with Prolog for a couple days. I understand some things but this is really confusing me. I'm suppose to write a function that takes a list a...
Flatten a list in Prolog Flatten a list in Prolog prolog flatten list difference-lists dcg Flatten Prolog flatten2 Atom ListTail RetList List BAD Flatten a list in Prolog I've only been working with Prolog for a couple days. I understand some things but this is really confusing me. I'm suppose to write a function that ...
[ 0.009033203125, 0.00732421875, 0.01220703125, 0.015380859375, -0.00054168701171875, 0.03564453125, -0.0062255859375, -0.004669189453125, 0.000598907470703125, 0.0108642578125, 0.00604248046875, -0.002838134765625, -0.0032958984375, -0.0079345703125, 0.01165771484375, 0.0185546875, 0....
[ 106516, 510, 5303, 1250, 4867, 502, 49878, 60212, 6562, 177, 304, 69728, 32036, 9874, 379, 47131, 154663, 8678, 397, 20697, 28219, 55681, 6953, 139124, 33022, 32354, 51776, 442, 1810, 75414, 45646, 2060, 43240, 11782, 1957, 2174, 107730, 83, ...
[ 0.241943359375, 0.22802734375, 0.2188720703125, 0.1435546875, 0.2169189453125, 0.08441162109375, 0.2374267578125, 0.1435546875, 0.1768798828125, 0.0028076171875, 0.012603759765625, 0.1024169921875, 0.13623046875, 0.053466796875, 0.030548095703125, 0.013671875, 0.10552978515625, 0.0...
embed
67533201_c0
67533201
prolog
0
Title: Prolog "findall/3" does not return a list Problem title: Prolog "findall/3" does not return a list Tags: prolog Problem: Prolog "findall/3" does not return a list I am struggling to understand why findall/3 behaves as such in my program. Basically I have wrote I predicate , that is supposed t...
Prolog "findall/3" does not return a list Prolog "findall/3" does not return a list prolog LIST Prolog CASES SUBLIST Prolog "findall/3" does not return a list I am struggling to understand why findall/3 behaves as such in my program. Basically I have wrote I predicate , that is supposed to take a li...
[ 0.0167236328125, 0.00390625, 0.00096893310546875, -0.0010223388671875, -0.013671875, 0.017578125, -0.01263427734375, -0.00164031982421875, 0.0096435546875, -0.0211181640625, 0.01904296875, -0.004547119140625, -0.006866455078125, -0.0064697265625, 0.003448486328125, 0.017822265625, 0....
[ 1250, 4867, 111607, 5584, 18113, 959, 30646, 5303, 502, 195977, 74213, 111231, 14602, 237875, 28219, 15400, 7413, 68991, 1528, 54397, 1653, 2063, 67, 134598, 5646, 7722, 24941, 63262, 140909, 138, 80836, 118551, 62366, 77325, 84751, 46132, 1393...
[ 0.1353759765625, 0.2037353515625, 0.147705078125, 0.1876220703125, 0.2410888671875, 0.0989990234375, 0.185302734375, 0.184814453125, 0.07177734375, 0.1453857421875, 0.039764404296875, 0.1085205078125, 0.00531005859375, 0.024017333984375, 0.034423828125, 0.0279541015625, 0.14538574218...
embed
36476389_c0
36476389
prolog
0
Title: Solving a puzzle in prolog - generating a solution with constraints? Problem title: Solving a puzzle in prolog - generating a solution with constraints? Tags: prolog, clpfd Problem: Solving a puzzle in prolog - generating a solution with constraints? I'm using prolog to try to solve a kakuro puzzle. I have a lis...
Solving a puzzle in prolog - generating a solution with constraints? Solving a puzzle in prolog - generating a solution with constraints? prolog clpfd Solving Solution List all_distinct Solving a puzzle in prolog - generating a solution with constraints? I'm using prolog to try to solve a kakuro puzzle. I have a list o...
[ 0.0074462890625, 0.0057373046875, 0.006866455078125, 0.000431060791015625, -0.006866455078125, -0.00848388671875, -0.032470703125, 0.01177978515625, 0.005096435546875, -0.0390625, -0.01123046875, -0.0255126953125, 0.0167236328125, 0.00592041015625, 0.01336669921875, 0.02001953125, 0....
[ 6678, 6496, 104192, 23, 502, 4867, 12663, 29806, 678, 158, 2816, 4288, 10, 39557, 71, 187895, 32036, 756, 46295, 38893, 1916, 17368, 9790, 86869, 18795, 11951, 5303, 91736, 627, 136, 313, 33636, 15555, 72134, 6275, 12638, 16530, 339, 140909...
[ 0.141357421875, 0.06549072265625, 0.222412109375, 0.1011962890625, 0.1878662109375, 0.2451171875, 0.1693115234375, 0.1734619140625, 0.151611328125, 0.1290283203125, 0.2064208984375, 0.1898193359375, 0.0362548828125, 0.01251220703125, 0.03387451171875, 0.0887451171875, 0.0693969726562...
embed
66251859_c0
66251859
prolog
0
Title: Can single sided unification improve error handling? Problem title: Can single sided unification improve error handling? Tags: unification, prolog, swi-prolog Problem: Can single sided unification improve error handling? Inspired by this question , I am trying to harden error handling of reverse/2. So I tried th...
Can single sided unification improve error handling? Can single sided unification improve error handling? unification prolog swi-prolog Can instantiation_error type_error ERROR Type Arguments Can single sided unification improve error handling? Inspired by this question , I am trying to harden error handling of reverse...
[ -0.01092529296875, 0.042236328125, 0.0164794921875, -0.005218505859375, 0.00201416015625, 0.00341796875, -0.003936767578125, 0.0034942626953125, 0.013916015625, -0.0284423828125, 0.006317138671875, -0.00055694580078125, 0.0169677734375, -0.0220947265625, 0.040283203125, -0.011535644531...
[ 4171, 11001, 5609, 71, 51, 41274, 52295, 18499, 45064, 502, 4867, 91, 2452, 3454, 34648, 14, 188800, 10644, 151206, 24638, 60457, 112140, 156241, 31577, 182, 555, 39531, 184, 12477, 37842, 208124, 171581, 43240, 5885, 9790, 237, 145823, 15549...
[ 0.093505859375, 0.183837890625, 0.1632080078125, 0.0660400390625, 0.1868896484375, 0.2083740234375, 0.1776123046875, 0.172607421875, 0.177734375, 0.0703125, 0.1873779296875, 0.003662109375, 0.1510009765625, 0.0816650390625, 0.0362548828125, 0.039794921875, 0.1614990234375, 0.093383...
embed
53660041_c1
53660041
prolog
1
,Result). comb(0,_,[]). comb(N,[X|T],[X|Comb]) :-N>0,N1 is N-1,comb(N1,T,Comb). comb(N,[_|T],Comb) :-N>0,comb(N,T,Comb). ?permutInListN([1,2,vacio],2,L). %output L = [1, 2] L = [2, 1] L = [1, empty] L = [empty, 1] L = [2, empty] L = [empty, 2] discard the listResul which no contains empty because when N=2 the posible q...
,Result). comb(0,_,[]). comb(N,[X|T],[X|Comb]) :-N>0,N1 is N-1,comb(N1,T,Comb). comb(N,[_|T],Comb) :-N>0,comb(N,T,Comb). ?permutInListN([1,2,vacio],2,L). %output L = [1, 2] L = [2, 1] L = [1, empty] L = [empty, 1] L = [2, empty] L = [empty, 2] discard the listResul which no contains empty because when N=2 the posible q...
[ -0.0208740234375, 0.001190185546875, 0.0177001953125, 0.00885009765625, 0.007598876953125, -0.01348876953125, -0.0086669921875, -0.007080078125, 0.028564453125, -0.006439208984375, 0.00103759765625, 0.0164794921875, 0.0113525390625, 0.0147705078125, -0.0247802734375, 0.007110595703125,...
[ 4, 4332, 7, 7136, 194, 375, 275, 2389, 454, 839, 1542, 618, 10770, 418, 83, 541, 5759, 277, 705, 1264, 14311, 4153, 154663, 133063, 330, 3521, 304, 866, 1745, 6056, 339, 116, 201505, 33548, 17116, 5861, 5303, 10178, 110, 70541, 6637, ...
[ 0.037078857421875, 0.0960693359375, 0.120361328125, 0.196044921875, 0.08203125, 0.10888671875, 0.174072265625, 0.1124267578125, 0.011138916015625, 0.144775390625, 0.0662841796875, 0.075927734375, 0.06842041015625, 0.08306884765625, 0.055816650390625, 0.153076171875, 0.1934814453125, ...
embed
23311277_c0
23311277
prolog
0
Title: loop until a it enter a valid value in prolog Problem title: loop until a it enter a valid value in prolog Tags: validation, prolog Problem: loop until a it enter a valid value in prolog I am new to prolog. I have only the very basic knowledge in Prolog. I wrote this code in Prolog and I have no idea how to impl...
loop until a it enter a valid value in prolog loop until a it enter a valid value in prolog validation prolog go:-write Enter Name Year Month Date loop until a it enter a valid value in prolog I am new to prolog. I have only the very basic knowledge in Prolog. I wrote this code in Prolog and I have no idea how to imple...
[ 0.0296630859375, -0.00933837890625, 0.0269775390625, 0.026123046875, -0.005523681640625, 0.0234375, -0.004486083984375, 0.0181884765625, -0.00185394287109375, -0.0244140625, 0.01513671875, -0.01092529296875, 0.003631591796875, 0.01324462890625, 0.009765625, -0.00106048583984375, 0.02...
[ 40956, 24189, 10, 442, 30957, 35604, 34292, 23, 502, 4867, 44622, 738, 434, 18781, 60816, 15757, 42552, 12982, 127, 25512, 3525, 62822, 51359, 1250, 54397, 18151, 6528, 29479, 2831, 3444, 22008, 1919, 3334, 101207, 74481, 35509, 117371, 2367,...
[ 0.2403564453125, 0.2060546875, 0.110107421875, 0.1182861328125, 0.1934814453125, 0.2122802734375, 0.1668701171875, 0.032745361328125, 0.15771484375, 0.2088623046875, 0.1905517578125, 0.04296875, 0.038055419921875, 0.1103515625, 0.2037353515625, 0.12841796875, 0.1591796875, 0.125122...
embed
15560379_c0
15560379
prolog
0
Title: Prolog - append to wrong list Problem title: Prolog - append to wrong list Tags: prolog Problem: Prolog - append to wrong list temperature(thessaloniki,january,24,1). temperature(thessaloniki,january,25,-2). temperature(katerini,january,24,3). temperature(loutsa,feb,25,1). temp([],[],[]). temp([H|T],L2,L3) :- te...
Prolog - append to wrong list Prolog - append to wrong list prolog Prolog Prolog - append to wrong list We have towns with temperatures and dates. And we need to add them to the correct list. I think the rules is right but when I run it with TkEclipse I get this: and as I watched at the tracer of program take only the ...
[ 0.01953125, 0.01495361328125, 0.0091552734375, -0.002685546875, -0.0027618408203125, -0.01214599609375, -0.01708984375, 0.0308837890625, 0.00927734375, 0.00103759765625, 0.0218505859375, -0.000400543212890625, -0.006195068359375, 0.0079345703125, 0.02001953125, 0.00060272216796875, 0...
[ 1250, 4867, 114689, 71, 47, 44691, 5303, 502, 765, 59444, 7, 52768, 136, 112474, 3871, 15190, 26785, 5351, 91736, 83, 7108, 1284, 11675, 678, 384, 92, 647, 106371, 184, 903, 192509, 1152, 3443, 1528, 5646, 4734, 5117, 2347, 99507, 5898, ...
[ 0.16162109375, 0.244873046875, 0.17724609375, 0.095947265625, 0.114501953125, 0.21484375, 0.2060546875, 0.1201171875, 0.001220703125, 0.177001953125, 0.0654296875, 0.233154296875, 0.037811279296875, 0.1304931640625, 0.003936767578125, 0.104248046875, 0.130126953125, 0.0553588867187...
embed
32728480_c0
32728480
prolog
0
Title: Recursion in Prolog and more Problem title: Recursion in Prolog and more Tags: recursion, prolog, transitive-closure Problem: Recursion in Prolog and more I have this knowledgebase in prolog of a air company and their flighs: flight(departure,arrive,day). flight(london,paris,monday). flight(paris,barcelona,thurs...
Recursion in Prolog and more Recursion in Prolog and more recursion prolog transitive-closure Recursion Prolog Departure Arrive Day Recursion in Prolog and more I have this knowledgebase in prolog of a air company and their flighs: recursive rules: And with this I can ask the question: is there a connection possible be...
[ 0.00360107421875, 0.0103759765625, 0.0296630859375, 0.037109375, 0.002899169921875, 0.0020751953125, -0.011474609375, -0.00164794921875, 0.00188446044921875, -0.033203125, -0.00238037109375, -0.0169677734375, -0.0179443359375, 0.0113525390625, 0.005645751953125, -0.0186767578125, 0.0...
[ 165428, 42, 6889, 23, 1250, 4867, 1286, 136, 195625, 1830, 502, 62621, 5844, 170224, 262, 2500, 64986, 272, 10013, 51359, 37382, 1831, 14380, 12564, 6958, 91736, 26458, 9655, 2685, 10, 94878, 7722, 17721, 134442, 231826, 76, 4759, 4445, 129...
[ 0.1612548828125, 0.16796875, 0.1513671875, 0.04058837890625, 0.1424560546875, 0.2484130859375, 0.07025146484375, 0.1473388671875, 0.2236328125, 0.0858154296875, 0.1160888671875, 0.1142578125, 0.1761474609375, 0.1571044921875, 0.00372314453125, 0.1038818359375, 0.09320068359375, 0.0...
embed
42591554_c0
42591554
prolog
0
Title: swi-prolog Combination of lists whose heads are unique Problem title: swi-prolog Combination of lists whose heads are unique Tags: prolog, list, combinations Problem: swi-prolog Combination of lists whose heads are unique I tried to modify this combination predicate: comb(+PairCount,+List,-Combination)/3 comb(0,...
swi-prolog Combination of lists whose heads are unique swi-prolog Combination of lists whose heads are unique prolog list combinations Combination PairCount List Comb N-1 CombinationList swi-prolog Combination of lists whose heads are unique I tried to modify this combination predicate: To make it include only lists wi...
[ -0.03125, 0.0244140625, 0.00787353515625, -0.0135498046875, -0.00836181640625, -0.002899169921875, -0.0126953125, 0.00885009765625, 0.017333984375, -0.036865234375, -0.007080078125, -0.00421142578125, 0.037841796875, 0.01116943359375, -0.01434326171875, 0.0014190673828125, 0.00195312...
[ 91, 2452, 3454, 4867, 106935, 19, 111, 5303, 124901, 10336, 7, 621, 36998, 502, 162515, 1342, 481, 108210, 32036, 3288, 275, 541, 5759, 154663, 37842, 2811, 40383, 1653, 2063, 67, 26698, 4734, 678, 3229, 11675, 903, 5608, 2046, 1884, 4358...
[ 0.040069580078125, 0.1937255859375, 0.1248779296875, 0.20947265625, 0.1915283203125, 0.1300048828125, 0.00372314453125, 0.192626953125, 0.039031982421875, 0.1898193359375, 0.03277587890625, 0.01580810546875, 0.2379150390625, 0.13720703125, 0.223876953125, 0.0770263671875, 0.019638061...
embed
26856951_c1
26856951
prolog
1
3 are meant to be initialized at 0 ?-checkWin([...],0,0). and increment as matches are found but, instead, it resets to 0 everytime the predicate calls recursion. Current Output: ?- checkWin( [['b0','b0','b0','S1','s1'], ['b0','b0','b0','b0','B0'], ['b0','b0','b0','s1','S2'], ['b0','b0','b0','b0','s2'], ['b2','b0','b0'...
3 are meant to be initialized at 0 ?-checkWin([...],0,0). and increment as matches are found but, instead, it resets to 0 everytime the predicate calls recursion. Current Output: ?- checkWin( [['b0','b0','b0','S1','s1'], ['b0','b0','b0','b0','B0'], ['b0','b0','b0','s1','S2'], ['b0','b0','b0','b0','s2'], ['b2','b0','b0'...
[ 0.000804901123046875, 0.00182342529296875, 0.0198974609375, 0.01324462890625, -0.0062255859375, 0.0068359375, -0.003387451171875, -0.0035247802734375, 0.029541015625, 0.0302734375, 0.01263427734375, 0.0262451171875, 0.02197265625, -0.000835418701171875, 0.0164794921875, 0.0052490234375...
[ 138, 621, 131148, 47, 186, 61475, 29367, 99, 757, 705, 9, 78292, 92049, 46344, 63527, 194, 136, 6, 158661, 237, 14858, 14037, 1284, 64457, 442, 168398, 7, 11907, 6032, 1653, 2063, 67, 11782, 195625, 1830, 5, 114063, 13538, 7077, 12765, ...
[ 0.209228515625, 0.06683349609375, 0.1978759765625, 0.14892578125, 0.0204010009765625, 0.206298828125, 0.1407470703125, 0.10693359375, 0.2080078125, 0.11474609375, 0.031219482421875, 0.226806640625, 0.27001953125, 0.030303955078125, 0.18310546875, 0.0181121826171875, 0.028564453125, ...
embed
17948840_c1
17948840
prolog
1
N@<Right. %traversals. %preorder -- N,Left,Right preorder(t,L) :- bTTree(t), bTTree(t(N,Left,Right)), append(N,[Left|Right],L). preorder(t,L) :- bTTree(t(_,Left,_), preorder(Left,L). preorder(t,L) :- bTTree(t(_,_,Right), preorder(Right,L). %inorder -- Left,N,Right. inorder(t,L) :- bTTree(t), bTTree(t(N,Left,Right)), a...
N@<Right. %traversals. %preorder -- N,Left,Right preorder(t,L) :- bTTree(t), bTTree(t(N,Left,Right)), append(N,[Left|Right],L). preorder(t,L) :- bTTree(t(_,Left,_), preorder(Left,L). preorder(t,L) :- bTTree(t(_,_,Right), preorder(Right,L). %inorder -- Left,N,Right. inorder(t,L) :- bTTree(t), bTTree(t(N,Left,Right)), a...
[ 0.033935546875, 0.007720947265625, 0.023193359375, -0.0169677734375, 0.0235595703125, 0.0067138671875, -0.000850677490234375, -0.011474609375, 0.0230712890625, -0.040283203125, -0.00360107421875, -0.01422119140625, -0.0126953125, -0.00830078125, 0.00994873046875, 0.00775146484375, 0....
[ 541, 981, 16093, 1052, 22553, 5, 1745, 1517, 7864, 16765, 4692, 80596, 4210, 4, 5267, 2480, 479, 18, 866, 15772, 876, 13739, 107, 13, 839, 114689, 71, 58745, 194, 73, 23, 4594, 1305, 33938, 568, 86250, 12638, 110, 112, 100, 87, 3949, ...
[ 0.2054443359375, 0.2027587890625, 0.122802734375, 0.0985107421875, 0.2047119140625, 0.03558349609375, 0.16748046875, 0.1767578125, 0.27685546875, 0.239501953125, 0.20556640625, 0.282470703125, 0.07318115234375, 0.038665771484375, 0.09014892578125, 0.1732177734375, 0.1658935546875, ...
embed
37067612_c0
37067612
prolog
0
Title: Prolog recursion and accumulators Problem title: Prolog recursion and accumulators Tags: prolog Problem: Prolog recursion and accumulators I am new to Prolog programming. I am doing recursive classification predicate with accumulator (I believe I need accumulator). Suppose I have following rules: species(tiger)....
Prolog recursion and accumulators Prolog recursion and accumulators prolog Prolog classification_aux Specie Accum gray_tree_frog Prolog recursion and accumulators I am new to Prolog programming. I am doing recursive classification predicate with accumulator (I believe I need accumulator). Suppose I have following rules...
[ -0.0001583099365234375, 0.0186767578125, 0.0166015625, 0.0220947265625, -0.028564453125, 0.01239013671875, -0.01483154296875, 0.0101318359375, -0.004669189453125, -0.038330078125, 0.0234375, -0.005126953125, -0.01287841796875, -0.0012664794921875, 0.03076171875, 0.001129150390625, 0....
[ 1250, 4867, 195625, 136, 183278, 22230, 1830, 502, 40865, 1363, 10442, 24990, 478, 29899, 316, 4224, 53, 62600, 211209, 3525, 56037, 5844, 1653, 2063, 67, 678, 1290, 18822, 3871, 121691, 25632, 91736, 30646, 1791, 147, 7668, 61112, 100, 344...
[ 0.1336669921875, 0.20361328125, 0.194580078125, 0.0256805419921875, 0.2012939453125, 0.094970703125, 0.0276031494140625, 0.0908203125, 0.18212890625, 0.046295166015625, 0.140625, 0.10455322265625, 0.04248046875, 0.0609130859375, 0.110107421875, 0.09765625, 0.024871826171875, 0.1408...
embed
9336371_c2
9336371
prolog
2
directory `/home/user/pl-5.10.1/packages/xpce/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/user/pl-5.10.1/packages/xpce' make[1]: *** [objects] Error 1 make[1]: Leaving directory `/home/user/pl-5.10.1/packages' make: *** [packages] Error 2 Code signals: -I/usr/include, /usr/include/X11/extensions/...
directory `/home/user/pl-5.10.1/packages/xpce/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/user/pl-5.10.1/packages/xpce' make[1]: *** [objects] Error 1 make[1]: Leaving directory `/home/user/pl-5.10.1/packages' make: *** [packages] Error 2 Code signals: -I/usr/include, /usr/include/X11/extensions/...
[ 0.002166748046875, -0.000701904296875, 0.0111083984375, -0.00445556640625, 0.020751953125, 0.0081787109375, -0.022705078125, -0.01080322265625, 0.004547119140625, 0.0213623046875, -0.00457763671875, -0.005523681640625, 0.0185546875, 0.00299072265625, -0.01446533203125, 0.0145263671875,...
[ 14364, 53, 64, 29552, 65918, 2424, 10342, 10179, 50412, 29102, 425, 254, 329, 19437, 3249, 39556, 24428, 5584, 212059, 116, 54642, 6496, 187694, 106, 25256, 12, 28864, 26073, 568, 223, 217028, 1542, 1662, 128872, 18280, 29223, 53861, 3355, ...
[ 0.146484375, 0.1004638671875, 0.04998779296875, 0.1607666015625, 0.15185546875, 0.1533203125, 0.1224365234375, 0.1925048828125, 0.0804443359375, 0.2041015625, 0.09088134765625, 0.1151123046875, 0.209716796875, 0.1998291015625, 0.182373046875, 0.03826904296875, 0.058135986328125, 0....
embed
61643680_c1
61643680
prolog
1
iao,[room8,room1]). iterativefree(_,[]). iterativefree(X,Y) :- Y=[H|T] , H \= X , iterativefree(X,T). free(X) :- forall(guest(_,Y) , (Y \= [_|_] , Y \= X) ). free(X) :- forall(guest(_,Y) , (Y=[H|T] , H \= X) ) , iterativefree(X,T). trace , free(room5) Call:free(room5) Call:guest(_16142, _16144) Exit:guest(amo, [room1, ...
iao,[room8,room1]). iterativefree(_,[]). iterativefree(X,Y) :- Y=[H|T] , H \= X , iterativefree(X,T). free(X) :- forall(guest(_,Y) , (Y \= [_|_] , Y \= X) ). free(X) :- forall(guest(_,Y) , (Y=[H|T] , H \= X) ) , iterativefree(X,T). trace , free(room5) Call:free(room5) Call:guest(_16142, _16144) Exit:guest(amo, [room1, ...
[ 0.0037994384765625, 0.0145263671875, 0.030029296875, 0.0157470703125, -0.01214599609375, -0.00408935546875, -0.0272216796875, 0.0233154296875, 0.01708984375, -0.01190185546875, 0.0118408203125, 0.0203857421875, 0.01239013671875, -0.01336669921875, -0.0191650390625, 0.006805419921875, ...
[ 5326, 31, 28905, 1019, 76172, 17, 720, 45023, 32087, 454, 1542, 1723, 15772, 990, 841, 58745, 618, 572, 1193, 6, 4092, 5584, 21325, 144851, 43317, 26265, 2485, 152837, 151525, 116553, 5443, 6144, 17155, 2489, 758, 37321, 13683, 10057, 19035...
[ 0.119140625, 0.1240234375, 0.167724609375, 0.1591796875, 0.06475830078125, 0.012664794921875, 0.1602783203125, 0.1173095703125, 0.1802978515625, 0.003509521484375, 0.07415771484375, 0.10357666015625, 0.036895751953125, 0.089599609375, 0.05572509765625, 0.035491943359375, 0.0819091796...
embed
60292807_c0
60292807
prolog
0
Title: How to use DCG in Prolog Problem title: How to use DCG in Prolog Tags: dcg, parsing, prolog, swi-prolog, tree Problem: How to use DCG in Prolog So I'm currently trying to achieve something similar to this tree, using a text file containing courses and the student ID's of anyone attending it. courses( [ ('MATH222...
How to use DCG in Prolog How to use DCG in Prolog dcg parsing prolog swi-prolog tree How DCG Prolog MATH2221 MATH2251 COMP2231 courses.txt Stream read_line_to_codes end_of_file How to use DCG in Prolog So I'm currently trying to achieve something similar to this tree, using a text file containing courses and the studen...
[ 0.041015625, -0.0172119140625, -0.007781982421875, 0.0264892578125, 0.00023555755615234375, 0.0196533203125, -0.01385498046875, -0.01116943359375, 0.000732421875, -0.06396484375, -0.01031494140625, -0.01202392578125, -0.029296875, -0.00154876708984375, 0.00396728515625, 0.0037384033203...
[ 11249, 4527, 391, 56367, 23, 1250, 4867, 47, 104, 238, 177, 366, 6953, 502, 2452, 3454, 53201, 139909, 4015, 3117, 11703, 61898, 5016, 132073, 124326, 115061, 12301, 2256, 188, 40899, 3564, 4390, 29822, 31577, 69307, 21373, 7986, 11435, 983...
[ 0.06903076171875, 0.1275634765625, 0.1275634765625, 0.25341796875, 0.066650390625, 0.161376953125, 0.232421875, 0.0247955322265625, 0.03179931640625, 0.0416259765625, 0.1414794921875, 0.1292724609375, 0.043792724609375, 0.094482421875, 0.139892578125, 0.09259033203125, 0.164794921875...
embed
19353198_c0
19353198
prolog
0
Title: Syntax error: operator expected when trying to compare Problem title: Syntax error: operator expected when trying to compare Tags: prolog Problem: Syntax error: operator expected when trying to compare I am trying to compare S1 with A1, S2 with A2, ..., S5 with A5 and get the total number of pairs that match eac...
Syntax error: operator expected when trying to compare Syntax error: operator expected when trying to compare prolog Syntax grade2 grade3 grade4 grade5 Syntax error: operator expected when trying to compare I am trying to compare S1 with A1, S2 with A2, ..., S5 with A5 and get the total number of pairs that match each ...
[ -0.01470947265625, 0.01171875, 0.003814697265625, 0.0023956298828125, 0.00439453125, -0.016357421875, -0.0086669921875, 0.0177001953125, -0.004486083984375, 0.00616455078125, 0.01361083984375, 0.002899169921875, 0.01177978515625, -0.0087890625, 0.0096435546875, -0.0220947265625, 0.00...
[ 19010, 86531, 18499, 39933, 84751, 3229, 31577, 47, 69101, 502, 4867, 44000, 304, 363, 617, 758, 159, 418, 678, 62, 3622, 14012, 80836, 14858, 12638, 3789, 70, 29481, 56, 45831, 12654, 8781, 51515, 86869, 2967, 44691, 18151 ]
[ 0.1383056640625, 0.1956787109375, 0.2041015625, 0.24951171875, 0.23583984375, 0.03192138671875, 0.1396484375, 0.064208984375, 0.2252197265625, 0.1104736328125, 0.1971435546875, 0.1024169921875, 0.116455078125, 0.024200439453125, 0.0531005859375, 0.137939453125, 0.077880859375, 0.05...
embed
5850992_c0
5850992
prolog
0
Title: Prolog variable names Problem title: Prolog variable names Tags: prolog Problem: Prolog variable names for example.. insert(X,Ys,[X|Ys]). insert(X,[Y|Ys],[Y|Zs]) :- insert(X,Ys,Zs) why the use of Zs as a variable.. the base case is obviously simple.. head of X::YS. but the recursive statement is going to be a co...
Prolog variable names Prolog variable names prolog Prolog Call _G522 Exit Redo _G595 Prolog variable names for example.. why the use of Zs as a variable.. the base case is obviously simple.. head of X::YS. but the recursive statement is going to be a continuation from the 1st goal. so for insert(a,[b,c],L) you get L=[a...
[ 0.006134033203125, 0.000766754150390625, -0.002899169921875, 0.0096435546875, -0.006866455078125, 0.0267333984375, -0.0341796875, -0.017822265625, 0.007568359375, -0.016357421875, 0.019287109375, -0.00531005859375, -0.0244140625, -0.0010528564453125, 0.01226806640625, 0.0303955078125, ...
[ 1250, 4867, 77336, 123055, 502, 26265, 724, 758, 4015, 5443, 217, 6096, 31, 8821, 15400, 4527, 567, 7, 3647, 7225, 8781, 10336, 26947, 195625, 5844, 63805, 9454, 1363, 1295, 271, 69236, 183540, 866, 339, 17932, 1733, 50960, 8561, 121392, ...
[ 0.15771484375, 0.236572265625, 0.271484375, 0.1351318359375, 0.105712890625, 0.1038818359375, 0.036346435546875, 0.10540771484375, 0.179443359375, 0.085205078125, 0.05657958984375, 0.083740234375, 0.1102294921875, 0.218017578125, 0.04693603515625, 0.08056640625, 0.1705322265625, 0....
embed
54836647_c0
54836647
prolog
0
Title: Prolog: Check that boolean predicate is of a certain form Problem title: Prolog: Check that boolean predicate is of a certain form Tags: prolog Problem: Prolog: Check that boolean predicate is of a certain form I am in first week of learning Prolog and I want to check that a boolean predicate is of a certain for...
Prolog: Check that boolean predicate is of a certain form Prolog: Check that boolean predicate is of a certain form prolog Prolog Check Term Prolog: Check that boolean predicate is of a certain form I am in first week of learning Prolog and I want to check that a boolean predicate is of a certain form. Specifically, I ...
[ 0.01611328125, 0.0234375, -0.006195068359375, 0.004669189453125, -0.002288818359375, 0.00433349609375, 0.00714111328125, -0.00160980224609375, -0.0069580078125, -0.040283203125, 0.01275634765625, -0.002288818359375, -0.0130615234375, 0.00101470947265625, 0.00360107421875, 0.00692749023...
[ 1250, 4867, 38679, 450, 337, 31, 34677, 1653, 2063, 67, 111, 24233, 3173, 83, 502, 2994, 5895, 52080, 12765, 29568, 707, 98320, 13379, 5117, 17366, 959, 756, 683, 2737, 23, 903, 2663, 436, 2396, 50960, 6528, 54529, 12638, 51339, 195625, ...
[ 0.1571044921875, 0.2442626953125, 0.2059326171875, 0.0596923828125, 0.0638427734375, 0.13623046875, 0.2025146484375, 0.16650390625, 0.2132568359375, 0.09246826171875, 0.088623046875, 0.07861328125, 0.153076171875, 0.0180206298828125, 0.10565185546875, 0.11328125, 0.042327880859375, ...
embed
13771188_c1
13771188
prolog
1
or less floors, or adjusting teams sobreposition times). And what I have so far: :- use_module(library(clpfd)). start(Fdigs,Floors,Vars):- length(Vars,5), %S -> start, E -> end, D -> duration %t -> transport, e -> excavating, f -> floor (build) Vars=[St,Et,Se,Ee,Cost], Se #>= Et, Ee #= Se + 10, Et #>=6, Cost #>= Ee * ...
or less floors, or adjusting teams sobreposition times). And what I have so far: :- use_module(library(clpfd)). start(Fdigs,Floors,Vars):- length(Vars,5), %S -> start, E -> end, D -> duration %t -> transport, e -> excavating, f -> floor (build) Vars=[St,Et,Se,Ee,Cost], Se #>= Et, Ee #= Se + 10, Et #>=6, Cost #>= Ee * ...
[ -0.012451171875, 0.0166015625, -0.006683349609375, 0.0069580078125, -0.007110595703125, -0.002349853515625, -0.005279541015625, 0.006683349609375, 0.0137939453125, -0.04248046875, 0.018310546875, -0.000911712646484375, 0.011474609375, 0.0145263671875, -0.0037384033203125, -0.0114746093...
[ 707, 40715, 74912, 126596, 87199, 1028, 40322, 20028, 765, 2060, 4527, 83279, 13, 150, 2844, 34937, 39557, 71, 4034, 919, 4803, 7, 365, 25251, 81827, 140909, 43317, 241, 3564, 391, 115, 6181, 1119, 73427, 1238, 177149, 3323, 37455, 69824, ...
[ 0.05224609375, 0.1680908203125, 0.1929931640625, 0.1611328125, 0.19189453125, 0.094482421875, 0.1307373046875, 0.10626220703125, 0.03082275390625, 0.08416748046875, 0.124755859375, 0.1981201171875, 0.0264434814453125, 0.0426025390625, 0.1109619140625, 0.050872802734375, 0.09576416015...
embed
33570606_c0
33570606
prolog
0
Title: Dealing with complicated prolog loops Problem title: Dealing with complicated prolog loops Tags: prolog, prolog-metainterpreter Problem: Dealing with complicated prolog loops I am using Prolog to encode some fairly complicated rules in a project of mine. There is a lot of recursion, including mutual recursion. P...
Dealing with complicated prolog loops Dealing with complicated prolog loops prolog prolog-metainterpreter Dealing pred1 pred2 Dealing with complicated prolog loops I am using Prolog to encode some fairly complicated rules in a project of mine. There is a lot of recursion, including mutual recursion. Part of the rules l...
[ 0.032470703125, -0.017822265625, 0.00136566162109375, 0.005035400390625, 0.0076904296875, -0.0005645751953125, 0.014892578125, 0.02685546875, 0.025390625, -0.048095703125, 0.029052734375, 0.01123046875, -0.020263671875, 0.00732421875, 0.041748046875, 0.01324462890625, 0.0177001953125...
[ 90943, 678, 96704, 297, 502, 4867, 40956, 35273, 158288, 56, 1653, 418, 304, 17368, 1250, 22, 40899, 180663, 91736, 13452, 5665, 5915, 195625, 199849, 6713, 162520, 54241, 13, 17721, 136, 182809, 2063, 4552, 34844, 54015, 27169, 110527, 452, ...
[ 0.1552734375, 0.0980224609375, 0.184326171875, 0.09844970703125, 0.1673583984375, 0.2437744140625, 0.2333984375, 0.12744140625, 0.18310546875, 0.012298583984375, 0.2247314453125, 0.0882568359375, 0.146484375, 0.04888916015625, 0.200927734375, 0.012939453125, 0.119873046875, 0.02496...
embed
13576403_c0
13576403
prolog
0
Title: Joining predicates in prolog Problem title: Joining predicates in prolog Tags: prolog Problem: Joining predicates in prolog I'm doing an exercise in Prolog using SWI-Prolog, to take a nested list and convert it into a list of elements and then make the sum of the elements, I made two separate predicates which ma...
Joining predicates in prolog Joining predicates in prolog prolog Joining my_flatten is_list Joining predicates in prolog I'm doing an exercise in Prolog using SWI-Prolog, to take a nested list and convert it into a list of elements and then make the sum of the elements, I made two separate predicates which make me both...
[ -0.00933837890625, 0.006683349609375, 0.0133056640625, 0.003143310546875, -0.0184326171875, 0.0400390625, 0.009521484375, 0.011962890625, 0.0289306640625, -0.046630859375, 0.0211181640625, -0.0211181640625, -0.0142822265625, -0.01177978515625, 0.005950927734375, 0.01068115234375, 0.0...
[ 113053, 1653, 2063, 1636, 502, 4867, 759, 150632, 510, 83, 6562, 23, 81979, 1250, 38969, 10752, 8512, 5303, 96760, 80854, 10554, 6626, 84797, 15044, 123309, 1542, 62624, 5037, 104064, 3934, 133266, 48650, 15190, 154663, 29117, 756, 30646, 296...
[ 0.2288818359375, 0.1898193359375, 0.2183837890625, 0.130126953125, 0.12646484375, 0.21337890625, 0.1182861328125, 0.2103271484375, 0.2022705078125, 0.129150390625, 0.1929931640625, 0.012603759765625, 0.0307159423828125, 0.1201171875, 0.1270751953125, 0.0870361328125, 0.13427734375, ...
embed
60644753_c0
60644753
prolog
0
Title: Prolog Recursion through Set of Problem title: Prolog Recursion through Set of Tags: recursion, prolog Problem: Prolog Recursion through Set of I'm trying to work on this Prolog rule you pass in an input of a list of movies and it returns a list of a star that are involved in that particular movie. Predicate: st...
Prolog Recursion through Set of Prolog Recursion through Set of recursion prolog Prolog Recursion Set captain_america chris_evan ant_man captain_marvel iron_man tom_holland Head Star1 Prolog Recursion through Set of I'm trying to work on this Prolog rule you pass in an input of a list of movies and it returns a list of...
[ 0.01361083984375, 0.00146484375, 0.0157470703125, 0.02197265625, -0.006072998046875, 0.0031585693359375, -0.0020294189453125, 0.0244140625, 0.00830078125, -0.03759765625, -0.017333984375, 0.0031890869140625, -0.0087890625, 0.00506591796875, -0.000904083251953125, 0.00579833984375, 0....
[ 1250, 4867, 165428, 42, 6889, 8305, 19943, 111, 195625, 1830, 502, 84495, 73, 152644, 17656, 164, 74655, 12936, 669, 2601, 193, 191, 3627, 6846, 1760, 44816, 4612, 418, 31577, 4488, 903, 79986, 27875, 23, 107730, 5303, 72304, 30646, 10, 6...
[ 0.1842041015625, 0.25439453125, 0.1820068359375, 0.181884765625, 0.128662109375, 0.1905517578125, 0.2401123046875, 0.227783203125, 0.255859375, 0.047393798828125, 0.1419677734375, 0.162109375, 0.10369873046875, 0.14794921875, 0.0638427734375, 0.083251953125, 0.1986083984375, 0.1279...
embed
56615310_c1
56615310
prolog
1
to use the Price as an entry variable): most_expensive(Name, Town):- home( Name, Town, Price), not((home( _, Town, P), P > Price)). The second most expensive home in a town is such that is the most expensive among the homes which are not the most expensive home in that town: second_most_expensive(Name, Town):- most_ex...
to use the Price as an entry variable): most_expensive(Name, Town):- home( Name, Town, Price), not((home( _, Town, P), P > Price)). The second most expensive home in a town is such that is the most expensive among the homes which are not the most expensive home in that town: second_most_expensive(Name, Town):- most_ex...
[ 0.005126953125, 0.000278472900390625, 0.004119873046875, 0.023681640625, 0.01141357421875, 0.024169921875, 0.003021240234375, 0.012451171875, 0.023681640625, -0.0189208984375, 0.021484375, -0.004180908203125, 0.0147705078125, -0.02294921875, -0.004486083984375, 0.0111083984375, -0.02...
[ 4527, 48025, 237, 42805, 77336, 2684, 83613, 33, 29888, 163612, 52649, 5368, 15757, 959, 29552, 436, 17932, 135587, 59444, 6044, 44556, 840, 10461, 4792, 33163, 2046, 15400, 20949, 5701, 16750, 17368, 169209, 30646, 70, 37397, 4426, 997, 387,...
[ 0.0936279296875, 0.219482421875, 0.044036865234375, 0.1971435546875, 0.2325439453125, 0.121337890625, 0.087890625, 0.139404296875, 0.16796875, 0.149658203125, 0.1708984375, 0.1439208984375, 0.150634765625, 0.08197021484375, 0.09832763671875, 0.023468017578125, 0.1551513671875, 0.19...
embed
72338922_c0
72338922
prolog
0
Title: Count the number of terms that are not atoms in a nested list Problem title: Count the number of terms that are not atoms in a nested list Tags: prolog Problem: Count the number of terms that are not atoms in a nested list I have these facts: vehicle(car,blue,[wheel,horn,optional(radio)]). vehicle(motorcycle,blu...
Count the number of terms that are not atoms in a nested list Count the number of terms that are not atoms in a nested list prolog Count Count the number of terms that are not atoms in a nested list I have these facts: I want to count all optional items (all "optional") of all blue vehicles - in this case 2. Right now ...
[ 0.00732421875, -0.007415771484375, -0.006439208984375, 0.006683349609375, 0.001739501953125, 0.00531005859375, -0.003814697265625, -0.0120849609375, 0.007537841796875, -0.019287109375, -0.0220947265625, -0.0380859375, 0.021728515625, 0.017822265625, 0.01904296875, 0.00799560546875, 0...
[ 108210, 14012, 69407, 450, 621, 959, 34627, 8512, 71, 5303, 7, 23, 502, 4867, 15824, 3444, 47, 54529, 756, 35829, 289, 55769, 5584, 109585, 57571, 117001, 7225, 787, 1653, 2063, 67, 28282, 82761, 144009, 51716, 38446, 24299, 6528, 27875, ...
[ 0.187255859375, 0.0927734375, 0.2158203125, 0.0211639404296875, 0.0692138671875, 0.1627197265625, 0.174560546875, 0.218994140625, 0.1097412109375, 0.17431640625, 0.000457763671875, 0.0205841064453125, 0.135986328125, 0.171630859375, 0.0645751953125, 0.04766845703125, 0.0067138671875,...
embed
64951295_c0
64951295
prolog
0
Title: Prolog query: how does addition matter for recursive queries Problem title: Prolog query: how does addition matter for recursive queries Tags: prolog Problem: Prolog query: how does addition matter for recursive queries I'm trying to write a predicate to find the nth element of a list. Initially I wrote somethin...
Prolog query: how does addition matter for recursive queries Prolog query: how does addition matter for recursive queries prolog Prolog N-1 Prolog query: how does addition matter for recursive queries I'm trying to write a predicate to find the nth element of a list. Initially I wrote something like this: It works for ...
[ -0.0037078857421875, 0.01495361328125, 0.01025390625, -0.0021820068359375, 0.002227783203125, 0.00628662109375, 0.0140380859375, 0.0015869140625, 0.0194091796875, -0.030029296875, 0.0247802734375, -0.038330078125, -0.0186767578125, 0.00830078125, 0.0205078125, -0.004486083984375, 0.0...
[ 1250, 4867, 41, 1294, 3642, 14602, 66044, 26866, 100, 195625, 5844, 10484, 502, 541, 5759, 31577, 33022, 1653, 2063, 67, 7413, 653, 927, 12830, 5303, 54397, 43240, 418, 116, 138, 201, 190, 757, 1193, 4879, 155937, 129980, 34648, 18499, 71...
[ 0.15380859375, 0.2275390625, 0.1544189453125, 0.0960693359375, 0.0845947265625, 0.06396484375, 0.2325439453125, 0.203369140625, 0.06219482421875, 0.190673828125, 0.1168212890625, 0.109619140625, 0.096435546875, 0.1363525390625, 0.197998046875, 0.0245208740234375, 0.03509521484375, ...
embed
21249849_c0
21249849
prolog
0
Title: Nested loops with accumulators in B-Prolog Problem title: Nested loops with accumulators in B-Prolog Tags: b-prolog, prolog Problem: Nested loops with accumulators in B-Prolog B-Prolog has logical loops. For example, that's how we can calculate sum of [1,2,3]: test1 :- foreach(A in 1..3, [], ac(Sa, 0), ( Sa^1 is...
Nested loops with accumulators in B-Prolog Nested loops with accumulators in B-Prolog b-prolog prolog Nested B-Prolog test1 test2 invalid_argument test3 Nested loops with accumulators in B-Prolog B-Prolog has logical loops. For example, that's how we can calculate sum of [1,2,3]: But when I try two nested loops with ac...
[ -0.000080108642578125, 0.0108642578125, 0.0029144287109375, 0.019287109375, 0.01263427734375, 0.02978515625, -0.01019287109375, 0.0029449462890625, 0.0189208984375, -0.03271484375, 0.034423828125, 0.00909423828125, 0.009521484375, 0.0159912109375, 0.03662109375, -0.0098876953125, 0.0...
[ 28701, 71, 40956, 7, 678, 183278, 22230, 335, 9, 10752, 4867, 876, 3454, 502, 3034, 304, 56649, 155937, 363, 1556, 62775, 289, 3642, 831, 74481, 10554, 111, 68252, 155761, 9790, 6626, 8512, 18499, 116267, 20117, 959, 26719, 159, 275, 5303...
[ 0.2406005859375, 0.125, 0.22802734375, 0.05157470703125, 0.1243896484375, 0.24169921875, 0.161376953125, 0.2010498046875, 0.04119873046875, 0.1552734375, 0.189697265625, 0.1318359375, 0.1165771484375, 0.11572265625, 0.100830078125, 0.012298583984375, 0.168701171875, 0.1456298828125...
embed
29002906_c0
29002906
prolog
0
Title: Trouble with finding length of list in Prolog Problem title: Trouble with finding length of list in Prolog Tags: prolog, list Problem: Trouble with finding length of list in Prolog I'm having trouble finding the length of a list. I know how to deal with lists such as say [a,b,c,d] or [a,b,[],d] or even [a,[[[]]]...
Trouble with finding length of list in Prolog Trouble with finding length of list in Prolog prolog list Trouble Prolog Len Len1 Trouble with finding length of list in Prolog I'm having trouble finding the length of a list. I know how to deal with lists such as say [a,b,c,d] or [a,b,[],d] or even [a,[[[]]],c,[]] each of...
[ 0.0115966796875, 0.0206298828125, 0.0091552734375, 0.0252685546875, -0.00531005859375, 0.000339508056640625, -0.004302978515625, 0.0107421875, 0.016845703125, -0.04833984375, -0.00531005859375, -0.01708984375, 0.012451171875, 0.01385498046875, 0.0213623046875, 0.00439453125, 0.021972...
[ 119671, 2661, 90791, 140909, 111, 5303, 23, 1250, 4867, 678, 502, 18226, 418, 19441, 63134, 70, 3714, 35142, 5154, 238, 71, 1398, 2967, 31577, 26366, 1810, 7225, 11, 275, 201, 80854, 1284, 11675, 18151, 28412, 1031, 16916, 75414, 11001, 1...
[ 0.109619140625, 0.05340576171875, 0.1533203125, 0.228759765625, 0.10101318359375, 0.2271728515625, 0.0460205078125, 0.178466796875, 0.2415771484375, 0.0180206298828125, 0.1439208984375, 0.119873046875, 0.021759033203125, 0.026824951171875, 0.122314453125, 0.05279541015625, 0.01972961...
embed
40062879_c0
40062879
prolog
0
Title: What does unique means in prolog Problem title: What does unique means in prolog Tags: prolog Problem: What does unique means in prolog I am trying to understand the unique predicate: for example: unique([H|T],[H|TU]) :- delete(T,E,TN), unique(TN,TU). delete(T,E,TN) is true if a list TN is identical to a list T ...
What does unique means in prolog What does unique means in prolog prolog What Enter Yes What does unique means in prolog I am trying to understand the unique predicate: for example: after removing all occurrences of an element E. So it comparing two lists T = ['a', 'b', 'd', 'f', 't'] TN =['a', 'b', 'd'] removes the oc...
[ -0.0012359619140625, 0.031982421875, 0.0279541015625, -0.006591796875, -0.00299072265625, 0.013916015625, 0.01116943359375, 0.004058837890625, 0.013671875, -0.0128173828125, 0.00274658203125, 0.01904296875, 0.0031280517578125, -0.001678466796875, 0.0087890625, 0.006072998046875, 0.01...
[ 4865, 14602, 36998, 26950, 23, 502, 4867, 60816, 32635, 28219, 1653, 2063, 67, 7103, 49146, 6496, 756, 74918, 42, 12830, 241, 37397, 6626, 5303, 384, 71, 420, 98300, 87388, 69098, 39210, 80854, 18151 ]
[ 0.06951904296875, 0.09405517578125, 0.316162109375, 0.1669921875, 0.084716796875, 0.14794921875, 0.228759765625, 0.1978759765625, 0.1654052734375, 0.0455322265625, 0.126708984375, 0.1695556640625, 0.07220458984375, 0.051483154296875, 0.06732177734375, 0.062255859375, 0.0791015625, ...
embed
49898738_c0
49898738
prolog
0
Title: Is this Prolog terminology correct? (fact, rule, procedure, predicate, ...) Problem title: Is this Prolog terminology correct? (fact, rule, procedure, predicate, ...) Tags: prolog, iso-prolog, terminology Problem: Is this Prolog terminology correct? (fact, rule, procedure, predicate, ...) Getting the terminology...
Is this Prolog terminology correct? (fact, rule, procedure, predicate, ...) Is this Prolog terminology correct? (fact, rule, procedure, predicate, ...) prolog iso-prolog terminology Prolog Is this Prolog terminology correct? (fact, rule, procedure, predicate, ...) Getting the terminology correct is part of the success ...
[ 0.0296630859375, 0.0242919921875, 0.00933837890625, 0.00701904296875, -0.0172119140625, 0.012451171875, -0.00083160400390625, -0.0022430419921875, 0.0019989013671875, -0.0023193359375, -0.006439208984375, 0.001220703125, -0.0146484375, -0.0035858154296875, 0.00579833984375, 0.003479003...
[ 2071, 903, 1250, 4867, 18614, 25443, 26785, 114700, 79986, 50491, 1653, 2063, 67, 502, 13882, 3454, 210732, 36272, 127219, 23755, 44691, 11814, 3688, 15969, 7909, 143459, 121742, 16454, 26253, 136, 129297, 27958, 100, 27985, 25031, 21135, 1596,...
[ 0.0210418701171875, 0.09375, 0.207763671875, 0.27294921875, 0.198974609375, 0.1416015625, 0.2041015625, 0.2154541015625, 0.209716796875, 0.2093505859375, 0.1650390625, 0.17041015625, 0.0927734375, 0.1468505859375, 0.0848388671875, 0.11962890625, 0.0302734375, 0.062744140625, 0.15...
embed
68585000_c0
68585000
prolog
0
Title: Using Logtalk Timeout function for Testing SWI Prolog Files Problem title: Using Logtalk Timeout function for Testing SWI Prolog Files Tags: logtalk, prolog, swi-prolog Problem: Using Logtalk Timeout function for Testing SWI Prolog Files This is follow up post associated with Using a Bash Script To Automate Test...
Using Logtalk Timeout function for Testing SWI Prolog Files Using Logtalk Timeout function for Testing SWI Prolog Files logtalk prolog swi-prolog Using Logtalk Timeout Testing SWI Prolog Files logtalk_tester Using Logtalk Timeout function for Testing SWI Prolog Files This is follow up post associated with Using a Bash ...
[ 0.023681640625, 0.0294189453125, 0.01031494140625, -0.0166015625, -0.01129150390625, -0.022216796875, 0.0186767578125, 0.000637054443359375, -0.014892578125, -0.041259765625, 0.00830078125, 0.01458740234375, -0.03564453125, -0.006988525390625, 0.0162353515625, 0.009521484375, 0.00399...
[ 345, 13146, 139109, 19055, 6056, 32354, 8647, 159, 38969, 1250, 4867, 42724, 12684, 502, 2452, 3454, 67, 144334, 84654, 51719, 134234, 29479, 15190, 1733, 142424, 109921, 4989, 9836, 95486, 1515, 254, 1496, 75101, 21658, 49938, 191619, 4727, ...
[ 0.005645751953125, 0.10601806640625, 0.242919921875, 0.1578369140625, 0.164306640625, 0.083251953125, 0.1824951171875, 0.0137939453125, 0.1800537109375, 0.0947265625, 0.159912109375, 0.093994140625, 0.107421875, 0.06573486328125, 0.1602783203125, 0.0732421875, 0.146484375, 0.073974...
embed
27907524_c0
27907524
prolog
0
Title: Purity of Prolog predicates that use impure primitives Problem title: Purity of Prolog predicates that use impure primitives Tags: prolog, logical-purity, logic-programming Problem: Purity of Prolog predicates that use impure primitives I know that var/1 , nonvar/1 and !/0 are impure primitives, but does their u...
Purity of Prolog predicates that use impure primitives Purity of Prolog predicates that use impure primitives prolog logical-purity logic-programming Purity Prolog plus_ Purity of Prolog predicates that use impure primitives I know that var/1 , nonvar/1 and !/0 are impure primitives, but does their use make every progr...
[ 0.00457763671875, 0.03857421875, 0.02783203125, 0.0019989013671875, -0.004119873046875, 0.0299072265625, -0.00537109375, -0.005645751953125, 0.0211181640625, -0.0390625, 0.004608154296875, 0.025634765625, -0.0274658203125, 0.00390625, 0.0126953125, 0.021240234375, 0.025146484375, 0...
[ 16915, 2481, 111, 1250, 4867, 1653, 2063, 4527, 21980, 3408, 128489, 502, 62775, 4717, 28966, 1001, 90, 3714, 285, 11583, 351, 1961, 136, 711, 107838, 621, 14602, 3249, 11907, 1528, 2856, 54397, 25632, 67, 18113, 68991, 237, 2174, 3542, 3...
[ 0.2044677734375, 0.1337890625, 0.06787109375, 0.148193359375, 0.2314453125, 0.1551513671875, 0.19287109375, 0.1197509765625, 0.1392822265625, 0.1861572265625, 0.200439453125, 0.1151123046875, 0.17626953125, 0.18310546875, 0.10467529296875, 0.169189453125, 0.0499267578125, 0.0561523...
embed
33554323_c0
33554323
prolog
0
Title: How to check if all elements of one list are members of another list in Prolog Problem title: How to check if all elements of one list are members of another list in Prolog Tags: list, compare, prolog Problem: How to check if all elements of one list are members of another list in Prolog I'm learning Prolog righ...
How to check if all elements of one list are members of another list in Prolog How to check if all elements of one list are members of another list in Prolog list compare prolog How Prolog How to check if all elements of one list are members of another list in Prolog I'm learning Prolog right now and the recursive thin...
[ 0.00830078125, -0.004730224609375, 0.00390625, 0.0216064453125, -0.01361083984375, 0.024658203125, 0.0021209716796875, -0.0093994140625, 0.0145263671875, -0.0164794921875, 0.0208740234375, 0.00823974609375, 0.01104736328125, 0.0252685546875, 0.00634765625, -0.004425048828125, 0.00299...
[ 11249, 47, 12765, 2174, 756, 80854, 1632, 5303, 621, 43032, 111, 15700, 1250, 4867, 69101, 502, 195625, 47644, 34844, 6626, 339, 304, 418, 70541, 23, 594, 27417, 866, 10461, 30646, 29568, 82449, 98320, 110, 201, 2046, 10336, 7413, 12830, ...
[ 0.035675048828125, 0.0538330078125, 0.20947265625, 0.0831298828125, 0.129638671875, 0.1927490234375, 0.072021484375, 0.1724853515625, 0.044158935546875, 0.2166748046875, 0.07720947265625, 0.12255859375, 0.156982421875, 0.2218017578125, 0.1630859375, 0.078857421875, 0.0474853515625, ...
embed
66302098_c0
66302098
prolog
0
Title: insert(I, [], [I, [], [] ] ). how to insert into a binary tree? Problem title: insert(I, [], [I, [], [] ] ). how to insert into a binary tree? Tags: prolog Problem: insert(I, [], [I, [], [] ] ). how to insert into a binary tree? To add a new element to the heap we must: Create a node containing the value of this...
insert(I, [], [I, [], [] ] ). how to insert into a binary tree? insert(I, [], [I, [], [] ] ). how to insert into a binary tree? prolog mix3 insert(I, [], [I, [], [] ] ). how to insert into a binary tree? To add a new element to the heap we must: Create a node containing the value of this element, Tie this knot in the l...
[ -0.00799560546875, 0.00445556640625, 0.0034942626953125, 0.003875732421875, -0.00872802734375, 0.015869140625, -0.05126953125, -0.01336669921875, 0.0155029296875, -0.02490234375, 0.011474609375, -0.03173828125, -0.001220703125, 0.00138092041015625, 0.0108642578125, 0.00823974609375, ...
[ 183540, 568, 3642, 3934, 2394, 6635, 53201, 502, 4867, 17664, 363, 717, 15190, 3525, 12830, 47, 764, 2631, 8110, 151313, 110, 112, 70541, 34292, 17985, 10869, 4568, 17366, 5117, 201505, 3687, 2060, 25737, 11343, 28484, 18151, 3229, 903, 41,...
[ 0.267333984375, 0.1202392578125, 0.06982421875, 0.1417236328125, 0.1915283203125, 0.1617431640625, 0.2454833984375, 0.0928955078125, 0.1378173828125, 0.1856689453125, 0.1610107421875, 0.009918212890625, 0.1650390625, 0.1253662109375, 0.187255859375, 0.05352783203125, 0.1605224609375,...
embed
9090556_c0
9090556
prolog
0
Title: In Order Tree Traversal in Prolog Problem title: In Order Tree Traversal in Prolog Tags: prolog, tree Problem: In Order Tree Traversal in Prolog I'm new to Prolog and I'm trying write an in-order tree traversal where given a list of facts such as: leftSubtree(9, 7). leftSubtree(7, 1). leftSubtree(1, -2). leftSub...
In Order Tree Traversal in Prolog In Order Tree Traversal in Prolog prolog tree Order Tree Traversal Prolog Root Left Right LeftNode RightNode In Order Tree Traversal in Prolog I'm new to Prolog and I'm trying write an in-order tree traversal where given a list of facts such as: I can use inOrder(9,X). to print out a t...
[ 0.036865234375, 0.002838134765625, 0.00823974609375, -0.00970458984375, 0.0093994140625, 0.032958984375, -0.0260009765625, -0.00799560546875, 0.01348876953125, -0.048828125, -0.0035400390625, -0.0252685546875, -0.00897216796875, -0.01348876953125, 0.01055908203125, 0.00543212890625, ...
[ 360, 81206, 101344, 4937, 814, 2317, 23, 1250, 4867, 502, 53201, 150948, 2480, 90911, 5021, 112, 3525, 31577, 33022, 80596, 37317, 289, 34475, 5303, 15824, 4527, 143045, 56, 132, 1126, 1542, 28412, 1810, 70, 12989, 25632, 18151, 43240, 8781...
[ 0.1231689453125, 0.2255859375, 0.2442626953125, 0.1102294921875, 0.1561279296875, 0.0859375, 0.1282958984375, 0.1519775390625, 0.2144775390625, 0.10595703125, 0.226318359375, 0.1473388671875, 0.039886474609375, 0.0675048828125, 0.10595703125, 0.010894775390625, 0.01190185546875, 0....
embed
51906974_c0
51906974
prolog
0
Title: Prolog, result correctly given but false is printed Problem title: Prolog, result correctly given but false is printed Tags: prolog, prolog-toplevel, prolog-cut, dcg Problem: Prolog, result correctly given but false is printed I have for example the following function computing the set of all internal nodes in a...
Prolog, result correctly given but false is printed Prolog, result correctly given but false is printed prolog prolog-toplevel prolog-cut dcg Prolog Prolog, result correctly given but false is printed I have for example the following function computing the set of all internal nodes in a binary tree (nodes which have at...
[ 0.025390625, 0.003875732421875, 0.030517578125, 0.0147705078125, -0.0201416015625, 0.0260009765625, -0.009521484375, -0.01068115234375, -0.011962890625, -0.01177978515625, 0.00457763671875, 0.0052490234375, -0.01318359375, 0.02099609375, 0.034423828125, 0.01373291015625, 0.0238037109...
[ 1250, 4867, 16750, 26785, 34475, 1284, 98320, 28412, 297, 502, 13784, 67919, 19774, 32354, 242122, 5423, 756, 70796, 110, 988, 2394, 6635, 53201, 157, 29041, 31358, 44084, 3564, 18151 ]
[ 0.136474609375, 0.2236328125, 0.1680908203125, 0.0950927734375, 0.08721923828125, 0.09735107421875, 0.265625, 0.1605224609375, 0.050811767578125, 0.1038818359375, 0.02606201171875, 0.1090087890625, 0.1004638671875, 0.110595703125, 0.1339111328125, 0.091796875, 0.052764892578125, 0....
embed
66623590_c0
66623590
prolog
0
Title: How prolog derivation works in this query? Problem title: How prolog derivation works in this query? Tags: trace, concatenation, prolog, list Problem: How prolog derivation works in this query? I tried to write a simple Prolog program with the following ruleset. conc([],L,L). conc([X|L1],L2,[X|L3]):- conc(L1,L2,...
How prolog derivation works in this query? How prolog derivation works in this query? trace concatenation prolog list How Call Exit How prolog derivation works in this query? I tried to write a simple Prolog program with the following ruleset. Then I loaded this in the SWI-Prolog shell and executed the following query ...
[ 0.032958984375, 0.0244140625, 0.00070953369140625, 0.0150146484375, -0.004669189453125, 0.01007080078125, -0.01806640625, 0.003173828125, 0.0014801025390625, -0.03515625, -0.000701904296875, -0.028564453125, -0.0164794921875, -0.00933837890625, -0.0031585693359375, 0.0023193359375, 0...
[ 11249, 502, 4867, 30057, 1363, 43240, 23, 903, 41, 1294, 144851, 158, 4460, 33, 5303, 26265, 5443, 217, 37842, 33022, 8781, 1250, 1528, 25632, 91736, 126, 72367, 159, 38969, 10752, 128019, 71924, 13736, 140992, 28960, 2967, 79442, 53201, 69...
[ 0.09429931640625, 0.1724853515625, 0.2484130859375, 0.22265625, 0.1021728515625, 0.1663818359375, 0.0670166015625, 0.07708740234375, 0.1204833984375, 0.0732421875, 0.19091796875, 0.0279541015625, 0.07763671875, 0.0487060546875, 0.1129150390625, 0.161376953125, 0.122314453125, 0.074...
embed
49443708_c0
49443708
prolog
0
Title: How to read a file creating a list Problem title: How to read a file creating a list Tags: list, prolog Problem: How to read a file creating a list I have some code, looks like this: main :- open('input.txt', read, Input), repeat, read_line_to_codes(Input, Line), maplist(my_representation, Line, FinalLine), ( Li...
How to read a file creating a list How to read a file creating a list list prolog How input.txt Input read_line_to_codes Line my_representation FinalLine end_of_file How to read a file creating a list I have some code, looks like this: FinalLine is a list of integers, including some underscores (based on the input file...
[ 0.01031494140625, -0.015869140625, 0.00933837890625, 0.00946044921875, -0.023681640625, 0.0185546875, 0.008544921875, 0.01519775390625, -0.0047607421875, -0.026123046875, 0.0074462890625, -0.019287109375, -0.0142822265625, 0.00335693359375, 0.0140380859375, -0.00836181640625, 0.01110...
[ 11249, 47, 12301, 11435, 105233, 5303, 10, 502, 4867, 107730, 124326, 7077, 2256, 188, 40899, 16777, 759, 205913, 27188, 93232, 3564, 29822, 18151, 33342, 892, 26255, 1379, 12064, 77007, 40956, 84079, 12638, 720, 15190, 15700, 28282, 71679, 6...
[ 0.0662841796875, 0.03009033203125, 0.2413330078125, 0.2186279296875, 0.2088623046875, 0.23095703125, 0.037322998046875, 0.1453857421875, 0.16064453125, 0.173095703125, 0.1697998046875, 0.04962158203125, 0.140869140625, 0.07177734375, 0.156494140625, 0.149169921875, 0.055908203125, ...
embed
65892060_c0
65892060
prolog
0
Title: Non-linearity of Wielemaker-Demoen Unification Problem title: Non-linearity of Wielemaker-Demoen Unification Tags: prolog, swi-prolog, unification Problem: Non-linearity of Wielemaker-Demoen Unification This is a follow up to the question here about acyclic terms. I am now interested in cyclic terms, and it seem...
Non-linearity of Wielemaker-Demoen Unification Non-linearity of Wielemaker-Demoen Unification prolog swi-prolog unification Non-linearity Wielemaker-Demoen Unification Non-linearity of Wielemaker-Demoen Unification This is a follow up to the question here about acyclic terms. I am now interested in cyclic terms, and it...
[ 0.0032806396484375, 0.0174560546875, 0.0123291015625, 0.0021514892578125, -0.01226806640625, -0.00445556640625, -0.00433349609375, 0.003143310546875, -0.00091552734375, -0.03759765625, -0.009765625, 0.005706787109375, 0.00125885009765625, 0.005950927734375, 0.021728515625, 0.0132446289...
[ 3775, 2256, 147, 157617, 55474, 168678, 33, 992, 41274, 502, 4867, 2452, 3454, 51, 10, 187830, 69407, 60892, 238, 959, 176683, 192617, 3034, 7225, 4527, 150679, 14012, 32354, 26582, 17, 720, 187, 2481, 116, 653, 963, 1197, 2525, 5757, 685...
[ 0.0986328125, 0.1920166015625, 0.113037109375, 0.1795654296875, 0.2003173828125, 0.155029296875, 0.0924072265625, 0.1253662109375, 0.1126708984375, 0.078857421875, 0.138916015625, 0.1165771484375, 0.078857421875, 0.1641845703125, 0.009368896484375, 0.2161865234375, 0.2080078125, 0....
embed
29519514_c0
29519514
prolog
0
Title: Changing tedge/2 predicate from Lu &amp; Mead&#x27;s Prolog: A Tutorial Introduction Problem title: Changing tedge/2 predicate from Lu &amp; Mead&#x27;s Prolog: A Tutorial Introduction Tags: prolog Problem: Changing tedge/2 predicate from Lu & Mead's Prolog: A Tutorial Introduction the booklet "Prolog: A tutoria...
Changing tedge/2 predicate from Lu &amp; Mead&#x27;s Prolog: A Tutorial Introduction Changing tedge/2 predicate from Lu &amp; Mead&#x27;s Prolog: A Tutorial Introduction prolog Lu Changing Mead Prolog Tutorial Introduction Node1 Node2 SomeNode Changing tedge/2 predicate from Lu & Mead's Prolog: A Tutorial Introduction ...
[ -0.006317138671875, 0.004730224609375, 0.0093994140625, 0.0172119140625, 0.003875732421875, -0.0010528564453125, -0.0247802734375, 0.01019287109375, 0.021240234375, -0.0234375, 0.000446319580078125, 0.00994873046875, 0.00087738037109375, 0.00836181640625, 0.015380859375, 0.007171630859...
[ 108193, 214, 120, 61007, 12477, 1653, 2063, 67, 1295, 3350, 619, 25133, 1215, 712, 3768, 1250, 4867, 62, 183447, 44891, 502, 438, 112, 418, 304, 31384, 5021, 12877, 1974, 10752, 57143, 10763, 14631, 845, 32721, 6859, 66139, 1884, 15549, 2...
[ 0.193115234375, 0.023468017578125, 0.182373046875, 0.273193359375, 0.27587890625, 0.15625, 0.22900390625, 0.1009521484375, 0.011474609375, 0.150146484375, 0.0836181640625, 0.035858154296875, 0.127685546875, 0.1285400390625, 0.0223236083984375, 0.087158203125, 0.2239990234375, 0.026...
embed
42731062_c0
42731062
prolog
0
Title: Prolog Out of stack error Problem title: Prolog Out of stack error Tags: combinatorics, prolog, backtracking, failure-slice, permutation Problem: Prolog Out of stack error I'm working on Problem 26 from 99 Prolog Problems : P26 (**) Generate the combinations of K distinct objects chosen from the N elements of a ...
Prolog Out of stack error Prolog Out of stack error combinatorics prolog backtracking failure-slice permutation Prolog Out use_module Tot List Length Prefix Stem Suffix SubList SubTot Tot-1 Prolog Out of stack error I'm working on Problem 26 from 99 Prolog Problems : So my program is: My query result starts fine but th...
[ -0.003448486328125, 0.03759765625, 0.01092529296875, -0.0020904541015625, 0.0022735595703125, -0.00152587890625, -0.019775390625, 0.00701904296875, 0.01080322265625, -0.054931640625, -0.004058837890625, -0.0225830078125, 0.0240478515625, 0.003936767578125, 0.01446533203125, 0.011535644...
[ 1250, 4867, 13538, 111, 177261, 18499, 22321, 3826, 502, 4420, 125728, 137578, 13348, 561, 4527, 83279, 13715, 32036, 77554, 1914, 55923, 8694, 39, 142830, 8273, 154663, 7763, 5759, 20697, 15649, 1381, 10078, 1528, 41, 1294, 16750, 4034, 5885...
[ 0.1756591796875, 0.25634765625, 0.221923828125, 0.1995849609375, 0.256103515625, 0.2044677734375, 0.09759521484375, 0.019134521484375, 0.1295166015625, 0.0435791015625, 0.145751953125, 0.1396484375, 0.109375, 0.069091796875, 0.07293701171875, 0.1114501953125, 0.12255859375, 0.15686...
embed
35205994_c1
35205994
prolog
1
) :- G = ancestor_of(X,Y), ( member(G, Open) -> throw(loop(G,Open)) ; ancestor_of_aux(X, Y, [G|Open]) ). ancestor_of_aux(X, Y, _Open) :- child_of(Y, X). ancestor_of_aux(X, Z, Open) :- child_of(Z, Y), ancestor_of_open(X, Y, Open). Sample query: ?- time (ancestor_of_open(X,Y,[])). % 4 inferences , 0.000 CPU in 0.000 seco...
) :- G = ancestor_of(X,Y), ( member(G, Open) -> throw(loop(G,Open)) ; ancestor_of_aux(X, Y, [G|Open]) ). ancestor_of_aux(X, Y, _Open) :- child_of(Y, X). ancestor_of_aux(X, Z, Open) :- child_of(Z, Y), ancestor_of_open(X, Y, Open). Sample query: ?- time (ancestor_of_open(X,Y,[])). % 4 inferences , 0.000 CPU in 0.000 seco...
[ 0.006744384765625, 0.005950927734375, 0.0008697509765625, 0.01214599609375, -0.004852294921875, -0.0026397705078125, -0.0106201171875, -0.003662109375, 0.0220947265625, -0.05322265625, 0.03369140625, -0.000507354736328125, 0.007415771484375, -0.004302978515625, 0.046630859375, -0.02270...
[ 1388, 15772, 527, 2203, 60502, 1290, 4390, 1542, 4, 1723, 32786, 724, 13527, 33079, 104250, 132, 28354, 103264, 10442, 990, 29041, 1193, 567, 1511, 59636, 33209, 41, 705, 9, 1733, 201, 53498, 69098, 757, 8557, 86039, 94131, 12807, 128208, ...
[ 0.045074462890625, 0.06243896484375, 0.1961669921875, 0.109619140625, 0.18603515625, 0.1846923828125, 0.20751953125, 0.1036376953125, 0.0230560302734375, 0.1522216796875, 0.189697265625, 0.1348876953125, 0.2152099609375, 0.03363037109375, 0.1995849609375, 0.027679443359375, 0.1947021...
embed
74593739_c0
74593739
prolog
0
Title: How to deal with an empty list when finding last elements in a list of lists in Prolog? Problem title: How to deal with an empty list when finding last elements in a list of lists in Prolog? Tags: empty-list, list, predicate, prolog, recursion Problem: How to deal with an empty list when finding last elements in...
How to deal with an empty list when finding last elements in a list of lists in Prolog? How to deal with an empty list when finding last elements in a list of lists in Prolog? empty-list list predicate prolog recursion How Prolog last_in_lol last_in_list How to deal with an empty list when finding last elements in a li...
[ 0.00152587890625, -0.003265380859375, 0.002655029296875, 0.002288818359375, -0.0250244140625, 0.0166015625, 0.01483154296875, -0.01611328125, 0.007171630859375, 0.00909423828125, 0.02001953125, -0.01953125, -0.01171875, 0.021484375, 0.0103759765625, -0.0002231597900390625, 0.01397705...
[ 11249, 35142, 678, 142, 201505, 5303, 90791, 4568, 80854, 1250, 4867, 6562, 1653, 2063, 502, 195625, 73, 55722, 23, 59121, 67, 7413, 18151, 12477, 12830, 8781, 4488, 140992, 35782, 70541, 9620, 106117, 30646, 22225, 184 ]
[ 0.020843505859375, 0.1322021484375, 0.08837890625, 0.0400390625, 0.2412109375, 0.2105712890625, 0.08984375, 0.2127685546875, 0.1424560546875, 0.1571044921875, 0.220947265625, 0.193115234375, 0.1337890625, 0.14404296875, 0.07489013671875, 0.06817626953125, 0.1099853515625, 0.1285400...
embed
48371764_c0
48371764
prolog
0
Title: Prevent unification of variables within list Problem title: Prevent unification of variables within list Tags: prolog Problem: Prevent unification of variables within list I am trying to write a predicate that returns 1 if a variable X and a predicate f(X) are both elements of an input list L , and 0 if at least...
Prevent unification of variables within list Prevent unification of variables within list prolog Prevent f_in_list Val Prevent unification of variables within list I am trying to write a predicate that returns 1 if a variable X and a predicate f(X) are both elements of an input list L , and 0 if at least one of them is...
[ 0.000324249267578125, -0.002716064453125, 0.0103759765625, -0.004486083984375, -0.00897216796875, -0.00439453125, 0.006866455078125, 0.007568359375, -0.0059814453125, -0.021240234375, 0.0027923583984375, 0.0206298828125, 0.021728515625, 0.0023345947265625, -0.002532958984375, 0.0167236...
[ 1914, 16274, 51, 41274, 77336, 28032, 5303, 502, 4867, 1238, 73, 6562, 4769, 31577, 33022, 1653, 2063, 67, 30646, 106, 2174, 1193, 136, 1542, 15044, 80854, 107730, 339, 757, 19713, 132283, 134598, 59121, 8781, 18151, 2967, 1250, 11343, 4038...
[ 0.1651611328125, 0.1724853515625, 0.2071533203125, 0.16650390625, 0.25927734375, 0.1712646484375, 0.19482421875, 0.12890625, 0.2205810546875, 0.1378173828125, 0.1483154296875, 0.2091064453125, 0.21435546875, 0.113037109375, 0.075927734375, 0.1494140625, 0.1796875, 0.065673828125, ...
embed
4634867_c1
4634867
prolog
1
l. symptom(Patient,cold skin):- write('does'),write(Patient)write('have cold skin (y/n)?'), read(Reply), Reply=y,nl. symptom(Patient,weak pulse):- write('does'),write(Patient)write('have weak pulse(y/n)?'), read(Reply), Reply=y,nl. symptom(Patient,voice change):- write('does'),write(Patient)write('have voice change(y/n...
l. symptom(Patient,cold skin):- write('does'),write(Patient)write('have cold skin (y/n)?'), read(Reply), Reply=y,nl. symptom(Patient,weak pulse):- write('does'),write(Patient)write('have weak pulse(y/n)?'), read(Reply), Reply=y,nl. symptom(Patient,voice change):- write('does'),write(Patient)write('have voice change(y/n...
[ 0.01055908203125, -0.003936767578125, 0.01300048828125, 0.0135498046875, -0.010009765625, 0.0277099609375, -0.01544189453125, 0.00933837890625, -0.0223388671875, -0.0145263671875, 0.00921630859375, -0.01336669921875, -0.0184326171875, 0.000637054443359375, -0.000591278076171875, 0.0068...
[ 96, 5, 128668, 132, 8335, 118, 2517, 4, 8447, 71, 21722, 2077, 9, 33022, 246, 90, 434, 18781, 25, 68991, 91097, 53, 64, 19, 12301, 62479, 122813, 1369, 13169, 1177, 344, 55111, 13, 642, 965, 15549, 54479, 184, 11, 133054, 7432, 15520,...
[ 0.1136474609375, 0.05596923828125, 0.257080078125, 0.030792236328125, 0.10107421875, 0.17236328125, 0.1339111328125, 0.009490966796875, 0.1939697265625, 0.1015625, 0.2115478515625, 0.017547607421875, 0.015289306640625, 0.158935546875, 0.15234375, 0.154296875, 0.05743408203125, 0.12...
embed
15233616_c0
15233616
prolog
0
Title: &quot;not&quot; operator or negation in Prolog Problem title: &quot;not&quot; operator or negation in Prolog Tags: negation, prolog Problem: "not" operator or negation in Prolog Background I need to write a relation power(P) that looks through a list and decides if all but one element of P is zero. Here is what ...
&quot;not&quot; operator or negation in Prolog &quot;not&quot; operator or negation in Prolog negation prolog Prolog "not" operator or negation in Prolog Background I need to write a relation power(P) that looks through a list and decides if all but one element of P is zero. Here is what I have: Some resources suggest ...
[ 0.01116943359375, 0.005126953125, 0.03173828125, 0.0028533935546875, -0.005523681640625, 0.01141357421875, 0.00823974609375, -0.00811767578125, -0.012939453125, 0.00738525390625, -0.01226806640625, -0.00494384765625, -0.0164794921875, 0.00970458984375, 0.007080078125, 0.01507568359375,...
[ 10869, 1230, 41502, 39933, 707, 108, 125682, 23, 1250, 4867, 502, 41911, 14537, 683, 33342, 8305, 5303, 28288, 1284, 12830, 436, 83, 45234, 42459, 17368, 59226, 72896, 6226, 4420, 125728, 959, 13395, 2661, 41872, 102817, 202317, 16750, 30646,...
[ 0.263671875, 0.033782958984375, 0.0199127197265625, 0.248779296875, 0.0709228515625, 0.1739501953125, 0.1502685546875, 0.03204345703125, 0.1392822265625, 0.1954345703125, 0.1182861328125, 0.126220703125, 0.119873046875, 0.0086669921875, 0.0172882080078125, 0.0168609619140625, 0.08966...
embed
49036185_c1
49036185
prolog
1
/2 ERROR: However, there are definitions for: ERROR: f/1 include works but isn't parallel What does do what I want (not in parallel tho) is include : ?- set(11,L), include(f, L, O). 1 2 3 L = [1, 2, 3, 4, 5, 6, 7, 8, 9|...], O = [1, 2, 3] . concurrent [edit] runs! But is it parallel? I've been trying to get it work usi...
/2 ERROR: However, there are definitions for: ERROR: f/1 include works but isn't parallel What does do what I want (not in parallel tho) is include : ?- set(11,L), include(f, L, O). 1 2 3 L = [1, 2, 3, 4, 5, 6, 7, 8, 9|...], O = [1, 2, 3] . concurrent [edit] runs! But is it parallel? I've been trying to get it work usi...
[ 0.00360107421875, 0.00043487548828125, 0.002655029296875, 0.00074005126953125, -0.00897216796875, -0.000766754150390625, 0.00994873046875, 0.007354736328125, 0.004608154296875, -0.041015625, 0.019287109375, 0.0301513671875, -0.017822265625, 0.002685546875, 0.01507568359375, 0.006622314...
[ 12477, 151206, 24638, 33306, 80934, 1238, 11583, 26698, 43240, 1284, 56112, 18, 95103, 54, 2367, 3444, 10869, 23, 14461, 5423, 1662, 866, 420, 339, 180, 116, 138, 190, 305, 361, 382, 483, 133244, 45082, 127877, 83, 4488, 18113, 228006, 11...
[ 0.233642578125, 0.133544921875, 0.1097412109375, 0.040008544921875, 0.1343994140625, 0.1270751953125, 0.2122802734375, 0.2685546875, 0.1396484375, 0.0877685546875, 0.0926513671875, 0.07281494140625, 0.294677734375, 0.032318115234375, 0.0343017578125, 0.13134765625, 0.106689453125, ...
embed
41534302_c0
41534302
prolog
0
Title: How can I do the sequence &quot;If, Else if and Else&quot; in PROLOG? Problem title: How can I do the sequence &quot;If, Else if and Else&quot; in PROLOG? Tags: prolog Problem: How can I do the sequence "If, Else if and Else" in PROLOG? I need somenthing like this: if(list.contains(var)){ //do something }else if...
How can I do the sequence &quot;If, Else if and Else&quot; in PROLOG? How can I do the sequence &quot;If, Else if and Else&quot; in PROLOG? prolog How PROLOG list.contains anotherVar1 anotherVar2 anotherVar3 list1.contains list2.contains list3.contains list4.contains How can I do the sequence "If, Else if and Else" in ...
[ 0.012451171875, 0.0203857421875, -0.00885009765625, 0.021484375, 0.0031890869140625, -0.00836181640625, 0.003662109375, 0.0223388671875, -0.0031280517578125, -0.03125, 0.001861572265625, 0.00982666015625, -0.01129150390625, 0.02294921875, 0.020751953125, 0.009765625, -0.009521484375,...
[ 11249, 831, 87, 54, 40, 944, 3956, 91306, 4, 540, 184, 2174, 136, 41502, 23, 10514, 47510, 502, 4867, 5303, 98102, 15700, 81827, 363, 617, 70, 3871, 37842, 37076, 8306, 96276, 313, 12830, 175199, 32786 ]
[ 0.0565185546875, 0.06494140625, 0.010284423828125, 0.099609375, 0.07135009765625, 0.14990234375, 0.122314453125, 0.2110595703125, 0.044097900390625, 0.1737060546875, 0.1612548828125, 0.2396240234375, 0.1326904296875, 0.0139617919921875, 0.049652099609375, 0.14306640625, 0.23669433593...
embed
46633966_c0
46633966
prolog
0
Title: How to make predicate repeat N number of times in Prolog? Problem title: How to make predicate repeat N number of times in Prolog? Tags: prolog, list Problem: How to make predicate repeat N number of times in Prolog? I have a number of lists containing letters and I have written a predicate that checks whether o...
How to make predicate repeat N number of times in Prolog? How to make predicate repeat N number of times in Prolog? prolog list How Prolog How to make predicate repeat N number of times in Prolog? I have a number of lists containing letters and I have written a predicate that checks whether or not there are duplicates ...
[ -0.00750732421875, 0.0213623046875, 0.0048828125, 0.00732421875, -0.00775146484375, 0.0260009765625, 0.0228271484375, -0.007049560546875, -0.00665283203125, -0.00958251953125, -0.01226806640625, -0.0123291015625, -0.01043701171875, 0.007080078125, 0.005035400390625, 0.013671875, 0.02...
[ 11249, 3249, 1653, 2063, 67, 119140, 541, 14012, 20028, 23, 1250, 4867, 502, 5303, 120820, 59121, 12765, 36766, 171763, 1636, 13379, 765, 209, 3714, 110, 1614, 6562, 831, 11651, 3034, 24145, 11907, 3642, 33022, 5809, 7565, 57767, 195625, 18...
[ 0.07635498046875, 0.0960693359375, 0.1865234375, 0.2196044921875, 0.1273193359375, 0.2578125, 0.1697998046875, 0.1214599609375, 0.185791015625, 0.040435791015625, 0.1666259765625, 0.2279052734375, 0.137451171875, 0.141845703125, 0.1251220703125, 0.0180511474609375, 0.14306640625, 0...
embed
10808371_c0
10808371
prolog
0
Title: DCG output single variable instead of whole clause in a list Problem title: DCG output single variable instead of whole clause in a list Tags: prolog, dcg Problem: DCG output single variable instead of whole clause in a list I have a problem, while creating a question answer Prolog file. I have a database with l...
DCG output single variable instead of whole clause in a list DCG output single variable instead of whole clause in a list prolog dcg DCG Str road66 _G2791 _G2792 _G2793 DCG output single variable instead of whole clause in a list I have a problem, while creating a question answer Prolog file. I have a database with loc...
[ 0.0230712890625, -0.01190185546875, 0.0018768310546875, 0.00958251953125, 0.00011968612670898438, 0.021484375, 0.00347900390625, -0.0126953125, 0.012939453125, -0.0244140625, -0.0125732421875, -0.01239013671875, 0.0028228759765625, -0.00665283203125, 0.011474609375, 0.0096435546875, ...
[ 391, 56367, 140992, 11001, 77336, 64457, 28271, 70731, 13, 5303, 502, 4867, 104, 238, 177, 23351, 33816, 14604, 116518, 418, 304, 363, 111, 23, 2967, 105233, 9655, 35166, 1250, 11435, 63399, 31913, 831, 21771, 1810, 12921, 52895, 36746, 642...
[ 0.1104736328125, 0.25634765625, 0.178466796875, 0.1988525390625, 0.27294921875, 0.1259765625, 0.11474609375, 0.18798828125, 0.102294921875, 0.193115234375, 0.1180419921875, 0.2076416015625, 0.0269317626953125, 0.023895263671875, 0.0931396484375, 0.126220703125, 0.1226806640625, 0.2...
embed
50054098_c0
50054098
prolog
0
Title: Graph implementation (does graph include all vertices?) Problem title: Graph implementation (does graph include all vertices?) Tags: prolog Problem: Graph implementation (does graph include all vertices?) Trying to implement following predicate, which takes on input list of lists - one list = one tested graph T ...
Graph implementation (does graph include all vertices?) Graph implementation (does graph include all vertices?) prolog all Graph V-W V-_ _-V Graph implementation (does graph include all vertices?) Trying to implement following predicate, which takes on input list of lists - one list = one tested graph T (as edges) grap...
[ -0.007537841796875, 0.0185546875, -0.007080078125, 0.012451171875, -0.00970458984375, -0.005035400390625, -0.00970458984375, 0.02099609375, 0.0147705078125, -0.0103759765625, 0.0159912109375, -0.00616455078125, -0.004791259765625, 0.00579833984375, -0.01025390625, 0.0260009765625, 0....
[ 6524, 11727, 208124, 41382, 26698, 756, 95378, 5170, 502, 4867, 310, 1456, 856, 40858, 29479, 25632, 1653, 2063, 51776, 107730, 5303, 1632, 3034, 384, 162, 121303, 527, 68034, 109921, 96853, 111, 9774, 30646, 46312, 214, 2060, 13562, 275, 1...
[ 0.17822265625, 0.1346435546875, 0.1895751953125, 0.2266845703125, 0.0909423828125, 0.1011962890625, 0.1856689453125, 0.072021484375, 0.1231689453125, 0.179443359375, 0.10595703125, 0.08612060546875, 0.152099609375, 0.0290069580078125, 0.160888671875, 0.08929443359375, 0.0735473632812...
embed
58760554_c1
58760554
prolog
1
054,_4060,_4066,_3400] L = [_4054, _4060, _4066, _4072]. And yet more convoluted logging and modification: ?- length(L, 3), foreach((member(M,L),write((m,M," ")),write((l,L," ")),length(M,3),write((m,M," ")),writeln((l,L))),(true)). m,_60830, l,[_60830,_61872,_61878], m,[_61944,_61950,_61956], l,[[_61944,_61950,_61956]...
054,_4060,_4066,_3400] L = [_4054, _4060, _4066, _4072]. And yet more convoluted logging and modification: ?- length(L, 3), foreach((member(M,L),write((m,M," ")),write((l,L," ")),length(M,3),write((m,M," ")),writeln((l,L))),(true)). m,_60830, l,[_60830,_61872,_61878], m,[_61944,_61950,_61956], l,[[_61944,_61950,_61956]...
[ 0.005157470703125, 0.030517578125, -0.01129150390625, -0.006561279296875, 0.0118408203125, 0.00115966796875, 0.004150390625, -0.01495361328125, 0.022705078125, -0.041015625, 0.0296630859375, 0.01483154296875, 0.01214599609375, 0.0052490234375, 0.03125, -0.0123291015625, -0.0080566406...
[ 4777, 617, 2839, 4598, 14604, 363, 10700, 339, 2203, 12338, 4, 12825, 14373, 1286, 158, 23232, 3674, 459, 36659, 136, 129344, 705, 140909, 866, 8439, 100, 41581, 27417, 594, 434, 18781, 39, 141, 23986, 21320, 9774, 347, 170285, 1197, 96, ...
[ 0.156494140625, 0.1866455078125, 0.14013671875, 0.216064453125, 0.2275390625, 0.043212890625, 0.2047119140625, 0.198974609375, 0.103759765625, 0.2015380859375, 0.000152587890625, 0.18212890625, 0.03631591796875, 0.051605224609375, 0.0277862548828125, 0.1365966796875, 0.06228637695312...
embed
20643408_c0
20643408
prolog
0
Title: Do not backtrack over single argument Problem title: Do not backtrack over single argument Tags: prolog Problem: Do not backtrack over single argument I have a predicate that, given a list, creates a partition for this list (i.e it splits into two parts). This predicate can thus generate multiple solutions. For ...
Do not backtrack over single argument Do not backtrack over single argument prolog List Perm1 Perm2 Do not backtrack over single argument I have a predicate that, given a list, creates a partition for this list (i.e it splits into two parts). This predicate can thus generate multiple solutions. For each part of the par...
[ 0.01202392578125, 0.01068115234375, 0.00360107421875, 0.00098419189453125, -0.0191650390625, 0.00067901611328125, -0.023681640625, -0.005859375, 0.0029144287109375, -0.01092529296875, -0.020751953125, 0.01373291015625, 0.004058837890625, 0.0177001953125, 0.00787353515625, -0.0030822753...
[ 984, 959, 4420, 125728, 645, 11001, 10750, 502, 4867, 32036, 908, 39, 418, 304, 1653, 2063, 67, 34475, 5303, 28282, 2878, 1363, 65450, 3934, 6626, 63920, 139392, 48716, 51347, 12638, 2831, 756, 7722, 117, 14311, 21094, 3034, 581, 6275, 21...
[ 0.00909423828125, 0.09442138671875, 0.155517578125, 0.255859375, 0.130615234375, 0.1944580078125, 0.2509765625, 0.1435546875, 0.171875, 0.111328125, 0.179931640625, 0.1168212890625, 0.07244873046875, 0.1292724609375, 0.1075439453125, 0.1337890625, 0.03289794921875, 0.02281188964843...
embed
70898243_c0
70898243
prolog
0
Title: SWIPL PROLOG as JSON Query Problem title: SWIPL PROLOG as JSON Query Tags: prolog, swi-prolog Problem: SWIPL PROLOG as JSON Query I have a knowledge base represented as PROLOG facts. I run swipl commands in a pipeline, each step emitting a new set of facts. I append the new facts to the old knowledge base using ...
SWIPL PROLOG as JSON Query SWIPL PROLOG as JSON Query prolog swi-prolog SWIPL PROLOG JSON Query user_output query.pl fb.pl SWIPL PROLOG as JSON Query I have a knowledge base represented as PROLOG facts. I run swipl commands in a pipeline, each step emitting a new set of facts. I append the new facts to the old knowledg...
[ 0.0302734375, 0.032470703125, 0.0030364990234375, 0.00372314453125, -0.02099609375, -0.01220703125, -0.006439208984375, 0.00087738037109375, 0.00555419921875, -0.041015625, 0.00653076171875, 0.037841796875, -0.0264892578125, -0.002593994140625, 0.0079345703125, 0.0263671875, 0.016113...
[ 159, 38969, 21130, 10514, 47510, 237, 821, 58627, 58836, 502, 4867, 91, 2452, 3454, 38937, 6056, 41, 1294, 2424, 108642, 51359, 3647, 33636, 15824, 11675, 75101, 137158, 2256, 12638, 29954, 53225, 3525, 5423, 114689, 10332, 87109, 68185, 1124...
[ 0.046722412109375, 0.18408203125, 0.2255859375, 0.175537109375, 0.2418212890625, 0.0960693359375, 0.16455078125, 0.240966796875, 0.19384765625, 0.1279296875, 0.201416015625, 0.030914306640625, 0.2078857421875, 0.1065673828125, 0.0653076171875, 0.0755615234375, 0.1326904296875, 0.01...
embed
11757678_c0
11757678
prolog
0
Title: conflict_free/2 Problem title: conflict_free/2 Tags: list, prolog Problem: conflict_free/2 I'm trying to write a program that takes lists of packages and versions. It should be true if there are no conflicting versions, in the candidate set. That is, if there are no packages that are listed with different versio...
conflict_free/2 conflict_free/2 list prolog conflict_free libc6 Posn conflict_free/2 I'm trying to write a program that takes lists of packages and versions. It should be true if there are no conflicting versions, in the candidate set. That is, if there are no packages that are listed with different versions. I tried t...
[ -0.0020904541015625, -0.007415771484375, 0.022705078125, 0.0032501220703125, -0.016357421875, -0.01080322265625, -0.004425048828125, 0.0174560546875, 0.000820159912109375, 0.003936767578125, -0.009765625, 0.000751495361328125, 0.0147705078125, 0.00421142578125, -0.0203857421875, -0.002...
[ 79612, 32087, 12477, 5303, 502, 4867, 25474, 910, 13498, 19, 31577, 33022, 1528, 51776, 98169, 11389, 29568, 2174, 110, 214, 25469, 13, 5423, 145870, 12921, 37842, 4527, 19069, 17357, 7413, 63262, 111, 119140, 80854, 68991, 1884, 195625, 5844...
[ 0.236083984375, 0.1866455078125, 0.208740234375, 0.1666259765625, 0.1207275390625, 0.1802978515625, 0.05712890625, 0.1251220703125, 0.107421875, 0.1097412109375, 0.04315185546875, 0.07489013671875, 0.112548828125, 0.0645751953125, 0.163330078125, 0.2049560546875, 0.0728759765625, 0...
embed
57244381_c0
57244381
prolog
0
Title: Prolog recursion base case Problem title: Prolog recursion base case Tags: prolog, recursion Problem: Prolog recursion base case I have a slightly complex recursive function in prolog. What it does isn't super important because I'm pretty sure my problem lies in the method headers. V is a list that doesn't chang...
Prolog recursion base case Prolog recursion base case prolog recursion Prolog Vset Dlist Prolog recursion base case I have a slightly complex recursive function in prolog. What it does isn't super important because I'm pretty sure my problem lies in the method headers. V is a list that doesn't change in the entire func...
[ 0.0196533203125, 0.01092529296875, 0.01171875, 0.01031494140625, 0.0118408203125, 0.0057373046875, -0.0225830078125, -0.01422119140625, 0.01214599609375, -0.01397705078125, 0.01177978515625, -0.0023040771484375, -0.0157470703125, 0.01019287109375, -0.0194091796875, -0.00921630859375, ...
[ 1250, 4867, 195625, 1830, 3647, 7225, 502, 19044, 18, 391, 6562, 161549, 27140, 5844, 32354, 5526, 2967, 55300, 10336, 1314, 310, 83, 5303, 22027, 15549, 64194, 50065, 5773, 11651, 6024, 62479, 4343, 34292, 184750, 1295, 48402, 756, 142424, ...
[ 0.1461181640625, 0.2420654296875, 0.205810546875, 0.012786865234375, 0.190673828125, 0.1671142578125, 0.1190185546875, 0.2196044921875, 0.2183837890625, 0.1015625, 0.2607421875, 0.05926513671875, 0.1103515625, 0.0794677734375, 0.1724853515625, 0.0435791015625, 0.098388671875, 0.105...
embed
5050792_c0
5050792
prolog
0
Title: Prolog, triangular numbers, accumulators and tail recursion Problem title: Prolog, triangular numbers, accumulators and tail recursion Tags: triangular, tail-recursion, prolog, accumulator Problem: Prolog, triangular numbers, accumulators and tail recursion I'm working on a homework assignment, consisting of 2 p...
Prolog, triangular numbers, accumulators and tail recursion Prolog, triangular numbers, accumulators and tail recursion triangular tail-recursion prolog accumulator Prolog Prolog, triangular numbers, accumulators and tail recursion I'm working on a homework assignment, consisting of 2 parts. The first is to write a Pro...
[ 0.0233154296875, 0.0167236328125, 0.01287841796875, 0.0020904541015625, -0.015380859375, 0.034912109375, -0.019287109375, 0.000095367431640625, 0.00113677978515625, -0.0211181640625, 0.0250244140625, 0.000946044921875, -0.01031494140625, -0.01904296875, 0.017578125, 0.01470947265625, ...
[ 1250, 4867, 1927, 1463, 35975, 101935, 183278, 22230, 46741, 195625, 1830, 107, 48650, 502, 1290, 136, 20697, 98, 5368, 18244, 95486, 674, 4, 214, 116, 63920, 5117, 33022, 1528, 12765, 7, 2174, 10, 24233, 80836, 1193, 990, 186, 10617, 47,...
[ 0.185791015625, 0.271728515625, 0.185546875, 0.14404296875, 0.21923828125, 0.1962890625, 0.263916015625, 0.1712646484375, 0.259033203125, 0.233642578125, 0.100341796875, 0.0150146484375, 0.1761474609375, 0.1456298828125, 0.19384765625, 0.0250396728515625, 0.06829833984375, 0.005218...
embed
60918210_c0
60918210
prolog
0
Title: List of lists reading in prolog Problem title: List of lists reading in prolog Tags: prolog Problem: List of lists reading in prolog I have a list of lists in prolog in the form [[Olivia,Thales,Canada Post,Cisco],[Jackson,Thales,Canada Post,Cisco],[Sophia,Cisco,Thales,Canada Post]] I'm trying to read the list an...
List of lists reading in prolog List of lists reading in prolog prolog List Olivia Thales Canada Post Cisco Jackson Sophia is_list List of lists reading in prolog I have a list of lists in prolog in the form [[Olivia,Thales,Canada Post,Cisco],[Jackson,Thales,Canada Post,Cisco],[Sophia,Cisco,Thales,Canada Post]] I'm try...
[ 0.0128173828125, 0.0033721923828125, 0.01708984375, 0.00836181640625, -0.0140380859375, 0.013671875, 0.00390625, -0.006561279296875, 0.0208740234375, -0.03662109375, 0.0206298828125, -0.0184326171875, -0.006866455078125, 0.005126953125, 0.0206298828125, -0.0147705078125, 0.0324707031...
[ 32036, 111, 5303, 7, 16454, 23, 502, 4867, 179818, 5971, 1577, 25730, 2795, 148368, 52234, 163614, 83, 6562, 3173, 670, 150, 3459, 78122, 98516, 40658, 12064, 176769, 1681, 8912, 19379, 31577, 12301, 28282, 3525, 51776, 5117, 12830, 12638, ...
[ 0.1622314453125, 0.05157470703125, 0.281005859375, 0.0999755859375, 0.2364501953125, 0.06646728515625, 0.2047119140625, 0.2498779296875, 0.269775390625, 0.1734619140625, 0.1771240234375, 0.1478271484375, 0.1912841796875, 0.1822509765625, 0.2034912109375, 0.252685546875, 0.14514160156...
embed
32934213_c0
32934213
prolog
0
Title: Limiting Prolog solutions based on rules Problem title: Limiting Prolog solutions based on rules Tags: prolog Problem: Limiting Prolog solutions based on rules I have a Prolog program that says whether people like various types of fruit: likes(alice,apple). likes(bob,peach). likes(bob,pear). There are a number o...
Limiting Prolog solutions based on rules Limiting Prolog solutions based on rules prolog Limiting Prolog can_eat Person Fruit Alice Bob Limiting Prolog solutions based on rules I have a Prolog program that says whether people like various types of fruit: There are a number of these types of fruit available: A user can ...
[ 0.02099609375, 0.0164794921875, -0.00054168701171875, 0.0162353515625, -0.00063323974609375, 0.005462646484375, -0.003509521484375, 0.00927734375, 0.017333984375, -0.035888671875, -0.0206298828125, -0.023193359375, -0.0019378662109375, 0.01220703125, 0.035888671875, -0.0067138671875, ...
[ 125177, 214, 1250, 4867, 51347, 35509, 98, 91736, 502, 831, 13, 257, 15270, 151958, 66083, 25027, 1528, 36766, 3395, 1884, 67842, 52895, 41896, 14012, 19882, 38937, 12638, 2174, 20174, 2363, 54, 707, 149766, 136, 107003, 108787, 1284, 4734, ...
[ 0.2249755859375, 0.0540771484375, 0.2071533203125, 0.245849609375, 0.194091796875, 0.12158203125, 0.03289794921875, 0.1951904296875, 0.1419677734375, 0.125, 0.1470947265625, 0.07220458984375, 0.1639404296875, 0.2227783203125, 0.2193603515625, 0.1873779296875, 0.1304931640625, 0.003...
embed
44100857_c0
44100857
prolog
0
Title: Formulating English statements as a set of First Order Logic statements Problem title: Formulating English statements as a set of First Order Logic statements Tags: prolog, first-order-logic Problem: Formulating English statements as a set of First Order Logic statements I'm currently learning FOL and have a num...
Formulating English statements as a set of First Order Logic statements Formulating English statements as a set of First Order Logic statements prolog first-order-logic Formulating English First Order Logic Formulating English statements as a set of First Order Logic statements I'm currently learning FOL and have a num...
[ 0.021728515625, -0.01318359375, -0.0240478515625, 0.00927734375, -0.006622314453125, -0.009521484375, 0.000720977783203125, -0.0037078857421875, -0.0033416748046875, -0.000675201416015625, -0.008544921875, -0.026611328125, -0.01434326171875, 0.004180908203125, 0.01141357421875, 0.01025...
[ 72791, 1916, 14941, 63805, 7, 237, 5423, 23972, 81206, 50592, 238, 502, 4867, 5117, 80596, 137043, 82424, 52080, 172155, 31577, 26168, 3934, 81887, 149016, 37873, 2633, 3714, 2174, 7440, 13648, 74955, 44691, 2856, 7338, 144525, 144792, 124661, ...
[ 0.211669921875, 0.061187744140625, 0.1986083984375, 0.2467041015625, 0.0394287109375, 0.0297088623046875, 0.09375, 0.10498046875, 0.1661376953125, 0.178955078125, 0.04034423828125, 0.1151123046875, 0.1541748046875, 0.0714111328125, 0.1746826171875, 0.1605224609375, 0.006988525390625,...
embed
21538970_c0
21538970
prolog
0
Title: Translating Roman numerals into Arabic ones Problem title: Translating Roman numerals into Arabic ones Tags: roman-numerals, prolog, math, integer, converters Problem: Translating Roman numerals into Arabic ones I have built a predicate, which converts Roman numerals into Arabic ones. The only problem is that th...
Translating Roman numerals into Arabic ones Translating Roman numerals into Arabic ones roman-numerals prolog math integer converters Translating Roman Arabic Tss Ess Translating Roman numerals into Arabic ones I have built a predicate, which converts Roman numerals into Arabic ones. The only problem is that the predic...
[ -0.0247802734375, -0.00836181640625, -0.0021514892578125, 0.000652313232421875, -0.01007080078125, 0.003326416015625, -0.03515625, 0.0240478515625, -0.0018768310546875, -0.01513671875, 0.0130615234375, -0.02294921875, 0.00384521484375, -0.005523681640625, -0.00872802734375, -0.00189208...
[ 11062, 143, 1916, 12610, 22542, 16765, 3934, 197212, 64333, 6315, 2606, 56, 502, 4867, 48909, 892, 172127, 384, 7, 1184, 88303, 1653, 2063, 67, 96760, 4734, 2967, 84046, 3444, 1286, 138, 24145, 959, 4488, 176683, 5608, 29806, 2060, 71062, ...
[ 0.1158447265625, 0.1661376953125, 0.00885009765625, 0.2042236328125, 0.1656494140625, 0.1025390625, 0.0833740234375, 0.24169921875, 0.055908203125, 0.1624755859375, 0.06298828125, 0.0501708984375, 0.0670166015625, 0.09912109375, 0.050323486328125, 0.049835205078125, 0.1392822265625, ...
embed
14389752_c0
14389752
prolog
0
Title: Optimize program using green and red cuts Problem title: Optimize program using green and red cuts Tags: optimization, prolog-cut, prolog Problem: Optimize program using green and red cuts The following Prolog program determines the insurance premium. The insurance premium depends on the vehicle's horsepower and...
Optimize program using green and red cuts Optimize program using green and red cuts optimization prolog-cut prolog green Optimize Insurance Age Optimize program using green and red cuts The following Prolog program determines the insurance premium. The insurance premium depends on the vehicle's horsepower and the drive...
[ 0.025390625, -0.00101470947265625, -0.006134033203125, 0.0196533203125, -0.00162506103515625, 0.0247802734375, -0.00811767578125, -0.00732421875, -0.003204345703125, 0.008056640625, -0.000331878662109375, 0.013671875, -0.01495361328125, -0.03173828125, 0.01611328125, 0.01171875, -0.0...
[ 43938, 20650, 1528, 17368, 50997, 136, 4842, 314, 933, 87235, 502, 4867, 19774, 172255, 72944, 25632, 1250, 83324, 70, 42169, 55941, 56566, 98, 80939, 7, 111649, 62783, 27941, 32070, 4, 3871, 678, 15497, 3003, 876, 87377, 47, 6096, 24674, ...
[ 0.1947021484375, 0.1219482421875, 0.205078125, 0.0987548828125, 0.199951171875, 0.124755859375, 0.1695556640625, 0.1895751953125, 0.10272216796875, 0.1710205078125, 0.1407470703125, 0.2420654296875, 0.163818359375, 0.16162109375, 0.1651611328125, 0.03131103515625, 0.1605224609375, ...
embed
43308628_c0
43308628
prolog
0
Title: How to create a list of lists with a specific width for the inner lists in prolog? Problem title: How to create a list of lists with a specific width for the inner lists in prolog? Tags: prolog Problem: How to create a list of lists with a specific width for the inner lists in prolog? I'm trying to create a list...
How to create a list of lists with a specific width for the inner lists in prolog? How to create a list of lists with a specific width for the inner lists in prolog? prolog How list_to_llists How to create a list of lists with a specific width for the inner lists in prolog? I'm trying to create a list of lists where my...
[ -0.00159454345703125, -0.00007295608520507812, -0.008544921875, 0.0003795623779296875, -0.00579833984375, -0.00390625, 0.00897216796875, -0.01214599609375, 0.0263671875, 0.00286865234375, 0.0035400390625, -0.00439453125, 0.00811767578125, -0.005615234375, 0.010986328125, -0.00199890136...
[ 11249, 28282, 5303, 111, 7, 678, 29458, 146984, 100, 75414, 502, 4867, 188, 19813, 933, 23, 107730, 49878, 510, 120067, 5646, 80854, 456, 62539, 3934, 164917, 1884, 133063, 82449, 104629, 136005, 3332, 29367, 47, 3971, 4734, 361, 16750, 420...
[ 0.053253173828125, 0.17138671875, 0.258544921875, 0.1448974609375, 0.111083984375, 0.062103271484375, 0.1767578125, 0.2509765625, 0.05462646484375, 0.20654296875, 0.1622314453125, 0.2353515625, 0.1444091796875, 0.13671875, 0.115478515625, 0.032318115234375, 0.1103515625, 0.05981445...
embed