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
49618495_c0
49618495
prolog
0
Title: Get a value from residual goals Problem title: Get a value from residual goals Tags: clpfd, prolog Problem: Get a value from residual goals If I have X #> 3. Prolog will give the residual goal X in 4..sup. . How can I assign X one of the possible values from 4 to sup ? Any random value will suffice. Code signals...
Get a value from residual goals Get a value from residual goals clpfd prolog residual Get Get a value from residual goals If I have X #> 3. Prolog will give the residual goal X in 4..sup. . How can I assign X one of the possible values from 4 to sup ? Any random value will suffice.
[ -0.01318359375, 0.003204345703125, 0.003173828125, -0.00408935546875, -0.007537841796875, -0.0072021484375, 0.013427734375, -0.0059814453125, 0.01092529296875, -0.0250244140625, 0.005889892578125, 0.00135040283203125, -0.0223388671875, 0.016845703125, 0.0014190673828125, 0.024291992187...
[ 20779, 10, 34292, 1295, 99996, 289, 109458, 33139, 39557, 71, 502, 4867, 765, 1193, 468, 2740, 1031, 1250, 8337, 69236, 23, 1398, 2037, 11249, 831, 95486, 1632, 7722, 142424, 201, 47, 15811, 28541, 96759, 133784 ]
[ 0.140380859375, 0.08135986328125, 0.2412109375, 0.1767578125, 0.242919921875, 0.166259765625, 0.2454833984375, 0.031219482421875, 0.0621337890625, 0.10784912109375, 0.112548828125, 0.2269287109375, 0.01190185546875, 0.11151123046875, 0.0278778076171875, 0.0269927978515625, 0.11639404...
embed
3600253_c0
3600253
prolog
0
Title: Programming deontic logic Problem title: Programming deontic logic Tags: prolog, reasoning Problem: Programming deontic logic I need to write rules for deontic logic, is there any programming language to do that? I saw prolog and I'm learning now but how to express deontic logic in PROLOG? please help Code signa...
Programming deontic logic Programming deontic logic prolog reasoning Programming Programming deontic logic I need to write rules for deontic logic, is there any programming language to do that? I saw prolog and I'm learning now but how to express deontic logic in PROLOG? please help
[ 0.0196533203125, 0.006805419921875, 0.01153564453125, -0.00017642974853515625, -0.00124359130859375, 0.0322265625, -0.006591796875, 0.001556396484375, -0.0017852783203125, -0.059326171875, 0.0031280517578125, -0.026611328125, -0.00933837890625, 0.01251220703125, 0.0002841949462890625, ...
[ 27958, 214, 8, 191, 9523, 62775, 502, 4867, 31635, 87, 3871, 33022, 91736, 100, 2499, 56037, 449, 46876, 47, 54, 450, 24124, 52080, 5036, 3642, 36510, 23, 10514, 47510, 22936, 4358 ]
[ 0.1717529296875, 0.04351806640625, 0.1531982421875, 0.13818359375, 0.16259765625, 0.22998046875, 0.1353759765625, 0.1939697265625, 0.151123046875, 0.0139923095703125, 0.10784912109375, 0.1302490234375, 0.186279296875, 0.0697021484375, 0.0134735107421875, 0.15576171875, 0.089965820312...
embed
50363192_c0
50363192
prolog
0
Title: Prolog print numbers from 1 to N? Problem title: Prolog print numbers from 1 to N? Tags: prolog Problem: Prolog print numbers from 1 to N? Assume the user gives an input N to the function, how would I print these numbers from 1 to N (recursively or other wise). example print_numbers(40). ->1 ->2 ->… ->40 Code si...
Prolog print numbers from 1 to N? Prolog print numbers from 1 to N? prolog 1 Prolog Prolog print numbers from 1 to N? Assume the user gives an input N to the function, how would I print these numbers from 1 to N (recursively or other wise). example print_numbers(40). ->1 ->2 ->… ->40
[ -0.00762939453125, -0.0027008056640625, -0.0002498626708984375, -0.01043701171875, 0.00994873046875, 0.03369140625, -0.00836181640625, 0.0003261566162109375, -0.007171630859375, -0.03125, 0.00180816650390625, -0.0341796875, -0.0211181640625, 0.006134033203125, 0.01031494140625, -0.0098...
[ 1250, 4867, 28412, 101935, 1295, 106, 47, 541, 502, 66596, 38937, 76199, 107730, 32354, 3642, 2806, 6097, 48650, 5844, 90825, 27781, 2606, 1297, 125136, 418, 304, 2839 ]
[ 0.1885986328125, 0.2548828125, 0.219970703125, 0.2392578125, 0.1029052734375, 0.1380615234375, 0.137939453125, 0.1724853515625, 0.1275634765625, 0.0305328369140625, 0.11224365234375, 0.0360107421875, 0.1527099609375, 0.1715087890625, 0.035797119140625, 0.03021240234375, 0.01461791992...
embed
6357866_c0
6357866
prolog
0
Title: Learning "The Art of Prolog" Problem title: Learning "The Art of Prolog" Tags: prolog Problem: Learning "The Art of Prolog" To those of you familiar with "The Art of Prolog", which software tools (e.g. IDEs, editors, compilers, etc.) would you suggest for following the book? Code signals: Lea...
Learning "The Art of Prolog" Learning "The Art of Prolog" prolog Learning Art Prolog Learning "The Art of Prolog" To those of you familiar with "The Art of Prolog", which software tools (e.g. IDEs, editors, compilers, etc.) would you suggest for following the book?
[ 0.0228271484375, 0.01068115234375, 0.0024566650390625, 0.00897216796875, -0.0206298828125, 0.0177001953125, -0.00567626953125, -0.00013065338134765625, 0.00836181640625, -0.06005859375, 0.005523681640625, -0.0031585693359375, -0.019775390625, 0.00946044921875, 0.017578125, -0.010803222...
[ 114344, 3957, 4713, 111, 1250, 4867, 502, 16031, 3129, 10975, 72977, 36497, 30391, 9969, 34759, 42459, 100, 25632, 12877 ]
[ 0.1357421875, 0.05010986328125, 0.1954345703125, 0.1435546875, 0.176025390625, 0.260986328125, 0.11181640625, 0.069580078125, 0.033111572265625, 0.208740234375, 0.2218017578125, 0.1689453125, 0.1260986328125, 0.08843994140625, 0.11749267578125, 0.08782958984375, 0.016357421875, 0.1...
embed
8869485_c0
8869485
prolog
0
Title: Lazy lists in Prolog? Problem title: Lazy lists in Prolog? Tags: stream, prolog, list, lazy-sequences, lazy-evaluation Problem: Lazy lists in Prolog? Is it possible to have lazy lists in Prolog? Something like the following: ones([1 | Y]) :- ones(Y). Although this obviously doesn't work as it's written. Code sig...
Lazy lists in Prolog? Lazy lists in Prolog? stream prolog list lazy-sequences lazy-evaluation Lazy Prolog Lazy lists in Prolog? Is it possible to have lazy lists in Prolog? Something like the following: Although this obviously doesn't work as it's written.
[ 0.0242919921875, 0.0166015625, 0.01220703125, -0.0140380859375, 0.00750732421875, -0.003173828125, 0.012939453125, 0.00225830078125, -0.0015411376953125, -0.0235595703125, -0.004730224609375, 0.0030975341796875, -0.01348876953125, 0.0106201171875, 0.020751953125, 0.00897216796875, 0....
[ 239, 3285, 5303, 7, 23, 1250, 4867, 75973, 502, 21, 26513, 159258, 7722, 765, 4488 ]
[ 0.1522216796875, 0.2021484375, 0.237548828125, 0.06793212890625, 0.043060302734375, 0.1585693359375, 0.2266845703125, 0.1231689453125, 0.11236572265625, 0.150146484375, 0.06317138671875, 0.08349609375, 0.0965576171875, 0.025054931640625, 0.03448486328125 ]
embed
30336715_c0
30336715
prolog
0
Title: Lists within a list Problem title: Lists within a list Tags: prolog Problem: Lists within a list I'm starting to learn Prolog, but I cannot find any examples on what I want to do: a list that contains several other lists; is it possible? Something like this: [ [1,1,1], [2,2,2], [3,3,3] ] . Thank you in advance. ...
Lists within a list Lists within a list prolog Lists Lists within a list I'm starting to learn Prolog, but I cannot find any examples on what I want to do: a list that contains several other lists; is it possible? Something like this: [ [1,1,1], [2,2,2], [3,3,3] ] . Thank you in advance.
[ 0.01373291015625, 0.01263427734375, -0.002349853515625, 0.0069580078125, -0.0150146484375, 0.0162353515625, 0.01019287109375, -0.00250244140625, 0.015625, -0.017333984375, -0.011474609375, -0.01348876953125, -0.00848388671875, 0.036865234375, -0.00118255615234375, 0.0067138671875, 0....
[ 32036, 28032, 10, 5303, 7, 502, 4867, 72134, 30698, 1250, 1284, 53418, 7413, 27781, 3444, 54, 70541, 40368, 3789, 83, 442, 7722, 200905, 1884, 903, 12, 378, 68252, 418, 76172, 304, 90173, 122101, 363, 96386, 129745 ]
[ 0.262451171875, 0.2362060546875, 0.0780029296875, 0.26123046875, 0.035491943359375, 0.1439208984375, 0.237548828125, 0.019317626953125, 0.0965576171875, 0.1676025390625, 0.002716064453125, 0.06573486328125, 0.0311279296875, 0.19384765625, 0.07379150390625, 0.03375244140625, 0.1586914...
embed
34214301_c0
34214301
prolog
0
Title: Query converting number into digits fails Problem title: Query converting number into digits fails Tags: prolog Problem: Query converting number into digits fails split(0). split(M,List) :- M > 0, MM is floor(M / 10), Z is M mod 10, append(List,[Z],SubList), nl, print(SubList), split(MM,SubList). Code signals: Q...
Query converting number into digits fails Query converting number into digits fails prolog Query List SubList Query converting number into digits fails
[ -0.01080322265625, 0.00543212890625, 0.010986328125, -0.011962890625, -0.0223388671875, 0.026123046875, -0.007720947265625, 0.00897216796875, 0.0220947265625, 0.010498046875, -0.0034332275390625, -0.004852294921875, -0.02392578125, 0.0155029296875, 0.003662109375, -0.00750732421875, ...
[ 58836, 53, 96760, 214, 14012, 3934, 153939, 7, 35782, 502, 4867, 32036, 8273, 154663 ]
[ 0.1673583984375, 0.0889892578125, 0.1170654296875, 0.03924560546875, 0.136962890625, 0.1009521484375, 0.1910400390625, 0.04754638671875, 0.1851806640625, 0.114501953125, 0.157470703125, 0.1185302734375, 0.11309814453125, 0.1234130859375 ]
embed
66439051_c0
66439051
prolog
0
Title: Sum within list prolog Problem title: Sum within list prolog Tags: prolog Problem: Sum within list prolog I´m trying to get the sum + input list in prolog, but no success so far. sum([], 0). sum([H|T], [N]):- sum(T, X), N is X + H. Input sum([1,2],L). This results in N = [3] What I´m trying to achieve N = [3,1,2...
Sum within list prolog Sum within list prolog prolog Sum Sum within list prolog I´m trying to get the sum + input list in prolog, but no success so far. Input This results in What I´m trying to achieve
[ -0.0076904296875, 0.0172119140625, 0.0191650390625, 0.0003833770751953125, -0.0233154296875, 0.005279541015625, -0.0181884765625, 0.0286865234375, 0.014404296875, -0.04150390625, -0.0079345703125, -0.0220947265625, -0.018310546875, 0.01287841796875, 0.0245361328125, 0.004669189453125, ...
[ 36335, 28032, 5303, 502, 4867, 31577, 2046, 10554, 997, 107730, 23, 110, 36272, 2060, 7077, 50339, 4865, 39, 69307 ]
[ 0.189453125, 0.1756591796875, 0.188720703125, 0.1417236328125, 0.2099609375, 0.129638671875, 0.0262603759765625, 0.2039794921875, 0.07574462890625, 0.16357421875, 0.006011962890625, 0.0135650634765625, 0.085693359375, 0.0030994415283203125, 0.0028228759765625, 0.005725860595703125, 0...
embed
47695521_c0
47695521
prolog
0
Title: Prolog - predicate to sort and merge list Problem title: Prolog - predicate to sort and merge list Tags: prolog Problem: Prolog - predicate to sort and merge list Hi I am trying to write a predicate that sorts first list low to high and second list high to low, then puts the heads of each list in to a new list. ...
Prolog - predicate to sort and merge list Prolog - predicate to sort and merge list prolog Prolog Prolog - predicate to sort and merge list Hi I am trying to write a predicate that sorts first list low to high and second list high to low, then puts the heads of each list in to a new list.
[ 0.0162353515625, 0.0155029296875, -0.0068359375, -0.00970458984375, -0.0174560546875, 0.031494140625, -0.0169677734375, -0.003936767578125, 0.004852294921875, 0.007598876953125, 0.006561279296875, 0.016357421875, 0.0008697509765625, -0.012451171875, 0.01513671875, -0.0267333984375, -...
[ 1250, 4867, 1653, 2063, 67, 47, 12096, 136, 42564, 5303, 502, 2673, 31577, 33022, 7, 5117, 27226, 11192, 17932, 3884, 10336, 12638, 23, 3525, 5 ]
[ 0.184326171875, 0.246826171875, 0.1871337890625, 0.224853515625, 0.1041259765625, 0.0775146484375, 0.2344970703125, 0.1123046875, 0.24560546875, 0.194091796875, 0.1319580078125, 0.004787445068359375, 0.06646728515625, 0.07611083984375, 0.047607421875, 0.05181884765625, 0.132568359375...
embed
64027128_c0
64027128
prolog
0
Title: Generate new clauses in Prolog Problem title: Generate new clauses in Prolog Tags: task, prolog Problem: Generate new clauses in Prolog I need to write a predicate where `numberM` is `abs(2*numberS - 10) + 12` There are clauses like `s(numberS)` like `s(1), s(2)` Please help me to write such a predicate Code sig...
Generate new clauses in Prolog Generate new clauses in Prolog task prolog Generate Prolog Generate new clauses in Prolog I need to write a predicate where There are clauses like Please help me to write such a predicate
[ 0.00154876708984375, 0.0260009765625, -0.01708984375, 0.00872802734375, 0.00897216796875, 0.02392578125, -0.009521484375, 0.016845703125, 0.005767822265625, -0.0128173828125, -0.005340576171875, 0.0016021728515625, -0.01385498046875, -0.008544921875, 0.026611328125, 0.01806640625, 0....
[ 155370, 67, 3525, 70731, 90, 23, 1250, 4867, 66211, 502, 3871, 33022, 1653, 2063, 7440, 8622, 621, 1884, 30607, 4358, 6044 ]
[ 0.162353515625, 0.0833740234375, 0.12469482421875, 0.243896484375, 0.11676025390625, 0.052337646484375, 0.1610107421875, 0.2138671875, 0.1572265625, 0.09765625, 0.0853271484375, 0.09405517578125, 0.1463623046875, 0.1805419921875, 0.0135498046875, 0.07598876953125, 0.0643310546875, ...
embed
8330508_c1
8330508
prolog
1
-(X==e)->(R is Y). confirma(X,Y,R):-(santafe(X,Y),R is 1); (R is 0). I figured it out.. Such a silly mistake. koza([], _, _, _, 87) :-!. koza(R, X, Y, V, C) :- movex(V, X, X1), movey(V, Y, Y1), confirma(X1, Y1, Z), Z == 1 -> (L is (C - 1), koza(U, X1, Y1, V, L), append(U, [emFrente], R)). Thanks anyway. Code signals: R...
-(X==e)->(R is Y). confirma(X,Y,R):-(santafe(X,Y),R is 1); (R is 0). I figured it out.. Such a silly mistake. koza([], _, _, _, 87) :-!. koza(R, X, Y, V, C) :- movex(V, X, X1), movey(V, Y, Y1), confirma(X1, Y1, Z), Z == 1 -> (L is (C - 1), koza(U, X1, Y1, V, L), append(U, [emFrente], R)). Thanks anyway. Code signals: R...
[ -0.004180908203125, -0.006378173828125, 0.0126953125, 0.023681640625, 0.008544921875, 0.002471923828125, -0.00006532669067382812, 0.0286865234375, 0.0198974609375, -0.01409912109375, 0.0169677734375, 0.0108642578125, -0.01300048828125, 0.004791259765625, -0.002349853515625, -0.02124023...
[ 20, 1542, 69112, 13, 103607, 1052, 83, 990, 194, 42570, 1723, 2077, 116357, 2242, 106, 757, 87, 26366, 71, 442, 1810, 62771, 78, 12097, 121742, 298, 596, 132, 1065, 125868, 15772, 38, 5, 1193, 310, 313, 25813, 425, 856, 17727, 53, 4, ...
[ 0.0352783203125, 0.14794921875, 0.17626953125, 0.1590576171875, 0.1090087890625, 0.164306640625, 0.1102294921875, 0.1888427734375, 0.0325927734375, 0.2607421875, 0.1151123046875, 0.002532958984375, 0.1241455078125, 0.2047119140625, 0.0828857421875, 0.1522216796875, 0.01153564453125, ...
embed
45087415_c0
45087415
prolog
0
Title: Why is [] = _. true in Prolog? Problem title: Why is [] = _. true in Prolog? Tags: prolog Problem: Why is [] = _. true in Prolog? I am learning Prolog, and do not understand why ?- [] = _. returns true in SWI-Prolog. [] means an empty list, and _ means it is not empty, right? Could someone explain the above logi...
Why is [] = _. true in Prolog? Why is [] = _. true in Prolog? prolog Why Prolog Why is [] = _. true in Prolog? I am learning Prolog, and do not understand why ?- [] = _. returns true in SWI-Prolog. [] means an empty list, and _ means it is not empty, right? Could someone explain the above logic?
[ 0.01409912109375, 0.00909423828125, 0.0203857421875, -0.003936767578125, -0.01025390625, 0.0013580322265625, 0.00445556640625, -0.004730224609375, 0.00799560546875, 0.0152587890625, 0.024658203125, -0.001953125, -0.01263427734375, 0.00616455078125, 0.0057373046875, -0.01171875, 0.014...
[ 44084, 83, 378, 268, 2203, 101, 5, 29568, 23, 1250, 4867, 502, 28219, 15400, 705, 9, 30646, 7, 159, 38969, 10752, 26950, 201505, 5303, 442, 959, 73342, 62775 ]
[ 0.132080078125, 0.08587646484375, 0.0931396484375, 0.115234375, 0.1636962890625, 0.1793212890625, 0.10650634765625, 0.234130859375, 0.1014404296875, 0.1846923828125, 0.25439453125, 0.098876953125, 0.0457763671875, 0.1221923828125, 0.0194549560546875, 0.014129638671875, 0.1533203125, ...
embed
61119855_c0
61119855
prolog
0
Title: How to import Prolog from pwsip Problem title: How to import Prolog from pwsip Tags: prolog Problem: How to import Prolog from pwsip I tried running this code in VISIO CODE STUDIO: from pyswip import Prolog from tkinter import * from tkinter import messagebox and I got an error. what am I doing wrong? Thanks. Co...
How to import Prolog from pwsip How to import Prolog from pwsip prolog Prolog pwsip How How to import Prolog from pwsip I tried running this code in VISIO CODE STUDIO: from pyswip import Prolog from tkinter import * from tkinter import messagebox and I got an error. what am I doing wrong? Thanks.
[ 0.0155029296875, 0.005950927734375, -0.00848388671875, 0.0269775390625, -0.021484375, 0.004547119140625, 0.0031890869140625, -0.005828857421875, -0.010986328125, -0.06298828125, 0.010986328125, -0.0162353515625, -0.0123291015625, -0.0198974609375, 0.00127410888671875, -0.00897216796875...
[ 11249, 24927, 1250, 4867, 1295, 123325, 30255, 47, 502, 51042, 18151, 101986, 17780, 8244, 8399, 218961, 57756, 2452, 254, 73713, 720, 26008, 11728, 18499, 44691 ]
[ 0.0289764404296875, 0.256103515625, 0.1864013671875, 0.272705078125, 0.1253662109375, 0.132080078125, 0.260009765625, 0.021453857421875, 0.1365966796875, 0.053497314453125, 0.10540771484375, 0.10064697265625, 0.137451171875, 0.095703125, 0.05804443359375, 0.1309814453125, 0.112915039...
embed
26679486_c2
26679486
prolog
2
right and why the last variable has become a new one ( _G4237 instead of _G4270 )? Because in the code I thought it is the same. Anyone could help me clear things out? Many thanks! Code signals: List, Head, Tail, List1, List2, Sorted, Small, Big, SortedSmall, SortedBig, Call, _G4136, _G4269, _G4270, Exit, _G4261, _G42...
right and why the last variable has become a new one ( _G4237 instead of _G4270 )? Because in the code I thought it is the same. Anyone could help me clear things out? Many thanks! Code signals: List, Head, Tail, List1, List2, Sorted, Small, Big, SortedSmall, SortedBig, Call, _G4136, _G4269, _G4270, Exit, _G4261, _G42...
[ 0.002655029296875, 0.01239013671875, -0.00323486328125, 0.007537841796875, 0.00421142578125, 0.0166015625, -0.0150146484375, 0.00113677978515625, 0.0245361328125, 0.044189453125, 0.011962890625, -0.01019287109375, -0.0010528564453125, 0.0157470703125, 0.01251220703125, -0.0115356445312...
[ 7108, 15400, 4568, 77336, 1556, 24209, 10, 3525, 1632, 724, 13023, 10945, 64457, 617, 104283, 70, 18151, 17569, 5701, 5809, 4358, 34735, 1810, 38, 28864, 26073, 7, 12, 32036, 44816, 1218, 379, 418, 304, 53666, 297, 105508, 14195, 69070, 1...
[ 0.10888671875, 0.0892333984375, 0.1856689453125, 0.31591796875, 0.0859375, 0.1485595703125, 0.004974365234375, 0.1407470703125, 0.05230712890625, 0.07232666015625, 0.181884765625, 0.230712890625, 0.077392578125, 0.1192626953125, 0.251708984375, 0.02496337890625, 0.1817626953125, 0....
embed
30267751_c0
30267751
prolog
0
Title: Different representation of line Problem title: Different representation of line Tags: prolog Problem: Different representation of line I am learning the Prolog. I tried to write Anew is + (A is H1 * H2), instead of is(Anew,+(A,*(H1,H2))), but it produces an error. Where is my mistake? Can you help me? Thank you...
Different representation of line Different representation of line prolog Different Anew Different representation of line I am learning the Prolog. I tried to write instead of but it produces an error. Where is my mistake? Can you help me? Thank you.
[ -0.003936767578125, -0.020751953125, 0.0086669921875, 0.028076171875, 0.0034027099609375, 0.0081787109375, -0.006591796875, 0.010986328125, 0.022216796875, -0.01422119140625, -0.00384521484375, 0.0034332275390625, 0.01123046875, -0.004058837890625, -0.0150146484375, -0.01019287109375, ...
[ 242520, 18811, 13315, 1363, 502, 4867, 62, 54936, 52080, 1250, 37842, 33022, 64457, 111, 27489, 18499, 121742, 4358 ]
[ 0.187744140625, 0.2232666015625, 0.1671142578125, 0.03961181640625, 0.118408203125, 0.219482421875, 0.038238525390625, 0.2144775390625, 0.050689697265625, 0.1329345703125, 0.05218505859375, 0.1488037109375, 0.10418701171875, 0.1029052734375, 0.06646728515625, 0.14599609375, 0.1124877...
embed
34596680_c0
34596680
prolog
0
Title: How can i change size of sudoku Problem title: How can i change size of sudoku Tags: gnu-prolog, prolog Problem: How can i change size of sudoku fd_alldifferent([A1,A2,A3,B1,B2,B3,C1,C2,C3]), fd_alldifferent([A4,A5,A6,B4,B5,B6,C4,C5,C6]), fd_alldifferent([A7,A8,A9,B7,B8,B9,C7,C8,C9]), Code signals: How, fd_domai...
How can i change size of sudoku How can i change size of sudoku gnu-prolog prolog How fd_domain fd_alldifferent fd_labeling How can i change size of sudoku I have a script to solve a Sudoku with size= 9*9 i have 81 variables and i define the rules for them, How can change this code to solve a sudoku with any size? for ...
[ 0.013427734375, -0.0252685546875, 0.0115966796875, 0.005340576171875, -0.000965118408203125, -0.01470947265625, -0.017822265625, 0.0166015625, -0.0001068115234375, 0.000492095947265625, -0.00762939453125, -0.024658203125, 0.00927734375, 0.02197265625, 0.00897216796875, -0.02099609375, ...
[ 11249, 831, 17, 15549, 13267, 111, 8932, 38067, 104155, 3454, 4867, 502, 1238, 71, 56206, 5584, 238778, 152526, 765, 26499, 86869, 15334, 1369, 483, 1639, 1126, 16503, 77336, 61924, 91736, 903, 18151, 47, 678, 2499, 27781, 611, 2485, 186, ...
[ 0.0966796875, 0.12353515625, 0.1175537109375, 0.240478515625, 0.2410888671875, 0.13134765625, 0.17919921875, 0.257080078125, 0.1885986328125, 0.1170654296875, 0.17333984375, 0.109619140625, 0.028411865234375, 0.06500244140625, 0.10400390625, 0.06317138671875, 0.1890869140625, 0.159...
embed
56839868_c1
56839868
prolog
1
List1],[HeadList1,RestList3]). secondLast([HeadList1|RestList1],[HeadList3|RestList3]) :- secondLast([HeadList1|RestList1],RestList3). What I'm expecting: ?- compare([2,8,9,1],[4,5,6,2],[1,2,3]). yes ?- compare([a,b,c,d,k],[a,c,f,e],[a,s]). no Code signals: Prolog, list1, list2, list3, HeadList1, RestList1, HeadList2, ...
List1],[HeadList1,RestList3]). secondLast([HeadList1|RestList1],[HeadList3|RestList3]) :- secondLast([HeadList1|RestList1],RestList3). What I'm expecting: ?- compare([2,8,9,1],[4,5,6,2],[1,2,3]). yes ?- compare([a,b,c,d,k],[a,c,f,e],[a,s]). no Code signals: Prolog, list1, list2, list3, HeadList1, RestList1, HeadList2, ...
[ 0.000629425048828125, 0.01080322265625, -0.0150146484375, 0.00457763671875, -0.014404296875, 0.00799560546875, -0.01226806640625, 0.00933837890625, 0.0228271484375, 0.013671875, 0.019287109375, 0.012451171875, 0.00836181640625, -0.000060558319091796875, 0.003387451171875, -0.0236816406...
[ 32036, 76172, 13025, 712, 154663, 418, 1052, 525, 96386, 17932, 2729, 271, 363, 15772, 21320, 41206, 214, 9, 69101, 132, 304, 145180, 617, 104629, 90173, 133063, 72272, 92, 420, 110, 28864, 26073, 7, 1250, 4867, 5303, 44816, 49756 ]
[ 0.2255859375, 0.0799560546875, 0.058685302734375, 0.060516357421875, 0.174560546875, 0.09808349609375, 0.013397216796875, 0.061309814453125, 0.1248779296875, 0.1575927734375, 0.15380859375, 0.123291015625, 0.126220703125, 0.029510498046875, 0.144775390625, 0.1993408203125, 0.10485839...
embed
22494787_c1
22494787
prolog
1
B, C], [G, H, I], Tastiness), is_equal([G, H, I], [D, E, F], Tastiness), is_equal([A, D, G], [B, E, H], Tastiness), is_equal([A, D, G], [C, F, I], Tastiness), is_equal([B, E, H], [C, F, I], Tastiness), is_equal([A, E, I], [C, E, G], Tastiness). But this doesn't work. How can I fix it? Code signals: Prolog, Nums, Plate...
B, C], [G, H, I], Tastiness), is_equal([G, H, I], [D, E, F], Tastiness), is_equal([A, D, G], [B, E, H], Tastiness), is_equal([A, D, G], [C, F, I], Tastiness), is_equal([B, E, H], [C, F, I], Tastiness), is_equal([A, E, I], [C, E, G], Tastiness). But this doesn't work. How can I fix it? Code signals: Prolog, Nums, Plate...
[ -0.00531005859375, -0.0111083984375, 0.0089111328125, 0.03076171875, -0.00970458984375, -0.004058837890625, -0.031982421875, -0.01397705078125, 0.002227783203125, 0.02685546875, 0.00994873046875, 0.01348876953125, 0.015869140625, 0.0147705078125, -0.006591796875, -0.0036468505859375, ...
[ 335, 313, 724, 572, 87, 9598, 118, 7432, 83, 13, 71723, 397, 241, 563, 284, 391, 527, 571, 441, 4966, 903, 22027, 18, 4488, 831, 30022, 442, 28864, 26073, 1250, 4867, 52782, 22387, 44816, 36335 ]
[ 0.1087646484375, 0.07000732421875, 0.09246826171875, 0.1251220703125, 0.1126708984375, 0.18310546875, 0.1510009765625, 0.1353759765625, 0.14306640625, 0.072265625, 0.192138671875, 0.06402587890625, 0.1463623046875, 0.1114501953125, 0.058746337890625, 0.1181640625, 0.1063232421875, ...
embed
23730587_c0
23730587
prolog
0
Title: tree family does not work properly in prolog Problem title: tree family does not work properly in prolog Tags: prolog Problem: tree family does not work properly in prolog I'm trying to run a prolog program that represents a tree but when I select option 1 from menu shows me false. Code: https://github.com/carso...
tree family does not work properly in prolog tree family does not work properly in prolog prolog tree family does not work properly in prolog I'm trying to run a prolog program that represents a tree but when I select option 1 from menu shows me false. Code: https://github.com/carson314/Prolog/blob/master/menus.pl
[ 0.032958984375, 0.0048828125, 0.001220703125, 0.010986328125, -0.028076171875, 0.00921630859375, -0.022705078125, -0.021240234375, -0.003173828125, -0.02685546875, 0.006622314453125, -0.0096435546875, -0.00078582763671875, 0.000004649162292480469, 0.0234375, 0.0015106201171875, 0.017...
[ 53201, 14449, 959, 4488, 155965, 502, 4867, 23, 11675, 1528, 33636, 36849, 35829, 106, 8026, 98320, 28864, 32102, 1681, 10752, 47327, 30144, 2424 ]
[ 0.2763671875, 0.2061767578125, 0.0638427734375, 0.1151123046875, 0.124755859375, 0.1138916015625, 0.2127685546875, 0.0294189453125, 0.0313720703125, 0.074462890625, 0.136962890625, 0.062225341796875, 0.158935546875, 0.0706787109375, 0.1396484375, 0.1839599609375, 0.049468994140625, ...
embed
8651093_c0
8651093
prolog
0
Title: All binary numbers with exactly n digits Problem title: All binary numbers with exactly n digits Tags: sequence, prolog, binary Problem: All binary numbers with exactly n digits I need a predicate to produce all binary numbers with length N in a list. Sample use: ?- bins(2,L). L = [[0,0], [0,1], [1,0], [1,1]]. %...
All binary numbers with exactly n digits All binary numbers with exactly n digits sequence prolog binary All All binary numbers with exactly n digits I need a predicate to produce all binary numbers with length N in a list. Sample use:
[ 0.00160980224609375, 0.0172119140625, 0.006622314453125, -0.004364013671875, -0.0024871826171875, 0.020751953125, 0.0009307861328125, 0.00762939453125, 0.0076904296875, -0.02099609375, -0.0098876953125, -0.01312255859375, -0.0091552734375, 0.0250244140625, 0.005340576171875, 0.01745605...
[ 3164, 2394, 6635, 101935, 678, 66161, 653, 153939, 40, 944, 3956, 502, 4867, 87, 3871, 10, 1653, 2063, 67, 27489, 756, 140909, 541, 23, 5303, 947, 33209, 4527 ]
[ 0.129638671875, 0.1983642578125, 0.115478515625, 0.190185546875, 0.08502197265625, 0.220947265625, 0.168212890625, 0.1934814453125, 0.00727081298828125, 0.07867431640625, 0.0249176025390625, 0.115966796875, 0.1600341796875, 0.0243377685546875, 0.1192626953125, 0.0024471282958984375, ...
embed
9729720_c0
9729720
prolog
0
Title: first order logic & prolog Problem title: first order logic & prolog Tags: prolog, first-order-logic Problem: first order logic & prolog I am trying to understand how prolog represent first order logic. how can I represent for example, in a list of types of animals: dog(spot). cat(nyny). fly(harry) that ...
first order logic & prolog first order logic & prolog prolog first-order-logic first order logic & prolog I am trying to understand how prolog represent first order logic. how can I represent for example, in a list of types of animals: dog(spot). cat(nyny). fly(harry) that all animals are mammals or insect?
[ 0.02685546875, -0.008544921875, -0.00787353515625, 0.02685546875, -0.01708984375, 0.00096893310546875, -0.00131988525390625, 0.0022125244140625, 0.005889892578125, -0.04248046875, -0.001800537109375, -0.0166015625, 0.005859375, -0.0223388671875, 0.021240234375, 0.010986328125, -0.001...
[ 5117, 12989, 62775, 619, 25133, 74, 502, 4867, 9, 80596, 137043, 31577, 28219, 3642, 33636, 831, 27781, 23, 5303, 52895, 85825, 10269, 53370, 7515, 299, 12403, 3467, 1294, 450, 756, 621, 21968, 8080, 707, 103665 ]
[ 0.1517333984375, 0.1956787109375, 0.2568359375, 0.0936279296875, 0.1392822265625, 0.04730224609375, 0.1961669921875, 0.281005859375, 0.01384735107421875, 0.2021484375, 0.2421875, 0.03521728515625, 0.09600830078125, 0.044769287109375, 0.23095703125, 0.0278167724609375, 0.0235137939453...
embed
43293904_c0
43293904
prolog
0
Title: Convert Clause to list Problem title: Convert Clause to list Tags: prolog Problem: Convert Clause to list Could someone explain me how can I convert :- op(500, xfy, v). conver(X,List) I would use it as converter to list like: convert(p v q v r, L) Which as result return list where are only variables: L= [p,q,r] ...
Convert Clause to list Convert Clause to list prolog Convert Clause List Convert Clause to list Could someone explain me how can I convert I would use it as converter to list like: Which as result return list where are only variables:
[ 0.01446533203125, 0.00787353515625, -0.0031890869140625, 0.00848388671875, -0.022216796875, 0.01190185546875, -0.0174560546875, 0.0035400390625, 0.0107421875, -0.018798828125, -0.0191650390625, 0.0016632080078125, -0.005401611328125, -0.000820159912109375, -0.009033203125, 0.0031280517...
[ 1657, 11549, 100700, 13, 47, 5303, 502, 4867, 32036, 73342, 3642, 96760, 4527, 237, 172127, 1884, 16750, 30646, 621, 4734, 77336 ]
[ 0.02203369140625, 0.154296875, 0.2418212890625, 0.103271484375, 0.060455322265625, 0.23193359375, 0.1341552734375, 0.2149658203125, 0.1766357421875, 0.04315185546875, 0.009429931640625, 0.1650390625, 0.03399658203125, 0.01190185546875, 0.1834716796875, 0.01129150390625, 0.02368164062...
embed
19832464_c0
19832464
prolog
0
Title: What are the minimum/maximum integers in gprolog? Problem title: What are the minimum/maximum integers in gprolog? Tags: prolog, iso-prolog, integer Problem: What are the minimum/maximum integers in gprolog? What are the minimum/maximum integers in gprolog? Is there a way to reference these numbers without using...
What are the minimum/maximum integers in gprolog? What are the minimum/maximum integers in gprolog? prolog iso-prolog integer What What are the minimum/maximum integers in gprolog? What are the minimum/maximum integers in gprolog? Is there a way to reference these numbers without using a "magic number"?
[ -0.001800537109375, -0.01513671875, 0.0126953125, 0.00189971923828125, -0.00836181640625, 0.037109375, 0.0203857421875, 0.00531005859375, 0.000865936279296875, 0.0281982421875, -0.0037994384765625, -0.00396728515625, -0.01348876953125, 0.01531982421875, 0.026611328125, 0.00259399414062...
[ 15440, 64, 192, 53950, 316, 892, 26255, 23, 706, 3454, 4867, 502, 13882, 1505, 4865, 621, 70, 3917, 91067, 101935, 15490, 91088, 238, 14012 ]
[ 0.2056884765625, 0.0806884765625, 0.054412841796875, 0.145751953125, 0.1036376953125, 0.1414794921875, 0.13671875, 0.039031982421875, 0.0972900390625, 0.1744384765625, 0.2220458984375, 0.1126708984375, 0.1146240234375, 0.0355224609375, 0.007171630859375, 0.041046142578125, 0.02603149...
embed
47913354_c2
47913354
prolog
2
]) :- %not(memberchk(arg(2, Item, X), [rock(_, L, _) | Rest])), %add_tail(L, arg(2, Item, X), L), %not(memberchk(Item, RestY)), subseq2(RestX,RestY). Code signals: How, Terms, Pantry, Capacity, Knapsack, subseq2, Item, RestX, RestY, add_tail, CALS, Rest, RestW, RestC, ListOfLegalKnapsacks, LegalKnapsack, LEGAL, LEGALS,...
]) :- %not(memberchk(arg(2, Item, X), [rock(_, L, _) | Rest])), %add_tail(L, arg(2, Item, X), L), %not(memberchk(Item, RestY)), subseq2(RestX,RestY). Code signals: How, Terms, Pantry, Capacity, Knapsack, subseq2, Item, RestX, RestY, add_tail, CALS, Rest, RestW, RestC, ListOfLegalKnapsacks, LegalKnapsack, LEGAL, LEGALS,...
[ 0.0002498626708984375, 0.0322265625, 0.00250244140625, 0.0272216796875, 0.00775146484375, 0.0302734375, -0.0263671875, 0.0059814453125, 0.0218505859375, 0.0142822265625, 0.037353515625, 0.001739501953125, 0.0035400390625, 0.00958251953125, 0.0022735595703125, -0.000316619873046875, 0...
[ 10114, 16, 15772, 1745, 10869, 132, 39, 27417, 206, 92, 61477, 54753, 78426, 1193, 32491, 339, 49756, 11, 4028, 46741, 866, 79459, 2982, 1723, 1614, 184, 864, 304, 1052, 525, 1542, 28864, 26073, 7, 12, 11249, 165504, 4378, 15123, 14304, ...
[ 0.058990478515625, 0.025177001953125, 0.1134033203125, 0.10107421875, 0.1951904296875, 0.037811279296875, 0.03662109375, 0.1817626953125, 0.13916015625, 0.1417236328125, 0.186279296875, 0.0841064453125, 0.2181396484375, 0.112060546875, 0.231201171875, 0.0911865234375, 0.212890625, ...
embed
14079805_c0
14079805
prolog
0
Title: How does negation-as-failure works in Prolog? Problem title: How does negation-as-failure works in Prolog? Tags: prolog, negation-as-failure Problem: How does negation-as-failure works in Prolog? I want to know how Prolog solves this program: test(X, Y). test(X, X):-!, fail. I googled "negation as failure" but I...
How does negation-as-failure works in Prolog? How does negation-as-failure works in Prolog? prolog negation-as-failure How Prolog How does negation-as-failure works in Prolog? I want to know how Prolog solves this program: I googled "negation as failure" but I am confused!
[ -0.0032501220703125, 0.0196533203125, 0.0216064453125, -0.0019683837890625, -0.002838134765625, 0.0103759765625, 0.0054931640625, -0.01287841796875, -0.002288818359375, 0.01708984375, -0.006256103515625, -0.00024127960205078125, -0.01129150390625, 0.00274658203125, 0.01123046875, 0.003...
[ 11249, 14602, 108, 125682, 162, 120540, 3408, 43240, 23, 1250, 4867, 9, 502, 3642, 86869, 1528, 26484, 3331, 1363, 237, 137578, 55681 ]
[ 0.07763671875, 0.056427001953125, 0.1749267578125, 0.1888427734375, 0.157470703125, 0.140869140625, 0.0977783203125, 0.1258544921875, 0.0687255859375, 0.162841796875, 0.2232666015625, 0.03558349609375, 0.1146240234375, 0.01806640625, 0.08935546875, 0.08673095703125, 0.04815673828125,...
embed
19124383_c0
19124383
prolog
0
Title: Can a Prolog sentence be ambiguous? Problem title: Can a Prolog sentence be ambiguous? Tags: prolog Problem: Can a Prolog sentence be ambiguous? Is it possible for a Prolog sentence to be ambiguous and could you show me an example? I know parsers can be ambiguous in a way that they could generate two different p...
Can a Prolog sentence be ambiguous? Can a Prolog sentence be ambiguous? prolog Can Prolog Can a Prolog sentence be ambiguous? Is it possible for a Prolog sentence to be ambiguous and could you show me an example? I know parsers can be ambiguous in a way that they could generate two different parse trees...
[ 0.03515625, 0.005706787109375, 0.01031494140625, 0.0208740234375, -0.0026702880859375, 0.02294921875, 0.0027008056640625, 0.0167236328125, 0.0023040771484375, -0.00408935546875, 0.01385498046875, -0.005157470703125, 0.004486083984375, 0.01385498046875, 0.0152587890625, 0.031494140625, ...
[ 4171, 1250, 4867, 149357, 186, 920, 12282, 10821, 502, 7722, 27781, 366, 1314, 831, 5809, 139392, 6626, 12921, 184, 1360 ]
[ 0.05908203125, 0.175048828125, 0.2327880859375, 0.18505859375, 0.0333251953125, 0.1595458984375, 0.1712646484375, 0.12213134765625, 0.106201171875, 0.059051513671875, 0.068603515625, 0.06292724609375, 0.019073486328125, 0.040069580078125, 0.002765655517578125, 0.0625, 0.0382690429687...
embed
73959533_c1
73959533
prolog
1
= [a, d, x|X] ; C = 30, R = [y, x|X] ; C = 30, R = [z, x|X]. Some help with cleaning up the stray [x|X] would be appreciated. Code signals: SWI-Prolog, Shortest, Path, PathN, Redo, _10100, Call, _18442, _18444, Exit, _19962, _21478, Fail, _24520, _24522, _26040, _27556, _228, _3680, _3682, _5200, _6716, _9758, _9760, ...
= [a, d, x|X] ; C = 30, R = [y, x|X] ; C = 30, R = [z, x|X]. Some help with cleaning up the stray [x|X] would be appreciated. Code signals: SWI-Prolog, Shortest, Path, PathN, Redo, _10100, Call, _18442, _18444, Exit, _19962, _21478, Fail, _24520, _24522, _26040, _27556, _228, _3680, _3682, _5200, _6716, _9758, _9760, ...
[ 0.000560760498046875, 0.015625, 0.01214599609375, 0.02490234375, -0.00799560546875, 0.004638671875, -0.0010223388671875, -0.003753662109375, 0.0067138671875, -0.0274658203125, 0.00067138671875, 0.000885009765625, -0.026611328125, 0.01226806640625, 0.0025177001953125, -0.000766754150390...
[ 2203, 378, 11, 4, 104, 1022, 58745, 1542, 2819, 313, 496, 627, 53, 169, 31384, 4358, 678, 174033, 1257, 70, 6363, 425, 268, 2806, 77947, 71, 28864, 26073, 7, 12, 159, 38969, 9, 10752, 4867, 82990, 525, 108421, 839, 6096, 31, 963, 35...
[ 0.18505859375, 0.00140380859375, 0.09405517578125, 0.03521728515625, 0.1319580078125, 0.1063232421875, 0.10498046875, 0.1634521484375, 0.040740966796875, 0.1246337890625, 0.200439453125, 0.185791015625, 0.1624755859375, 0.10162353515625, 0.06256103515625, 0.1634521484375, 0.083496093...
embed
10768961_c0
10768961
prolog
0
Title: Prolog convert strings to pair list Problem title: Prolog convert strings to pair list Tags: prolog, string, list Problem: Prolog convert strings to pair list I'm learning Prolog and I need idea how to convert a list of strings: ['f(a,45)', 'f(b,13)', 'f(c,12)'] into a list of pairs that looks like this: [[45,'a...
Prolog convert strings to pair list Prolog convert strings to pair list prolog string list Prolog Prolog convert strings to pair list I'm learning Prolog and I need idea how to convert a list of strings: into a list of pairs that looks like this:
[ 0.01068115234375, 0.0021820068359375, -0.0019683837890625, 0.01300048828125, -0.021240234375, 0.037841796875, -0.0169677734375, -0.000835418701171875, -0.0030975341796875, -0.00762939453125, 0.005615234375, -0.021240234375, -0.004058837890625, -0.0140380859375, 0.0052490234375, 0.00022...
[ 1250, 4867, 96760, 79315, 7, 47, 80836, 5303, 502, 52080, 3871, 6528, 3934, 33342, 1884, 903 ]
[ 0.1593017578125, 0.2376708984375, 0.161376953125, 0.271728515625, 0.073974609375, 0.0745849609375, 0.27294921875, 0.2408447265625, 0.11614990234375, 0.05682373046875, 0.01611328125, 0.034637451171875, 0.06512451171875, 0.1380615234375, 0.03607177734375, 0.01739501953125 ]
embed
37200270_c0
37200270
prolog
0
Title: Prolog: List = List + Tail Problem title: Prolog: List = List + Tail Tags: prolog, list Problem: Prolog: List = List + Tail At the moment, I am doing the following: append(List, [A], AppendedList), append(List, [B], AppendedList2) Surely there is a better way, in which I can just update List? Code signals: Prolo...
Prolog: List = List + Tail Prolog: List = List + Tail prolog list Prolog List Tail AppendedList AppendedList2 Prolog: List = List + Tail At the moment, I am doing the following: Surely there is a better way, in which I can just update List?
[ 0.0252685546875, 0.01708984375, 0.026611328125, 0.01611328125, -0.0034332275390625, 0.0167236328125, -0.025146484375, 0.006317138671875, 0.0225830078125, -0.0191650390625, 0.0247802734375, -0.0067138671875, -0.00787353515625, 0.00836181640625, 0.0162353515625, -0.002288818359375, 0.0...
[ 1250, 4867, 32036, 2203, 997, 1218, 379, 12, 502, 5303, 5659, 2285, 154663, 304, 3095, 20594, 25632, 172561, 11522, 3917, 1660, 28350 ]
[ 0.1737060546875, 0.2369384765625, 0.255859375, 0.05169677734375, 0.126220703125, 0.158935546875, 0.1676025390625, 0.0003008842468261719, 0.1043701171875, 0.133544921875, 0.07000732421875, 0.1402587890625, 0.1624755859375, 0.0755615234375, 0.10772705078125, 0.0428466796875, 0.03863525...
embed
56353714_c2
56353714
prolog
2
_) :- fimDeJogo(Matriz). jogar(Matriz, X,Y,["S"|Rota]) :- elementoSuperior(X,Y,Z,Matriz),Z > -1,decrementa(X,Y,Matriz,NMAtriz), NX is X-1,jogar(NMAtriz, NX, Y,Rota). jogar(Matriz, X,Y,["I"|Rota]) :- Code signals: Prolog, Matriz, Caminho, Rota, caminho.txt, Elemento, ListaX, Aux, Aux1, X-1, Y-1, Resp, NMAtriz, MatrizAtu...
_) :- fimDeJogo(Matriz). jogar(Matriz, X,Y,["S"|Rota]) :- elementoSuperior(X,Y,Z,Matriz),Z > -1,decrementa(X,Y,Matriz,NMAtriz), NX is X-1,jogar(NMAtriz, NX, Y,Rota). jogar(Matriz, X,Y,["I"|Rota]) :- Code signals: Prolog, Matriz, Caminho, Rota, caminho.txt, Elemento, ListaX, Aux, Aux1, X-1, Y-1, Resp, NMAtriz, MatrizAtu...
[ -0.02392578125, 0.0106201171875, 0.007354736328125, 0.01226806640625, 0.00518798828125, 0.00689697265625, -0.018310546875, 0.000823974609375, 0.0238037109375, 0.01025390625, -0.01483154296875, -0.00286865234375, 0.00506591796875, -0.0159912109375, -0.004241943359375, 0.00836181640625, ...
[ 101, 16, 15772, 20342, 4657, 16604, 519, 79520, 14096, 194, 141071, 132, 4, 1193, 1723, 294, 12724, 102, 51534, 73903, 39674, 1542, 1511, 977, 68940, 112, 7612, 32125, 28848, 166989, 83, 5759, 513, 1970, 990, 568, 28864, 26073, 7, 12, 1...
[ 0.103515625, 0.04217529296875, 0.10394287109375, 0.2227783203125, 0.1632080078125, 0.168212890625, 0.1319580078125, 0.14892578125, 0.2398681640625, 0.074462890625, 0.304443359375, 0.0643310546875, 0.00006103515625, 0.07958984375, 0.1282958984375, 0.054931640625, 0.117919921875, 0.1...
embed
67376268_c0
67376268
prolog
0
Title: Prolog backtracking position Problem title: Prolog backtracking position Tags: prolog, backtracking Problem: Prolog backtracking position Given the following: R(p):- a(p), b(p), c(p). When c fails, it will backtrack to b and unbind b . However, I want it to backtrack from a and unbind b as well as a instead. Is ...
Prolog backtracking position Prolog backtracking position prolog backtracking Prolog Prolog backtracking position Given the following: When c fails, it will backtrack to b and unbind b . However, I want it to backtrack from a and unbind b as well as a instead. Is it possible to do this?
[ 0.0211181640625, 0.04052734375, 0.020263671875, 0.007293701171875, -0.01068115234375, 0.01165771484375, 0.026123046875, 0.00946044921875, -0.00439453125, -0.0145263671875, -0.01019287109375, 0.00494384765625, 0.006072998046875, -0.00002849102020263672, 0.000579833984375, 0.013916015625...
[ 1250, 4867, 4420, 125728, 19069, 214, 502, 25632, 14847, 501, 35782, 1221, 47, 876, 136, 51, 89817, 3444, 1295, 5299, 10, 64457, 7722, 54, 903 ]
[ 0.1591796875, 0.240478515625, 0.18115234375, 0.26171875, 0.215087890625, 0.03314208984375, 0.10711669921875, 0.003688812255859375, 0.059906005859375, 0.12139892578125, 0.2081298828125, 0.019317626953125, 0.07342529296875, 0.1146240234375, 0.01776123046875, 0.0914306640625, 0.20849609...
embed
41938013_c0
41938013
prolog
0
Title: sudoku solver in prolog without clpfd Problem title: sudoku solver in prolog without clpfd Tags: sudoku, prolog Problem: sudoku solver in prolog without clpfd I have an AI project in which I should make a sudoku solver in Prolog but without using the clpfd package. How should I write the code and is there any wa...
sudoku solver in prolog without clpfd sudoku solver in prolog without clpfd sudoku prolog sudoku solver in prolog without clpfd I have an AI project in which I should make a sudoku solver in Prolog but without using the clpfd package. How should I write the code and is there any way to print whenever a variable gets a ...
[ 0.0007476806640625, 0.00927734375, 0.009765625, -0.00433349609375, -0.01141357421875, 0.003692626953125, -0.019775390625, -0.00439453125, -0.0172119140625, -0.03173828125, -0.009521484375, -0.0244140625, -0.0064697265625, -0.004180908203125, 0.0093994140625, 0.0159912109375, 0.004669...
[ 8932, 38067, 3115, 814, 23, 502, 4867, 15490, 33139, 39557, 71, 38730, 13452, 5608, 1250, 1284, 17368, 98169, 11249, 33022, 18151, 3917, 28412, 217684, 77336, 62163, 34292 ]
[ 0.1300048828125, 0.21044921875, 0.1324462890625, 0.11865234375, 0.06781005859375, 0.1351318359375, 0.2283935546875, 0.142822265625, 0.082763671875, 0.0880126953125, 0.1224365234375, 0.1607666015625, 0.06939697265625, 0.01554107666015625, 0.1318359375, 0.028045654296875, 0.06915283203...
embed
13527825_c0
13527825
prolog
0
Title: Trying to check if a number is greater than one Problem title: Trying to check if a number is greater than one Tags: prolog Problem: Trying to check if a number is greater than one I am writing a piece of prolog code and i want to find out if a number is greater than 1.It always return false whenever i query it....
Trying to check if a number is greater than one Trying to check if a number is greater than one prolog Trying Trying to check if a number is greater than one I am writing a piece of prolog code and i want to find out if a number is greater than 1.It always return false whenever i query it.
[ 0.023193359375, 0.0021209716796875, -0.0068359375, 0.0036773681640625, 0.00531005859375, -0.0111083984375, -0.004608154296875, -0.00103759765625, 0.016845703125, -0.039306640625, 0.00347900390625, -0.00885009765625, -0.02587890625, 0.00433349609375, 0.017578125, -0.01153564453125, 0....
[ 40858, 214, 12765, 2174, 14012, 83, 117396, 3501, 1632, 47, 502, 4867, 32562, 18151, 3444, 7413, 1810, 10, 615, 11343, 30646, 98320, 217684, 17, 41, 1294, 442 ]
[ 0.1314697265625, 0.054168701171875, 0.1724853515625, 0.11285400390625, 0.178466796875, 0.10382080078125, 0.177734375, 0.12286376953125, 0.143310546875, 0.046356201171875, 0.16015625, 0.194091796875, 0.07037353515625, 0.1068115234375, 0.053802490234375, 0.06854248046875, 0.05657958984...
embed
30111397_c0
30111397
prolog
0
Title: How do I append 3 lists efficiently in Prolog? Problem title: How do I append 3 lists efficiently in Prolog? Tags: prolog Problem: How do I append 3 lists efficiently in Prolog? I know how to do it for 2 lists: append([],L,L). append([H|T],L,[H|R]):-append(T,L,R). but how to do it for 3? Without using the append...
How do I append 3 lists efficiently in Prolog? How do I append 3 lists efficiently in Prolog? prolog How Prolog How do I append 3 lists efficiently in Prolog? I know how to do it for 2 lists: but how to do it for 3? Without using the append for 2 lists twice.
[ 0.00384521484375, 0.0078125, 0.017578125, -0.00090789794921875, 0.0023345947265625, 0.008056640625, -0.01226806640625, 0.00494384765625, 0.015869140625, -0.0220947265625, 0.005523681640625, -0.0289306640625, -0.00469970703125, 0.004150390625, 0.00677490234375, 0.008056640625, 0.00927...
[ 11249, 114689, 71, 138, 5303, 7, 93766, 538, 23, 1250, 4867, 87, 502, 3642, 100, 116, 54, 177417, 186351 ]
[ 0.05108642578125, 0.1746826171875, 0.15087890625, 0.2218017578125, 0.2435302734375, 0.11920166015625, 0.167236328125, 0.06085205078125, 0.0240020751953125, 0.15478515625, 0.22314453125, 0.0037059783935546875, 0.08197021484375, 0.0304107666015625, 0.0662841796875, 0.0192718505859375, ...
embed
40952927_c0
40952927
prolog
0
Title: Is there any NOT operator in DCG Problem title: Is there any NOT operator in DCG Tags: dcg, prolog Problem: Is there any NOT operator in DCG I think the question is clear from the title, I couldn't find any documentation about the NOT operator in DCG, while it exists in prolog. Is there anyway to do it? Any exam...
Is there any NOT operator in DCG Is there any NOT operator in DCG dcg prolog NOT DCG Is there any NOT operator in DCG I think the question is clear from the title, I couldn't find any documentation about the NOT operator in DCG, while it exists in prolog. Is there anyway to do it? Any example? Thanks in advance.
[ 0.0244140625, 0.000732421875, 0.03564453125, 0.0198974609375, -0.0038909912109375, 0.0228271484375, -0.003082275390625, 0.000881195068359375, 0.00469970703125, -0.0184326171875, -0.0230712890625, -0.012451171875, 0.00020503997802734375, -0.00787353515625, -0.0021514892578125, 0.0155029...
[ 2685, 2499, 86725, 39933, 23, 391, 56367, 104, 238, 177, 502, 4867, 34735, 209806, 70, 442, 32316, 109954, 47, 54, 27781 ]
[ 0.037841796875, 0.0758056640625, 0.251220703125, 0.267578125, 0.08697509765625, 0.10455322265625, 0.2198486328125, 0.018890380859375, 0.0283660888671875, 0.1165771484375, 0.1151123046875, 0.1851806640625, 0.01172637939453125, 0.136474609375, 0.039031982421875, 0.054107666015625, 0.04...
embed
16027449_c0
16027449
prolog
0
Title: What is the difference between is and =? Problem title: What is the difference between is and =? Tags: prolog Problem: What is the difference between is and =? I have entered these statements into the prolog interpreter and am confused by the results. Shouldn't they return the same thing; true? 1 ?- 7 = 5 + 2. f...
What is the difference between is and =? What is the difference between is and =? prolog What What is the difference between is and =? I have entered these statements into the prolog interpreter and am confused by the results. Shouldn't they return the same thing; true?
[ 0.0135498046875, -0.00775146484375, 0.0184326171875, -0.00628662109375, 0.00095367431640625, 0.0074462890625, 0.01129150390625, 0.00677490234375, 0.0016021728515625, 0.01434326171875, 0.014404296875, -0.00531005859375, 0.00086212158203125, 0.0157470703125, -0.0034027099609375, -0.00106...
[ 4865, 83, 70, 60212, 17721, 136, 2203, 32, 502, 4867, 30957, 63805, 29481, 56, 55681, 5281, 50339, 30646, 5701, 13580, 29568 ]
[ 0.0482177734375, 0.229736328125, 0.1209716796875, 0.225341796875, 0.1607666015625, 0.1884765625, 0.2296142578125, 0.0289154052734375, 0.129150390625, 0.1905517578125, 0.0738525390625, 0.1624755859375, 0.138671875, 0.0830078125, 0.05438232421875, 0.0221099853515625, 0.034820556640625,...
embed
47666506_c0
47666506
prolog
0
Title: How to check the cycles in Prolog? Problem title: How to check the cycles in Prolog? Tags: prolog Problem: How to check the cycles in Prolog? I have the Prolog predicates: gen(c1, c2). gen(c2, c1). gen(c2, c3). gen(c3, c1). I want to write a rule to check that there are no cycles in the gen/2 predicates. How sho...
How to check the cycles in Prolog? How to check the cycles in Prolog? prolog How Prolog How to check the cycles in Prolog? I have the Prolog predicates: I want to write a rule to check that there are no cycles in the gen/2 predicates. How should I write this rule?
[ 0.0162353515625, 0.018310546875, -0.0093994140625, 0.0240478515625, 0.00086212158203125, 0.007720947265625, 0.00182342529296875, -0.00592041015625, 0.0002593994140625, -0.0299072265625, -0.0086669921875, 0.00921630859375, -0.01068115234375, -0.0012359619140625, 0.026123046875, 0.018798...
[ 11249, 47, 12765, 105823, 7, 23, 1250, 4867, 502, 70, 1653, 2063, 1636, 33022, 79986, 110, 9226, 12477 ]
[ 0.07684326171875, 0.07879638671875, 0.2127685546875, 0.239501953125, 0.1097412109375, 0.08880615234375, 0.1732177734375, 0.24755859375, 0.08294677734375, 0.022674560546875, 0.10650634765625, 0.11407470703125, 0.008880615234375, 0.038177490234375, 0.1082763671875, 0.0863037109375, 0.1...
embed
44721870_c0
44721870
prolog
0
Title: What is Prolog bad at? Problem title: What is Prolog bad at? Tags: prolog Problem: What is Prolog bad at? I was recently trying to learn about Prolog and it seems to map well to a lot of domains, but I was having trouble figuring out what it might be bad at. So what is it bad at (besides things that need real-ti...
What is Prolog bad at? What is Prolog bad at? prolog What Prolog What is Prolog bad at? I was recently trying to learn about Prolog and it seems to map well to a lot of domains, but I was having trouble figuring out what it might be bad at. So what is it bad at (besides things that need real-time/no-gc performance)?
[ 0.00994873046875, 0.003936767578125, 0.00830078125, -0.017333984375, -0.009033203125, 0.021240234375, -0.00665283203125, -0.01708984375, 0.00124359130859375, -0.0113525390625, -0.00933837890625, -0.01220703125, -0.00958251953125, 0.0150146484375, 0.003814697265625, 0.000037908554077148...
[ 4865, 83, 1250, 4867, 6494, 99, 502, 30698, 37202, 22288, 5299, 5915, 77758, 26747, 2367, 13648, 186, 442, 2773, 6032, 23718 ]
[ 0.06903076171875, 0.077880859375, 0.1839599609375, 0.283935546875, 0.17236328125, 0.14404296875, 0.1265869140625, 0.0013427734375, 0.00457763671875, 0.1112060546875, 0.011077880859375, 0.0235137939453125, 0.07379150390625, 0.012908935546875, 0.030029296875, 0.07122802734375, 0.055480...
embed
37506680_c0
37506680
prolog
0
Title: How write a rule to exit program in prolog? Problem title: How write a rule to exit program in prolog? Tags: prolog Problem: How write a rule to exit program in prolog? I want to write a rule to exit prolog but how can I do this? What should I do so that I can exit the program? I tried something like this do(exi...
How write a rule to exit program in prolog? How write a rule to exit program in prolog? prolog How How write a rule to exit program in prolog? I want to write a rule to exit prolog but how can I do this? What should I do so that I can exit the program? I tried something like this do(exit):-halt , but halt does not work...
[ 0.012939453125, 0.00982666015625, 0.000507354736328125, 0.0108642578125, -0.01611328125, 0.027099609375, -0.01361083984375, 0.0037841796875, -0.005462646484375, -0.043212890625, -0.0135498046875, -0.0120849609375, -0.0230712890625, -0.0002880096435546875, 0.0194091796875, -0.0017318725...
[ 11249, 33022, 10, 79986, 47, 82230, 1528, 23, 502, 4867, 3444, 3642, 831, 54, 450, 37842, 13, 23399, 23766, 58810, 959, 4488 ]
[ 0.09063720703125, 0.19091796875, 0.088134765625, 0.221923828125, 0.1470947265625, 0.25927734375, 0.2276611328125, 0.09051513671875, 0.161865234375, 0.243896484375, 0.046600341796875, 0.04913330078125, 0.08349609375, 0.044921875, 0.0002033710479736328, 0.004070281982421875, 0.08471679...
embed
19734799_c0
19734799
prolog
0
Title: Getting last char of a string in Prolog Problem title: Getting last char of a string in Prolog Tags: prolog Problem: Getting last char of a string in Prolog I need to get the last char of a string. For example: ?- last_char('abde', X). X = 'e' ?- last_char('abdef', X). X = 'f' Could someone help me, please? I'm ...
Getting last char of a string in Prolog Getting last char of a string in Prolog prolog Getting Prolog last_char Getting last char of a string in Prolog I need to get the last char of a string. For example: Could someone help me, please? I'm new to Prolog.
[ 0.01275634765625, 0.00836181640625, 0.025390625, 0.007232666015625, -0.0106201171875, 0.022216796875, 0.005340576171875, -0.010986328125, -0.006561279296875, -0.02197265625, 0.0196533203125, -0.035400390625, -0.0230712890625, 0.01239013671875, -0.00970458984375, 0.00360107421875, -0....
[ 210732, 4568, 21441, 111, 79315, 23, 1250, 4867, 502, 9254, 3871, 2046, 191147, 22008, 4358, 163, 22936, 3525 ]
[ 0.10260009765625, 0.21484375, 0.2159423828125, 0.07550048828125, 0.1968994140625, 0.072998046875, 0.15478515625, 0.2337646484375, 0.11029052734375, 0.2119140625, 0.051727294921875, 0.0946044921875, 0.02655029296875, 0.003482818603515625, 0.07354736328125, 0.00559234619140625, 0.06240...
embed
10282088_c0
10282088
prolog
0
Title: SWI-Prolog - Fail to Assert Problem title: SWI-Prolog - Fail to Assert Tags: prolog-assert, prolog Problem: SWI-Prolog - Fail to Assert I define an operator as follows: :- op(500, xfx, =>). When I try something like: assert(a => b). Prolog raises an error that says 'No permission to modify static_procedure (=>)/...
SWI-Prolog - Fail to Assert SWI-Prolog - Fail to Assert prolog-assert prolog SWI-Prolog Fail Assert SWI-Prolog - Fail to Assert I define an operator as follows: When I try something like: Prolog raises an error that says 'No permission to modify static_procedure (=>)/2'. Any solution?
[ 0.00384521484375, 0.0037994384765625, 0.0255126953125, -0.0035858154296875, -0.01165771484375, -0.005157470703125, -0.00994873046875, 0.00787353515625, -0.01226806640625, -0.006011962890625, 0.00360107421875, 0.00958251953125, -0.0054931640625, 0.01055908203125, 0.03564453125, -0.00448...
[ 159, 38969, 10752, 4867, 190355, 47, 1301, 33657, 502, 162, 61924, 39933, 28960, 9790, 1250, 138804, 18499, 5021, 168081, 2811, 40383, 201939, 232578, 78690, 2740, 12477, 29806 ]
[ 0.042999267578125, 0.2152099609375, 0.1346435546875, 0.2227783203125, 0.19482421875, 0.0670166015625, 0.0731201171875, 0.1787109375, 0.106689453125, 0.0169677734375, 0.1932373046875, 0.269287109375, 0.051605224609375, 0.119384765625, 0.164794921875, 0.0877685546875, 0.16650390625, ...
embed
59036520_c0
59036520
prolog
0
Title: Prolog write n as sum of consecutive numbers Problem title: Prolog write n as sum of consecutive numbers Tags: prolog Problem: Prolog write n as sum of consecutive numbers I'm studying prolog and I want to determine all decomposition of n (n given, positive), as sum of consecutive natural numbers but I don't kno...
Prolog write n as sum of consecutive numbers Prolog write n as sum of consecutive numbers prolog Prolog Prolog write n as sum of consecutive numbers I'm studying prolog and I want to determine all decomposition of n (n given, positive), as sum of consecutive natural numbers but I don't know how to approach this. Any id...
[ -0.00095367431640625, 0.004302978515625, 0.001190185546875, 0.019287109375, 0.0012054443359375, 0.025390625, -0.0067138671875, 0.007720947265625, 0.00823974609375, -0.01953125, 0.000835418701171875, 0.00182342529296875, 0.000217437744140625, 0.005645751953125, 0.0025787353515625, 0.028...
[ 1250, 4867, 33022, 653, 237, 10554, 111, 148390, 101935, 13, 502, 35187, 3444, 83324, 756, 8, 277, 40322, 19, 34475, 24491, 6083, 18, 3714, 51515, 25647 ]
[ 0.15087890625, 0.21337890625, 0.1375732421875, 0.15380859375, 0.0948486328125, 0.19140625, 0.0239715576171875, 0.2083740234375, 0.1636962890625, 0.0026836395263671875, 0.12384033203125, 0.01654052734375, 0.045654296875, 0.1334228515625, 0.0660400390625, 0.1580810546875, 0.15771484375...
embed
9777077_c0
9777077
prolog
0
Title: Get elements from list of lists Problem title: Get elements from list of lists Tags: dcg, list, prolog Problem: Get elements from list of lists is it possible to get all elements from list of lists in Prolog? Something like: We have getElements([[[a,b,[c]],d,e],f,g,[h,[i,j]]],S) and the result is: S = [a,b,c,d,e...
Get elements from list of lists Get elements from list of lists dcg list prolog list Get Get elements from list of lists is it possible to get all elements from list of lists in Prolog? Something like: We have getElements([[[a,b,[c]],d,e],f,g,[h,[i,j]]],S) and the result is: S = [a,b,c,d,e,f,g,h,i,j] ... Thanks for hel...
[ 0.0032501220703125, 0.00811767578125, -0.00921630859375, 0.01470947265625, -0.0224609375, 0.005096435546875, 0.01422119140625, -0.01708984375, 0.01519775390625, -0.042724609375, 0.0205078125, 0.0024261474609375, -0.023681640625, 0.00872802734375, -0.012451171875, 0.0089111328125, 0.0...
[ 20779, 80854, 1295, 5303, 111, 7, 238, 177, 502, 4867, 83, 442, 7722, 47, 2046, 756, 23, 1250, 647, 19929, 275, 71, 13, 420, 127, 170, 294, 16750, 159, 2203, 4358 ]
[ 0.148681640625, 0.2293701171875, 0.14453125, 0.221435546875, 0.110107421875, 0.05609130859375, 0.014312744140625, 0.091796875, 0.1170654296875, 0.2470703125, 0.0040283203125, 0.021514892578125, 0.13134765625, 0.02545166015625, 0.1414794921875, 0.1097412109375, 0.0176849365234375, 0...
embed
13036899_c0
13036899
prolog
0
Title: Remove adjacent duplicates from a list prolog Problem title: Remove adjacent duplicates from a list prolog Tags: prolog, duplicates, list Problem: Remove adjacent duplicates from a list prolog I'm new to Prolog and I need to remove duplicates from a list like shown in the example below. ?- remove([a,a,b,c,a,a,b,...
Remove adjacent duplicates from a list prolog Remove adjacent duplicates from a list prolog prolog duplicates list a Remove Remove adjacent duplicates from a list prolog I'm new to Prolog and I need to remove duplicates from a list like shown in the example below.
[ 0.005767822265625, 0.016357421875, 0.01513671875, 0.011474609375, -0.02392578125, 0.0133056640625, 0.0030975341796875, 0.0238037109375, 0.005889892578125, -0.031005859375, -0.0201416015625, 0.0247802734375, -0.00421142578125, 0.019775390625, -0.01287841796875, 0.001220703125, 0.01330...
[ 181139, 123594, 16797, 171763, 1636, 1295, 5303, 502, 4867, 10, 3525, 1250, 3871, 87388, 127887, 27781, 35064 ]
[ 0.1572265625, 0.147705078125, 0.2066650390625, 0.2744140625, 0.1585693359375, 0.09832763671875, 0.197021484375, 0.137451171875, 0.200439453125, 0.006954193115234375, 0.04095458984375, 0.11883544921875, 0.043212890625, 0.1473388671875, 0.0067138671875, 0.096923828125, 0.04220581054687...
embed
69665091_c0
69665091
prolog
0
Title: How can i get a sublist of list in Prolog? Problem title: How can i get a sublist of list in Prolog? Tags: prolog Problem: How can i get a sublist of list in Prolog? Let's assume that I have a list = [1,2,3,4,5] and an element = 3 I want to get a sublist based on that element , like that sublist = [3,4,5] What i...
How can i get a sublist of list in Prolog? How can i get a sublist of list in Prolog? prolog How Prolog How can i get a sublist of list in Prolog? Let's assume that I have a list = [1,2,3,4,5] and an element = 3 I want to get a sublist based on that element , like that sublist = [3,4,5] What is the implementation in Pr...
[ 0.00616455078125, 0.00124359130859375, 0.0177001953125, 0.007415771484375, -0.024658203125, 0.01611328125, -0.0147705078125, 0.0213623046875, -0.0021209716796875, -0.017578125, 0.007598876953125, -0.00823974609375, -0.025146484375, 0.00787353515625, 0, 0.00927734375, 0.02197265625, ...
[ 11249, 831, 17, 2046, 10, 1614, 6562, 111, 5303, 23, 1250, 4867, 502, 41591, 155761, 80389, 12830, 138, 3444, 35509, 208124 ]
[ 0.0294342041015625, 0.05230712890625, 0.0226898193359375, 0.114501953125, 0.040008544921875, 0.2457275390625, 0.268310546875, 0.07977294921875, 0.202392578125, 0.04638671875, 0.164306640625, 0.2410888671875, 0.08233642578125, 0.028472900390625, 0.06207275390625, 0.141845703125, 0.131...
embed
11106585_c0
11106585
prolog
0
Title: Start a separate program in prolog/swiprolog Problem title: Start a separate program in prolog/swiprolog Tags: swi-prolog, prolog Problem: Start a separate program in prolog/swiprolog I want to open firefox or a other browser with prolog code. But how i can realize it. Specific i need comment for prolog like ope...
Start a separate program in prolog/swiprolog Start a separate program in prolog/swiprolog swi-prolog prolog Start Start a separate program in prolog/swiprolog I want to open firefox or a other browser with prolog code. But how i can realize it. Specific i need comment for prolog like open_url_in_Browser X. where X ist ...
[ 0.0179443359375, -0.00787353515625, -0.01556396484375, 0.00021648406982421875, -0.02099609375, 0.000591278076171875, 0.005157470703125, 0.006317138671875, -0.00145721435546875, -0.0322265625, -0.004150390625, 0.0245361328125, -0.0159912109375, 0.0084228515625, 0.0257568359375, -0.03564...
[ 13794, 84797, 1528, 23, 502, 4867, 2452, 3454, 91, 64, 7, 87, 3444, 47, 9803, 11476, 147797, 3789, 31842, 678, 18151, 92154, 209052, 3871, 6868, 25002, 73, 15555, 1193, 443 ]
[ 0.1585693359375, 0.1937255859375, 0.2039794921875, 0.089111328125, 0.1629638671875, 0.2430419921875, 0.1900634765625, 0.175048828125, 0.0355224609375, 0.007354736328125, 0.02081298828125, 0.004791259765625, 0.0970458984375, 0.0181427001953125, 0.1754150390625, 0.140869140625, 0.23706...
embed
14357556_c0
14357556
prolog
0
Title: ERROR: Undefined procedure: (:-)/2 Problem title: ERROR: Undefined procedure: (:-)/2 Tags: prolog-toplevel, prolog Problem: ERROR: Undefined procedure: (:-)/2 I'm new in Prolog , I am trying to set rule on SWI-Prolog shell e.g - listensToMusic(X) :- happy(X). But it prompts - ERROR: Undefined procedure: (:-)/2 I...
ERROR: Undefined procedure: (:-)/2 ERROR: Undefined procedure: (:-)/2 prolog-toplevel prolog ERROR Undefined ERROR: Undefined procedure: (:-)/2 I'm new in Prolog , I am trying to set rule on SWI-Prolog shell e.g - But it prompts - I use SWI-Prolog version 6.2.6
[ 0.017333984375, 0.0235595703125, 0.000274658203125, 0.0341796875, -0.034912109375, 0.01318359375, -0.007781982421875, 0.0096435546875, 0.00058746337890625, -0.044921875, 0.006744384765625, -0.0205078125, 0.01214599609375, -0.005401611328125, 0.0220947265625, -0.0000934600830078125, 0...
[ 151206, 24638, 79912, 5983, 297, 50491, 15, 53483, 12477, 502, 4867, 13784, 67919, 3525, 1250, 31577, 5423, 79986, 159, 38969, 10752, 128019, 105876, 4527, 9, 11389, 2289, 154784 ]
[ 0.15185546875, 0.139892578125, 0.1416015625, 0.2181396484375, 0.08734130859375, 0.2255859375, 0.030181884765625, 0.1104736328125, 0.25390625, 0.1331787109375, 0.243896484375, 0.0765380859375, 0.15966796875, 0.070068359375, 0.1387939453125, 0.050811767578125, 0.1435546875, 0.2042236...
embed
16549020_c0
16549020
prolog
0
Title: prolog delete head from a clause Problem title: prolog delete head from a clause Tags: list, prolog, yap Problem: prolog delete head from a clause I am using yap. Suppose I have this scenario: p(x,y) :- q(x), f(x,y), g(x). I need to put the body of the predicate in a list using the command listing(p) . Expected ...
prolog delete head from a clause prolog delete head from a clause list prolog yap a prolog delete head from a clause I am using yap. Suppose I have this scenario: p(x,y) :- q(x), f(x,y), g(x). I need to put the body of the predicate in a list using the command listing(p) . Expected output should be: [q,f,g]. How I can ...
[ 0.0274658203125, 0.02197265625, 0.0045166015625, 0.0179443359375, -0.02880859375, 0.0130615234375, 0.000492095947265625, -0.007537841796875, 0.0009002685546875, -0.043212890625, 0.01025390625, 0.01361083984375, -0.0172119140625, -0.025390625, 0.01202392578125, -0.021728515625, -0.003...
[ 502, 4867, 154109, 10336, 1295, 70731, 13, 5303, 15850, 10, 17368, 121691, 106117, 915, 53, 8096, 1238, 706, 3871, 3884, 14361, 111, 1653, 2063, 67, 23, 75101, 214, 254, 60075, 140992, 5608, 864, 420, 177, 54 ]
[ 0.1558837890625, 0.1953125, 0.2264404296875, 0.2215576171875, 0.11376953125, 0.18603515625, 0.06744384765625, 0.1866455078125, 0.206298828125, 0.020050048828125, 0.053466796875, 0.0274810791015625, 0.1217041015625, 0.07275390625, 0.051116943359375, 0.099365234375, 0.0672607421875, ...
embed
22736188_c0
22736188
prolog
0
Title: unification in prolog failure Problem title: unification in prolog failure Tags: unification, prolog Problem: unification in prolog failure Can anyone please tell me why this fails? f(X,X) = f(a,b). It was my assumption that X would first be instantiated to a, then removed, then to b making just X = b. Trying it...
unification in prolog failure unification in prolog failure unification prolog unification in prolog failure Can anyone please tell me why this fails? It was my assumption that X would first be instantiated to a, then removed, then to b making just X = b. Trying it out, I see that I am wrong but I do not know why. Than...
[ 0.025146484375, 0.016845703125, 0.0206298828125, 0.001007080078125, -0.010009765625, -0.01507568359375, -0.00830078125, -0.00738525390625, 0.01068115234375, -0.003570556640625, 0.005767822265625, 0.0101318359375, -0.005096435546875, -0.0162353515625, 0.00848388671875, -0.00023078918457...
[ 51, 41274, 23, 502, 4867, 137578, 14192, 15400, 903, 35782, 7, 237259, 1193, 5117, 34648, 14, 47, 10, 184750, 876, 20662, 1660, 2203, 40858, 1957, 444, 44691, 3714 ]
[ 0.1793212890625, 0.1573486328125, 0.0287017822265625, 0.12548828125, 0.2119140625, 0.2138671875, 0.0239715576171875, 0.08935546875, 0.006103515625, 0.1767578125, 0.0670166015625, 0.10760498046875, 0.1099853515625, 0.024810791015625, 0.07952880859375, 0.064453125, 0.0599365234375, 0...
embed
23712875_c0
23712875
prolog
0
Title: Prolog arithmetic Problem title: Prolog arithmetic Tags: prolog, clpfd Problem: Prolog arithmetic If I had the following SWI Prolog queries and answers [A,B,C] ins 1..3, A#= B + C. And needed to select from below which were incorrect: A in 2..3, B in 1..3, C in 1..3. Would I be correct in thinking that A in 2..3...
Prolog arithmetic Prolog arithmetic prolog clpfd Prolog Prolog arithmetic If I had the following SWI Prolog queries and answers And needed to select from below which were incorrect: Would I be correct in thinking that A in 2..3 is not possible as in no case can A = 3?
[ 0.0059814453125, 0.01092529296875, 0.0137939453125, 0.007781982421875, -0.01055908203125, 0.007598876953125, -0.0164794921875, 0.00384521484375, -0.0037078857421875, 0.005279541015625, -0.005828857421875, -0.0167236328125, 0.01141357421875, 0.02392578125, 0.010986328125, -0.00234985351...
[ 1250, 4867, 187, 8962, 282, 9523, 502, 71, 159, 38969, 41, 10484, 35166, 44841, 36849, 35064, 214552, 154559, 26785, 47644, 62, 23, 787, 363, 959, 7722, 110, 7225, 831, 2203, 138 ]
[ 0.1732177734375, 0.285400390625, 0.01043701171875, 0.1126708984375, 0.0721435546875, 0.030548095703125, 0.123046875, 0.036346435546875, 0.023895263671875, 0.1678466796875, 0.06707763671875, 0.041259765625, 0.0711669921875, 0.007293701171875, 0.07733154296875, 0.03497314453125, 0.1541...
embed
14860832_c0
14860832
prolog
0
Title: Incomplete to difference lists Problem title: Incomplete to difference lists Tags: difference-lists, prolog Problem: Incomplete to difference lists I want to convert incomplete lists into difference lists and vice versa. This is code to convert regular list to difference: reg2diff(L,X-Y):-append(L,Y,X). How do I...
Incomplete to difference lists Incomplete to difference lists difference-lists prolog Incomplete reg2diff X-Y Incomplete to difference lists I want to convert incomplete lists into difference lists and vice versa. This is code to convert regular list to difference: How do I go the other direction?
[ 0.022705078125, 0.0020904541015625, 0.005462646484375, 0.0155029296875, -0.0223388671875, 0.03173828125, -0.002532958984375, 0.0146484375, 0.0240478515625, 0.00213623046875, 0.0029144287109375, 0.0003261566162109375, -0.003936767578125, 0.00171661376953125, 0.006134033203125, -0.001426...
[ 360, 277, 131801, 47, 60212, 5303, 6562, 502, 4867, 6835, 304, 152462, 1193, 1723, 7, 3444, 96760, 82940, 46485, 3934, 22925, 105274, 18151, 20324, 3789, 48225 ]
[ 0.055511474609375, 0.11737060546875, 0.19091796875, 0.12017822265625, 0.2568359375, 0.219482421875, 0.1829833984375, 0.09381103515625, 0.1419677734375, 0.1119384765625, 0.0421142578125, 0.1796875, 0.01537322998046875, 0.0908203125, 0.045074462890625, 0.07818603515625, 0.13330078125, ...
embed
47659437_c0
47659437
prolog
0
Title: Im trying to check if its a list in prolog Problem title: Im trying to check if its a list in prolog Tags: list, prolog Problem: Im trying to check if its a list in prolog So I started by creating a base case. Then came up with this: list([]). list([_|_]):- list([_],true), list([_|_],true). So when I run it its ...
Im trying to check if its a list in prolog Im trying to check if its a list in prolog list prolog Im trying to check if its a list in prolog So I started by creating a base case. Then came up with this: So when I run it its supposed to do this
[ 0.0120849609375, 0.0029296875, 0.00897216796875, 0.0186767578125, -0.01287841796875, 0.01287841796875, -0.016357421875, 0.009765625, 0.006561279296875, -0.0208740234375, 0.01019287109375, -0.0220947265625, -0.0130615234375, 0.0103759765625, -0.0037689208984375, 0.022705078125, 0.0301...
[ 3370, 31577, 12765, 2174, 6863, 10, 5303, 23, 502, 4867, 26859, 105233, 3647, 7225, 1257, 678, 903, 3229, 11675, 442, 134598, 47, 54 ]
[ 0.06976318359375, 0.0863037109375, 0.184326171875, 0.085205078125, 0.1112060546875, 0.057586669921875, 0.2408447265625, 0.09967041015625, 0.173828125, 0.262451171875, 0.026519775390625, 0.088623046875, 0.1458740234375, 0.1654052734375, 0.0626220703125, 0.0474853515625, 0.094177246093...
embed
17137066_c0
17137066
prolog
0
Title: Prolog - like gensym, but for variables Problem title: Prolog - like gensym, but for variables Tags: prolog Problem: Prolog - like gensym, but for variables I'm trying to generate some rules in runtime with the help of dynamic/1 and assert/1 rules. Is there a way to generate variables to be used in that rules, j...
Prolog - like gensym, but for variables Prolog - like gensym, but for variables prolog Prolog Prolog - like gensym, but for variables I'm trying to generate some rules in runtime with the help of dynamic/1 and assert/1 rules. Is there a way to generate variables to be used in that rules, just like gensym but for genera...
[ 0.019287109375, 0.0155029296875, -0.010986328125, 0.00518798828125, -0.000324249267578125, 0.01275634765625, -0.012451171875, 0.0283203125, -0.01007080078125, -0.048583984375, -0.012939453125, 0.00063323974609375, -0.006317138671875, -0.00421142578125, 0.0164794921875, 0.0201416015625,...
[ 1250, 4867, 1884, 29038, 4650, 1284, 100, 77336, 7, 502, 31577, 139392, 91736, 11675, 6032, 4358, 84079, 11583, 237, 33657, 3917, 186, 11814, 12663 ]
[ 0.1807861328125, 0.29443359375, 0.12451171875, 0.154296875, 0.2371826171875, 0.08221435546875, 0.103271484375, 0.26806640625, 0.061309814453125, 0.142333984375, 0.0262451171875, 0.13525390625, 0.1531982421875, 0.06109619140625, 0.116943359375, 0.006256103515625, 0.1483154296875, 0....
embed
31434659_c2
31434659
prolog
2
0) ? creep Fail: (7) intepretation("abc", "", _G1441) ? creep Fail: (6) morph(abc, _G1441) ? creep I'm sure this is the result of me simply misunderstanding strings or something. I'd appreciate any help, thanks. Code signals: Simple, Splitting, SWI-Prolog, Not, Working, Input, Output, string_concat, First, Second, Foo,...
0) ? creep Fail: (7) intepretation("abc", "", _G1441) ? creep Fail: (6) morph(abc, _G1441) ? creep I'm sure this is the result of me simply misunderstanding strings or something. I'd appreciate any help, thanks. Code signals: Simple, Splitting, SWI-Prolog, Not, Working, Input, Output, string_concat, First, Second, Foo,...
[ 0.01300048828125, -0.006591796875, -0.016357421875, 0.029541015625, 0.00102996826171875, 0.020751953125, 0.0223388671875, -0.000949859619140625, 0.007415771484375, 0.000713348388671875, 0.00555419921875, -0.0147705078125, -0.04296875, -0.003021240234375, 0.0089111328125, -0.01538085937...
[ 757, 16, 705, 49512, 254, 190355, 8696, 892, 4692, 22062, 2055, 238, 724, 2592, 123001, 6791, 178851, 9077, 903, 70, 16750, 163, 42856, 1239, 24658, 144057, 79315, 7, 77947, 4358, 28864, 26073, 60552, 46474, 1916, 159, 38969, 10752, 4867, ...
[ 0.105224609375, 0.002593994140625, 0.03131103515625, 0.1883544921875, 0.15478515625, 0.1915283203125, 0.0196533203125, 0.05853271484375, 0.154296875, 0.0197906494140625, 0.09332275390625, 0.0782470703125, 0.03509521484375, 0.162841796875, 0.194580078125, 0.045562744140625, 0.20812988...
embed
21841631_c1
21841631
prolog
1
,[F|B]). unite([], [], []). unite([X], [], [X]). unite([], [X], [X]). unite([H|T], [S|R], [X|Xs]) :- S=H, X is S, unite(T, R, Xs). unite([H|T], [S|R], [X|Xs]) :- H<S, X is H, unite(T, [S|R], Xs). unite([H|T], [S|R], [X|Xs]) :- S<H, X is S, unite([H|T], R, Xs). Code signals: L, Prolog, Error, Instantiated, Exception, _G...
,[F|B]). unite([], [], []). unite([X], [], [X]). unite([], [X], [X]). unite([H|T], [S|R], [X|Xs]) :- S=H, X is S, unite(T, R, Xs). unite([H|T], [S|R], [X|Xs]) :- H<S, X is H, unite(T, [S|R], Xs). unite([H|T], [S|R], [X|Xs]) :- S<H, X is S, unite([H|T], R, Xs). Code signals: L, Prolog, Error, Instantiated, Exception, _G...
[ 0.022705078125, 0.031494140625, 0.0164794921875, -0.02978515625, -0.0086669921875, -0.00958251953125, -0.029541015625, -0.0036468505859375, 0.02685546875, 0.0023193359375, 0.0067138671875, 0.00579833984375, 0.018310546875, 0.000873565673828125, -0.0205078125, -0.002593994140625, 0.02...
[ 6, 4, 919, 58745, 571, 268, 194, 51, 1486, 132, 1542, 841, 618, 294, 1052, 15772, 159, 1369, 1193, 83, 627, 572, 16093, 28864, 26073, 7, 12, 339, 1250, 4867, 212059, 166945, 14, 27686, 5443, 63928, 724, 129150, 2485, 304, 123885, 5016...
[ 0.03692626953125, 0.02294921875, 0.1204833984375, 0.1204833984375, 0.1158447265625, 0.0186309814453125, 0.056610107421875, 0.1688232421875, 0.208740234375, 0.07415771484375, 0.14111328125, 0.13720703125, 0.1265869140625, 0.06524658203125, 0.1182861328125, 0.07489013671875, 0.13879394...
embed
42911010_c0
42911010
prolog
0
Title: why in-built prolog predicates are written with a slash(/) Problem title: why in-built prolog predicates are written with a slash(/) Tags: prolog, predicate Problem: why in-built prolog predicates are written with a slash(/) for example: aggregate_all/3 , findall/3 , aggregate/4 and so on. What is the difference...
why in-built prolog predicates are written with a slash(/) why in-built prolog predicates are written with a slash(/) prolog predicate aggregate_all why in-built prolog predicates are written with a slash(/) for example: aggregate_all/3 , findall/3 , aggregate/4 and so on. What is the difference between aggregate/3 and...
[ 0.01385498046875, -0.00787353515625, -0.00457763671875, -0.01226806640625, -0.03564453125, 0.000244140625, 0.00811767578125, -0.00060272216796875, 0.01708984375, -0.0341796875, 0.00946044921875, 0.0003185272216796875, 0.0035400390625, -0.0263671875, 0.0244140625, -0.0027008056640625, ...
[ 15400, 23, 978, 24908, 502, 4867, 1653, 2063, 1636, 59121, 678, 91, 5544, 64, 67, 197564, 13, 5584, 132, 18113, 7413, 17357, 70, 60212, 17721, 136 ]
[ 0.11279296875, 0.08184814453125, 0.09002685546875, 0.1107177734375, 0.1607666015625, 0.2139892578125, 0.1661376953125, 0.203857421875, 0.0899658203125, 0.14501953125, 0.049530029296875, 0.04107666015625, 0.181396484375, 0.140380859375, 0.051971435546875, 0.1602783203125, 0.0709228515...
embed
23312716_c0
23312716
prolog
0
Title: Get a date as user input and parse it in prolog Problem title: Get a date as user input and parse it in prolog Tags: prolog, swi-prolog Problem: Get a date as user input and parse it in prolog I want to get the user birthday as a input and break in to parts. like year, month , date. how to do it. Please help me....
Get a date as user input and parse it in prolog Get a date as user input and parse it in prolog prolog swi-prolog Get Get a date as user input and parse it in prolog I want to get the user birthday as a input and break in to parts. like year, month , date. how to do it. Please help me. I have no idea how to do it. Than...
[ 0.0014801025390625, -0.006683349609375, 0.00958251953125, 0.02734375, -0.02734375, 0.02490234375, -0.00262451171875, 0.011962890625, -0.005462646484375, -0.046142578125, -0.007720947265625, 0.00762939453125, -0.0272216796875, 0.0029144287109375, -0.004058837890625, 0.0067138671875, 0...
[ 20779, 10, 5622, 237, 38937, 107730, 366, 184, 442, 23, 502, 4867, 91, 2452, 3454, 136, 3444, 47, 2046, 70, 101207, 36356, 63920, 1884, 6602, 31150, 3642, 54, 30607, 4358, 6528, 129745 ]
[ 0.127197265625, 0.05615234375, 0.212890625, 0.1099853515625, 0.2109375, 0.2236328125, 0.163818359375, 0.148681640625, 0.038848876953125, 0.080810546875, 0.14599609375, 0.220947265625, 0.007781982421875, 0.17431640625, 0.1380615234375, 0.014129638671875, 0.1109619140625, 0.095397949...
embed
32416332_c0
32416332
prolog
0
Title: Using variables in a database Problem title: Using variables in a database Tags: prolog, database Problem: Using variables in a database I use SWI-Prolog. It is impossible? :- dynamic question/1. question([do, you, know, what, a, F1, is, ?]). question([does, F1, have, a, F2, ?]). ..... ?- question([do, you, know...
Using variables in a database Using variables in a database prolog database Using Using variables in a database I use SWI-Prolog. It is impossible?
[ 0.0264892578125, -0.006500244140625, 0, -0.0022430419921875, 0.00408935546875, -0.002227783203125, -0.01251220703125, 0.018310546875, 0.005645751953125, -0.059814453125, 0.000885009765625, -0.0025634765625, -0.018310546875, -0.00173187255859375, -0.006317138671875, -0.005584716796875, ...
[ 345, 77336, 7, 23, 63399, 502, 4867, 4527, 159, 38969, 10752, 1650, 83, 69201 ]
[ 0.096435546875, 0.2607421875, 0.0215606689453125, 0.048309326171875, 0.20654296875, 0.136474609375, 0.2333984375, 0.06243896484375, 0.08880615234375, 0.229736328125, 0.13916015625, 0.018341064453125, 0.06097412109375, 0.2259521484375 ]
embed
66522803_c0
66522803
prolog
0
Title: Prolog: Multiplication(X,Y) Problem title: Prolog: Multiplication(X,Y) Tags: prolog Problem: Prolog: Multiplication(X,Y) double(X, Y) :- X is Y/2, Y is X*2. I'm trying to execute this but its given error always Arguments are not sufficiently instantiated In: [2] 4 is _1604/2 [1] double(4,_1662) at line 2 how can...
Prolog: Multiplication(X,Y) Prolog: Multiplication(X,Y) prolog Prolog Multiplication Prolog: Multiplication(X,Y) double(X, Y) :- X is Y/2, Y is X*2. I'm trying to execute this but its given error always Arguments are not sufficiently instantiated In: [2] 4 is _1604/2 [1] double(4,_1662) at line 2 how can I get double o...
[ 0.01104736328125, 0.00872802734375, 0.00921630859375, 0.0223388671875, 0.01019287109375, 0.0247802734375, -0.021240234375, -0.00009012222290039062, 0.006988525390625, -0.0137939453125, 0.008056640625, -0.00579833984375, -0.0150146484375, -0.0245361328125, 0.004302978515625, 0.005706787...
[ 1250, 4867, 19335, 182867, 1542, 4, 1723, 502, 16, 41929, 990, 1193, 83, 12477, 1639, 5442, 31577, 71924, 903, 6863, 34475, 18499, 11343, 112140, 7, 959, 129980, 34648, 14, 27686, 201, 37321, 617, 105801, 186890, 13315, 116, 3642, 831, 87...
[ 0.1614990234375, 0.2047119140625, 0.1258544921875, 0.1641845703125, 0.1846923828125, 0.0799560546875, 0.1783447265625, 0.11279296875, 0.019866943359375, 0.27978515625, 0.197021484375, 0.15869140625, 0.1248779296875, 0.2802734375, 0.1387939453125, 0.209228515625, 0.0648193359375, 0....
embed
22644373_c0
22644373
prolog
0
Title: How to do arithmetic and or operations in prolog? Problem title: How to do arithmetic and or operations in prolog? Tags: prolog Problem: How to do arithmetic and or operations in prolog? In C, given two numbers like this: 1010 0101 I can do something like this: 0000 == 1010&&0101; 1111 == 1010||0101; Then is it ...
How to do arithmetic and or operations in prolog? How to do arithmetic and or operations in prolog? prolog How How to do arithmetic and or operations in prolog? In C, given two numbers like this: I can do something like this: Then is it possible to use Prolog do the same thing..? Thank you!
[ 0.01318359375, -0.00040435791015625, -0.007354736328125, 0.017333984375, -0.01177978515625, 0.0128173828125, -0.00933837890625, 0.0037841796875, -0.005767822265625, -0.004364013671875, -0.00872802734375, 0.007080078125, -0.0177001953125, 0.00579833984375, 0.0009002685546875, -0.0159912...
[ 11249, 47, 54, 187, 8962, 282, 9523, 136, 707, 41018, 7, 23, 502, 4867, 32, 360, 313, 34475, 6626, 101935, 1884, 903, 87, 831, 9844, 7722, 4527, 1250, 5701 ]
[ 0.1077880859375, 0.10760498046875, 0.11859130859375, 0.0908203125, 0.17138671875, 0.1619873046875, 0.1593017578125, 0.156005859375, 0.10394287109375, 0.2159423828125, 0.0733642578125, 0.1181640625, 0.19091796875, 0.27734375, 0.0025730133056640625, 0.069580078125, 0.1397705078125, 0...
embed
12756072_c0
12756072
prolog
0
Title: prolog avg of list Problem title: prolog avg of list Tags: prolog Problem: prolog avg of list I have the code that able to calculate the avg of a list, but the only problem is it has error when it is empty list. I want to return false when the list is empty. any hint? avg( List, Avg ):- sum( List, Sum ), length(...
prolog avg of list prolog avg of list prolog List Avg Sum Length prolog avg of list I have the code that able to calculate the avg of a list, but the only problem is it has error when it is empty list. I want to return false when the list is empty. any hint?
[ 0.0019378662109375, 0.0084228515625, 0.0269775390625, 0.01141357421875, -0.022216796875, 0.00677490234375, 0.00457763671875, 0.0169677734375, 0.01190185546875, -0.006256103515625, 0.0098876953125, -0.015625, 0.00787353515625, 0.009033203125, 0.0034637451171875, 0.01708984375, 0.01818...
[ 502, 4867, 185, 177, 111, 5303, 32036, 4908, 36335, 77554, 18151, 19048, 74481, 67, 2967, 18499, 201505, 3444, 30646, 98320, 3229, 83, 5122 ]
[ 0.1466064453125, 0.203125, 0.194091796875, 0.1539306640625, 0.12200927734375, 0.22021484375, 0.1649169921875, 0.166748046875, 0.152587890625, 0.08599853515625, 0.1544189453125, 0.0116424560546875, 0.13330078125, 0.004177093505859375, 0.07794189453125, 0.1597900390625, 0.189697265625,...
embed
9448148_c0
9448148
prolog
0
Title: Is there a program that can draw a search tree of Prolog queries? Problem title: Is there a program that can draw a search tree of Prolog queries? Tags: prolog, search-tree, swi-prolog Problem: Is there a program that can draw a search tree of Prolog queries? I was wondering if there exists a tool that can draw ...
Is there a program that can draw a search tree of Prolog queries? Is there a program that can draw a search tree of Prolog queries? prolog search-tree swi-prolog Prolog Is there a program that can draw a search tree of Prolog queries? I was wondering if there exists a tool that can draw a step-by-step search tree of a ...
[ 0.03076171875, 0.0281982421875, -0.000606536865234375, -0.0048828125, -0.00787353515625, 0.02001953125, -0.007537841796875, -0.01708984375, -0.0172119140625, -0.0289306640625, 0.01556396484375, -0.01068115234375, -0.007720947265625, 0.00799560546875, 0.0184326171875, -0.000055789947509...
[ 1528, 450, 831, 79442, 33938, 53201, 111, 1250, 4867, 41, 10484, 10, 502, 62600, 2452, 3454, 2685, 149016, 32316, 55516, 29954, 1272, 95528 ]
[ 0.2008056640625, 0.0335693359375, 0.06597900390625, 0.186279296875, 0.2078857421875, 0.27001953125, 0.0609130859375, 0.1695556640625, 0.26025390625, 0.1380615234375, 0.1199951171875, 0.038665771484375, 0.110595703125, 0.2149658203125, 0.126953125, 0.106689453125, 0.02313232421875, ...
embed
45123328_c0
45123328
prolog
0
Title: How to make list constructors (e.g .(a,[]) == [a].) work in Prolog? Problem title: How to make list constructors (e.g .(a,[]) == [a].) work in Prolog? Tags: swi-prolog, prolog Problem: How to make list constructors (e.g .(a,[]) == [a].) work in Prolog? Code signals: How, e.g, Prolog, ERROR, Type, type_error, _40...
How to make list constructors (e.g .(a,[]) == [a].) work in Prolog? How to make list constructors (e.g .(a,[]) == [a].) work in Prolog? swi-prolog prolog How e.g Prolog ERROR Type type_error _4020 Applications SWI Prolog.app Contents init.pl:3369 _4086 dicts.pl:46 How to make list constructors (e.g .(a,[]) == [a].) wor...
[ 0.0224609375, 0.01708984375, -0.01177978515625, 0.0201416015625, -0.00897216796875, -0.0022735595703125, -0.0179443359375, 0.005950927734375, 0.0218505859375, -0.020751953125, 0.007568359375, -0.00885009765625, -0.005157470703125, 0.00970458984375, 0.0120849609375, -0.0089111328125, ...
[ 11249, 47, 3249, 5303, 64549, 25251, 11, 1065, 69112, 378, 4488, 23, 1250, 4867, 91, 2452, 3454, 502, 151206, 24638, 60457, 10644, 188800, 2839, 1549, 104921, 159, 38969, 9007, 70870, 2424, 14212, 15276, 61669, 32909, 52080, 5, 132, 4, 30...
[ 0.0706787109375, 0.0126953125, 0.098876953125, 0.238525390625, 0.22900390625, 0.1739501953125, 0.1634521484375, 0.09442138671875, 0.231689453125, 0.03680419921875, 0.145263671875, 0.06396484375, 0.192138671875, 0.259033203125, 0.0074462890625, 0.1591796875, 0.132568359375, 0.104370...
embed
35527863_c0
35527863
prolog
0
Title: Prolog: efficiency Problem title: Prolog: efficiency Tags: prolog, processing-efficiency Problem: Prolog: efficiency Is there a way in prolog to make the following shorter: rule(prop, [1/2,2/2]). rule(prop, [1/3,2/3,3/3]). rule(prop, [1/4,2/4,3/4,4/4]). rule(prop, [1/5,2/5,3/5,4/5,5/5]). rule(prop, [1/6,2/6,3/6,...
Prolog: efficiency Prolog: efficiency prolog processing-efficiency Prolog Prolog: efficiency Is there a way in prolog to make the following shorter:
[ 0.0234375, 0.00799560546875, 0.01531982421875, -0.01068115234375, -0.005279541015625, 0.0208740234375, -0.003448486328125, -0.006805419921875, 0.000789642333984375, -0.01318359375, -0.006134033203125, -0.00830078125, -0.00194549560546875, -0.022216796875, 0.01361083984375, 0.0412597656...
[ 1250, 4867, 12, 227066, 502, 9433, 4240, 11044, 33, 10, 3917, 23, 47, 3249, 25632, 16610, 56 ]
[ 0.16015625, 0.2479248046875, 0.01197052001953125, 0.195068359375, 0.1505126953125, 0.0780029296875, 0.047821044921875, 0.10260009765625, 0.005588531494140625, 0.01485443115234375, 0.09814453125, 0.05572509765625, 0.0060272216796875, 0.1014404296875, 0.1258544921875, 0.208984375, 0.19...
embed
5484035_c0
5484035
prolog
0
Title: Is there any Prolog parser for TSPLIB and / or SAT format? Problem title: Is there any Prolog parser for TSPLIB and / or SAT format? Tags: prolog Problem: Is there any Prolog parser for TSPLIB and / or SAT format? Are there any parsers written in Prolog for either the TSPLIB or the suggested satisfiability forma...
Is there any Prolog parser for TSPLIB and / or SAT format? Is there any Prolog parser for TSPLIB and / or SAT format? prolog Prolog TSPLIB SAT Is there any Prolog parser for TSPLIB and / or SAT format? Are there any parsers written in Prolog for either the TSPLIB or the suggested satisfiability format ? (The second lin...
[ 0.0194091796875, 0.01531982421875, 0.00159454345703125, 0.0096435546875, -0.015869140625, 0.01226806640625, 0.008544921875, -0.0032501220703125, -0.0031585693359375, -0.031005859375, 0.0087890625, 0.00130462646484375, -0.028076171875, 0.0027313232421875, 0.0230712890625, 0.00390625, ...
[ 2499, 1250, 4867, 366, 2189, 100, 53800, 21130, 29877, 75210, 9384, 502, 2685, 7, 1314, 59121, 42459, 40407, 14, 41159, 3126, 147845, 11435 ]
[ 0.0611572265625, 0.1474609375, 0.2413330078125, 0.19140625, 0.204833984375, 0.067626953125, 0.1163330078125, 0.1549072265625, 0.235595703125, 0.19580078125, 0.1575927734375, 0.0985107421875, 0.019866943359375, 0.1121826171875, 0.1260986328125, 0.02252197265625, 0.0791015625, 0.1712...
embed
6684726_c0
6684726
prolog
0
Title: In Prolog why does this query return this particular result Problem title: In Prolog why does this query return this particular result Tags: prolog, prolog-toplevel, prolog-assert Problem: In Prolog why does this query return this particular result ?- assert(p(a)),assert(p(b)),p(X). X = a yes Whats the effect of...
In Prolog why does this query return this particular result In Prolog why does this query return this particular result prolog prolog-toplevel prolog-assert Prolog In Prolog why does this query return this particular result Whats the effect of this query and why does it return this particular result?
[ 0.033447265625, 0.0184326171875, 0.00531005859375, 0.0244140625, -0.014892578125, 0.021484375, -0.006805419921875, -0.00518798828125, -0.00653076171875, -0.0035552978515625, 0.01123046875, 0.01513671875, -0.0233154296875, 0.00750732421875, 0.0201416015625, 0.0118408203125, 0.01196289...
[ 1250, 4867, 15400, 14602, 903, 41, 1294, 30646, 17311, 16750, 360, 502, 13784, 67919, 162, 33657, 21543 ]
[ 0.1695556640625, 0.2418212890625, 0.188720703125, 0.09478759765625, 0.10906982421875, 0.17724609375, 0.17578125, 0.22119140625, 0.1552734375, 0.1807861328125, 0.039306640625, 0.142333984375, 0.12890625, 0.2020263671875, 0.083984375, 0.2044677734375, 0.1881103515625 ]
embed
6669690_c0
6669690
prolog
0
Title: Prolog Query returning H128 Problem title: Prolog Query returning H128 Tags: prolog-dif, prolog Problem: Prolog Query returning H128 In the query below, firstly I'm getting X = H128 , where does that come from? Also why is it returning yes? Is it because the variable X is actually not defined and we are testing ...
Prolog Query returning H128 Prolog Query returning H128 prolog-dif prolog Prolog Query H128 Prolog Query returning H128 In the query below, firstly I'm getting X = H128 , where does that come from? Also why is it returning yes? Is it because the variable X is actually not defined and we are testing for that condition?
[ 0.01470947265625, 0.0205078125, 0.00038909912109375, 0.01226806640625, -0.00189208984375, 0.00482177734375, 0.0002536773681640625, -0.020263671875, 0.01153564453125, 0.0004367828369140625, 0.0084228515625, -0.02001953125, -0.00970458984375, 0.0076904296875, 0.000629425048828125, 0.0145...
[ 1250, 4867, 58836, 53, 30646, 572, 81764, 502, 428, 420, 214, 41, 1294, 35064, 5117, 538, 20949, 1193, 2203, 7440, 1380, 1295, 15400, 83, 72272, 77336, 959, 61924, 134234, 35431 ]
[ 0.14404296875, 0.1993408203125, 0.1839599609375, 0.0721435546875, 0.18505859375, 0.15283203125, 0.295166015625, 0.0987548828125, 0.0660400390625, 0.09283447265625, 0.058441162109375, 0.1524658203125, 0.11865234375, 0.0919189453125, 0.02215576171875, 0.00439453125, 0.0775146484375, ...
embed
22895832_c0
22895832
prolog
0
Title: Prolog member function Problem title: Prolog member function Tags: prolog Problem: Prolog member function I am trying to return true if the object is in Obj false otherwise. But the built in member function does not give me true or false. It gives me Obj as shown. How do i make it return true or false ? member(c...
Prolog member function Prolog member function prolog Prolog Obj _G3422 Prolog member function I am trying to return true if the object is in Obj false otherwise. But the built in member function does not give me true or false. It gives me Obj as shown. How do i make it return true or false ?
[ 0.00518798828125, -0.004791259765625, 0.01556396484375, 0.01025390625, -0.017333984375, 0.0034637451171875, 0.00262451171875, 0.01519775390625, -0.005035400390625, -0.052490234375, 0.03369140625, -0.0033111572265625, 0.013671875, -0.0159912109375, 0.0037841796875, -0.0274658203125, -...
[ 1250, 4867, 32786, 32354, 502, 3545, 170, 116397, 304, 31577, 30646, 29568, 2174, 36746, 23, 98320, 120262, 88303, 959, 8337, 707, 76199, 163, 237, 127887, 3249 ]
[ 0.1231689453125, 0.2242431640625, 0.284912109375, 0.15625, 0.0845947265625, 0.1790771484375, 0.2269287109375, 0.1402587890625, 0.0958251953125, 0.06195068359375, 0.154541015625, 0.1788330078125, 0.051025390625, 0.2177734375, 0.1080322265625, 0.2254638671875, 0.049041748046875, 0.10...
embed
10788597_c0
10788597
prolog
0
Title: Prolog, converting term into a list Problem title: Prolog, converting term into a list Tags: prolog, list Problem: Prolog, converting term into a list Hello I have a predicate that returns example equalisation for given list equalisation([1,2,3,4,12],L). L = (1=2-3* (4/12)) now I want to change this result into ...
Prolog, converting term into a list Prolog, converting term into a list prolog list Prolog Prolog, converting term into a list Hello I have a predicate that returns example equalisation for given list now I want to change this result into a list like this: How can I do that?
[ 0.033447265625, 0.00732421875, 0.0045166015625, -0.0012054443359375, -0.0208740234375, 0.0130615234375, -0.0169677734375, 0.00604248046875, -0.00482177734375, -0.029052734375, 0.0167236328125, 0.01092529296875, 0.0062255859375, -0.006011962890625, -0.0098876953125, 0.0177001953125, -...
[ 1250, 4867, 96760, 13579, 3934, 5303, 214, 10, 502, 35378, 1653, 2063, 67, 30646, 27781, 105950, 15032, 3444, 47, 15549, 16750, 831, 54 ]
[ 0.1761474609375, 0.260986328125, 0.1265869140625, 0.2342529296875, 0.0926513671875, 0.218017578125, 0.03717041015625, 0.04364013671875, 0.1224365234375, 0.047698974609375, 0.12054443359375, 0.1356201171875, 0.0679931640625, 0.053741455078125, 0.1658935546875, 0.134765625, 0.079772949...
embed
33925916_c0
33925916
prolog
0
Title: Prolog add N to 0 to the list Problem title: Prolog add N to 0 to the list Tags: addition, list, prolog Problem: Prolog add N to 0 to the list I want to add to Result list N to 0 digits. The sample query ?- add(5,R). should return the answer: R = [5,4,3,2,1,0]. I already tried the following code but it did not w...
Prolog add N to 0 to the list Prolog add N to 0 to the list addition list prolog Prolog N-1 Prolog add N to 0 to the list I want to add to Result list N to 0 digits. The sample query should return the answer: I already tried the following code but it did not work.
[ 0.003387451171875, 0.0048828125, -0.00128173828125, 0.0069580078125, -0.017333984375, 0.01287841796875, 0.00531005859375, 0.00183868408203125, 0.0133056640625, -0.037353515625, 0.021728515625, -0.0130615234375, -0.0242919921875, 0.01422119140625, 0.01422119140625, -0.0238037109375, 0...
[ 1250, 4867, 15190, 541, 47, 757, 70, 5303, 66044, 502, 5759, 3444, 126684, 153939, 121413, 41, 1294, 30646, 35166, 21771, 37842, 25632, 18151, 959, 4488, 5 ]
[ 0.173828125, 0.2449951171875, 0.159423828125, 0.21044921875, 0.1751708984375, 0.2193603515625, 0.0104522705078125, 0.2196044921875, 0.151123046875, 0.1280517578125, 0.0972900390625, 0.06689453125, 0.224609375, 0.1988525390625, 0.1766357421875, 0.06878662109375, 0.0214691162109375, ...
embed
47625564_c0
47625564
prolog
0
Title: treeMerge in swi-prolog Problem title: treeMerge in swi-prolog Tags: prolog Problem: treeMerge in swi-prolog I am trying to build a predicate treeMerge(A,B,C) that returns true if C is the result of merging the two trees A and B. Any suggestions on how I can implement this? I have a rough idea, I am thinking of ...
treeMerge in swi-prolog treeMerge in swi-prolog prolog treeMerge in swi-prolog I am trying to build a predicate treeMerge(A,B,C) that returns true if C is the result of merging the two trees A and B. Any suggestions on how I can implement this? I have a rough idea, I am thinking of merging the root, then first child th...
[ 0.03564453125, 0.0247802734375, -0.003265380859375, 0.008544921875, -0.0054931640625, 0.0234375, -0.041259765625, -0.0030975341796875, 0.0028839111328125, -0.0478515625, -0.0022430419921875, 0.021728515625, -0.0035552978515625, 0.0032501220703125, 0.025634765625, -0.004119873046875, ...
[ 53201, 30248, 429, 23, 91, 2452, 3454, 4867, 502, 31577, 45367, 1653, 2063, 67, 284, 4, 571, 441, 30646, 29568, 2174, 313, 16750, 1143, 9966, 6626, 1360, 90, 62, 136, 335, 157666, 831, 29479, 166904, 6528, 47644, 74855, 5117, 29041, 179...
[ 0.232666015625, 0.2244873046875, 0.1539306640625, 0.05694580078125, 0.060577392578125, 0.2310791015625, 0.1588134765625, 0.2000732421875, 0.1544189453125, 0.0623779296875, 0.1138916015625, 0.1239013671875, 0.1563720703125, 0.03546142578125, 0.036376953125, 0.008026123046875, 0.074707...
embed
55110407_c1
55110407
prolog
1
?- neq(A, 1), A = 1. 0 Call neq(A, 1) ? 0 Exit neq(A, 1) ? 0 Call A = 1 ? 0 Fail A = 1 ? No Is there an elegant way to disable a module/package, but nevertheless see top-level calls/exits from the module/packge? Code signals: Trace, Hide, Module, Package, Welcome, SWI-Prolog, Call, clpfd:clpfd_in, _2662, clpfd:fd_vari...
?- neq(A, 1), A = 1. 0 Call neq(A, 1) ? 0 Exit neq(A, 1) ? 0 Call A = 1 ? 0 Fail A = 1 ? No Is there an elegant way to disable a module/package, but nevertheless see top-level calls/exits from the module/packge? Code signals: Trace, Hide, Module, Package, Welcome, SWI-Prolog, Call, clpfd:clpfd_in, _2662, clpfd:fd_vari...
[ 0.007598876953125, 0.0037384033203125, 0.019287109375, 0.033447265625, 0.0017547607421875, 0.00482177734375, 0.0286865234375, -0.004638671875, 0.00799560546875, -0.018798828125, -0.01513671875, 0.022705078125, -0.006744384765625, 0.019775390625, 0.0269775390625, -0.0111083984375, 0.0...
[ 705, 9, 108, 864, 284, 4879, 62, 2203, 615, 757, 26265, 5443, 217, 106, 190355, 27650, 3917, 47, 2837, 2886, 88996, 64, 29102, 4588, 1284, 8306, 2347, 9393, 1957, 2663, 67919, 11782, 3355, 14481, 1295, 429, 28864, 26073, 4937, 329, 2673...
[ 0.045623779296875, 0.013946533203125, 0.1541748046875, 0.1929931640625, 0.1287841796875, 0.113525390625, 0.11767578125, 0.08380126953125, 0.06280517578125, 0.1400146484375, 0.193603515625, 0.1522216796875, 0.1400146484375, 0.031494140625, 0.174560546875, 0.1866455078125, 0.0668334960...
embed
47384945_c0
47384945
prolog
0
Title: Comparing a variable with a string in Prolog Problem title: Comparing a variable with a string in Prolog Tags: prolog Problem: Comparing a variable with a string in Prolog male(X) :- (X=='john') ; (X=='dexter'). But now whenever I type the query male(X) and whenever X is unified with 'john' or 'dexter' it displa...
Comparing a variable with a string in Prolog Comparing a variable with a string in Prolog prolog Comparing Prolog Comparing a variable with a string in Prolog But now whenever I type the query male(X) and whenever X is unified with 'john' or 'dexter' it displays false whereas it should give true. Could Someone help?
[ 0.00897216796875, -0.00130462646484375, -0.00531005859375, 0.01275634765625, 0.0030517578125, 0.01300048828125, -0.00025177001953125, 0.0087890625, -0.00799560546875, -0.013916015625, 0.015380859375, -0.006988525390625, 0.00732421875, 0.00079345703125, 0.000278472900390625, 0.010131835...
[ 113307, 77336, 678, 79315, 1250, 4867, 502, 214, 23, 4966, 5036, 217684, 10644, 41, 1294, 11280, 1542, 1193, 51, 47314, 66159, 19, 39659, 720, 44116, 98320, 5608, 8337, 29568, 191147, 4358 ]
[ 0.153076171875, 0.233642578125, 0.1180419921875, 0.198974609375, 0.14794921875, 0.25927734375, 0.092041015625, 0.0015115737915039062, 0.00716400146484375, 0.00466156005859375, 0.0205230712890625, 0.00934600830078125, 0.14111328125, 0.09027099609375, 0.0728759765625, 0.15869140625, 0....
embed
5694902_c0
5694902
prolog
0
Title: Gist.github prolog syntax highlight Problem title: Gist.github prolog syntax highlight Tags: git, syntax-highlighting, prolog Problem: Gist.github prolog syntax highlight On gist.github there are no prolog syntax highlight theme. So what language should I choose for something really close to prolog syntax? And, ...
Gist.github prolog syntax highlight Gist.github prolog syntax highlight git syntax-highlighting prolog Gist.github Gist.github prolog syntax highlight On gist.github there are no prolog syntax highlight theme. So what language should I choose for something really close to prolog syntax? And, by the way, what's wrong wi...
[ 0.015625, 0.007293701171875, 0.000652313232421875, -0.02001953125, -0.01019287109375, 0.009765625, -0.008056640625, 0.01397705078125, -0.006500244140625, -0.00762939453125, 0.00689697265625, -0.00518798828125, -0.031982421875, -0.0225830078125, 0.0308837890625, -0.016357421875, -0.00...
[ 527, 1419, 15769, 32102, 502, 4867, 6002, 86531, 127308, 62270, 84396, 177476, 3016, 271, 110, 73986, 46876, 5608, 55076, 6183, 20903, 47, 44691, 221, 223, 2886 ]
[ 0.0740966796875, 0.1378173828125, 0.08642578125, 0.1754150390625, 0.136962890625, 0.2305908203125, 0.137451171875, 0.162109375, 0.2462158203125, 0.180419921875, 0.0738525390625, 0.10089111328125, 0.10235595703125, 0.1221923828125, 0.03668212890625, 0.1650390625, 0.18896484375, 0.01...
embed
65668490_c0
65668490
prolog
0
Title: How do I define this predicate so that it doesn&#x27;t run forever Problem title: How do I define this predicate so that it doesn&#x27;t run forever Tags: prolog Problem: How do I define this predicate so that it doesn't run forever I need to define a predicate such that: ?- X = succ(X), nu(X). false. How do I d...
How do I define this predicate so that it doesn&#x27;t run forever How do I define this predicate so that it doesn&#x27;t run forever prolog How How do I define this predicate so that it doesn't run forever I need to define a predicate such that: How do I do it? It just seems like it won't return anything and just run ...
[ -0.00665283203125, 0.0206298828125, -0.0069580078125, -0.0025634765625, -0.01348876953125, 0.01416015625, 0.00653076171875, -0.0093994140625, 0.003021240234375, -0.04638671875, 0.01483154296875, 0.0186767578125, -0.00872802734375, 0.000843048095703125, 0.0137939453125, 0.018798828125, ...
[ 11249, 87, 61924, 903, 1653, 2063, 67, 221, 450, 442, 22027, 3768, 18, 11675, 136993, 54, 502, 4867, 3871, 6044, 37202, 1884, 23742, 30646, 23937, 1660 ]
[ 0.08831787109375, 0.047088623046875, 0.2178955078125, 0.090576171875, 0.2064208984375, 0.2401123046875, 0.1513671875, 0.0760498046875, 0.05047607421875, 0.137939453125, 0.14599609375, 0.10540771484375, 0.1572265625, 0.201416015625, 0.217041015625, 0.07177734375, 0.168212890625, 0.2...
embed
72116577_c1
72116577
prolog
1
). max_min_eval(List,Result) :- seperate_lists(List,Lets,Nums), max_min_eval_aux(Lets,Nums,Result). The problem is that it doesn't work for ?- max_min_eval([1,max,10,min,2],Result) , only works for 3 element list like this ?- max_min_eval([1,max,4],Result) or ?- max_min_eval([2,min,5],Result) Code signals: max_min_eva...
). max_min_eval(List,Result) :- seperate_lists(List,Lets,Nums), max_min_eval_aux(Lets,Nums,Result). The problem is that it doesn't work for ?- max_min_eval([1,max,10,min,2],Result) , only works for 3 element list like this ?- max_min_eval([1,max,4],Result) or ?- max_min_eval([2,min,5],Result) Code signals: max_min_eva...
[ -0.0084228515625, -0.003753662109375, 0.024658203125, 0.0223388671875, -0.01263427734375, 0.012451171875, 0.017578125, -0.006561279296875, 0.0167236328125, -0.00160980224609375, -0.016845703125, 0.00164794921875, 0.037109375, -0.007781982421875, 0.008544921875, -0.020751953125, -0.00...
[ 194, 18389, 1249, 13, 1405, 154663, 4332, 7, 7136, 15772, 40, 143870, 6562, 124480, 839, 10321, 10442, 2967, 442, 22027, 18, 4488, 100, 454, 24084, 963, 90173, 4734, 43240, 138, 12830, 5303, 1884, 903, 617, 758, 28864, 26073, 32036, 10842...
[ 0.04425048828125, 0.183349609375, 0.2568359375, 0.11279296875, 0.267822265625, 0.2042236328125, 0.1121826171875, 0.13623046875, 0.2135009765625, 0.009307861328125, 0.0997314453125, 0.1888427734375, 0.2373046875, 0.1947021484375, 0.01995849609375, 0.153564453125, 0.18505859375, 0.13...
embed
4800282_c0
4800282
prolog
0
Title: A simple prolog syntax question Problem title: A simple prolog syntax question Tags: prolog Problem: A simple prolog syntax question In user mode in SWI-Prolog I define a function as follows: |: test1(+X,+Y) :- X >= 0, X =:= Y. And now in query mode: ?- test1(1, 1). false. I was expecting this to return "true" s...
A simple prolog syntax question A simple prolog syntax question prolog test1 A simple prolog syntax question In user mode in SWI-Prolog I define a function as follows: And now in query mode: I was expecting this to return "true" since 1 is greater than 0 and 1 is equal to 1. So where did I go wrong?
[ 0.00836181640625, 0.003875732421875, -0.00634765625, -0.007293701171875, -0.0106201171875, -0.00042724609375, 0.0123291015625, 0.00009632110595703125, 0.00799560546875, 0.01031494140625, 0.02197265625, -0.001495361328125, -0.019775390625, -0.006011962890625, 0.0274658203125, 0.00303649...
[ 8781, 502, 4867, 6002, 86531, 9655, 3034, 418, 38937, 13736, 159, 38969, 10752, 61924, 32354, 28960, 23, 41, 1294, 509, 41206, 214, 30646, 9774, 13, 106, 83, 117396, 3501, 757, 105950, 47, 615, 6777, 738, 44691 ]
[ 0.158203125, 0.130126953125, 0.215576171875, 0.10382080078125, 0.1309814453125, 0.08551025390625, 0.1376953125, 0.019256591796875, 0.1571044921875, 0.14501953125, 0.050445556640625, 0.1962890625, 0.138427734375, 0.2152099609375, 0.221435546875, 0.0308990478515625, 0.01416015625, 0....
embed
40089507_c0
40089507
prolog
0
Title: file input SWI-Prolog Problem title: file input SWI-Prolog Tags: prolog, file Problem: file input SWI-Prolog Can someone show me the code to read multiply strings from file line by line and print it in console? I can write something to file, but have problems, reading it. I've tried see\1 , seen\0 ; read(Stream,...
file input SWI-Prolog file input SWI-Prolog prolog file SWI-Prolog Stream file input SWI-Prolog Can someone show me the code to read multiply strings from file line by line and print it in console? I can write something to file, but have problems, reading it. I've tried see\1 , seen\0 ; read(Stream, X) Some predicates ...
[ -0.0078125, -0.00110626220703125, 0.00604248046875, 0.0159912109375, -0.01507568359375, -0.0002651214599609375, 0.033447265625, 0.00860595703125, -0.00101470947265625, -0.0296630859375, -0.000629425048828125, -0.0026702880859375, -0.01556396484375, 0.0017242431640625, 0.00144195556640625...
[ 11435, 107730, 159, 38969, 10752, 4867, 502, 115061, 7639, 163, 18151, 12301, 6024, 62479, 79315, 1295, 13315, 390, 28412, 23, 130250, 831, 33022, 47, 44402, 16454, 37842, 1957, 41872, 418, 51592, 2389, 1193, 1653, 2063, 26484, 15490, 36272 ]
[ 0.189697265625, 0.188232421875, 0.07275390625, 0.24755859375, 0.1463623046875, 0.1881103515625, 0.126708984375, 0.16943359375, 0.06201171875, 0.00115966796875, 0.164794921875, 0.20703125, 0.16357421875, 0.235107421875, 0.2093505859375, 0.06121826171875, 0.12255859375, 0.09637451171...
embed
66824982_c0
66824982
prolog
0
Title: The form of Result in Prolog Problem title: The form of Result in Prolog Tags: prolog Problem: The form of Result in Prolog ?− count_frequencies ([1 ,1 ,4 ,6 ,8 ,8 ,6 ,2 ,1] , L). L = [f(1,3),f(4,1),f(6,2),f(8,2),f(2,1)] my question is about the form of f(1,3) I don't really understand the point. how should i do...
The form of Result in Prolog The form of Result in Prolog prolog Result Prolog count_frequencies The form of Result in Prolog my question is about the form of f(1,3) I don't really understand the point. how should i do then output form in Prolog is f(). Thanks!
[ 0.03955078125, -0.0113525390625, -0.00113677978515625, -0.0079345703125, -0.0050048828125, -0.00127410888671875, 0.0034332275390625, -0.00927734375, 0.01129150390625, -0.0244140625, 0.01202392578125, -0.03369140625, -0.00115966796875, 0.0286865234375, 0.000286102294921875, -0.011962890...
[ 581, 3173, 111, 126684, 23, 1250, 4867, 502, 54529, 12176, 944, 117538, 9655, 1238, 41600, 4, 21320, 28219, 6275, 3642, 54, 140992, 83, 132 ]
[ 0.022003173828125, 0.2259521484375, 0.06890869140625, 0.26806640625, 0.0888671875, 0.1746826171875, 0.25390625, 0.1190185546875, 0.187744140625, 0.1319580078125, 0.12237548828125, 0.038787841796875, 0.034637451171875, 0.14990234375, 0.00875091552734375, 0.045654296875, 0.153198242187...
embed
22933559_c0
22933559
prolog
0
Title: alldifferent/1 predicate in Prolog Problem title: alldifferent/1 predicate in Prolog Tags: dcg, prolog Problem: alldifferent/1 predicate in Prolog allsame([]). allsame([X]). allsame([X,X|Z]) :- allsame([X|Z]). How do I change to get the result below? alldifferent(L): The elements in L are all different. ?- alldi...
alldifferent/1 predicate in Prolog alldifferent/1 predicate in Prolog dcg prolog Prolog alldifferent/1 predicate in Prolog How do I change to get the result below?
[ 0.006103515625, -0.00162506103515625, 0.0003795623779296875, 0.00872802734375, -0.0303955078125, 0.0162353515625, -0.013671875, 0.00982666015625, 0.008056640625, -0.010009765625, -0.009033203125, 0.019287109375, -0.0013275146484375, 0.01141357421875, -0.0098876953125, 0.0247802734375, ...
[ 756, 238778, 11583, 1653, 2063, 23, 1250, 4867, 67, 104, 238, 177, 502, 15549, 2046, 16750, 35064 ]
[ 0.1627197265625, 0.293701171875, 0.177734375, 0.1568603515625, 0.20654296875, 0.045196533203125, 0.16357421875, 0.251220703125, 0.06549072265625, 0.000946044921875, 0.01092529296875, 0.06494140625, 0.0908203125, 0.168701171875, 0.04376220703125, 0.1351318359375, 0.135009765625 ]
embed
5663157_c0
5663157
prolog
0
Title: How to write well predicate(not between) Problem title: How to write well predicate(not between) Tags: prolog, clpfd Problem: How to write well predicate(not between) I write code follwing testb :- X::1..10, V1 = 3, V2 = 6, testbb(X,V1,V2), writeln(X). ?- testb. Yes (0.00s cpu) _385{[1, 2, 7 .. 10]} It works wel...
How to write well predicate(not between) How to write well predicate(not between) prolog clpfd How X::1..10 Yes _385 How to write well predicate(not between) I write code follwing It works well, but i think it isn't efficient Thanks very much :)
[ -0.0196533203125, -0.01214599609375, 0.008056640625, 0.00616455078125, -0.00958251953125, 0.0283203125, 0.00384521484375, -0.006195068359375, 0.0047607421875, 0.00994873046875, 0.00506591796875, 0.01080322265625, 0.0196533203125, 0.0203857421875, 0.0223388671875, -0.005126953125, 0.0...
[ 11249, 47, 33022, 5299, 1653, 2063, 67, 10869, 17721, 132, 502, 4867, 33139, 39557, 71, 1193, 19721, 5, 963, 32635, 104342, 18151, 18344, 14775, 43240, 5351, 56112, 18, 93766 ]
[ 0.056488037109375, 0.03997802734375, 0.189208984375, 0.1693115234375, 0.177734375, 0.22314453125, 0.155029296875, 0.14990234375, 0.2418212890625, 0.0021381378173828125, 0.1346435546875, 0.1881103515625, 0.0452880859375, 0.051910400390625, 0.0904541015625, 0.137939453125, 0.0460510253...
embed
65439288_c0
65439288
prolog
0
Title: `less/2` relation in Peano arithmetic Problem title: `less/2` relation in Peano arithmetic Tags: prolog, successor-arithmetics, logical-purity Problem: `less/2` relation in Peano arithmetic This less-than predicate in Peano arithmetic less(0, s(_)). less(s(X), s(Y)) :- less(X, Y). loops when ?- less(X, Y), X=s(0...
`less/2` relation in Peano arithmetic `less/2` relation in Peano arithmetic prolog successor-arithmetics logical-purity Peano `less/2` relation in Peano arithmetic This less-than predicate in Peano arithmetic loops when Is there a better way to write less/2 (using Horn clauses only)?
[ -0.00084686279296875, 0.0198974609375, -0.007354736328125, 0.00506591796875, 0.01397705078125, 0.00897216796875, -0.01129150390625, 0.004425048828125, 0.0037078857421875, -0.0034332275390625, 0.0238037109375, 0.019287109375, -0.013671875, -0.006805419921875, 0.0277099609375, 0.01232910...
[ 9393, 12477, 41911, 1460, 3922, 8962, 502, 4867, 39457, 42, 62775, 4717, 40715, 21732, 1653, 2063, 282, 40956, 11522, 3917, 33022, 78315, 70731, 4734 ]
[ 0.21630859375, 0.28271484375, 0.1724853515625, 0.1375732421875, 0.201904296875, 0.07763671875, 0.07965087890625, 0.141845703125, 0.1422119140625, 0.01385498046875, 0.06402587890625, 0.106201171875, 0.2408447265625, 0.1231689453125, 0.10040283203125, 0.1612548828125, 0.01318359375, ...
embed
31103388_c0
31103388
prolog
0
Title: Is it possible to run prolog from C#? Problem title: Is it possible to run prolog from C#? Tags: prolog, c%23 Problem: Is it possible to run prolog from C#? I want to call a prolog program from C#. Is that possible? I process the user input by c# and write into a file. I then want to call a prolog program which ...
Is it possible to run prolog from C#? Is it possible to run prolog from C#? prolog c%23 C# Is it possible to run prolog from C#? I want to call a prolog program from C#. Is that possible? I process the user input by c# and write into a file. I then want to call a prolog program which uses that file, then I want to show...
[ 0.02880859375, 0.00555419921875, 0.00677490234375, 0.00640869140625, -0.0081787109375, 0.01904296875, 0.003875732421875, -0.005462646484375, -0.0030364990234375, -0.0458984375, -0.0072021484375, 0.0242919921875, -0.029052734375, -0.0081787109375, 0.031982421875, -0.004852294921875, 0...
[ 2071, 442, 7722, 47, 11675, 502, 4867, 1295, 313, 4904, 32, 501, 3742, 3444, 11782, 1528, 450, 9433, 38937, 107730, 390, 33022, 3934, 11435, 4527, 7639, 10941 ]
[ 0.06561279296875, 0.0540771484375, 0.1854248046875, 0.041412353515625, 0.158203125, 0.2113037109375, 0.26904296875, 0.164794921875, 0.112060546875, 0.2283935546875, 0.002777099609375, 0.044464111328125, 0.09136962890625, 0.057373046875, 0.1397705078125, 0.155517578125, 0.014480590820...
embed
20983345_c0
20983345
prolog
0
Title: Store a result to a variable in prolog? Problem title: Store a result to a variable in prolog? Tags: prolog Problem: Store a result to a variable in prolog? parent(max,alex). ?- parent(max,alex). "true." ?- parent(max,jack). "false." ?- X = parent(max,jack), write(X). // Why X != false? "X = parent(max, jack)." ...
Store a result to a variable in prolog? Store a result to a variable in prolog? prolog Store Why Store a result to a variable in prolog? How to store to X answer from query "parent(max,jack)"(true or false)?
[ 0.0186767578125, 0.01806640625, 0.006683349609375, 0.017822265625, -0.00147247314453125, 0.030517578125, 0.017822265625, 0.01068115234375, 0.0087890625, -0.00927734375, 0.01129150390625, 0.001007080078125, -0.00872802734375, 0.01544189453125, 0.01458740234375, -0.018798828125, 0.0061...
[ 14934, 16750, 47, 77336, 502, 4867, 23, 44084, 10, 11249, 4343, 1193, 35166, 41, 1294, 99547, 24084, 135758, 9774, 98320 ]
[ 0.2305908203125, 0.1954345703125, 0.1480712890625, 0.2340087890625, 0.1275634765625, 0.2301025390625, 0.058013916015625, 0.045562744140625, 0.0256805419921875, 0.02392578125, 0.1953125, 0.0439453125, 0.1251220703125, 0.048095703125, 0.0014133453369140625, 0.12335205078125, 0.14916992...
embed
39688402_c0
39688402
prolog
0
Title: Ceiling / round / floor in prolog Problem title: Ceiling / round / floor in prolog Tags: prolog Problem: Ceiling / round / floor in prolog When I try to execute the following query with prolog swi version 7.2.3, ceiling(1.5) it says, ERROR: toplevel: Undefined procedure: ceiling/1 (DWIM could not correct goal.) ...
Ceiling / round / floor in prolog Ceiling / round / floor in prolog prolog Ceiling ERROR Undefined DWIM Ceiling / round / floor in prolog When I try to execute the following query with prolog swi version 7.2.3, ceiling(1.5) it says, How do I get the "ceiling" working for this case?
[ -0.0021820068359375, 0.0013275146484375, 0.011962890625, -0.00885009765625, -0.0037384033203125, -0.001983642578125, -0.01409912109375, 0.01409912109375, -0.00072479248046875, 0.002105712890625, -0.0177001953125, 0.00439453125, -0.0252685546875, 0.006927490234375, 0.0167236328125, -0.0...
[ 1845, 49725, 248, 68807, 74912, 23, 502, 4867, 151206, 24638, 79912, 5983, 30439, 17199, 9790, 71924, 41, 1294, 2452, 11389, 2861, 120883, 405, 42876, 11249, 2046, 329, 20697 ]
[ 0.1732177734375, 0.2479248046875, 0.048309326171875, 0.1790771484375, 0.2406005859375, 0.005435943603515625, 0.147705078125, 0.2493896484375, 0.1185302734375, 0.0455322265625, 0.0537109375, 0.1610107421875, 0.12939453125, 0.2120361328125, 0.0148773193359375, 0.0531005859375, 0.085754...
embed
6034593_c1
6034593
prolog
1
,_131634) ? (2) fail:myddas:db_open(mysql,x,localhost/myschema/0/_131406,web,mypassword) ? (1) fail:db_open(mysql,x,localhost/myschema,web,mypassword) ? Code signals: Why, Yap, MYDDAS, MySQL, API, db_open, use_module, call:db_open, call:myddas:db_open, _131406, call:myddas_errors, error_checks, exit:myddas_errors, call...
,_131634) ? (2) fail:myddas:db_open(mysql,x,localhost/myschema/0/_131406,web,mypassword) ? (1) fail:db_open(mysql,x,localhost/myschema,web,mypassword) ? Code signals: Why, Yap, MYDDAS, MySQL, API, db_open, use_module, call:db_open, call:myddas:db_open, _131406, call:myddas_errors, error_checks, exit:myddas_errors, call...
[ 0.00970458984375, 0.01434326171875, -0.0079345703125, 0.000797271728515625, 0.00927734375, 0.00103759765625, -0.0185546875, -0.0252685546875, 0.0064697265625, -0.00897216796875, 0.0079345703125, -0.016357421875, 0.00872802734375, -0.00080108642578125, -0.0059814453125, -0.0058288574218...
[ 6, 4, 454, 115468, 159219, 16, 705, 1737, 35782, 39, 13974, 162, 48073, 59636, 74277, 99247, 425, 98908, 40294, 1176, 7560, 192, 107838, 150744, 14051, 13409, 47416, 798, 28864, 26073, 7, 44084, 47246, 54133, 397, 73686, 157146, 61687, 4004...
[ 0.01727294921875, 0.040191650390625, 0.042938232421875, 0.1968994140625, 0.27587890625, 0.00750732421875, 0.04180908203125, 0.1181640625, 0.208251953125, 0.096435546875, 0.1317138671875, 0.177490234375, 0.1571044921875, 0.2183837890625, 0.1195068359375, 0.19384765625, 0.08642578125, ...
embed
14455712_c0
14455712
prolog
0
Title: remove element from list without removing all duplicates Problem title: remove element from list without removing all duplicates Tags: prolog Problem: remove element from list without removing all duplicates i want remove elements from a list but if i do this: deletelist([3,1,2,3,4], [3], [3,1,2,4]) how remove o...
remove element from list without removing all duplicates remove element from list without removing all duplicates prolog list remove element from list without removing all duplicates i want remove elements from a list but if i do this: how remove only a 3 and not get this answer: Thanks!
[ 0.00128936767578125, 0.028564453125, -0.0027313232421875, -0.00323486328125, -0.0238037109375, 0.00186920166015625, -0.004730224609375, 0.0174560546875, 0.009033203125, -0.00177764892578125, -0.002166748046875, -0.0019378662109375, 0.00579833984375, 0.007293701171875, -0.0002956390380859...
[ 87388, 12830, 1295, 5303, 15490, 756, 171763, 1636, 49146, 6496, 502, 4867, 3444, 80854, 3642, 4734, 10, 138, 959, 35166 ]
[ 0.1634521484375, 0.173095703125, 0.1207275390625, 0.17236328125, 0.11920166015625, 0.0643310546875, 0.2010498046875, 0.084716796875, 0.023590087890625, 0.01161956787109375, 0.12017822265625, 0.1607666015625, 0.06427001953125, 0.1610107421875, 0.00848388671875, 0.0955810546875, 0.0171...
embed
48138487_c0
48138487
prolog
0
Title: How does the generate and test method work in prolog? Problem title: How does the generate and test method work in prolog? Tags: prolog Problem: How does the generate and test method work in prolog? I need help understanding what the generate and test method in prolog is, what it is used for and how to use it. I...
How does the generate and test method work in prolog? How does the generate and test method work in prolog? prolog How How does the generate and test method work in prolog? I need help understanding what the generate and test method in prolog is, what it is used for and how to use it. I've searched for answers online b...
[ 0.018310546875, 0.007598876953125, -0.004669189453125, 0.0042724609375, -0.0118408203125, 0.00830078125, -0.0093994140625, -0.01300048828125, 0.003814697265625, -0.0255126953125, -0.0089111328125, -0.008544921875, -0.032958984375, 0.004608154296875, -0.00064849853515625, -0.01037597656...
[ 11249, 14602, 70, 139392, 136, 3034, 55300, 4488, 23, 502, 4867, 4358, 100094, 2367, 83, 442, 11814, 100, 3642, 47, 4527, 35166 ]
[ 0.102783203125, 0.09356689453125, 0.0618896484375, 0.26171875, 0.176513671875, 0.2489013671875, 0.177978515625, 0.154541015625, 0.1016845703125, 0.1573486328125, 0.2310791015625, 0.00042724609375, 0.01666259765625, 0.03448486328125, 0.0382080078125, 0.060150146484375, 0.0848388671875...
embed
55868561_c0
55868561
prolog
0
Title: How to convert this clause into prolog? Problem title: How to convert this clause into prolog? Tags: prolog Problem: How to convert this clause into prolog? Clause:Every food is a meal OR Anything is a meal if it is a food How do I convert this clause to Prolog language this is my attempt: meal(X):-food(X) I am ...
How to convert this clause into prolog? How to convert this clause into prolog? prolog How How to convert this clause into prolog? Clause:Every food is a meal OR Anything is a meal if it is a food How do I convert this clause to Prolog language this is my attempt: meal(X):-food(X) I am unsure how to convert the clause ...
[ 0.00015354156494140625, -0.000858306884765625, 0.000701904296875, 0.025390625, -0.03369140625, 0.01446533203125, 0.00238037109375, -0.0167236328125, 0.0172119140625, -0.01226806640625, -0.01519775390625, 0.0103759765625, -0.03662109375, -0.0032196044921875, 0.01019287109375, -0.0073547...
[ 11249, 47, 96760, 903, 70731, 13, 3934, 502, 4867, 100700, 200647, 15381, 83, 10, 109911, 33172, 28541, 64113, 2174, 442, 1250, 46876, 81887, 1542, 49558, 299 ]
[ 0.04400634765625, 0.068115234375, 0.1470947265625, 0.061767578125, 0.15087890625, 0.0706787109375, 0.1241455078125, 0.1160888671875, 0.1964111328125, 0.1055908203125, 0.15771484375, 0.19140625, 0.127197265625, 0.06475830078125, 0.191162109375, 0.0439453125, 0.052459716796875, 0.142...
embed
23769862_c0
23769862
prolog
0
Title: Check if two lists are different in prolog Problem title: Check if two lists are different in prolog Tags: prolog Problem: Check if two lists are different in prolog diverso([X|L1],L2) :- nonp(X,L2), diverso(L1,L2). nonp(X,[]). nonp(X,[A|B]) :- X\=A, nonp(X,B). this is my code, it doesn't work and I don't know w...
Check if two lists are different in prolog Check if two lists are different in prolog prolog Check Check if two lists are different in prolog this is my code, it doesn't work and I don't know why. Error is My query is:
[ -0.0034637451171875, 0.0107421875, 0.0052490234375, 0.01153564453125, -0.007354736328125, 0.00104522705078125, -0.000476837158203125, 0.01409912109375, -0.004913330078125, -0.00189971923828125, 0.024169921875, 0.0267333984375, 0.00927734375, 0.007354736328125, -0.00213623046875, 0.0070...
[ 38679, 2174, 6626, 5303, 7, 621, 12921, 23, 502, 4867, 18151, 18, 4488, 15400, 212059, 41, 1294 ]
[ 0.149169921875, 0.115966796875, 0.1278076171875, 0.211669921875, 0.0284576416015625, 0.0667724609375, 0.212890625, 0.080078125, 0.1695556640625, 0.2269287109375, 0.094970703125, 0.004913330078125, 0.037445068359375, 0.001312255859375, 0.111572265625, 0.061859130859375, 0.023712158203...
embed
5408067_c0
5408067
prolog
0
Title: sorting list of lists by the second element of each sublist prolog Problem title: sorting list of lists by the second element of each sublist prolog Tags: prolog Problem: sorting list of lists by the second element of each sublist prolog I have a list like L = [[id1,avg1],[id2,avg2],....,[idN,avgN]] and I want t...
sorting list of lists by the second element of each sublist prolog sorting list of lists by the second element of each sublist prolog prolog id1 avg1 id2 avg2 sorting list of lists by the second element of each sublist prolog I have a list like L = [[id1,avg1],[id2,avg2],....,[idN,avgN]] and I want to sort this list by...
[ 0.010498046875, -0.01141357421875, 0.0086669921875, -0.0032958984375, -0.007415771484375, 0.02294921875, 0.0030517578125, 0.00160980224609375, 0.0091552734375, -0.01190185546875, 0.0142822265625, 0.020263671875, -0.01544189453125, -0.021484375, -0.015625, -0.00067901611328125, 0.0085...
[ 12096, 214, 5303, 111, 7, 390, 17932, 12830, 12638, 1614, 6562, 502, 4867, 3447, 418, 185, 177, 304, 765, 1884, 339, 2203, 532, 3818, 76172, 839, 3444, 47, 903, 831, 18, 4034, 552, 6238, 6528, 7273 ]
[ 0.2374267578125, 0.09405517578125, 0.2093505859375, 0.0125732421875, 0.030029296875, 0.0758056640625, 0.158203125, 0.157958984375, 0.0733642578125, 0.1536865234375, 0.1986083984375, 0.1280517578125, 0.1536865234375, 0.1016845703125, 0.042694091796875, 0.19921875, 0.1405029296875, 0...
embed
7619930_c0
7619930
prolog
0
Title: Prolog - Variable as operator Problem title: Prolog - Variable as operator Tags: prolog Problem: Prolog - Variable as operator I have an operator stored in a variable Op and two integers are stored in X and Y. Now, I want to do something like (Z is X Op Y), but this syntax seems not to be correct. Does anybody k...
Prolog - Variable as operator Prolog - Variable as operator prolog Prolog Variable Prolog - Variable as operator I have an operator stored in a variable Op and two integers are stored in X and Y. Now, I want to do something like (Z is X Op Y), but this syntax seems not to be correct. Does anybody know if there is a way...
[ 0.0205078125, -0.0185546875, 0.01165771484375, 0.009765625, 0.004119873046875, 0.0194091796875, 0.01251220703125, 0.0125732421875, -0.0025634765625, -0.017822265625, -0.0198974609375, -0.0072021484375, 0.007110595703125, -0.0269775390625, 0.01556396484375, 0.0120849609375, -0.0247802...
[ 1250, 4867, 84572, 2886, 237, 39933, 502, 4343, 71, 23, 77336, 2331, 6626, 892, 26255, 1193, 136, 990, 3444, 47, 54, 9844, 1884, 1511, 83, 903, 6002, 86531, 37202, 959, 26785, 37873, 3714, 3917 ]
[ 0.158203125, 0.2415771484375, 0.1890869140625, 0.1544189453125, 0.1077880859375, 0.267333984375, 0.073974609375, 0.1370849609375, 0.0209808349609375, 0.032989501953125, 0.2423095703125, 0.256591796875, 0.09912109375, 0.114013671875, 0.0994873046875, 0.092529296875, 0.106201171875, ...
embed
43915034_c0
43915034
prolog
0
Title: Prolog: predicate for maximum without accumulator Problem title: Prolog: predicate for maximum without accumulator Tags: prolog, list, integer-arithmetic Problem: Prolog: predicate for maximum without accumulator Is it possible to create a predicate max/2 without an accumulator so that max(List, Max) is true if ...
Prolog: predicate for maximum without accumulator Prolog: predicate for maximum without accumulator prolog list integer-arithmetic Prolog List Max Prolog: predicate for maximum without accumulator Is it possible to create a predicate max/2 without an accumulator so that max(List, Max) is true if and only if Max is the ...
[ -0.0025177001953125, 0.0159912109375, 0.0167236328125, 0.0184326171875, -0.0157470703125, 0.031982421875, -0.004608154296875, 0.01202392578125, -0.009033203125, -0.0181884765625, 0.015625, -0.01373291015625, -0.0145263671875, -0.0184326171875, 0.0208740234375, -0.0062255859375, 0.006...
[ 1250, 4867, 1653, 2063, 67, 38132, 15490, 183278, 1290, 502, 5303, 892, 1505, 8962, 32036, 9920, 7722, 28282, 18389, 12477, 154663, 29568, 34292, 26255 ]
[ 0.1236572265625, 0.20166015625, 0.15576171875, 0.1864013671875, 0.094970703125, 0.196044921875, 0.0966796875, 0.1795654296875, 0.1168212890625, 0.0821533203125, 0.114013671875, 0.1094970703125, 0.08038330078125, 0.07281494140625, 0.1522216796875, 0.177490234375, 0.11083984375, 0.11...
embed
10815267_c0
10815267
prolog
0
Title: Synchronize jobs Problem title: Synchronize jobs Tags: prolog Problem: Synchronize jobs I have two function ; foo ( A, B, C ) bar ( D, E, F ) I want ; | --------- | foo foo started finished | ------- | bar bar started finished | ------ | ^^^^^^^^^^ concatenate two list namely C and F How can I synchronize these ...
Synchronize jobs Synchronize jobs prolog Synchronize Synchronize jobs I have two function ; I want ; How can I synchronize these two functions in order to work as in order ? Can you give a sample example ?
[ 0.0281982421875, 0.0167236328125, -0.00927734375, 0.008056640625, -0.010009765625, 0.01068115234375, -0.024169921875, 0.02880859375, 0.01263427734375, -0.024658203125, -0.004364013671875, 0.00018405914306640625, -0.01446533203125, 0.0223388671875, 0.01312255859375, -0.0177001953125, ...
[ 19010, 101966, 20650, 74464, 502, 4867, 765, 6626, 32354, 3444, 11249, 831, 87, 200470, 6097, 12989, 4488, 237, 121413, 27781 ]
[ 0.12255859375, 0.179931640625, 0.15185546875, 0.20654296875, 0.0908203125, 0.11224365234375, 0.0292816162109375, 0.1314697265625, 0.209228515625, 0.07720947265625, 0.0361328125, 0.0282745361328125, 0.002498626708984375, 0.232666015625, 0.0027103424072265625, 0.1396484375, 0.057800292...
embed
66942322_c0
66942322
prolog
0
Title: Wall follower algorithm in Prolog Problem title: Wall follower algorithm in Prolog Tags: algorithm, prolog Problem: Wall follower algorithm in Prolog I want to implement left-hand wall follower maze solving algorithm in Prolog language. I'm a full beginner in Prolog and haven't found anything on web regarding wa...
Wall follower algorithm in Prolog Wall follower algorithm in Prolog algorithm prolog Wall Prolog Wall follower algorithm in Prolog I want to implement left-hand wall follower maze solving algorithm in Prolog language. I'm a full beginner in Prolog and haven't found anything on web regarding wall follower algorithm in P...
[ 0.0019683837890625, 0.00567626953125, 0.016357421875, 0.0025177001953125, -0.01904296875, 0.0211181640625, -0.01519775390625, -0.0059814453125, -0.017333984375, -0.033447265625, -0.004180908203125, -0.0025787353515625, -0.019775390625, -0.006591796875, 0.0016937255859375, 0.00741577148...
[ 23706, 28960, 56, 234873, 1250, 4867, 23, 502, 3444, 29479, 25737, 12336, 58982, 291, 731, 3115, 6496, 46876, 1679, 50592, 5608, 90911, 3535, 12 ]
[ 0.2052001953125, 0.211669921875, 0.13427734375, 0.20263671875, 0.1497802734375, 0.2274169921875, 0.0293121337890625, 0.0972900390625, 0.044219970703125, 0.0947265625, 0.1226806640625, 0.10430908203125, 0.190673828125, 0.0675048828125, 0.1544189453125, 0.10162353515625, 0.010437011718...
embed
10262143_c0
10262143
prolog
0
Title: pretty-print a prolog term Problem title: pretty-print a prolog term Tags: pretty-print, prolog Problem: pretty-print a prolog term How do I pretty print a list of terms in SWI-Prolog. I have tried: portray_clause([term1, term2]). but that just writes out in a long stream and a string even comes out as a list of...
pretty-print a prolog term pretty-print a prolog term pretty-print prolog portray_clause term1 term2 pretty-print a prolog term How do I pretty print a list of terms in SWI-Prolog. I have tried: portray_clause([term1, term2]). but that just writes out in a long stream and a string even comes out as a list of ascii char...
[ 0.01904296875, 0.00811767578125, -0.0037994384765625, 0.006805419921875, -0.017822265625, -0.005950927734375, 0.00921630859375, 0.0120849609375, 0.01361083984375, -0.0035552978515625, 0.00689697265625, -0.012451171875, -0.0030364990234375, -0.003631591796875, -0.01904296875, 0.02246093...
[ 28875, 35662, 10, 502, 4867, 13579, 9, 11469, 7092, 18347, 4032, 418, 304, 28412, 5303, 69407, 23, 159, 38969, 10752, 37842, 32166, 90173, 33022, 1810, 4989, 75973, 79315, 237, 26506, 62816, 18151, 1884, 2055, 238, 297 ]
[ 0.2279052734375, 0.2161865234375, 0.02606201171875, 0.165771484375, 0.222412109375, 0.228759765625, 0.000152587890625, 0.12939453125, 0.149169921875, 0.080322265625, 0.1331787109375, 0.0273895263671875, 0.044921875, 0.2222900390625, 0.1844482421875, 0.24462890625, 0.010589599609375, ...
embed
40636389_c0
40636389
prolog
0
Title: showing status in prolog Problem title: showing status in prolog Tags: prolog Problem: showing status in prolog i want to show status like status([[1,1][2,2],[5,5]]) $???? ?$??? ????? ????$ status([]) ????? ????? ????? ????? ????? can you understand? it's 5x5 size. but not fixed. size can be anything 10x10,6x6,7...
showing status in prolog showing status in prolog prolog showing status in prolog i want to show status like status([[1,1][2,2],[5,5]]) $???? ?$??? ????? ????$ status([]) ????? ????? ????? ????? ????? can you understand? it's 5x5 size. but not fixed. size can be anything 10x10,6x6,7x7.... how can i do this? i am new wi...
[ 0.022216796875, 0.01336669921875, 0.028076171875, 0.0086669921875, -0.006378173828125, -0.01214599609375, 0.00592041015625, 0.005218505859375, -0.0111083984375, 0.0252685546875, -0.005157470703125, 0.00921630859375, 0.00157928466796875, -0.018798828125, -0.00970458984375, -0.0024414062...
[ 141377, 10778, 23, 502, 4867, 17, 3444, 47, 7639, 1884, 304, 90173, 125592, 3650, 35042, 4369, 7273, 85908, 831, 28219, 442, 190, 425, 758, 13267, 188347, 209, 963, 136555, 54, 903, 3525, 678, 20653, 3249, 5665, 7, 1177, 13, 1264 ]
[ 0.1519775390625, 0.2325439453125, 0.1119384765625, 0.15771484375, 0.2445068359375, 0.036865234375, 0.1168212890625, 0.006317138671875, 0.170166015625, 0.055816650390625, 0.0164947509765625, 0.0638427734375, 0.1907958984375, 0.031524658203125, 0.0714111328125, 0.027374267578125, 0.032...
embed
43529917_c0
43529917
prolog
0
Title: Prolog why these 2 items unify? Problem title: Prolog why these 2 items unify? Tags: prolog, list Problem: Prolog why these 2 items unify? I'm very confused as to why [a,b,c,d] and [a,b|[c,d]] unify. From my limited understanding, the "|" operator splits the head and tail producing [a,b] and [[c,d]]. So how can ...
Prolog why these 2 items unify? Prolog why these 2 items unify? prolog list Prolog Prolog why these 2 items unify? I'm very confused as to why [a,b,c,d] and [a,b|[c,d]] unify. From my limited understanding, the "|" operator splits the head and tail producing [a,b] and [[c,d]]. So how can this result object with apparen...
[ 0.0223388671875, 0.01123046875, 0.01007080078125, 0.0126953125, -0.016845703125, 0.00836181640625, -0.0289306640625, 0.01202392578125, 0.0089111328125, -0.00099945068359375, -0.0011444091796875, 0.0028533935546875, 0.00872802734375, -0.00836181640625, -0.0146484375, -0.015869140625, ...
[ 1250, 4867, 15400, 6097, 116, 55769, 51, 40383, 502, 5303, 55681, 5281, 11, 275, 238, 71, 136, 58745, 100094, 39933, 65450, 7, 10336, 46741, 27024, 16750, 36746, 173676, 41929, 678, 501 ]
[ 0.155029296875, 0.2080078125, 0.16162109375, 0.1158447265625, 0.15673828125, 0.197509765625, 0.1796875, 0.2039794921875, 0.12646484375, 0.1953125, 0.0469970703125, 0.020599365234375, 0.03369140625, 0.095947265625, 0.075439453125, 0.1173095703125, 0.0767822265625, 0.1868896484375, ...
embed
53769756_c0
53769756
prolog
0
Title: Prolog Euclidian Square Problem title: Prolog Euclidian Square Tags: prolog, tail-recursion, euclidean-distance Problem: Prolog Euclidian Square Ive written a program such that for two arrays X & Y that are equal it should calculate SUM((X-Y)*(X-Y)). However it just returns false: euclidsqr([],[],ED). euclidsqr(...
Prolog Euclidian Square Prolog Euclidian Square prolog tail-recursion euclidean-distance Prolog Euclidian Square X-Y Prolog Euclidian Square Ive written a program such that for two arrays X & Y that are equal it should calculate SUM((X-Y)*(X-Y)). However it just returns false:
[ 0.0255126953125, 0.0123291015625, 0.01226806640625, 0.00634765625, -0.01025390625, 0.0093994140625, -0.0106201171875, 0.0157470703125, 0.004058837890625, 0.00799560546875, 0.00872802734375, 0.00138092041015625, -0.0166015625, -0.0281982421875, 0.00433349609375, -0.00982666015625, 0.0...
[ 1250, 4867, 5177, 238, 150, 27201, 68305, 502, 6, 46741, 107, 48650, 1175, 34937, 130265, 56883, 1193, 9, 1723, 87, 272, 59121, 1528, 6044, 100, 6626, 10298, 4778, 619, 990, 621, 105950, 5608, 74481, 127944, 132, 1542, 1639, 194, 33306, ...
[ 0.13525390625, 0.2332763671875, 0.0787353515625, 0.080322265625, 0.1578369140625, 0.12939453125, 0.1978759765625, 0.08984375, 0.0804443359375, 0.2015380859375, 0.039276123046875, 0.137939453125, 0.0291900634765625, 0.1024169921875, 0.09423828125, 0.158935546875, 0.1268310546875, 0....
embed
64071818_c0
64071818
prolog
0
Title: Elements of nth level of binary tree Problem title: Elements of nth level of binary tree Tags: prolog, binary-tree Problem: Elements of nth level of binary tree How to find all elements of given level of binary tree? I tried with this: nlevel(void,_,[]). nlevel(tree(X,L,R),0,[X]). nlevel(tree(X,L,R),N,Zs):- nlev...
Elements of nth level of binary tree Elements of nth level of binary tree prolog binary-tree Elements Elements of nth level of binary tree How to find all elements of given level of binary tree? I tried with this: , but it doesn't work.
[ 0.001251220703125, -0.0052490234375, 0.003875732421875, -0.01458740234375, 0.00982666015625, 0.020263671875, -0.0179443359375, -0.013916015625, -0.003326416015625, -0.04638671875, 0.00537109375, -0.035400390625, -0.004608154296875, 0.01055908203125, 0.0024261474609375, 0.0067138671875,...
[ 48325, 653, 927, 17366, 2394, 6635, 53201, 502, 4867, 62600, 11249, 47, 7413, 756, 80854, 111, 34475, 37842, 678, 903, 18, 4488 ]
[ 0.1641845703125, 0.193359375, 0.1400146484375, 0.2139892578125, 0.1334228515625, 0.116455078125, 0.1982421875, 0.05755615234375, 0.1038818359375, 0.17138671875, 0.00977325439453125, 0.04559326171875, 0.1146240234375, 0.1253662109375, 0.19482421875, 0.00006961822509765625, 0.054443359...
embed