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
20773775_c0
20773775
prolog
0
Title: Prolog variable not seen inside conditional clause Problem title: Prolog variable not seen inside conditional clause Tags: debugging, prolog Problem: Prolog variable not seen inside conditional clause I am working on a project in Prolog and I stumbled upon a problem: Let's say I am working with a list [H|T] . fu...
Prolog variable not seen inside conditional clause Prolog variable not seen inside conditional clause debugging prolog Prolog function1 Result Yes Stuff function2 Stuff2 Stuff3 Prolog variable not seen inside conditional clause I am working on a project in Prolog and I stumbled upon a problem: Let's say I am working wi...
[ 0.015380859375, 0.006622314453125, 0.00118255615234375, 0.004608154296875, -0.0035247802734375, 0.00689697265625, 0.005401611328125, 0.01495361328125, 0.002777099609375, 0.005859375, -0.006011962890625, 0.010986328125, -0.0103759765625, -0.0150146484375, 0.0274658203125, -0.00680541992...
[ 1250, 4867, 77336, 959, 51592, 46132, 35431, 289, 70731, 8, 978, 502, 32354, 126684, 32635, 2907, 21493, 363, 13452, 2967, 20697, 5303, 841, 58745, 618, 13, 572, 136, 384, 75693, 3525, 3249, 2856 ]
[ 0.139404296875, 0.2342529296875, 0.265869140625, 0.0439453125, 0.1693115234375, 0.136474609375, 0.180419921875, 0.111328125, 0.1861572265625, 0.050994873046875, 0.09814453125, 0.0740966796875, 0.119384765625, 0.1474609375, 0.09454345703125, 0.07159423828125, 0.1676025390625, 0.0723...
embed
59733100_c1
59733100
prolog
1
_diff(HL,HR,Diff), Diff =< 1, avl_tree_planter(L,Ls), avl_tree_planter(R,Rs), append(Rs, [X], Xs1), % postorder append(Ls, Xs1, Xs). avl_tree_planter(tree(X,L,R), Xs) :- height(L,HL), height(R,HR), abs_diff(HL,HR,Diff), Diff =< 1, avl_tree_planter(L,Ls), avl_tree_planter(R,Rs), append([X|Ls], Rs, Xs). % preorder In som...
_diff(HL,HR,Diff), Diff =< 1, avl_tree_planter(L,Ls), avl_tree_planter(R,Rs), append(Rs, [X], Xs1), % postorder append(Ls, Xs1, Xs). avl_tree_planter(tree(X,L,R), Xs) :- height(L,HL), height(R,HR), abs_diff(HL,HR,Diff), Diff =< 1, avl_tree_planter(L,Ls), avl_tree_planter(R,Rs), append([X|Ls], Rs, Xs). % preorder In som...
[ 0.01226806640625, 0.01025390625, -0.0191650390625, -0.01708984375, -0.01177978515625, 0.0208740234375, -0.0103759765625, -0.0155029296875, 0.0238037109375, -0.0294189453125, 0.01458740234375, -0.008544921875, 0.0208740234375, -0.0155029296875, 0.0167236328125, -0.00909423828125, 0.00...
[ 152462, 48599, 29562, 397, 32920, 191144, 16093, 106, 185, 141, 62600, 48538, 56, 866, 1052, 114689, 1542, 1193, 17727, 1745, 1305, 80596, 155955, 43719, 115034, 479, 1118, 29481, 107730, 275, 140992, 2203, 53201, 132, 11, 17324, 77488, 76456...
[ 0.2176513671875, 0.1697998046875, 0.1328125, 0.013336181640625, 0.1884765625, 0.209716796875, 0.04315185546875, 0.031951904296875, 0.166748046875, 0.14404296875, 0.208251953125, 0.1868896484375, 0.1514892578125, 0.0755615234375, 0.0841064453125, 0.0819091796875, 0.1400146484375, 0....
embed
7014553_c0
7014553
prolog
0
Title: SWI-Prolog C++ interface Problem title: SWI-Prolog C++ interface Tags: windows, swi-prolog, prolog, c%2B%2B Problem: SWI-Prolog C++ interface I get an error while trying to load a DLL generated with swipl-ld in prolog the predicate that throws the exception is this initialization(shlib:use_foreign_library('C:/Us...
SWI-Prolog C++ interface SWI-Prolog C++ interface windows swi-prolog prolog c%2B%2B SWI-Prolog shlib:use_foreign_library Users valquiria.duarte Desktop dlog-server-0.3-beta-source hash_swi.dll ERROR open_shared_object Win32 SWI-Prolog C++ interface I get an error while trying to load a DLL generated with swipl-ld in pr...
[ 0.02685546875, 0.01177978515625, -0.00421142578125, 0.0026092529296875, -0.01470947265625, -0.005859375, -0.0038299560546875, 0.01287841796875, -0.01123046875, -0.048583984375, -0.0015716552734375, -0.00537109375, -0.00848388671875, -0.000545501708984375, 0.0211181640625, -0.0197753906...
[ 159, 38969, 9, 10752, 4867, 313, 37223, 101758, 54825, 2452, 3454, 502, 7547, 5612, 4032, 2472, 38529, 150, 2844, 53400, 3502, 3181, 1651, 693, 10845, 141423, 104, 39642, 170179, 59865, 60427, 1556, 127, 7, 71, 1181, 151206, 24638, 9803, ...
[ 0.0947265625, 0.259521484375, 0.035308837890625, 0.146728515625, 0.2276611328125, 0.024505615234375, 0.2198486328125, 0.1824951171875, 0.1209716796875, 0.2264404296875, 0.1131591796875, 0.1397705078125, 0.0576171875, 0.1995849609375, 0.080078125, 0.0250091552734375, 0.101318359375, ...
embed
11220567_c0
11220567
prolog
0
Title: Flatting a list Problem title: Flatting a list Tags: prolog, dcg Problem: Flatting a list I need to write a function that flat a list. For example: flat([ c , [[[]]] , [] , k] , X). X=[c,k] this is what I did: flat([],[]). flat([[A] |B] , R) :- flat([A|B],R). flat([[]|L],L1) :- flat(L,L1).! flat([[A|L]|W],R) :- ...
Flatting a list Flatting a list prolog dcg Flatting Flatting a list I need to write a function that flat a list. For example: this is what I did: I know why it is not true but I do not know how to do that. thanks. EDIT: almost work:
[ 0.002349853515625, 0.01416015625, -0.0028533935546875, -0.0011444091796875, -0.003753662109375, -0.007476806640625, -0.004302978515625, -0.00634765625, 0.025146484375, -0.00836181640625, 0.000797271728515625, -0.0255126953125, -0.0184326171875, 0.0306396484375, -0.00592041015625, -0.00...
[ 106516, 1916, 5303, 502, 4867, 104, 238, 177, 3871, 33022, 32354, 450, 49878, 10, 27781, 903, 83, 2367, 6777, 3714, 15400, 959, 29568, 54, 39555, 4488 ]
[ 0.2216796875, 0.129638671875, 0.23193359375, 0.1085205078125, 0.168701171875, 0.005580902099609375, 0.0106964111328125, 0.09503173828125, 0.07086181640625, 0.0950927734375, 0.17041015625, 0.004390716552734375, 0.2890625, 0.01428985595703125, 0.034027099609375, 0.0689697265625, 0.0307...
embed
50695712_c0
50695712
prolog
0
Title: List with if - plus and minus Problem title: List with if - plus and minus Tags: prolog Problem: List with if - plus and minus I should create a list with integer.It should be ziga_arnitika(L,ML).Which take L list (+) integer and will return the list ML only (-) integer the even numbers of list L. Warning:The X ...
List with if - plus and minus List with if - plus and minus prolog List Example ziga_arnitika List with if - plus and minus I should create a list with integer.It should be ziga_arnitika(L,ML).Which take L list (+) integer and will return the list ML only (-) integer the even numbers of list L. Warning:The X mod Y calc...
[ -0.01171875, 0.006988525390625, 0.005523681640625, 0.0009307861328125, -0.00201416015625, 0.015380859375, 0.007598876953125, 0.019775390625, 0.0177001953125, 0.00494384765625, 0.0064697265625, -0.0133056640625, -0.00131988525390625, 0.01806640625, -0.000614166259765625, 0.0066528320312...
[ 32036, 678, 2174, 1001, 136, 26948, 20, 502, 4867, 89536, 8705, 89035, 147, 93, 8193, 5608, 28282, 5303, 892, 1505, 866, 39456, 5646, 339, 22183, 30646, 4734, 9, 3853, 101935, 5550, 1193, 2811, 990, 74481, 1636, 12, 1723, 3714, 27781, 9...
[ 0.21826171875, 0.1195068359375, 0.2152099609375, 0.201416015625, 0.1319580078125, 0.26318359375, 0.0350341796875, 0.123779296875, 0.20947265625, 0.0711669921875, 0.01153564453125, 0.1715087890625, 0.04534912109375, 0.07958984375, 0.199462890625, 0.04486083984375, 0.1143798828125, 0...
embed
26321789_c0
26321789
prolog
0
Title: Abstractions for Concurrency in Prolog Problem title: Abstractions for Concurrency in Prolog Tags: prolog, erlog, erlang, concurrency, actor Problem: Abstractions for Concurrency in Prolog We are working on building the 1.0 release of Erlog, a prolog that can run in an Erlang process. For now I have implemented ...
Abstractions for Concurrency in Prolog Abstractions for Concurrency in Prolog prolog erlog erlang concurrency actor Abstractions Concurrency Prolog Abstractions for Concurrency in Prolog We are working on building the 1.0 release of Erlog, a prolog that can run in an Erlang process. For now I have implemented the abili...
[ 0.0296630859375, 0.01422119140625, -0.007415771484375, -0.005615234375, 0.00127410888671875, 0.0069580078125, -0.0172119140625, 0.0179443359375, -0.0009918212890625, -0.05615234375, 0.0206298828125, 0.0079345703125, -0.006500244140625, 0.00323486328125, 0.017822265625, 0.0269775390625,...
[ 233973, 17514, 100, 1657, 64240, 33, 1250, 4867, 502, 72, 3066, 108636, 982, 39329, 20697, 33976, 53855, 54452, 1004, 831, 9433, 5036, 29479, 81273, 47, 25379, 136, 53299, 48205, 3638, 191619, 1884, 15190, 3789, 2408, 164789, 88303, 2663, 2...
[ 0.2293701171875, 0.12158203125, 0.0626220703125, 0.08575439453125, 0.1962890625, 0.119140625, 0.1666259765625, 0.2489013671875, 0.1243896484375, 0.1204833984375, 0.2255859375, 0.196044921875, 0.14306640625, 0.1729736328125, 0.0369873046875, 0.0205535888671875, 0.0709228515625, 0.02...
embed
63456033_c1
63456033
prolog
1
item(3, 6)] ; ERROR: Out of global-stack. ERROR: No room for exception term. Aborting. ERROR: Out of global-stack. ERROR: No room for exception term. Aborting. Could not reenable global-stack Could not reenable global-stack Could not reenable global-stack % Execution Aborted Works great for values with values N < 2 ?-...
item(3, 6)] ; ERROR: Out of global-stack. ERROR: No room for exception term. Aborting. ERROR: Out of global-stack. ERROR: No room for exception term. Aborting. Could not reenable global-stack Could not reenable global-stack Could not reenable global-stack % Execution Aborted Works great for values with values N < 2 ?-...
[ -0.009033203125, 0.01416015625, -0.01025390625, -0.00872802734375, 0.00555419921875, 0.0284423828125, -0.01300048828125, 0.00128173828125, 0.010986328125, -0.0250244140625, 0.02978515625, -0.009765625, 0.017822265625, -0.0086669921875, 0.0233154296875, -0.007476806640625, 0.017822265...
[ 35735, 86827, 4, 35914, 151206, 24638, 13538, 111, 7964, 590, 2594, 438, 17155, 100, 131527, 13579, 62, 3422, 1916, 191147, 456, 33, 2886, 1745, 211603, 1830, 3674, 27985, 6782, 142424, 541, 4426, 116, 22321, 40514, 78426, 217, 4958, 54753,...
[ 0.256591796875, 0.12353515625, 0.0123291015625, 0.2080078125, 0.1575927734375, 0.1324462890625, 0.179443359375, 0.147705078125, 0.184814453125, 0.1590576171875, 0.1461181640625, 0.044769287109375, 0.193115234375, 0.018096923828125, 0.20556640625, 0.16845703125, 0.03729248046875, 0....
embed
47420934_c0
47420934
prolog
0
Title: Recursive addition in Prolog with Peano numbers doesn&#x27;t work Problem title: Recursive addition in Prolog with Peano numbers doesn&#x27;t work Tags: successor-arithmetics, prolog Problem: Recursive addition in Prolog with Peano numbers doesn't work I'm currently trying to practice some Prolog. I just started...
Recursive addition in Prolog with Peano numbers doesn&#x27;t work Recursive addition in Prolog with Peano numbers doesn&#x27;t work successor-arithmetics prolog Recursive Prolog Peano Peano1 Peano2 Recursive addition in Prolog with Peano numbers doesn't work I'm currently trying to practice some Prolog. I just started ...
[ -0.0021209716796875, 0.0113525390625, 0.01422119140625, 0.0174560546875, -0.00897216796875, 0.0228271484375, -0.0155029296875, -0.00457763671875, 0.006988525390625, -0.01263427734375, 0.0198974609375, -0.0027008056640625, -0.0189208984375, -0.01287841796875, 0.0142822265625, 0.00030899...
[ 853, 48650, 5844, 66044, 1250, 4867, 678, 1460, 3922, 101935, 22027, 3768, 18, 4488, 39457, 42, 8962, 502, 304, 41361, 2967, 28219, 83324, 195625, 2174, 1632, 14012, 83, 70, 41929, 111, 15700, 37842, 86869, 15400 ]
[ 0.0753173828125, 0.2041015625, 0.1429443359375, 0.1817626953125, 0.1585693359375, 0.2255859375, 0.05914306640625, 0.173583984375, 0.2237548828125, 0.13330078125, 0.07470703125, 0.007354736328125, 0.079833984375, 0.146484375, 0.1480712890625, 0.0287933349609375, 0.032745361328125, 0...
embed
45472514_c1
45472514
prolog
1
% Performed 1 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % user:parent/2 (512KB--1265384KB) % user:parent/2 (512KB--1265384KB)... % ...user:parent/2 (512KB--1265377KB) % ..... ERROR!! RESOURCE ERROR- not enough stack This also causes problems for the "cous...
% Performed 1 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % user:parent/2 (512KB--1265384KB) % user:parent/2 (512KB--1265384KB)... % ...user:parent/2 (512KB--1265377KB) % ..... ERROR!! RESOURCE ERROR- not enough stack This also causes problems for the "cous...
[ 0.020263671875, 0.0322265625, -0.00177001953125, 0.0196533203125, -0.02294921875, -0.00099945068359375, -0.00543212890625, 0.006256103515625, 0.0093994140625, -0.034423828125, 0.016357421875, -0.004241943359375, -0.004150390625, 0.0306396484375, 0.034423828125, -0.0213623046875, 0.01...
[ 1745, 169033, 297, 106, 3671, 402, 429, 42486, 7, 3164, 88441, 26265, 136, 2016, 16765, 17106, 103905, 13527, 162080, 360, 36836, 203758, 38937, 99547, 12477, 39709, 9955, 12424, 117180, 65918, 151206, 24638, 1146, 61661, 76234, 959, 20174, 1...
[ 0.10162353515625, 0.2017822265625, 0.0972900390625, 0.1148681640625, 0.0994873046875, 0.2008056640625, 0.1181640625, 0.2296142578125, 0.02801513671875, 0.1292724609375, 0.1832275390625, 0.1988525390625, 0.00067138671875, 0.1568603515625, 0.1263427734375, 0.11376953125, 0.191162109375...
embed
11567050_c0
11567050
prolog
0
Title: Prolog difference lists: code works on SWI and GNU Prolog, but not Yap Problem title: Prolog difference lists: code works on SWI and GNU Prolog, but not Yap Tags: prolog, yap Problem: Prolog difference lists: code works on SWI and GNU Prolog, but not Yap This code correctly calculates the number of elements in a...
Prolog difference lists: code works on SWI and GNU Prolog, but not Yap Prolog difference lists: code works on SWI and GNU Prolog, but not Yap prolog yap Prolog SWI GNU Yap X-X1 unify_with_occurs_check T-T1 Prolog difference lists: code works on SWI and GNU Prolog, but not Yap This code correctly calculates the number o...
[ 0.031982421875, 0.0146484375, 0.00823974609375, 0.00531005859375, 0.0003528594970703125, -0.00897216796875, -0.0087890625, 0.0177001953125, 0.005035400390625, -0.036865234375, -0.010009765625, -0.0181884765625, 0.0120849609375, -0.000278472900390625, 0.016357421875, 0.0021209716796875,...
[ 1250, 4867, 60212, 5303, 18151, 43240, 98, 159, 38969, 165132, 959, 47246, 502, 15850, 1193, 1542, 418, 51, 40383, 76228, 6652, 48650, 78292, 384, 618, 7, 26785, 74481, 14012, 80854, 11675, 136, 33306, 30957, 54241, 40956, 44084, 2806, 2948...
[ 0.17529296875, 0.2344970703125, 0.2376708984375, 0.17724609375, 0.166259765625, 0.11083984375, 0.0265960693359375, 0.04541015625, 0.1737060546875, 0.1708984375, 0.12060546875, 0.2412109375, 0.111572265625, 0.1500244140625, 0.0364990234375, 0.05352783203125, 0.06146240234375, 0.1140...
embed
14344068_c0
14344068
prolog
0
Title: Writing elements in prolog console Problem title: Writing elements in prolog console Tags: prolog, dcg Problem: Writing elements in prolog console In prolog I have do to something like this: ************************ * * * ########## * * # button # * * ########## * * * ************************ User gives the widt...
Writing elements in prolog console Writing elements in prolog console prolog dcg Writing Writing elements in prolog console In prolog I have do to something like this: User gives the width and height of window (created with *), and coordinates, width, height and text of button (created by #). This "window" is written i...
[ 0.0169677734375, 0.0032196044921875, -0.008056640625, 0.007476806640625, 0.0040283203125, 0.020751953125, 0.0034332275390625, -0.007568359375, 0.01422119140625, -0.0294189453125, -0.0012969970703125, -0.022705078125, 0.00128173828125, -0.003875732421875, 0.01495361328125, -0.0084228515...
[ 213185, 80854, 23, 502, 4867, 130250, 104, 238, 177, 54, 1884, 53400, 76199, 146984, 155955, 76896, 7612, 678, 661, 176866, 136, 7986, 77679, 468, 9494, 24293, 59121, 63134, 32562, 68034, 3714, 3642, 9844, 442, 4358, 17997, 98893 ]
[ 0.228759765625, 0.223876953125, 0.06658935546875, 0.149169921875, 0.221923828125, 0.223876953125, 0.006317138671875, 0.0224761962890625, 0.0816650390625, 0.015380859375, 0.0130615234375, 0.115966796875, 0.097412109375, 0.1387939453125, 0.1307373046875, 0.1727294921875, 0.079345703125...
embed
50886366_c0
50886366
prolog
0
Title: Cut Tree in Prolog from some depth Problem title: Cut Tree in Prolog from some depth Tags: prolog, depth, binary-tree Problem: Cut Tree in Prolog from some depth first(M,N):- N>0,M=..[H|T],((T==[],write(H));(T\=[],write(H),Q is N-1,second(T,Q))). second(M,N):- N>0,M=[H|T],first(H,N),((T==[]);(T\=[],second(T,N)))...
Cut Tree in Prolog from some depth Cut Tree in Prolog from some depth prolog depth binary-tree some Cut Tree Prolog N-1 Cut Tree in Prolog from some depth I want to cut tree form some depth.I write some program which give me this result. But I want to get this. Please someone help me to solove it.
[ 0.0296630859375, 0.0130615234375, 0.01214599609375, 0.0230712890625, 0.01129150390625, 0.005767822265625, 0.0003490447998046875, 0.0079345703125, -0.001312255859375, -0.020263671875, -0.015625, -0.01312255859375, -0.014892578125, 0.004058837890625, 0.033935546875, 0.00167083740234375, ...
[ 3003, 18, 101344, 23, 1250, 4867, 1295, 3060, 168867, 502, 2394, 6635, 62600, 541, 5759, 3444, 47, 59226, 53201, 3173, 33022, 1528, 16750, 4966, 2046, 903, 30607, 22008, 4358, 2639, 272 ]
[ 0.1680908203125, 0.083740234375, 0.26806640625, 0.055450439453125, 0.1470947265625, 0.2357177734375, 0.08502197265625, 0.042327880859375, 0.1888427734375, 0.099609375, 0.11566162109375, 0.059783935546875, 0.1922607421875, 0.062286376953125, 0.10882568359375, 0.08343505859375, 0.01178...
embed
20620018_c0
20620018
prolog
0
Title: Prolog counting with restrictions Problem title: Prolog counting with restrictions Tags: clpfd, sicstus-prolog, prolog Problem: Prolog counting with restrictions I don't know how can I achieve the following: I want to count the number of times a certain condition (whose values are unknown) is met. For instance, ...
Prolog counting with restrictions Prolog counting with restrictions clpfd sicstus-prolog prolog Prolog use_module all_different Prolog counting with restrictions I don't know how can I achieve the following: I want to count the number of times a certain condition (whose values are unknown) is met. For instance, if I ha...
[ -0.00921630859375, -0.0091552734375, 0.004486083984375, 0.00860595703125, 0.004058837890625, 0.006866455078125, -0.0035552978515625, 0.01300048828125, 0.0286865234375, -0.04296875, -0.0016937255859375, -0.021240234375, 0.0260009765625, 0.0225830078125, 0.01348876953125, -0.019897460937...
[ 1250, 4867, 54529, 678, 185190, 214, 39557, 71, 18253, 3454, 502, 4527, 83279, 756, 238778, 7, 3714, 69307, 3444, 47, 14012, 20028, 24233, 35431, 497, 142424, 51, 69723, 83, 435, 5303, 284, 418, 304, 96386, 136, 571, 28282, 1052, 2975, ...
[ 0.174560546875, 0.254638671875, 0.2252197265625, 0.121826171875, 0.22998046875, 0.043853759765625, 0.002593994140625, 0.0229949951171875, 0.159423828125, 0.107177734375, 0.113525390625, 0.043304443359375, 0.07794189453125, 0.045684814453125, 0.19482421875, 0.08013916015625, 0.0291137...
embed
6334050_c0
6334050
prolog
0
Title: adding a search Path in SWI prolog Problem title: adding a search Path in SWI prolog Tags: prolog Problem: adding a search Path in SWI prolog In many Prolog systems it is easy to add a new search path for consulting file. In Yap for example, the predicate I know it is add_to_path(NewPath). Is there a way to do t...
adding a search Path in SWI prolog adding a search Path in SWI prolog prolog Path SWI adding a search Path in SWI prolog In many Prolog systems it is easy to add a new search path for consulting file. In Yap for example, the predicate I know it is add_to_path(NewPath). Is there a way to do the same in SWI Prolog ?. My ...
[ 0.0213623046875, 0.0264892578125, -0.00067138671875, 0.01806640625, -0.04052734375, -0.0034942626953125, -0.000835418701171875, 0.0089111328125, 0.002227783203125, -0.06396484375, 0.0120849609375, -0.00060272216796875, -0.020751953125, 0.016357421875, 0.00286865234375, -0.0048828125, ...
[ 154107, 10, 33938, 108421, 23, 159, 38969, 502, 4867, 5941, 1250, 76519, 23468, 15190, 3525, 60875, 100, 75463, 214, 11435, 47246, 1653, 2063, 67, 3714, 188, 128405, 46568, 683, 10519, 3917, 54, 1632, 47, 21771, 144573, 86250, 12477, 8, 1...
[ 0.17138671875, 0.05511474609375, 0.2403564453125, 0.257568359375, 0.037445068359375, 0.0777587890625, 0.235107421875, 0.14453125, 0.2042236328125, 0.01141357421875, 0.1600341796875, 0.09814453125, 0.07574462890625, 0.1644287109375, 0.1173095703125, 0.260986328125, 0.00555419921875, ...
embed
15672272_c0
15672272
prolog
0
Title: how to output text in prolog? Problem title: how to output text in prolog? Tags: prolog Problem: how to output text in prolog? I'm new to Prolog and I'm trying to write some output. I have a function: father(X,Y) that is true if X is Y's father, so this happens: ?- father(homer,bart) true How do I do something l...
how to output text in prolog? how to output text in prolog? prolog Test1 Test2 Test3 how to output text in prolog? I'm new to Prolog and I'm trying to write some output. I have a function: father(X,Y) that is true if X is Y's father, so this happens: How do I do something like this: so I get something like this ... ?
[ 0.033935546875, 0.0002880096435546875, -0.015869140625, 0.00946044921875, -0.036376953125, 0.0028228759765625, 0.01507568359375, -0.004730224609375, -0.000652313232421875, 0.00640869140625, 0.0194091796875, -0.0037689208984375, -0.009521484375, 0.0003719329833984375, 0.024169921875, 0....
[ 3642, 47, 140992, 7986, 23, 502, 4867, 8647, 363, 3525, 1250, 31577, 33022, 32354, 67373, 1542, 1723, 29568, 2174, 1193, 83, 990, 96276, 11249, 1884, 903, 2046, 9844 ]
[ 0.077880859375, 0.0843505859375, 0.2371826171875, 0.236572265625, 0.0858154296875, 0.1627197265625, 0.2496337890625, 0.108154296875, 0.014373779296875, 0.0364990234375, 0.1279296875, 0.01025390625, 0.03192138671875, 0.135986328125, 0.1854248046875, 0.007232666015625, 0.05209350585937...
embed
14416099_c0
14416099
prolog
0
Title: How can I print unification results when using prolog script? Problem title: How can I print unification results when using prolog script? Tags: prolog, unification, gnu-prolog Problem: How can I print unification results when using prolog script? I'm using prolog script to do all queries, the code goes like: :-...
How can I print unification results when using prolog script? How can I print unification results when using prolog script? prolog unification gnu-prolog prolog How How can I print unification results when using prolog script? I'm using prolog script to do all queries, the code goes like: the problem is that queryAll w...
[ 0.0198974609375, 0.02197265625, 0.015869140625, 0.00096893310546875, -0.00506591796875, -0.01806640625, -0.00170135498046875, -0.007476806640625, -0.007232666015625, -0.00885009765625, -0.004119873046875, 0.0025177001953125, -0.00225830078125, 0.006195068359375, -0.0159912109375, 0.003...
[ 11249, 831, 87, 28412, 51, 41274, 50339, 3229, 17368, 502, 4867, 26499, 6, 104155, 3454, 756, 41, 10484, 18151, 2967, 1294, 43512, 1221, 4734, 63736, 707, 157, 3444, 1957, 5 ]
[ 0.075439453125, 0.0465087890625, 0.009307861328125, 0.22607421875, 0.1876220703125, 0.2235107421875, 0.20654296875, 0.0264892578125, 0.0726318359375, 0.1654052734375, 0.220458984375, 0.1851806640625, 0.01165771484375, 0.1346435546875, 0.1156005859375, 0.040069580078125, 0.11376953125...
embed
34247970_c1
34247970
prolog
1
, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54], domain(Vars,1,9), noDotsFace:- sum([V2,V19, V7, V16, V31, V26],[V5, V23, V11, V5...
, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54], domain(Vars,1,9), noDotsFace:- sum([V2,V19, V7, V16, V31, V26],[V5, V23, V11, V5...
[ 0.0113525390625, 0.00262451171875, -0.01129150390625, 0.0252685546875, 0.003448486328125, 0.0032806396484375, -0.0111083984375, 0.00897216796875, 0.004364013671875, -0.013671875, 0.0033111572265625, -0.006805419921875, 0.004791259765625, 0.0009307861328125, -0.0220947265625, -0.0097045...
[ 6, 4, 310, 966, 1019, 1126, 963, 1662, 1530, 2681, 2592, 1837, 2485, 2489, 1819, 2947, 1549, 3117, 4015, 3742, 2357, 2588, 4046, 3768, 3882, 4235, 1197, 5016, 6460, 9185, 10289, 5843, 8659, 10945, 10991, 9323, 2839, 8894, 13023, 11548, ...
[ 0.1212158203125, 0.0899658203125, 0.206787109375, 0.177734375, 0.1943359375, 0.198974609375, 0.1680908203125, 0.1756591796875, 0.1573486328125, 0.16015625, 0.150146484375, 0.1514892578125, 0.2137451171875, 0.1163330078125, 0.118408203125, 0.226806640625, 0.1063232421875, 0.11926269...
embed
12157453_c0
12157453
prolog
0
Title: &quot;Out of local stack&quot; reversing a list Problem title: &quot;Out of local stack&quot; reversing a list Tags: prolog Problem: "Out of local stack" reversing a list I wrote the following Prolog code: concatenate([X|L1], L2, [X|L3]) :- concatenate(L1, L2, L3). concatenate([], L, L). rev([X|L], Y) :- concate...
&quot;Out of local stack&quot; reversing a list &quot;Out of local stack&quot; reversing a list prolog Out ERROR "Out of local stack" reversing a list I wrote the following Prolog code: If I do some queries like: it's ok, but if I do: I get: I'm sure I can find a correct implementation of reverse function on the web, b...
[ 0.00830078125, 0.02001953125, 0.00823974609375, 0.0177001953125, -0.004638671875, 0.008056640625, -0.01287841796875, 0.024658203125, 0.01031494140625, -0.041259765625, 0.02099609375, -0.004974365234375, 0.0194091796875, -0.00927734375, 0.025146484375, 0.01025390625, 0.021240234375, ...
[ 79858, 111, 4000, 177261, 39531, 6953, 5303, 502, 4867, 13538, 151206, 24638, 54397, 25632, 1250, 18151, 41, 10484, 3664, 1284, 2174, 54, 2046, 26785, 208124, 184, 32354, 1467, 2367, 22304, 903, 18499 ]
[ 0.22119140625, 0.2315673828125, 0.193359375, 0.2410888671875, 0.2469482421875, 0.11083984375, 0.1954345703125, 0.1190185546875, 0.1925048828125, 0.18359375, 0.1490478515625, 0.07147216796875, 0.0174713134765625, 0.032562255859375, 0.12060546875, 0.0888671875, 0.06170654296875, 0.11...
embed
31464428_c0
31464428
prolog
0
Title: generate a range of ints -- &quot;out of local stack&quot; [beginner] Problem title: generate a range of ints -- &quot;out of local stack&quot; [beginner] Tags: failure-slice, prolog Problem: generate a range of ints -- "out of local stack" [beginner] gen(N,R) : R is value between 0 and N-1, in order. N non-zero...
generate a range of ints -- &quot;out of local stack&quot; [beginner] generate a range of ints -- &quot;out of local stack&quot; [beginner] failure-slice prolog genN2 ERROR Out generate a range of ints -- "out of local stack" [beginner] gen(N,R) : R is value between 0 and N-1, in order. N non-zero positive int. N will ...
[ -0.01177978515625, 0.01806640625, 0.0020294189453125, -0.0027923583984375, 0.0004787445068359375, 0.005615234375, -0.0164794921875, 0.009033203125, 0.0064697265625, -0.041748046875, 0.01153564453125, 0.00860595703125, 0.016845703125, 0.002593994140625, 0.04541015625, -0.00885009765625,...
[ 139392, 37457, 111, 23, 933, 6056, 4000, 177261, 82089, 56, 137578, 13348, 502, 4867, 9226, 839, 304, 151206, 24638, 13538, 4, 1052, 627, 83, 34292, 17721, 757, 541, 5759, 12989, 351, 80510, 24491, 18, 1221, 11343, 34475, 705, 54753, 7619...
[ 0.198974609375, 0.220703125, 0.18701171875, 0.177734375, 0.1917724609375, 0.1954345703125, 0.1583251953125, 0.195068359375, 0.075927734375, 0.0836181640625, 0.207763671875, 0.14306640625, 0.1097412109375, 0.17529296875, 0.188232421875, 0.1695556640625, 0.1231689453125, 0.1396484375...
embed
56491144_c1
56491144
prolog
1
If we've got to the end of our string, it is a word if there is a terminal child. lookup_trie([], _Char-Children) :- member(terminal, Children). % If we have more characters in our string, lookup the C trie and continue. lookup_trie([C | Cs], _Char-Children) :- member(C-GrandChildren, Children), lookup_trie(Cs, C-Gran...
If we've got to the end of our string, it is a word if there is a terminal child. lookup_trie([], _Char-Children) :- member(terminal, Children). % If we have more characters in our string, lookup the C trie and continue. lookup_trie([C | Cs], _Char-Children) :- member(C-GrandChildren, Children), lookup_trie(Cs, C-Gran...
[ 0.01806640625, 0.01495361328125, 0.0005645751953125, -0.003753662109375, -0.01214599609375, 0.0174560546875, 0.021484375, -0.005706787109375, 0.0169677734375, -0.035400390625, 0.018798828125, 0.00160980224609375, -0.0234375, 0.0230712890625, -0.005096435546875, -0.00012302398681640625,...
[ 4263, 4163, 47, 3564, 111, 2446, 79315, 442, 83, 2565, 2174, 2685, 33949, 29041, 6713, 2037, 97351, 84068, 9, 441, 102656, 982, 32786, 30524, 289, 91345, 1745, 765, 1286, 124850, 313, 1927, 13, 21342, 4, 142216, 3714, 3642, 4527, 903, 8...
[ 0.038055419921875, 0.06982421875, 0.04681396484375, 0.176513671875, 0.015899658203125, 0.04345703125, 0.2122802734375, 0.0050048828125, 0.0443115234375, 0.1922607421875, 0.0546875, 0.06298828125, 0.261962890625, 0.236328125, 0.09375, 0.127197265625, 0.254638671875, 0.179931640625, ...
embed
67769930_c0
67769930
prolog
0
Title: Heuristic function prolog Problem title: Heuristic function prolog Tags: prolog Problem: Heuristic function prolog I have a problem which is [1,2,3,0,4,5,6] and the goal is [4,5,6,0,1,2,3] and the Heuristic function is to calculate misplaced for 4,5,6 tile in position of 1,2,3 tile so when I try to add the condi...
Heuristic function prolog Heuristic function prolog prolog Heuristic Head Heuristic function prolog I have a problem which is [1,2,3,0,4,5,6] and the goal is [4,5,6,0,1,2,3] and the Heuristic function is to calculate misplaced for 4,5,6 tile in position of 1,2,3 tile so when I try to add the condition for head >3 it al...
[ 0.00860595703125, 0.000293731689453125, -0.00299072265625, -0.00946044921875, -0.005218505859375, -0.00634765625, -0.00262451171875, 0.01031494140625, 0.012939453125, -0.005584716796875, 0.0194091796875, -0.00179290771484375, 0.010009765625, 0.00701904296875, 0.00994873046875, -0.03051...
[ 1529, 474, 48242, 32354, 502, 4867, 44816, 2967, 133063, 128188, 617, 104629, 70, 69236, 80389, 188636, 96386, 83, 74481, 1239, 23935, 71, 100, 201, 139, 13, 19069, 25568, 363, 9790, 15190, 35431, 10336, 977, 11343, 98320 ]
[ 0.1031494140625, 0.2105712890625, 0.1842041015625, 0.166015625, 0.1268310546875, 0.1868896484375, 0.176513671875, 0.15625, 0.1009521484375, 0.1357421875, 0.109130859375, 0.193603515625, 0.01763916015625, 0.2318115234375, 0.15673828125, 0.1080322265625, 0.038238525390625, 0.00805664...
embed
75318676_c0
75318676
prolog
0
Title: Finding complement of a set in prolog Problem title: Finding complement of a set in prolog Tags: set-operations, prolog Problem: Finding complement of a set in prolog suppose i've defined three clubs in Prolog: club(football, [john, mary, peter, jane]). club(basketball, [peter, jane, tom, kim]). club(dance, [emi...
Finding complement of a set in prolog Finding complement of a set in prolog set-operations prolog Finding Finding complement of a set in prolog suppose i've defined three clubs in Prolog: now i wish to find the complement of football club from the combined three clubs (i.e answer should display [tom, kim,emily, andrew,...
[ 0.0029449462890625, 0.009033203125, 0.029541015625, -0.0034637451171875, -0.0172119140625, -0.0032196044921875, 0.0101318359375, 0.0198974609375, 0.034912109375, -0.000164031982421875, -0.005706787109375, 0.00701904296875, 0.0174560546875, -0.011474609375, -0.00408935546875, 0.00058746...
[ 26040, 110633, 111, 5423, 23, 502, 4867, 214, 10, 21473, 5256, 139124, 61924, 17262, 117406, 1250, 32599, 7413, 70, 101740, 11938, 1295, 70163, 71, 35166, 5608, 44116, 5928, 7586, 195, 20102, 2528, 434, 79, 587, 18151, 51339, 66211, 114689,...
[ 0.1461181640625, 0.292236328125, 0.102783203125, 0.2213134765625, 0.048065185546875, 0.1446533203125, 0.23046875, 0.01654052734375, 0.00750732421875, 0.147216796875, 0.011749267578125, 0.012054443359375, 0.1092529296875, 0.13720703125, 0.203857421875, 0.1187744140625, 0.0482482910156...
embed
65407935_c0
65407935
prolog
0
Title: How does unify predicate (=)/2 differ from first order equality? Problem title: How does unify predicate (=)/2 differ from first order equality? Tags: logical-purity, prolog Problem: How does unify predicate (=)/2 differ from first order equality? The tag logical purity mentions (=)/2 as pure. Is it "intrinsical...
How does unify predicate (=)/2 differ from first order equality? How does unify predicate (=)/2 differ from first order equality? logical-purity prolog first How How does unify predicate (=)/2 differ from first order equality? The tag logical purity mentions (=)/2 as pure. Is it "intrinsically" pure or "operational" pu...
[ 0.006988525390625, -0.0023345947265625, 0.028564453125, 0.01458740234375, -0.002593994140625, -0.0076904296875, -0.0048828125, -0.002532958984375, 0.01080322265625, -0.017822265625, -0.0005645751953125, 0.0255126953125, -0.019775390625, 0.001708984375, -0.00262451171875, 0.006286621093...
[ 11249, 51, 40383, 1653, 2063, 67, 78690, 12477, 129927, 1295, 5117, 12989, 28, 161789, 62775, 289, 4717, 2481, 502, 4867, 14602, 7909, 7398, 41392, 237, 34166, 442, 73, 33310, 21473, 43315, 61924, 78315, 70731, 1250, 15824, 21771, 88303, 28...
[ 0.07232666015625, 0.166748046875, 0.1953125, 0.17578125, 0.1925048828125, 0.1097412109375, 0.1302490234375, 0.270263671875, 0.2490234375, 0.09381103515625, 0.074951171875, 0.180419921875, 0.072998046875, 0.20849609375, 0.17431640625, 0.07452392578125, 0.14404296875, 0.1275634765625...
embed
17262573_c0
17262573
prolog
0
Title: Generating digits from 0 to 9 (Prolog) Problem title: Generating digits from 0 to 9 (Prolog) Tags: prolog Problem: Generating digits from 0 to 9 (Prolog) I was reading a source code of a program for solving algebrogram. A part of it is a procedure which tries out every digit from 0 to 9. This is the source code ...
Generating digits from 0 to 9 (Prolog) Generating digits from 0 to 9 (Prolog) prolog 0 Generating Prolog Generating digits from 0 to 9 (Prolog) I was reading a source code of a program for solving algebrogram. A part of it is a procedure which tries out every digit from 0 to 9. This is the source code for it: When I ru...
[ 0.0113525390625, 0.01165771484375, -0.0034332275390625, 0.0033416748046875, -0.01153564453125, 0.0225830078125, -0.001861572265625, 0.006866455078125, -0.003936767578125, -0.03369140625, -0.00830078125, -0.013916015625, -0.021240234375, 0.0098876953125, 0.015625, -0.01153564453125, 0...
[ 155370, 1916, 153939, 7, 1295, 757, 47, 483, 10752, 4867, 502, 1250, 16454, 31344, 18151, 1528, 3115, 6496, 144, 429, 6369, 25561, 2831, 50491, 1927, 1810, 11907, 3569, 70, 11675, 903, 26458, 18, 32233, 48903, 28219, 15400, 14602, 191147, ...
[ 0.18798828125, 0.0906982421875, 0.230712890625, 0.047821044921875, 0.07470703125, 0.15966796875, 0.10400390625, 0.21923828125, 0.1541748046875, 0.2088623046875, 0.126708984375, 0.163330078125, 0.062255859375, 0.1551513671875, 0.139404296875, 0.1043701171875, 0.05523681640625, 0.010...
embed
50312697_c1
50312697
prolog
1
/0], then [1/0, 0/0], and so forth. However I suspect I'm very wrong here. The trace stack fails here: Exit: (12) samecolumn(_15108/_15110, _15108/_15116) ? creep Fail: (11) not(user:samecolumn(_15048, _15054)) ? creep Clearly the problem is it uses the _15108 as the X values for same_column. I'd expect it to then try ...
/0], then [1/0, 0/0], and so forth. However I suspect I'm very wrong here. The trace stack fails here: Exit: (12) samecolumn(_15108/_15110, _15108/_15116) ? creep Fail: (11) not(user:samecolumn(_15048, _15054)) ? creep Clearly the problem is it uses the _15108 as the X values for same_column. I'd expect it to then try ...
[ 0.01361083984375, 0.007049560546875, 0.0203857421875, 0.0169677734375, -0.00848388671875, -0.005462646484375, -0.0120849609375, -0.0242919921875, -0.00323486328125, -0.01214599609375, -0.00592041015625, 0.031494140625, -0.007598876953125, -0.01116943359375, -0.0263671875, -0.0021362304...
[ 107838, 268, 7068, 68252, 757, 5, 33306, 92610, 4552, 44691, 3688, 144851, 177261, 35782, 7, 5443, 217, 23676, 5701, 8447, 316, 19, 1837, 69139, 36053, 135224, 60978, 49512, 254, 190355, 21282, 959, 65918, 40175, 132, 19236, 9285, 4, 134463...
[ 0.210205078125, 0.04437255859375, 0.007171630859375, 0.0079345703125, 0.0831298828125, 0.0155487060546875, 0.0174102783203125, 0.09375, 0.05145263671875, 0.0679931640625, 0.0738525390625, 0.259033203125, 0.2354736328125, 0.196044921875, 0.0333251953125, 0.09100341796875, 0.0841064453...
embed
41341578_c0
41341578
prolog
0
Title: Writing an adjacent procedure for graphs in prolog Problem title: Writing an adjacent procedure for graphs in prolog Tags: prolog Problem: Writing an adjacent procedure for graphs in prolog I am attempting to write a procedure that checks if 2 nodes in a graph are adjacent, or are neighbours. I'm using SWI-prolo...
Writing an adjacent procedure for graphs in prolog Writing an adjacent procedure for graphs in prolog prolog Writing Writing an adjacent procedure for graphs in prolog I am attempting to write a procedure that checks if 2 nodes in a graph are adjacent, or are neighbours. I'm using SWI-prolog. I am trying: However, this...
[ -0.009765625, 0.00848388671875, -0.006378173828125, -0.0031585693359375, -0.01263427734375, 0.01434326171875, -0.01409912109375, 0.022216796875, 0.00775146484375, -0.03662109375, -0.005584716796875, 0.015380859375, -0.012451171875, 0.00897216796875, 0.0240478515625, 0.008544921875, 0...
[ 213185, 123594, 16797, 50491, 100, 41382, 7, 23, 502, 4867, 81887, 33022, 12765, 2174, 116, 110, 988, 707, 621, 108, 6958, 38648, 159, 38969, 3454, 31577, 903, 22027, 18, 4488, 55681, 15400, 17368, 3034, 175199, 442, 2424, 1884, 8382, 150...
[ 0.1566162109375, 0.1712646484375, 0.23046875, 0.22216796875, 0.06390380859375, 0.2100830078125, 0.0596923828125, 0.0256805419921875, 0.13720703125, 0.2049560546875, 0.0283050537109375, 0.0804443359375, 0.1552734375, 0.039306640625, 0.1026611328125, 0.1298828125, 0.10888671875, 0.01...
embed
42099194_c0
42099194
prolog
0
Title: swi-prolog abs operator not working in clpfd module Problem title: swi-prolog abs operator not working in clpfd module Tags: clpfd, prolog, swi-prolog Problem: swi-prolog abs operator not working in clpfd module I am doing some toy tests with the CLPFD library in swi-prolog. Does anybody know why the program bel...
swi-prolog abs operator not working in clpfd module swi-prolog abs operator not working in clpfd module clpfd prolog swi-prolog Vars X-Y swi-prolog abs operator not working in clpfd module I am doing some toy tests with the CLPFD library in swi-prolog. Does anybody know why the program below does not work? The expected...
[ 0.007598876953125, -0.000583648681640625, 0.01080322265625, 0.0220947265625, -0.01068115234375, 0.02099609375, 0.0201416015625, 0.016357421875, 0.0191650390625, -0.0103759765625, 0.01123046875, -0.015625, 0.01123046875, 0.0194091796875, 0.0006103515625, -0.00124359130859375, 0.001251...
[ 91, 2452, 3454, 4867, 43719, 39933, 959, 20697, 23, 33139, 39557, 71, 88996, 502, 3323, 1193, 1723, 72713, 109921, 46323, 41265, 397, 35773, 3714, 15400, 1528, 35064, 14602, 4488, 84751, 35166, 4034, 1542, 76067, 990, 33000, 117414, 48716, ...
[ 0.029754638671875, 0.1875, 0.1329345703125, 0.1800537109375, 0.200927734375, 0.2271728515625, 0.08819580078125, 0.113525390625, 0.01300048828125, 0.06475830078125, 0.059539794921875, 0.094482421875, 0.1502685546875, 0.09710693359375, 0.1112060546875, 0.057861328125, 0.1002197265625, ...
embed
16957092_c0
16957092
prolog
0
Title: Split lists issue Problem title: Split lists issue Tags: list, prolog Problem: Split lists issue I have a problem in Prolog, I have a list with 81 items and I need to get just 9 items from it in different positions each time, for example if my list is: L=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18], split(L1,2...
Split lists issue Split lists issue list prolog Split N-1 Split lists issue I have a problem in Prolog, I have a list with 81 items and I need to get just 9 items from it in different positions each time, for example if my list is: My procedure is but it doesn't work.
[ -0.006866455078125, 0.006927490234375, 0.0035400390625, 0.008056640625, -0.040771484375, 0.0103759765625, -0.0133056640625, 0.0150146484375, 0.004913330078125, 0.0093994140625, 0.006866455078125, -0.0015106201171875, -0.01324462890625, 0.01373291015625, 0.0230712890625, 0.0142822265625...
[ 46474, 5303, 31089, 502, 4867, 541, 5759, 2967, 23, 1250, 765, 10, 678, 16503, 55769, 3871, 2046, 1660, 483, 1295, 12921, 19069, 12638, 1733, 2646, 50491, 83, 1284, 22027, 18, 4488 ]
[ 0.2646484375, 0.24267578125, 0.169677734375, 0.139892578125, 0.241943359375, 0.103759765625, 0.12939453125, 0.11431884765625, 0.01483154296875, 0.1776123046875, 0.017578125, 0.0401611328125, 0.03948974609375, 0.17041015625, 0.1622314453125, 0.07464599609375, 0.09613037109375, 0.094...
embed
43268111_c0
43268111
prolog
0
Title: Predicate to find occurrences of subterm in a term Problem title: Predicate to find occurrences of subterm in a term Tags: prolog Problem: Predicate to find occurrences of subterm in a term While executing the query, value of N was coming out to be 1 instead of 2: occurrences(X, s(X, t(X, Y)), N). N = 1 occurren...
Predicate to find occurrences of subterm in a term Predicate to find occurrences of subterm in a term prolog Predicate Sub Term Acc N-1 Predicate to find occurrences of subterm in a term While executing the query, value of N was coming out to be 1 instead of 2: occurrences(X, s(X, t(X, Y)), N). N = 1
[ 0.0087890625, 0.01348876953125, 0.0128173828125, 0.00384521484375, 0.005767822265625, 0.00689697265625, -0.000202178955078125, 0.019287109375, -0.00112152099609375, -0.0303955078125, 0.006866455078125, 0.01275634765625, 0.00970458984375, -0.0084228515625, 0.029296875, -0.00273132324218...
[ 7145, 2063, 67, 47, 7413, 74918, 42, 69098, 111, 153224, 39, 23, 13579, 502, 4867, 8273, 2994, 29899, 541, 5759, 71924, 41, 1294, 34292, 38162, 1810, 106, 64457, 15573, 1542, 4, 91, 808, 990, 2203 ]
[ 0.1566162109375, 0.211669921875, 0.0833740234375, 0.0152435302734375, 0.1317138671875, 0.1512451171875, 0.1484375, 0.11572265625, 0.035858154296875, 0.236083984375, 0.2103271484375, 0.04388427734375, 0.2205810546875, 0.128173828125, 0.2091064453125, 0.149169921875, 0.164306640625, ...
embed
18106182_c0
18106182
prolog
0
Title: How to calculate a sum of sequence of numbers in Prolog Problem title: How to calculate a sum of sequence of numbers in Prolog Tags: prolog, loops Problem: How to calculate a sum of sequence of numbers in Prolog The task is to calculate a sum of natural numbers from 0 to M. I wrote the following code using SWI-P...
How to calculate a sum of sequence of numbers in Prolog How to calculate a sum of sequence of numbers in Prolog prolog loops How Prolog my_sum Next How to calculate a sum of sequence of numbers in Prolog The task is to calculate a sum of natural numbers from 0 to M. I wrote the following code using SWI-Prolog: But when...
[ 0.01007080078125, 0.022216796875, 0.004486083984375, 0.0072021484375, -0.00732421875, 0.000560760498046875, 0.005828857421875, 0.0211181640625, 0.00823974609375, -0.031494140625, 0.00579833984375, 0.005767822265625, -0.00469970703125, 0.01513671875, 0.0400390625, -0.006011962890625, ...
[ 11249, 47, 74481, 67, 10554, 111, 40, 944, 3956, 101935, 23, 1250, 4867, 502, 40956, 759, 11832, 4997, 66211, 6083, 1295, 757, 276, 54397, 25632, 18151, 17368, 159, 38969, 10752, 4966, 9790, 4163, 22225, 184, 64457, 26785, 14012, 44691, 2...
[ 0.05419921875, 0.10504150390625, 0.190185546875, 0.074951171875, 0.2135009765625, 0.0858154296875, 0.045623779296875, 0.10986328125, 0.0689697265625, 0.158203125, 0.05224609375, 0.164794921875, 0.25244140625, 0.12841796875, 0.172119140625, 0.0772705078125, 0.22900390625, 0.07409667...
embed
22406099_c0
22406099
prolog
0
Title: Prolog efficiency: facts unification or list membership? Problem title: Prolog efficiency: facts unification or list membership? Tags: prolog Problem: Prolog efficiency: facts unification or list membership? Given these facts: pos(a,1). pos(b,2). pos(c,3). I want to find the position of a character. For example,...
Prolog efficiency: facts unification or list membership? Prolog efficiency: facts unification or list membership? prolog Prolog Prolog efficiency: facts unification or list membership? Given these facts: I want to find the position of a character. For example, pos(b,P) P=2. Is it better to convert these facts to a list...
[ 0.01220703125, -0.0145263671875, 0.03173828125, 0.002105712890625, -0.017333984375, -0.007476806640625, 0.0084228515625, -0.001495361328125, -0.00125885009765625, -0.00982666015625, 0.002777099609375, 0.01251220703125, 0.01556396484375, -0.0191650390625, -0.021484375, 0.008056640625, ...
[ 1250, 4867, 227066, 15824, 7, 51, 41274, 707, 5303, 209274, 502, 3444, 47, 7413, 19069, 62816, 3864, 275, 683, 436, 55257, 11522, 96760, 12765, 41591, 35829, 73342, 38280, 158, 12638, 51515, 27781, 5941, 14105, 903, 20028, 805, 1328 ]
[ 0.166015625, 0.257080078125, 0.224365234375, 0.187744140625, 0.0694580078125, 0.1605224609375, 0.1534423828125, 0.021820068359375, 0.189208984375, 0.2452392578125, 0.123291015625, 0.042449951171875, 0.0238494873046875, 0.1295166015625, 0.2041015625, 0.1849365234375, 0.1732177734375, ...
embed
13943778_c0
13943778
prolog
0
Title: Finding intersection of two set without using member function in prolog Problem title: Finding intersection of two set without using member function in prolog Tags: prolog Problem: Finding intersection of two set without using member function in prolog I am working on a function that accepts two sets and returns...
Finding intersection of two set without using member function in prolog Finding intersection of two set without using member function in prolog prolog member Finding set_int Finding intersection of two set without using member function in prolog I am working on a function that accepts two sets and returns an intersecti...
[ 0.0037841796875, 0.01409912109375, 0.029296875, 0.0235595703125, -0.00701904296875, 0.006988525390625, -0.008056640625, -0.0002498626708984375, 0.00164794921875, -0.0174560546875, 0.0177001953125, 0.033203125, 0.00139617919921875, 0.00860595703125, 0.02001953125, 0.004425048828125, 0...
[ 26040, 1940, 7, 58994, 6626, 5423, 15490, 17368, 32786, 32354, 502, 4867, 4288, 20697, 26946, 30646, 13319, 3444, 4527, 18151, 2060, 4358, 62775 ]
[ 0.118896484375, 0.1614990234375, 0.15283203125, 0.171875, 0.09716796875, 0.1971435546875, 0.08782958984375, 0.0218048095703125, 0.223388671875, 0.1435546875, 0.10791015625, 0.1783447265625, 0.166259765625, 0.013885498046875, 0.06915283203125, 0.053955078125, 0.02923583984375, 0.063...
embed
28445192_c0
28445192
prolog
0
Title: Stuck with prolog program Problem title: Stuck with prolog program Tags: prolog Problem: Stuck with prolog program So i encounter a problem with my Prolog problem. let's say you request this: ?-num(100,200). The program should return all number from this interval that can generate the number 6 from the reduction...
Stuck with prolog program Stuck with prolog program prolog Stuck Stuck with prolog program So i encounter a problem with my Prolog problem. let's say you request this: The program should return all number from this interval that can generate the number 6 from the reduction theosophique (123=1+2+3=6 so i should return 1...
[ -0.007354736328125, -0.0126953125, 0.01031494140625, -0.00933837890625, -0.002532958984375, 0.01275634765625, -0.026123046875, 0.0086669921875, 0.004425048828125, -0.0654296875, 0.01123046875, -0.00102996826171875, -0.02685546875, -0.011474609375, 0.023681640625, 0.0015411376953125, ...
[ 26085, 2594, 678, 502, 4867, 1528, 190647, 2967, 1250, 50336, 5608, 30646, 756, 14012, 1295, 903, 51514, 831, 139392, 305, 456, 77391, 70, 6781, 19379, 944, 48636, 54651, 85398, 910, 37638, 21213, 2203, 138790, 131815, 21771, 765, 74481, 98...
[ 0.1407470703125, 0.098388671875, 0.0855712890625, 0.1461181640625, 0.248291015625, 0.175048828125, 0.0885009765625, 0.1182861328125, 0.1468505859375, 0.06378173828125, 0.05560302734375, 0.1583251953125, 0.06646728515625, 0.123291015625, 0.030670166015625, 0.0323486328125, 0.189208984...
embed
52591497_c0
52591497
prolog
0
Title: Prolog Unit Tests for Non-deterministic predicates Problem title: Prolog Unit Tests for Non-deterministic predicates Tags: prolog, plunit Problem: Prolog Unit Tests for Non-deterministic predicates I am trying to use the Prolog Unit Tests from http://www.swi-prolog.org/pldoc/doc_for?object=section%28%27packages/...
Prolog Unit Tests for Non-deterministic predicates Prolog Unit Tests for Non-deterministic predicates prolog plunit Prolog Unit Tests Non-deterministic Prolog Unit Tests for Non-deterministic predicates I am trying to use the Prolog Unit Tests from http://www.swi-prolog.org/pldoc/doc_for?object=section%28%27packages/pl...
[ 0.005615234375, 0.00011873245239257812, 0.0142822265625, 0.0033721923828125, -0.007080078125, 0.0057373046875, 0.01519775390625, 0.0091552734375, 0.0020294189453125, 0.01177978515625, 0.018798828125, 0.017822265625, 0.00909423828125, 0.0186767578125, 0.0003032684326171875, 0.0141601562...
[ 1250, 4867, 46640, 8647, 100, 3775, 112, 30524, 48242, 1653, 2063, 502, 12266, 6773, 31577, 4527, 2452, 3454, 29713, 187694, 29102, 62821, 4235, 27781, 351, 1636, 5351, 109921, 756, 12830, 5303, 1193, 69112, 238, 3034, 2174, 15400, 117729, ...
[ 0.156494140625, 0.2152099609375, 0.1910400390625, 0.2061767578125, 0.0261993408203125, 0.109130859375, 0.059722900390625, 0.1593017578125, 0.0596923828125, 0.159423828125, 0.1805419921875, 0.1026611328125, 0.1065673828125, 0.159423828125, 0.023101806640625, 0.04901123046875, 0.140136...
embed
22787623_c0
22787623
prolog
0
Title: Prolog: Unification of Arithmetic Expression and Constant Problem title: Prolog: Unification of Arithmetic Expression and Constant Tags: unification, prolog Problem: Prolog: Unification of Arithmetic Expression and Constant I am trying to learn Prolog for an exam. According to my slides arithmetic expressions do...
Prolog: Unification of Arithmetic Expression and Constant Prolog: Unification of Arithmetic Expression and Constant unification prolog Prolog Unification Arithmetic Expression Constant X-1 Prolog: Unification of Arithmetic Expression and Constant I am trying to learn Prolog for an exam. According to my slides arithmeti...
[ 0.01226806640625, 0.0260009765625, 0.0172119140625, -0.006591796875, 0.01019287109375, 0.0036468505859375, -0.00665283203125, 0.0078125, 0.00005650520324707031, 0.00213623046875, -0.01129150390625, 0.002593994140625, 0.0189208984375, 0.0010986328125, 0.00946044921875, 0.002670288085937...
[ 1250, 4867, 992, 41274, 1172, 8962, 282, 25129, 148416, 51, 502, 1193, 5759, 1830, 136, 31577, 30698, 42276, 122753, 187, 9523, 125195, 54, 959, 40383, 678, 53697, 31635, 27781, 581, 757, 22027, 18, 1542, 110218, 6, 5, 68185, 154559, 2967...
[ 0.1419677734375, 0.23193359375, 0.1434326171875, 0.197265625, 0.018157958984375, 0.1533203125, 0.1019287109375, 0.131591796875, 0.154541015625, 0.1861572265625, 0.07977294921875, 0.05596923828125, 0.10723876953125, 0.0067138671875, 0.06005859375, 0.037200927734375, 0.05987548828125, ...
embed
64041180_c1
64041180
prolog
1
if __name__ == "__main__": app.run(debug=True) but cant seem to reach that function, the error in flask itself is: prologQuery() has not been defined the error in the front-end : GEThttp://127.0.0.1:5000/api/get-json [HTTP/1.0 500 INTERNAL SERVER ERROR 80ms] Cross-Origin Request Blocked: The Same Origin Policy disallo...
if __name__ == "__main__": app.run(debug=True) but cant seem to reach that function, the error in flask itself is: prologQuery() has not been defined the error in the front-end : GEThttp://127.0.0.1:5000/api/get-json [HTTP/1.0 500 INTERNAL SERVER ERROR 80ms] Cross-Origin Request Blocked: The Same Origin Policy disallo...
[ 0.0274658203125, 0.028076171875, 0.01275634765625, 0.0162353515625, -0.0038299560546875, -0.017333984375, 0.01434326171875, 0.005767822265625, 0.002044677734375, -0.056884765625, 0.0264892578125, 0.02001953125, -0.0179443359375, -0.00213623046875, 0.0164794921875, -0.00146484375, 0.0...
[ 2174, 5953, 11627, 69112, 14005, 24931, 4027, 16428, 112, 85779, 882, 13, 1284, 45767, 48903, 58359, 450, 32354, 18499, 23, 56055, 92, 68034, 83, 502, 4867, 41732, 1294, 132, 1556, 959, 2809, 61924, 71, 12912, 3611, 79794, 5475, 1530, 129...
[ 0.046417236328125, 0.0154876708984375, 0.1534423828125, 0.091552734375, 0.013916015625, 0.193603515625, 0.17041015625, 0.1495361328125, 0.152099609375, 0.29296875, 0.0675048828125, 0.010650634765625, 0.044647216796875, 0.14501953125, 0.1053466796875, 0.1693115234375, 0.03829956054687...
embed
63631488_c0
63631488
prolog
0
Title: SWI-Prolog give me False message Problem title: SWI-Prolog give me False message Tags: prolog Problem: SWI-Prolog give me False message Define a sum_threshold (List, Threshold, Sum) predicate to sum the elements of List that have a value greater than or equal to the Threshold. sum_threshold([Head | Tail], Thresh...
SWI-Prolog give me False message SWI-Prolog give me False message prolog SWI-Prolog sum_threshold Head Tail Threshold Sum Sum2 SWI-Prolog give me False message I have compiled the file on SWI-Prolog, but when I do: It gives me Why??
[ 0.014404296875, 0.0272216796875, 0.004119873046875, 0.0029449462890625, -0.0234375, 0.0050048828125, 0.024169921875, 0.005523681640625, 0.012451171875, 0.0111083984375, 0.022216796875, -0.01336669921875, -0.01483154296875, 0.00946044921875, 0.00180816650390625, 0.0267333984375, 0.021...
[ 159, 38969, 10752, 4867, 8337, 163, 22225, 184, 26008, 9, 502, 10554, 2109, 16200, 44816, 1218, 379, 36335, 304, 375, 5974, 11435, 98, 1284, 3229, 54, 1650, 76199, 44084 ]
[ 0.059967041015625, 0.2353515625, 0.1304931640625, 0.2127685546875, 0.057403564453125, 0.0926513671875, 0.1629638671875, 0.1453857421875, 0.147705078125, 0.01255035400390625, 0.11236572265625, 0.1475830078125, 0.0904541015625, 0.1124267578125, 0.116943359375, 0.0946044921875, 0.073242...
embed
57476377_c0
57476377
prolog
0
Title: Prolog: Reflect (X,Y) -&gt; (Y,X) Problem title: Prolog: Reflect (X,Y) -&gt; (Y,X) Tags: prolog Problem: Prolog: Reflect (X,Y) -> (Y,X) I am attempting to generate a second, reflected point besides the input in prolog without using Inbuilt functions (i.e. swap etc). I am unsure how to swap these without causing ...
Prolog: Reflect (X,Y) -&gt; (Y,X) Prolog: Reflect (X,Y) -&gt; (Y,X) prolog Prolog Reflect Prolog: Reflect (X,Y) -> (Y,X) I am attempting to generate a second, reflected point besides the input in prolog without using Inbuilt functions (i.e. swap etc). I am unsure how to swap these without causing infinite recursion by ...
[ 0.0206298828125, 0.013671875, 0.01611328125, -0.0037994384765625, -0.0140380859375, 0.008544921875, -0.013916015625, -0.00836181640625, -0.00927734375, -0.006591796875, 0.016357421875, 0.002593994140625, -0.0284423828125, 0.013916015625, 0.0137939453125, 0.0135498046875, 0.03125, 0...
[ 1250, 4867, 53295, 8996, 18, 1542, 1723, 5386, 4, 502, 33079, 81887, 139392, 17932, 44961, 297, 6275, 30338, 107730, 15490, 360, 978, 24908, 32354, 202317, 6097, 216806, 54241, 195625, 1830, 13204, 12638, 69407, 3789, 37842, 46348, 38496, 133...
[ 0.1644287109375, 0.2138671875, 0.2088623046875, 0.2423095703125, 0.1455078125, 0.1429443359375, 0.150634765625, 0.1041259765625, 0.026092529296875, 0.135009765625, 0.0233154296875, 0.06536865234375, 0.1373291015625, 0.173095703125, 0.267822265625, 0.1102294921875, 0.1683349609375, ...
embed
27151274_c0
27151274
prolog
0
Title: Prolog: Take the first &quot;N&quot; elements of a list Problem title: Prolog: Take the first &quot;N&quot; elements of a list Tags: list, prolog Problem: Prolog: Take the first "N" elements of a list I need to write a Prolog predicate take(L, N, L1) which succeeds if list L1 contains the first N elements of lis...
Prolog: Take the first &quot;N&quot; elements of a list Prolog: Take the first &quot;N&quot; elements of a list list prolog Prolog Take N-1 Prolog: Take the first "N" elements of a list I need to write a Prolog predicate take(L, N, L1) which succeeds if list L1 contains the first N elements of list L , in the same orde...
[ 0.00946044921875, 0.006622314453125, -0.000041484832763671875, 0.01123046875, -0.0130615234375, 0.0108642578125, -0.00106048583984375, 0.017822265625, 0.01007080078125, -0.037841796875, 0.0235595703125, -0.003814697265625, -0.01416015625, 0.005950927734375, 0.01165771484375, 0.01202392...
[ 1250, 4867, 12, 46673, 5117, 839, 1230, 80854, 5303, 502, 541, 5759, 111, 3871, 33022, 1653, 2063, 67, 5646, 866, 339, 17727, 214493, 2174, 418, 70541, 6, 5701, 12989, 1326, 2060, 20662, 10176, 10422, 7941, 1733, 116987, 7565, 73342, 4469...
[ 0.2108154296875, 0.27294921875, 0.00555419921875, 0.2100830078125, 0.1595458984375, 0.18896484375, 0.09423828125, 0.2216796875, 0.1988525390625, 0.1585693359375, 0.1893310546875, 0.181396484375, 0.0237884521484375, 0.078125, 0.1246337890625, 0.169189453125, 0.19677734375, 0.0758666...
embed
27629219_c0
27629219
prolog
0
Title: No permission to modify static procedure `(\+)/1&#x27; Problem title: No permission to modify static procedure `(\+)/1&#x27; Tags: prolog Problem: No permission to modify static procedure `(\+)/1' I have the followings: mother(grimalde). daughter(biancaneve, grimalde). love(X, Y) :- mother(X), daughter(Y, X). \+...
No permission to modify static procedure `(\+)/1&#x27; No permission to modify static procedure `(\+)/1&#x27; prolog ex.pl ERROR Scrivania ex.pl:4 Defined init.pl:242 No permission to modify static procedure `(\+)/1' I have the followings: when I run consult('ex.pl'). I get: And I don't understand why...
[ 0.0012054443359375, 0.033935546875, 0.0250244140625, -0.00732421875, -0.015869140625, 0.00958251953125, -0.02734375, 0.004547119140625, 0.0135498046875, -0.052001953125, -0.0250244140625, -0.0021514892578125, -0.0003376007080078125, 0.004119873046875, 0.0260009765625, -0.0087890625, ...
[ 438, 168081, 2811, 40383, 201939, 50491, 102817, 11583, 3768, 47, 502, 4867, 1119, 2424, 151206, 24638, 38213, 14, 75913, 617, 5983, 23, 217, 25732, 304, 41872, 765, 25632, 11675, 75463, 3355, 5, 2046, 2301, 18, 28219, 15400 ]
[ 0.1123046875, 0.2227783203125, 0.1453857421875, 0.1005859375, 0.208740234375, 0.1944580078125, 0.148681640625, 0.1561279296875, 0.0928955078125, 0.031280517578125, 0.1431884765625, 0.201171875, 0.1595458984375, 0.1959228515625, 0.089111328125, 0.0271759033203125, 0.08135986328125, ...
embed
26964782_c0
26964782
prolog
0
Title: Determining if graph is connected in prolog Problem title: Determining if graph is connected in prolog Tags: meta-predicate, transitive-closure, prolog, graph-traversal Problem: Determining if graph is connected in prolog I need to make a predicate isConnected/1 that takes a graph as an argument and determines i...
Determining if graph is connected in prolog Determining if graph is connected in prolog meta-predicate transitive-closure prolog graph-traversal Determining Determining if graph is connected in prolog I need to make a predicate isConnected/1 that takes a graph as an argument and determines if there is an undirected pat...
[ -0.0130615234375, 0.005035400390625, -0.004730224609375, 0.01416015625, -0.0145263671875, 0.0089111328125, -0.028076171875, 0.000743865966796875, -0.00531005859375, -0.0294189453125, 0.0133056640625, -0.01348876953125, -0.029052734375, 0.0093994140625, 0.005859375, 0.020751953125, -0...
[ 262, 30524, 2174, 41382, 83, 162711, 502, 4867, 23, 23550, 19714, 2063, 62621, 170224, 814, 2317, 1653, 67, 235603, 297, 11583, 10750, 83324, 51, 80581, 60875, 17721, 80836, 5303, 121303, 527, 110, 138, 201, 5608, 35782, 51515, 2967, 37317,...
[ 0.049224853515625, 0.1396484375, 0.1119384765625, 0.251953125, 0.0693359375, 0.225830078125, 0.1290283203125, 0.2174072265625, 0.0289459228515625, 0.0985107421875, 0.051422119140625, 0.1300048828125, 0.069580078125, 0.1141357421875, 0.10430908203125, 0.004425048828125, 0.102172851562...
embed
16155537_c0
16155537
prolog
0
Title: Arithmetic on Two Lists Prolog Problem title: Arithmetic on Two Lists Prolog Tags: list, prolog Problem: Arithmetic on Two Lists Prolog So I have a HW problem I've been working on for a couple days and I'm stuck on the last part. In Prolog, I'm supposed to write a function that takes in two lists ((x1, x2, …, xn...
Arithmetic on Two Lists Prolog Arithmetic on Two Lists Prolog list prolog Arithmetic Two Lists Prolog Sum Rest Ha-Hb Arithmetic on Two Lists Prolog So I have a HW problem I've been working on for a couple days and I'm stuck on the last part. In Prolog, I'm supposed to write a function that takes in two lists ((x1, x2, ...
[ 0.0172119140625, 0.009033203125, -0.000553131103515625, 0.00885009765625, -0.005767822265625, 0.016845703125, 0.004730224609375, 0.01556396484375, 0.01409912109375, -0.0133056640625, 0.01031494140625, -0.005889892578125, -0.01318359375, -0.01239013671875, -0.00836181640625, -0.00066375...
[ 8962, 282, 9523, 98, 32964, 32036, 1250, 4867, 1172, 5303, 502, 36335, 49756, 1391, 841, 275, 765, 572, 1456, 2967, 20697, 24941, 13312, 39, 179933, 4568, 2831, 134598, 33022, 32354, 51776, 23, 6626, 425, 418, 4, 1022, 304, 19, 53, 113,...
[ 0.1116943359375, 0.10308837890625, 0.12255859375, 0.08770751953125, 0.1597900390625, 0.258056640625, 0.165283203125, 0.2415771484375, 0.010101318359375, 0.266845703125, 0.1160888671875, 0.11376953125, 0.1395263671875, 0.11376953125, 0.043670654296875, 0.06732177734375, 0.022781372070...
embed
28048396_c0
28048396
prolog
0
Title: Sorting predicates Problem title: Sorting predicates Tags: prolog Problem: Sorting predicates I have this predicates, date(YYYY,MM,DD). immigrant(IdPerson,Date). and I want to know the IdPerson of the most recent immigrant. I saw the solution and I got this: most_recent_immigrant(IDPerson):- findall(immigrants1(...
Sorting predicates Sorting predicates prolog Sorting YYYY IdPerson Date most_recent_immigrant immigrants1 Data ListOfImmigrants List Sorting predicates I have this predicates, and I want to know the IdPerson of the most recent immigrant. I saw the solution and I got this: So, if I understood well this exercise, we need...
[ 0.006561279296875, -0.0230712890625, 0.007049560546875, 0.006591796875, -0.0198974609375, 0.037841796875, 0.003082275390625, 0.00299072265625, 0.0003147125244140625, -0.044677734375, 0.004669189453125, -0.01611328125, -0.0196533203125, -0.015380859375, -0.0009307861328125, -0.008544921...
[ 53666, 214, 1653, 2063, 1636, 502, 4867, 108354, 24799, 160054, 25512, 2684, 107, 16797, 464, 171359, 177705, 7, 418, 11809, 32036, 132887, 61637, 765, 903, 3444, 47, 3714, 70, 111, 17309, 24124, 29806, 2174, 217064, 5299, 81979, 3871, 1209...
[ 0.215576171875, 0.122802734375, 0.2083740234375, 0.202880859375, 0.08624267578125, 0.123046875, 0.149658203125, 0.1793212890625, 0.1656494140625, 0.2098388671875, 0.1158447265625, 0.1187744140625, 0.06280517578125, 0.15283203125, 0.082763671875, 0.1883544921875, 0.25, 0.00997924804...
embed
62725794_c0
62725794
prolog
0
Title: Creating a if else in prolog Problem title: Creating a if else in prolog Tags: prolog Problem: Creating a if else in prolog I'm trying to create a if/else verification in prolog, but actually i cant pass a parenthesis as a predicate "parameter", the code follows bellow s(Z):- si(X), vp(Y), append(X,Y,Z). si(Z):-...
Creating a if else in prolog Creating a if else in prolog prolog Creating Creating a if else in prolog I'm trying to create a if/else verification in prolog, but actually i cant pass a parenthesis as a predicate "parameter", the code follows bellow On openParent and closeParent i want to pass the parenthesis without qu...
[ 0.01080322265625, -0.0012969970703125, -0.0118408203125, 0.0203857421875, 0.0111083984375, 0.0026397705078125, 0.007415771484375, 0.02978515625, 0.0021820068359375, -0.02197265625, 0.0269775390625, -0.0033416748046875, -0.0159912109375, -0.00124359130859375, 0, 0.007476806640625, 0.0...
[ 56781, 10, 2174, 37076, 502, 4867, 1916, 23, 31577, 28282, 64, 5557, 493, 41274, 20653, 45767, 27875, 49129, 160291, 7, 237, 1653, 2063, 6276, 29089, 18151, 28960, 41566, 9803, 28636, 2517, 20903, 3444, 15490, 66747, 71924, 18499 ]
[ 0.157958984375, 0.0672607421875, 0.21142578125, 0.195068359375, 0.155517578125, 0.2376708984375, 0.015045166015625, 0.017669677734375, 0.0240478515625, 0.140869140625, 0.009002685546875, 0.1458740234375, 0.1397705078125, 0.1436767578125, 0.0125732421875, 0.0814208984375, 0.1256103515...
embed
26726691_c0
26726691
prolog
0
Title: Reasoning with Conjunctive Normal Forms Problem title: Reasoning with Conjunctive Normal Forms Tags: prolog, conjunctive-normal-form Problem: Reasoning with Conjunctive Normal Forms I have this code, which I need to translate into the CNF (this is in preparation for the exam, so not a homework!): p,q r :- q fals...
Reasoning with Conjunctive Normal Forms Reasoning with Conjunctive Normal Forms prolog conjunctive-normal-form Reasoning Conjunctive Normal Forms Reasoning with Conjunctive Normal Forms I have this code, which I need to translate into the CNF (this is in preparation for the exam, so not a homework!): Here's what I did:...
[ 0.025146484375, 0.0238037109375, -0.005126953125, 0.045166015625, 0.00482177734375, 0.008544921875, -0.0225830078125, 0.0028076171875, -0.01220703125, -0.0498046875, -0.017578125, 0.002349853515625, -0.0167236328125, 0.004486083984375, -0.0233154296875, 0.00665283203125, 0.0240478515...
[ 236267, 214, 678, 1657, 461, 8766, 4935, 28723, 15236, 502, 4867, 158, 33176, 5037, 765, 903, 18151, 3871, 3900, 19309, 3934, 313, 73493, 212485, 42276, 18244, 6777, 2071, 759, 31635, 26785, 83, 9655, 3688, 28219, 756, 24372, 162365, 2320, ...
[ 0.2154541015625, 0.124267578125, 0.152099609375, 0.04888916015625, 0.1141357421875, 0.06500244140625, 0.05938720703125, 0.1727294921875, 0.2010498046875, 0.10589599609375, 0.193115234375, 0.04833984375, 0.1839599609375, 0.20068359375, 0.04705810546875, 0.03729248046875, 0.18957519531...
embed
28784460_c0
28784460
prolog
0
Title: Swapping list prefix and suffix in Prolog Problem title: Swapping list prefix and suffix in Prolog Tags: list, prolog Problem: Swapping list prefix and suffix in Prolog I would like to make a program that swaps suffix and prefix of lists. This is expected result. ?- swap([a,b,c,d,e],[c,d],Xs). Xs = [e,c,d,a,b] ;...
Swapping list prefix and suffix in Prolog Swapping list prefix and suffix in Prolog list prolog Swapping Prolog Prefix Swapping list prefix and suffix in Prolog I would like to make a program that swaps suffix and prefix of lists. This is expected result. I am trying to solve it using a 4-tuple predicate with accumulat...
[ 0.001708984375, 0.019775390625, 0.002532958984375, -0.01141357421875, -0.021728515625, -0.010986328125, -0.0064697265625, 0.004638671875, 0.0003185272216796875, 0.028564453125, 0.004241943359375, 0.0224609375, -0.00946044921875, 0.003997802734375, 0.0228271484375, 0.0164794921875, 0....
[ 43062, 26783, 5303, 183114, 136, 133784, 425, 23, 1250, 4867, 502, 1914, 55923, 1884, 1528, 202317, 7, 111, 84751, 16750, 31577, 86869, 7306, 458, 8705, 1653, 2063, 183278, 1290, 2060 ]
[ 0.18994140625, 0.078125, 0.2115478515625, 0.27392578125, 0.0872802734375, 0.2113037109375, 0.0853271484375, 0.050811767578125, 0.1409912109375, 0.2257080078125, 0.092529296875, 0.102783203125, 0.2119140625, 0.03466796875, 0.125244140625, 0.204345703125, 0.052154541015625, 0.0141906...
embed
7923043_c0
7923043
prolog
0
Title: Where can I find a list of Prolog commands? Problem title: Where can I find a list of Prolog commands? Tags: command, tuprolog, prolog, date Problem: Where can I find a list of Prolog commands? I'm new to Prolog and trying to do a program to check if some values can be a date, but I don't know what can I do with...
Where can I find a list of Prolog commands? Where can I find a list of Prolog commands? command tuprolog prolog date Where Prolog Where can I find a list of Prolog commands? I'm new to Prolog and trying to do a program to check if some values can be a date, but I don't know what can I do with the language. I don't know...
[ 0.0269775390625, 0.003509521484375, 0.00238037109375, 0.0281982421875, 0.0020294189453125, 0.0262451171875, -0.001129150390625, 0.00823974609375, 0.00958251953125, -0.0294189453125, -0.00994873046875, -0.0159912109375, -0.004913330078125, -0.008544921875, -0.00982666015625, -0.01177978...
[ 78662, 831, 7413, 5303, 111, 1250, 4867, 75101, 7, 370, 3454, 502, 5622, 10, 3525, 1528, 12765, 2174, 142424, 186, 3714, 678, 46876, 27781, 3444, 2046, 140909, 79315, 7722, 7639, 10752, 41925, 53299, 6626, 17262, 171859, 10644, 209, 139217,...
[ 0.0615234375, 0.06292724609375, 0.1241455078125, 0.1529541015625, 0.05010986328125, 0.2032470703125, 0.27880859375, 0.2548828125, 0.12158203125, 0.1181640625, 0.1749267578125, 0.1734619140625, 0.1942138671875, 0.016510009765625, 0.0269622802734375, 0.10888671875, 0.1256103515625, 0...
embed
13042836_c0
13042836
prolog
0
Title: index of element Problem title: index of element Tags: prolog Problem: index of element I'm new to s.o and new to Prolog which is what i am working on, specifically SWI-Prolog. I am trying to do as the title says, and have gotten it to work on a 1 based list (starting at 1 instead of zero) using some methods tha...
index of element index of element prolog nth1 index of element I'm new to s.o and new to Prolog which is what i am working on, specifically SWI-Prolog. I am trying to do as the title says, and have gotten it to work on a 1 based list (starting at 1 instead of zero) using some methods that were included in the SWI-libra...
[ 0.007720947265625, -0.004425048828125, -0.0033416748046875, -0.0011444091796875, -0.01129150390625, 0.001800537109375, -0.0011749267578125, 0.0013580322265625, 0.01806640625, -0.060302734375, 0.00811767578125, -0.02001953125, -0.0203857421875, 0.00592041015625, 0.00469970703125, -0.017...
[ 63262, 111, 12830, 502, 4867, 653, 927, 418, 3525, 91, 5, 31, 1250, 20697, 159, 38969, 10752, 31577, 4488, 106, 35509, 5303, 17137, 99, 64457, 45234, 150624, 99201, 2844, 18151, 95486, 63736, 442, 1096, 434, 20, 101, 1284, 757, 54529, 4...
[ 0.2457275390625, 0.1744384765625, 0.2213134765625, 0.1358642578125, 0.2198486328125, 0.0665283203125, 0.1964111328125, 0.087646484375, 0.029144287109375, 0.035797119140625, 0.021697998046875, 0.1240234375, 0.117919921875, 0.049652099609375, 0.053192138671875, 0.2188720703125, 0.12365...
embed
5144495_c0
5144495
prolog
0
Title: Prolog and lists issue Problem title: Prolog and lists issue Tags: prolog, list Problem: Prolog and lists issue I have a problem with a small program that i made. Below is the part with the problem. failed(X, C, Y) :- registered_for( student(id(X),_,_,_,_,_), course(name(C),year(Y),_),absences(A)), A>2. count_fa...
Prolog and lists issue Prolog and lists issue prolog list Prolog registered_for count_failed Prolog and lists issue I have a problem with a small program that i made. Below is the part with the problem. The first 2 lines are working as intended. The problem is somewhere in the last. I want to add C on the list L but al...
[ 0.023681640625, 0.01043701171875, 0.00830078125, 0.019775390625, -0.0135498046875, 0.0029144287109375, -0.022216796875, 0.005645751953125, 0.025146484375, -0.05224609375, 0.01123046875, -0.0223388671875, -0.00191497802734375, 0.003662109375, -0.0032958984375, -0.016357421875, 0.00125...
[ 1250, 4867, 136, 5303, 7, 31089, 502, 189893, 2472, 54529, 120540, 297, 2967, 19336, 1528, 7228, 17336, 116, 124519, 20697, 179140, 174653, 4568, 3444, 15190, 313, 98, 70, 339, 12501, 14255, 1052, 13538, 111, 7964, 177261, 17368, 159, 38969...
[ 0.1812744140625, 0.252197265625, 0.1168212890625, 0.2379150390625, 0.083740234375, 0.19140625, 0.146728515625, 0.1978759765625, 0.037261962890625, 0.202392578125, 0.154296875, 0.012908935546875, 0.1048583984375, 0.03076171875, 0.125, 0.004669189453125, 0.017547607421875, 0.01306152...
embed
35118125_c0
35118125
prolog
0
Title: Create a rule in Prolog, cubeLess(X,B,R) which calculates the power of 3 and the remainder such that b =x3+r Problem title: Create a rule in Prolog, cubeLess(X,B,R) which calculates the power of 3 and the remainder such that b =x3+r Tags: clpfd, prolog Problem: Create a rule in Prolog, cubeLess(X,B,R) which calc...
Create a rule in Prolog, cubeLess(X,B,R) which calculates the power of 3 and the remainder such that b =x3+r Create a rule in Prolog, cubeLess(X,B,R) which calculates the power of 3 and the remainder such that b =x3+r clpfd prolog Create Prolog Create a rule in Prolog, cubeLess(X,B,R) which calculates the power of 3 an...
[ 0.0255126953125, 0.0263671875, -0.00750732421875, 0.0181884765625, 0.026123046875, 0.017578125, 0.004058837890625, -0.0172119140625, 0.0224609375, 0.00634765625, 0.00543212890625, -0.0224609375, 0.003143310546875, 0.00628662109375, 0.01190185546875, -0.004547119140625, -0.00460815429...
[ 151313, 79986, 1250, 4867, 314, 372, 68016, 7, 1542, 571, 1052, 74481, 14537, 138, 47143, 820, 876, 425, 363, 1328, 42, 23, 111, 502, 27781, 54753, 963, 5608, 16750, 627, 55257, 59121, 3647, 7225, 63527, 77495, 1193, 2740, 2389, 418 ]
[ 0.1099853515625, 0.1943359375, 0.1171875, 0.20166015625, 0.1171875, 0.0831298828125, 0.2127685546875, 0.081298828125, 0.103515625, 0.0614013671875, 0.1243896484375, 0.137451171875, 0.1650390625, 0.2147216796875, 0.127197265625, 0.094970703125, 0.107177734375, 0.0294952392578125, ...
embed
61397569_c0
61397569
prolog
0
Title: How to represent the following statement using predicate logic? Problem title: How to represent the following statement using predicate logic? Tags: logic, prolog, predicate Problem: How to represent the following statement using predicate logic? The fact that Terry is the leader of CM7 means he is either a Doct...
How to represent the following statement using predicate logic? How to represent the following statement using predicate logic? logic prolog predicate predicate How How to represent the following statement using predicate logic? The fact that Terry is the leader of CM7 means he is either a Doctor along with expertise i...
[ 0.01220703125, -0.01397705078125, -0.005615234375, 0.0291748046875, -0.00872802734375, 0.00445556640625, -0.004730224609375, 0.000797271728515625, 0.0107421875, -0.0458984375, -0.007415771484375, 0.01043701171875, -0.009765625, -0.0091552734375, 0.010009765625, 0.02490234375, 0.00842...
[ 11249, 47, 33636, 25632, 63805, 17368, 1653, 2063, 67, 62775, 502, 4867, 15824, 169589, 83, 70, 57724, 111, 44932, 966, 26950, 764, 40101, 10, 52625, 107963, 96408, 78804, 48909, 13, 47148, 80835, 305, 5369, 16981, 1022, 12535, 765, 24189, ...
[ 0.1038818359375, 0.061798095703125, 0.274658203125, 0.1380615234375, 0.1954345703125, 0.083251953125, 0.1722412109375, 0.228759765625, 0.1099853515625, 0.235595703125, 0.1463623046875, 0.2156982421875, 0.031707763671875, 0.28271484375, 0.08831787109375, 0.0528564453125, 0.22509765625...
embed
13310272_c1
13310272
prolog
1
0,400/80 * 60, 400*3/5,bus). edge(a,d,400,400/100 * 60, 400*2/5,car). edge(a,d,400,400/5 * 60, 400*0,walk). edge(a,b,1500,1500/500 * 60, 1500*1, plane). edge(a,b,1500,1500/120 * 60, 1500*3/4,train). edge(a,b,1500,1500/80 * 60, 1500*3/5,bus). edge(a,b,1500,1500/100 * 60,1500*2/5, car). edge(a,b,1500,1500/5 * 60, 1500*0,...
0,400/80 * 60, 400*3/5,bus). edge(a,d,400,400/100 * 60, 400*2/5,car). edge(a,d,400,400/5 * 60, 400*0,walk). edge(a,b,1500,1500/500 * 60, 1500*1, plane). edge(a,b,1500,1500/120 * 60, 1500*3/4,train). edge(a,b,1500,1500/80 * 60, 1500*3/5,bus). edge(a,b,1500,1500/100 * 60,1500*2/5, car). edge(a,b,1500,1500/5 * 60, 1500*0,...
[ -0.0014495849609375, -0.0021820068359375, -0.002899169921875, 0.0024871826171875, -0.00157928466796875, -0.007720947265625, -0.0225830078125, -0.009033203125, 0.0130615234375, -0.0179443359375, -0.0291748046875, -0.03173828125, -0.00193023681640625, -0.00118255615234375, -0.0009994506835...
[ 757, 4, 10700, 64, 4836, 661, 1496, 4082, 1639, 363, 12147, 4223, 194, 121303, 132, 11, 71, 83123, 304, 3284, 2389, 94449, 275, 78299, 4283, 17551, 418, 47880, 20840, 17357, 1517, 73, 2258, 238, 178692, 483, 5868, 13, 1126, 5955, 1781 ]
[ 0.1734619140625, 0.1083984375, 0.28662109375, 0.175048828125, 0.250244140625, 0.21630859375, 0.258544921875, 0.263427734375, 0.163330078125, 0.1619873046875, 0.2032470703125, 0.2242431640625, 0.1226806640625, 0.28759765625, 0.06854248046875, 0.1221923828125, 0.138427734375, 0.18066...
embed
21886252_c0
21886252
prolog
0
Title: Prolog - Multiply a matrix with a number Problem title: Prolog - Multiply a matrix with a number Tags: prolog, matrix Problem: Prolog - Multiply a matrix with a number I'm new to prolog. I have a problem: Input a matrix and multiply that matrix with 4. Here my code: make_num_matrix(N,Matrix) :- make_matrix(N,N,M...
Prolog - Multiply a matrix with a number Prolog - Multiply a matrix with a number prolog matrix Prolog Multiply make_num_matrix Matrix make_matrix make_list Rest Prolog - Multiply a matrix with a number I'm new to prolog. I have a problem: Input a matrix and multiply that matrix with 4. Here my code: In Prolog: And the...
[ -0.02587890625, 0.01116943359375, 0.020263671875, -0.003875732421875, 0.005889892578125, 0.00543212890625, -0.0252685546875, 0.0172119140625, 0.00390625, -0.0279541015625, -0.031982421875, -0.02880859375, -0.0225830078125, -0.005859375, -0.01953125, 0.0001850128173828125, 0.033447265...
[ 1250, 4867, 19335, 62479, 10, 50944, 425, 678, 14012, 20, 502, 3249, 2606, 192, 87427, 194234, 6562, 49756, 3525, 2967, 360, 7077, 136, 6024, 1398, 11853, 18151, 16750, 2301, 18, 3714, 3642, 47, 903, 594, 30607, 4358 ]
[ 0.1700439453125, 0.25341796875, 0.1231689453125, 0.1693115234375, 0.0318603515625, 0.21044921875, 0.1239013671875, 0.1376953125, 0.16357421875, 0.008941650390625, 0.134765625, 0.0953369140625, 0.1630859375, 0.0987548828125, 0.104736328125, 0.18359375, 0.136962890625, 0.135864257812...
embed
43183904_c0
43183904
prolog
0
Title: Prolog: ignore unwanted variables in the output Problem title: Prolog: ignore unwanted variables in the output Tags: prolog, swi-prolog Problem: Prolog: ignore unwanted variables in the output Is there a way to force the prolog CLI to return query results with only the variables I'm interested in? A simple examp...
Prolog: ignore unwanted variables in the output Prolog: ignore unwanted variables in the output prolog swi-prolog Prolog Prolog: ignore unwanted variables in the output Is there a way to force the prolog CLI to return query results with only the variables I'm interested in? A simple example would be: which returns bind...
[ 0.0213623046875, 0.0206298828125, -0.000698089599609375, -0.01165771484375, -0.009521484375, 0.0035552978515625, -0.0172119140625, -0.01544189453125, -0.0025482177734375, -0.01287841796875, -0.006591796875, -0.024658203125, -0.01904296875, 0.0194091796875, 0.018310546875, 0.02124023437...
[ 1250, 4867, 124962, 51, 3206, 3674, 77336, 140992, 502, 2452, 3454, 7, 3917, 47, 37772, 10927, 30646, 41, 1294, 50339, 678, 4734, 70, 87, 39, 60892, 23, 8781, 27781, 128239, 100, 756, 276, 563, 313, 418, 136, 29786, 3055, 5941, 4358, ...
[ 0.1627197265625, 0.2396240234375, 0.19775390625, 0.050994873046875, 0.10791015625, 0.0753173828125, 0.2296142578125, 0.174072265625, 0.1490478515625, 0.140869140625, 0.132080078125, 0.0032958984375, 0.053955078125, 0.0323486328125, 0.1575927734375, 0.1588134765625, 0.1617431640625, ...
embed
27180060_c0
27180060
prolog
0
Title: Prolog graph path search with cyclic path Problem title: Prolog graph path search with cyclic path Tags: path, prolog, transitive-closure, infinite-loop, cyclic-graph Problem: Prolog graph path search with cyclic path I am a complete newbie in Prolog. I am trying to figure out a problem where I need to check if ...
Prolog graph path search with cyclic path Prolog graph path search with cyclic path path prolog transitive-closure infinite-loop cyclic-graph Prolog Start End Prolog graph path search with cyclic path I am a complete newbie in Prolog. I am trying to figure out a problem where I need to check if path is present between ...
[ 0.0191650390625, 0.0036163330078125, 0.00970458984375, 0.0242919921875, -0.01165771484375, 0.008544921875, -0.0011138916015625, 0.01202392578125, 0.0014801025390625, -0.039794921875, 0.00927734375, 0.00701904296875, -0.018798828125, 0.007568359375, 0.0341796875, 0.0167236328125, 0.01...
[ 1250, 4867, 41382, 60875, 33938, 678, 187830, 238, 502, 62621, 5844, 170224, 54241, 13, 28354, 13794, 18878, 3525, 9014, 26366, 2967, 12765, 2174, 13379, 17721, 121303, 16940, 10, 18151, 7730, 47, 40956, 34831, 7225, 13204, 1653, 2063, 128405...
[ 0.15185546875, 0.2427978515625, 0.1929931640625, 0.225341796875, 0.1871337890625, 0.0819091796875, 0.19091796875, 0.0906982421875, 0.10888671875, 0.1207275390625, 0.06884765625, 0.149658203125, 0.134033203125, 0.037445068359375, 0.1475830078125, 0.05145263671875, 0.1324462890625, 0...
embed
27967268_c0
27967268
prolog
0
Title: Prolog Operator Expected Error Problem title: Prolog Operator Expected Error Tags: meta-predicate, prolog, syntax-error Problem: Prolog Operator Expected Error I have searched Prolog Operator expected error questions at stack overflow, however I can't identify the error I am getting : 4:26: Syntax error: Operato...
Prolog Operator Expected Error Prolog Operator Expected Error meta-predicate prolog syntax-error Prolog Operator Expected Error Syntax Simple Base Increment Result Head Recurse Tail Prolog Operator Expected Error I have searched Prolog Operator expected error questions at stack overflow, however I can't identify the er...
[ 0.0079345703125, -0.00127410888671875, 0.004669189453125, 0.005035400390625, -0.0034942626953125, 0.00732421875, 0.000732421875, -0.005615234375, -0.01226806640625, -0.031982421875, -0.00384521484375, -0.034912109375, -0.00165557861328125, -0.00384521484375, 0.015380859375, -0.01098632...
[ 1250, 4867, 150922, 60075, 13, 89829, 212059, 23550, 19714, 2063, 502, 6002, 86531, 188800, 19010, 60552, 44978, 8942, 107, 126684, 44816, 165428, 9927, 1218, 379, 33938, 84751, 18499, 17582, 177261, 645, 118664, 831, 18, 135812, 20949, 18151, ...
[ 0.1561279296875, 0.23046875, 0.2430419921875, 0.121337890625, 0.12353515625, 0.069580078125, 0.14599609375, 0.13134765625, 0.0809326171875, 0.08319091796875, 0.1285400390625, 0.06805419921875, 0.159912109375, 0.146728515625, 0.0787353515625, 0.0916748046875, 0.11224365234375, 0.007...
embed
29442083_c1
29442083
prolog
1
_tuna. if family_fish and size_small then species_sardine. now after i consult the file i am to assert the following: asserta(fact covering_scales). asserta(fact size_large). I am then to enter the following query: is_true(species_tuna, P). But all i get is the following error message: uncaught exception: error(existen...
_tuna. if family_fish and size_small then species_sardine. now after i consult the file i am to assert the following: asserta(fact covering_scales). asserta(fact size_large). I am then to enter the following query: is_true(species_tuna, P). But all i get is the following error message: uncaught exception: error(existen...
[ 0.041015625, 0.00653076171875, 0.02099609375, 0.02783203125, -0.031494140625, -0.0133056640625, -0.003662109375, -0.013916015625, -0.0010986328125, -0.0206298828125, 0.0205078125, 0.006317138671875, -0.01507568359375, -0.004302978515625, 0.02685546875, -0.0150146484375, -0.0013580322...
[ 42789, 2174, 14449, 84433, 13267, 69070, 7068, 114149, 4100, 30833, 75463, 11435, 237, 33657, 110965, 114700, 29256, 214, 16275, 1577, 30957, 41, 1294, 83, 9774, 16711, 3387, 436, 756, 25632, 18499, 26008, 51, 408, 46526, 131527, 116311, 1888...
[ 0.28076171875, 0.00457763671875, 0.09814453125, 0.1920166015625, 0.09564208984375, 0.1322021484375, 0.0234832763671875, 0.1998291015625, 0.1722412109375, 0.230224609375, 0.081787109375, 0.1397705078125, 0.0220489501953125, 0.1439208984375, 0.243896484375, 0.156494140625, 0.1253662109...
embed
75258580_c0
75258580
prolog
0
Title: Basic primality test predicate in Prolog Problem title: Basic primality test predicate in Prolog Tags: primality-test, prolog Problem: Basic primality test predicate in Prolog I am trying to create a predicate isPrime/1 that checks if a given number is prime or not. I have come up with the following code: primeR...
Basic primality test predicate in Prolog Basic primality test predicate in Prolog primality-test prolog Basic Prolog Y-1 Basic primality test predicate in Prolog I am trying to create a predicate isPrime/1 that checks if a given number is prime or not. I have come up with the following code: but it does not seem to wor...
[ -0.0142822265625, 0.00811767578125, 0.021484375, 0.0206298828125, 0.017578125, 0.0098876953125, 0.006072998046875, -0.0135498046875, 0.001312255859375, -0.01446533203125, 0.0057373046875, -0.0003147125244140625, -0.04150390625, -0.0137939453125, 0.01519775390625, 0.0211181640625, 0.0...
[ 91692, 29810, 134393, 3034, 1653, 2063, 67, 1250, 4867, 23, 6954, 502, 990, 5759, 28282, 83, 145111, 13, 11583, 12765, 2174, 34475, 14012, 20809, 707, 959, 25632, 18151, 4488, 136, 15400, 28960, 5665, 11343, 30646, 98320, 2499, 132, 1542, ...
[ 0.12255859375, 0.199462890625, 0.083740234375, 0.1781005859375, 0.1373291015625, 0.167236328125, 0.053192138671875, 0.150390625, 0.2210693359375, 0.013427734375, 0.12939453125, 0.0970458984375, 0.106689453125, 0.1343994140625, 0.04815673828125, 0.1307373046875, 0.1943359375, 0.1485...
embed
55359521_c0
55359521
prolog
0
Title: Type checking with Prolog Problem title: Type checking with Prolog Tags: prolog, typechecking, types Problem: Type checking with Prolog I tried to code a type checker with Prolog, but i'm a noob with Prolog, my rule doesn't work, and I don't understand why? (I already have defined facts for bool etc.) types are ...
Type checking with Prolog Type checking with Prolog prolog typechecking types Type Prolog e1:bool e2:t e3:t Cond Cons Alter Env Type checking with Prolog I tried to code a type checker with Prolog, but i'm a noob with Prolog, my rule doesn't work, and I don't understand why? (I already have defined facts for bool etc.)...
[ 0.02783203125, 0.0040283203125, -0.000614166259765625, 0.023681640625, -0.0027008056640625, 0.0019989013671875, -0.0216064453125, 0.0106201171875, -0.01312255859375, -0.034423828125, 0.00445556640625, -0.005157470703125, -0.007354736328125, -0.0130615234375, 0.01458740234375, 0.0019378...
[ 60457, 175199, 678, 1250, 4867, 502, 10644, 78292, 52895, 28, 82825, 142484, 304, 18, 363, 1657, 71, 39215, 39176, 357, 334, 37842, 18151, 12765, 56, 3522, 79986, 4488, 28219, 15400, 61924, 15824, 5303, 23, 661, 4288, 11, 4028, 4568, 1328...
[ 0.23193359375, 0.193115234375, 0.043792724609375, 0.1553955078125, 0.2171630859375, 0.1163330078125, 0.2322998046875, 0.169921875, 0.219970703125, 0.059906005859375, 0.0443115234375, 0.1597900390625, 0.0655517578125, 0.1007080078125, 0.1165771484375, 0.051849365234375, 0.005340576171...
embed
37079759_c0
37079759
prolog
0
Title: Bfs prolog program Problem title: Bfs prolog program Tags: breadth-first-search, prolog Problem: Bfs prolog program This is a BFS prolog program, when I am changing in sol which is in goal, nothing happens, display same result as rest value.correct or not? domains l=integer x=integer predicates nondeterm breadth...
Bfs prolog program Bfs prolog program breadth-first-search prolog Bfs List Bfs prolog program This is a BFS prolog program, when I am changing in sol which is in goal, nothing happens, display same result as rest value.correct or not?
[ 0.0155029296875, 0.02001953125, 0.01104736328125, 0.003875732421875, -0.03125, -0.0004673004150390625, -0.01556396484375, -0.007537841796875, -0.021728515625, -0.0157470703125, -0.00049591064453125, -0.0172119140625, -0.01251220703125, 0.00494384765625, 0.003570556640625, 0.00347900390...
[ 335, 17447, 502, 4867, 1528, 179967, 927, 13448, 271, 86250, 32036, 36381, 3229, 151134, 23, 3115, 69236, 33720, 96276, 44116, 5701, 16750, 237, 10588, 34292, 32399, 15390, 707, 959 ]
[ 0.059356689453125, 0.21826171875, 0.13427734375, 0.20947265625, 0.1820068359375, 0.1356201171875, 0.051513671875, 0.06781005859375, 0.0180816650390625, 0.177001953125, 0.1236572265625, 0.21728515625, 0.0252532958984375, 0.173828125, 0.09405517578125, 0.227783203125, 0.2314453125, 0...
embed
61690934_c0
61690934
prolog
0
Title: Implementation of Stack in SWI-Prolog Problem title: Implementation of Stack in SWI-Prolog Tags: abstract-data-type, prolog Problem: Implementation of Stack in SWI-Prolog So I have to implement an ADT, in this case a Stack in SWI-Prolog. I need help, because I'm new in this programming language, and don know how...
Implementation of Stack in SWI-Prolog Implementation of Stack in SWI-Prolog abstract-data-type prolog Implementation Stack SWI-Prolog Implementation of Stack in SWI-Prolog So I have to implement an ADT, in this case a Stack in SWI-Prolog. I need help, because I'm new in this programming language, and don know how to st...
[ 0.017822265625, 0.0186767578125, 0.0045166015625, 0.017333984375, -0.01708984375, 0.00372314453125, -0.01611328125, 0.010986328125, -0.002716064453125, -0.0284423828125, 0.0052490234375, 0.0128173828125, -0.0283203125, 0.000560760498046875, 0.00885009765625, 0.0162353515625, 0.010620...
[ 153941, 6512, 2594, 23, 159, 38969, 10752, 4867, 164789, 10135, 50986, 502, 765, 29479, 62, 41072, 9, 3871, 4358, 3525, 56037, 46876, 2301, 4034, 208124, 17198, 50828, 69829, 61924, 18507, 49814, 32354, 4488, 7332, 83, 33548, 939, 33554, 28...
[ 0.2001953125, 0.2186279296875, 0.2451171875, 0.072021484375, 0.1044921875, 0.248779296875, 0.1688232421875, 0.222900390625, 0.2059326171875, 0.0889892578125, 0.1649169921875, 0.156982421875, 0.00726318359375, 0.2149658203125, 0.1151123046875, 0.2359619140625, 0.00982666015625, 0.02...
embed
19041483_c0
19041483
prolog
0
Title: Prolog list manipulation Problem title: Prolog list manipulation Tags: prolog, list Problem: Prolog list manipulation I have a question and need someone to correct me: store(wyoming, [evan, sandra], [storybook, fiction, general]). store(brooklyn, [haas, maria], [fiction, schoolbook, religion]). store(oakland, [r...
Prolog list manipulation Prolog list manipulation prolog list Prolog Book Books Prolog list manipulation I have a question and need someone to correct me: store(wyoming, [evan, sandra], [storybook, fiction, general]). store(brooklyn, [haas, maria], [fiction, schoolbook, religion]). store(oakland, [rich, walker, dina, v...
[ 0.01483154296875, 0.002044677734375, 0.01141357421875, 0.006591796875, -0.0034942626953125, 0.0191650390625, 0.010009765625, 0.0079345703125, 0.0167236328125, -0.023681640625, 0.00701904296875, -0.00009870529174804688, 0.00848388671875, -0.01953125, 0.0111083984375, -0.0235595703125, ...
[ 1250, 4867, 5303, 45258, 1363, 502, 27432, 83266, 765, 9655, 3871, 22008, 26785, 163, 4343, 132, 5014, 306, 214, 74655, 57, 14519, 86385, 14137, 127663, 4537, 194, 172525, 12536, 528, 162, 5786, 1029, 10696, 42615, 26079, 1760, 26932, 35691...
[ 0.1829833984375, 0.292236328125, 0.25341796875, 0.2490234375, 0.054931640625, 0.1402587890625, 0.1585693359375, 0.1541748046875, 0.0191650390625, 0.06134033203125, 0.070068359375, 0.0174407958984375, 0.153076171875, 0.03460693359375, 0.23095703125, 0.008758544921875, 0.0943603515625,...
embed
69834156_c2
69834156
prolog
2
H,DX,DY,I,Mx,My). make_cols(0,_,_,_,_,_,_,_,_). make_cols(C,My,SIW,SIH,DX,DY,I,Mx,My) :- make_tiles( C,My,SIW,SIH,DX,DY,I,Mx,My), C1 is C-1, Code signals: Prolog, Put, har3.jpg, COMMENTS, PROGRAM, Such, working_directory, Harmenszoon, Rijn, Har, SIW, SIH, SIW-0, SIH-0, make_alltiles, Box, make_circles, Count, Count1, C...
H,DX,DY,I,Mx,My). make_cols(0,_,_,_,_,_,_,_,_). make_cols(C,My,SIW,SIH,DX,DY,I,Mx,My) :- make_tiles( C,My,SIW,SIH,DX,DY,I,Mx,My), C1 is C-1, Code signals: Prolog, Put, har3.jpg, COMMENTS, PROGRAM, Such, working_directory, Harmenszoon, Rijn, Har, SIW, SIH, SIW-0, SIH-0, make_alltiles, Box, make_circles, Count, Count1, C...
[ 0.0074462890625, 0.003387451171875, 0.021728515625, 0.0308837890625, 0.0031280517578125, 0.0074462890625, -0.0079345703125, -0.0146484375, 0.0177001953125, 0.01287841796875, 0.00173187255859375, 0.0032806396484375, 0.015380859375, 0.0089111328125, -0.00067138671875, -0.01416015625, -...
[ 572, 397, 1542, 43098, 568, 425, 31852, 194, 3249, 8447, 7, 2389, 441, 9902, 1456, 841, 15772, 118, 1577, 313, 418, 83, 5759, 28864, 26073, 1250, 4867, 19577, 182, 363, 25687, 31436, 33827, 59677, 62771, 20697, 80581, 30675, 1950, 18241, ...
[ 0.0982666015625, 0.033935546875, 0.1285400390625, 0.08697509765625, 0.016021728515625, 0.041900634765625, 0.1466064453125, 0.0081787109375, 0.1746826171875, 0.2008056640625, 0.1136474609375, 0.06573486328125, 0.013885498046875, 0.0794677734375, 0.0921630859375, 0.08740234375, 0.03056...
embed
36076635_c0
36076635
prolog
0
Title: Checking if graph is connected Problem title: Checking if graph is connected Tags: prolog, transitive-closure Problem: Checking if graph is connected I am checking if the graph is connected and for some reason getting false when it should be true. allConnected([]). allConnected(A|L) :- checkConnect(A,L), allConn...
Checking if graph is connected Checking if graph is connected prolog transitive-closure Checking Head Checking if graph is connected I am checking if the graph is connected and for some reason getting false when it should be true. What I'm doing for my predicate is checking if every node in allConnected([a,b,c]) is con...
[ -0.0036468505859375, -0.0103759765625, -0.0011444091796875, 0.03173828125, -0.01348876953125, 0.00433349609375, -0.0198974609375, -0.000873565673828125, -0.00074005126953125, -0.031982421875, 0.018310546875, -0.000728607177734375, -0.0086669921875, -0.00022411346435546875, -0.01721191406...
[ 38679, 214, 2174, 41382, 83, 162711, 502, 4867, 62621, 5844, 170224, 44816, 175199, 20949, 98320, 5608, 29568, 2063, 11907, 110, 112, 756, 235603, 297, 275, 238, 38496, 18499, 144851, 4358 ]
[ 0.1715087890625, 0.03985595703125, 0.1314697265625, 0.2381591796875, 0.1015625, 0.236083984375, 0.0855712890625, 0.15771484375, 0.09490966796875, 0.07843017578125, 0.143310546875, 0.1197509765625, 0.17822265625, 0.0030517578125, 0.1729736328125, 0.041229248046875, 0.1220703125, 0.0...
embed
20789772_c0
20789772
prolog
0
Title: how to serach in range in lists and binary search tree for example find(min,max,list)? Problem title: how to serach in range in lists and binary search tree for example find(min,max,list)? Tags: prolog Problem: how to serach in range in lists and binary search tree for example find(min,max,list)? please help i n...
how to serach in range in lists and binary search tree for example find(min,max,list)? how to serach in range in lists and binary search tree for example find(min,max,list)? prolog how to serach in range in lists and binary search tree for example find(min,max,list)? please help i need to search in binary search tree a...
[ 0.012939453125, 0.000598907470703125, 0.009765625, 0.00823974609375, 0.00531005859375, 0.037109375, -0.018310546875, 0.01043701171875, -0.001861572265625, -0.024658203125, 0.005218505859375, -0.01318359375, 0.01507568359375, 0.015380859375, 0.04345703125, 0.00762939453125, 0.01483154...
[ 3642, 47, 520, 934, 23, 37457, 5303, 7, 2394, 6635, 33938, 53201, 7413, 1249, 24084, 6562, 502, 4867, 136, 4358, 3871, 30646, 14012, 720, 45367, 1653, 2063, 67, 11343, 98320, 86869, 35166, 18775 ]
[ 0.07391357421875, 0.03460693359375, 0.1636962890625, 0.265380859375, 0.08587646484375, 0.2349853515625, 0.2132568359375, 0.0028076171875, 0.1260986328125, 0.099365234375, 0.197998046875, 0.192138671875, 0.149169921875, 0.1934814453125, 0.161865234375, 0.1661376953125, 0.0701293945312...
embed
10645482_c0
10645482
prolog
0
Title: override an element in a list in prolog Problem title: override an element in a list in prolog Tags: prolog, overriding, list, element Problem: override an element in a list in prolog I have the following problem: I have a list with 9 positions and I have this function putPiece(Piece, Board, Line, Column) that p...
override an element in a list in prolog override an element in a list in prolog prolog overriding list element Piece Board Line Column override an element in a list in prolog I have the following problem: I have a list with 9 positions and I have this function putPiece(Piece, Board, Line, Column) that puts a Piece in a...
[ 0.00439453125, -0.0087890625, 0.0150146484375, 0.0113525390625, -0.005340576171875, 0.0035858154296875, -0.00103759765625, 0.015869140625, 0.0166015625, 0.003326416015625, -0.03466796875, 0.013427734375, 0.0272216796875, -0.01507568359375, -0.0184326171875, 0.0016632080078125, 0.0493...
[ 645, 416, 112, 12830, 23, 5303, 502, 4867, 10374, 329, 62554, 16777, 233987, 25632, 2967, 483, 19069, 32354, 3884, 111242, 99428, 12765, 2174, 21771, 152382, 9790, 7722, 4358, 91306, 81437, 12647, 5861, 83, 93232, 45443, 95699, 34, 138518 ]
[ 0.1087646484375, 0.1700439453125, 0.0538330078125, 0.162353515625, 0.041168212890625, 0.1710205078125, 0.1431884765625, 0.2213134765625, 0.125732421875, 0.0980224609375, 0.1571044921875, 0.1544189453125, 0.1827392578125, 0.005401611328125, 0.07135009765625, 0.11083984375, 0.175903320...
embed
53767991_c0
53767991
prolog
0
Title: Binary Search Tree in Prolog Problem title: Binary Search Tree in Prolog Tags: prolog, binary-search-tree Problem: Binary Search Tree in Prolog I have to make a binary search tree using Prolog that contains the following features: insert, search, pre-order, in-order and post-order. My problem is that I don't eve...
Binary Search Tree in Prolog Binary Search Tree in Prolog prolog binary-search-tree Binary Search Tree Prolog Binary Search Tree in Prolog I have to make a binary search tree using Prolog that contains the following features: insert, search, pre-order, in-order and post-order. My problem is that I don't even know where...
[ 0.04345703125, 0.0087890625, 0.0010223388671875, -0.002593994140625, 0.0087890625, 0.0311279296875, -0.0196533203125, -0.02490234375, -0.01458740234375, -0.043701171875, -0.01495361328125, -0.0211181640625, -0.017578125, 0.0021514892578125, 0.00933837890625, 0.0111083984375, 0.008544...
[ 54092, 1294, 33086, 101344, 23, 1250, 4867, 502, 2394, 6635, 86250, 62600, 765, 3249, 33938, 53201, 17368, 70541, 25632, 66139, 183540, 479, 80596, 1305, 2967, 2301, 18, 3714, 9842, 16487, 1118, 4677, 28219, 20174, 23937, 10422, 20697, 8545, ...
[ 0.208740234375, 0.1114501953125, 0.19921875, 0.27001953125, 0.0712890625, 0.1790771484375, 0.2271728515625, 0.1480712890625, 0.2193603515625, 0.1331787109375, 0.2042236328125, 0.252685546875, 0.007537841796875, 0.05145263671875, 0.2041015625, 0.253173828125, 0.050537109375, 0.04412...
embed
38341797_c0
38341797
prolog
0
Title: Declaring symbols in Prolog Problem title: Declaring symbols in Prolog Tags: prolog Problem: Declaring symbols in Prolog I am using this code: item(one, 50, 40). item(two, 80, 70). item(three, 100, 55). item(four, 50, 45). maxMeanStudy:- findall(M,item(_,M,_),L), max_member(Max,L), writeln(Max),!. To access midd...
Declaring symbols in Prolog Declaring symbols in Prolog prolog Declaring Prolog max_member Max Name Val1 Val2 Declaring symbols in Prolog I am using this code: To access middle value of item, I have to access it using item(_,M,_) . This is OK if there are a few entries only. But if there are many entries it is difficul...
[ 0.0081787109375, -0.00286865234375, 0.0137939453125, 0.006103515625, -0.01190185546875, 0.0185546875, 0.0035858154296875, -0.00897216796875, 0.0076904296875, -0.00946044921875, 0.0262451171875, 0.0023651123046875, 0.020751953125, -0.0201416015625, 0.01611328125, 0.01055908203125, -0....
[ 25755, 320, 26582, 7, 1250, 4867, 502, 18389, 39, 27417, 9920, 15757, 4769, 418, 304, 17368, 18151, 17203, 86991, 34292, 111, 35735, 454, 594, 14315, 10846, 112820, 5941, 34844, 30957, 11907, 1733, 3917, 159978, 45646, 61475, 237, 163612, 1...
[ 0.0987548828125, 0.120849609375, 0.2342529296875, 0.0192413330078125, 0.162841796875, 0.248779296875, 0.10137939453125, 0.1424560546875, 0.07598876953125, 0.17529296875, 0.11474609375, 0.09326171875, 0.1551513671875, 0.05047607421875, 0.0679931640625, 0.0175323486328125, 0.091796875,...
embed
41522304_c0
41522304
prolog
0
Title: Polynomial multiplication in Prolog Problem title: Polynomial multiplication in Prolog Tags: polynomials, prolog, multiplication Problem: Polynomial multiplication in Prolog I tried to write a predicate that performs the multiplication of two polynomials, but work only when it receives only monomials. This is th...
Polynomial multiplication in Prolog Polynomial multiplication in Prolog polynomials prolog multiplication Polynomial Prolog Polynomial multiplication in Prolog I tried to write a predicate that performs the multiplication of two polynomials, but work only when it receives only monomials. This is the code: Code Monomial...
[ -0.0064697265625, 0.0277099609375, 0.0213623046875, 0.0166015625, -0.00830078125, 0.0191650390625, -0.01025390625, -0.01153564453125, -0.014404296875, -0.048095703125, 0.00994873046875, 0.00347900390625, -0.0196533203125, -0.01190185546875, -0.01611328125, -0.00531005859375, 0.008666...
[ 63306, 1687, 15403, 127664, 23, 1250, 4867, 35874, 502, 1363, 37842, 33022, 1653, 2063, 67, 51339, 6626, 4488, 4734, 53299, 22460, 266, 16765, 18151, 28864, 77879, 289, 997, 10827, 19335, 182867, 130373, 3714, 4358 ]
[ 0.1802978515625, 0.16259765625, 0.142333984375, 0.2210693359375, 0.05029296875, 0.154541015625, 0.245849609375, 0.166748046875, 0.1055908203125, 0.0278778076171875, 0.04302978515625, 0.05914306640625, 0.10693359375, 0.152099609375, 0.050079345703125, 0.0955810546875, 0.1181640625, ...
embed
33180517_c0
33180517
prolog
0
Title: Prolog: Build a list with repeated elements of other list Problem title: Prolog: Build a list with repeated elements of other list Tags: prolog, list Problem: Prolog: Build a list with repeated elements of other list I need construct a predicate who receive a list, check who are the repeated elements and return ...
Prolog: Build a list with repeated elements of other list Prolog: Build a list with repeated elements of other list prolog list Prolog Build rep_elements Elem Prolog: Build a list with repeated elements of other list I need construct a predicate who receive a list, check who are the repeated elements and return other l...
[ -0.00299072265625, 0.00543212890625, 0.00151824951171875, 0.021728515625, -0.0087890625, 0.022216796875, -0.00083160400390625, 0.01544189453125, 0.00592041015625, -0.042236328125, 0.00982666015625, -0.00054168701171875, -0.00518798828125, -0.0025177001953125, 0.0107421875, 0.0167236328...
[ 1250, 4867, 121137, 5303, 678, 119140, 297, 80854, 111, 3789, 502, 10958, 62766, 540, 195, 3871, 64549, 1653, 2063, 67, 2750, 53299, 12765, 621, 30646, 89536, 4034, 33976, 62822, 45646, 5036, 3642, 67229, 903, 11522, 3917, 157666 ]
[ 0.14892578125, 0.2327880859375, 0.1611328125, 0.1937255859375, 0.07513427734375, 0.2454833984375, 0.110595703125, 0.17919921875, 0.0382080078125, 0.08978271484375, 0.1064453125, 0.1778564453125, 0.15771484375, 0.05572509765625, 0.1134033203125, 0.08685302734375, 0.1358642578125, 0....
embed
37438094_c0
37438094
prolog
0
Title: Extract subterm from term&#x27;s list Problem title: Extract subterm from term&#x27;s list Tags: prolog Problem: Extract subterm from term's list my problem is probably easy to solve but today i have one of this 'poor' days. I am trying to extract host from url. Function parse_url comes from library(url). Here i...
Extract subterm from term&#x27;s list Extract subterm from term&#x27;s list prolog term Extract extract_host parse_url hostexample.org index.html Extract subterm from term's list my problem is probably easy to solve but today i have one of this 'poor' days. I am trying to extract host from url. Function parse_url comes...
[ 0.0120849609375, -0.005859375, 0.034912109375, 0.0257568359375, -0.000240325927734375, 0.00726318359375, -0.0023040771484375, -0.0040283203125, 0.00628662109375, -0.02099609375, -0.0064697265625, -0.02783203125, -0.01214599609375, 0.0091552734375, -0.00823974609375, 0.004302978515625, ...
[ 31501, 15390, 153224, 39, 1295, 13579, 3768, 5303, 502, 4867, 125663, 40294, 366, 184, 25002, 3080, 24371, 11, 33209, 1478, 63262, 7693, 2967, 83, 31895, 23468, 47, 86869, 18925, 765, 771, 748, 13312, 31577, 27980, 28670, 32497, 35773, 3235...
[ 0.1729736328125, 0.079833984375, 0.2435302734375, 0.216064453125, 0.104248046875, 0.2391357421875, 0.08502197265625, 0.165283203125, 0.1123046875, 0.1639404296875, 0.2242431640625, 0.19482421875, 0.12744140625, 0.1064453125, 0.1651611328125, 0.1279296875, 0.0819091796875, 0.1447753...
embed
767799_c0
767799
prolog
0
Title: Prolog operator precedence and rules matching Problem title: Prolog operator precedence and rules matching Tags: prolog, operator-precedence Problem: Prolog operator precedence and rules matching I have the next two facts loaded in my prolog interpreter: foo(U+V,1). foo(U*V,2). Now I try the next queries with th...
Prolog operator precedence and rules matching Prolog operator precedence and rules matching prolog operator-precedence Prolog DOES NOT Prolog operator precedence and rules matching I have the next two facts loaded in my prolog interpreter: Now I try the next queries with that results: Now I try with the next query: As ...
[ 0.0238037109375, 0.01470947265625, 0.0068359375, 0.0208740234375, -0.00457763671875, 0.004791259765625, -0.00537109375, 0.0089111328125, 0.0213623046875, -0.025390625, 0.01434326171875, -0.018310546875, 0.004608154296875, -0.01409912109375, 0.007659912109375, -0.019287109375, 0.00424...
[ 1250, 4867, 39933, 107671, 6620, 91736, 14858, 214, 502, 4692, 37534, 86725, 11737, 6626, 15824, 72367, 297, 29481, 56, 9790, 41, 10484, 50339, 1294, 189050, 45367, 53201, 125195, 187136, 26785 ]
[ 0.1624755859375, 0.25732421875, 0.2369384765625, 0.1904296875, 0.085205078125, 0.13720703125, 0.14697265625, 0.052825927734375, 0.099853515625, 0.0697021484375, 0.137451171875, 0.092529296875, 0.083740234375, 0.0268707275390625, 0.1187744140625, 0.051300048828125, 0.00067138671875, ...
embed
74415615_c1
74415615
prolog
1
not(member(Y, V)). connect(X, Y, V, [X|T]) :- flight(X,Z,_,_,_,_), not(member(Z, V)), connect(Z, Y, [Z|V], T). I'd like to now exclude certain flights based on airline. This is what I've written, but it doesn't work. Perhaps an issue with retractall/1? trip2(X, Y, A, T) :- connect2(X, Y, A, [X], T). connect2(X, Y, A, ...
not(member(Y, V)). connect(X, Y, V, [X|T]) :- flight(X,Z,_,_,_,_), not(member(Z, V)), connect(Z, Y, [Z|V], T). I'd like to now exclude certain flights based on airline. This is what I've written, but it doesn't work. Perhaps an issue with retractall/1? trip2(X, Y, A, T) :- connect2(X, Y, A, [X], T). connect2(X, Y, A, ...
[ 0.003173828125, 0.00701904296875, 0.0169677734375, 0.0118408203125, -0.0086669921875, 0.005401611328125, -0.006683349609375, 0.00390625, 0.0037078857421875, -0.01708984375, -0.002227783203125, 0.00775146484375, -0.0115966796875, -0.000514984130859375, -0.0081787109375, -0.015625, 0.0...
[ 959, 39, 27417, 1723, 310, 37067, 1542, 990, 618, 113014, 1511, 856, 384, 1884, 5036, 39041, 112, 24233, 35509, 98, 1831, 2256, 22027, 18, 4488, 41499, 238, 91569, 11583, 24745, 304, 62, 20016, 756, 59623, 157, 7341, 7413, 5584, 28864, ...
[ 0.1986083984375, 0.0222015380859375, 0.1861572265625, 0.1173095703125, 0.1568603515625, 0.208740234375, 0.0931396484375, 0.09783935546875, 0.06427001953125, 0.2027587890625, 0.0870361328125, 0.0650634765625, 0.06353759765625, 0.0399169921875, 0.0228271484375, 0.2093505859375, 0.11389...
embed
40920830_c0
40920830
prolog
0
Title: Prolog recrusive Algorithm Problem title: Prolog recrusive Algorithm Tags: recursion, algorithm, prolog Problem: Prolog recrusive Algorithm foo(0,Y,Z) :- Z is Y. foo(X,0,Z) :- Z is X. foo(X,Y,Z) :- X>=Y, M1 is X-2, foo(M1, Y, Zx), Z is Zx + Y. foo(X,Y,Z) :- Y<X, N1 is Y-3, foo(X, N1, Zx), Z is Zx + X. So this is...
Prolog recrusive Algorithm Prolog recrusive Algorithm recursion algorithm prolog Prolog Algorithm X-2 Y-3 Prolog recrusive Algorithm So this is my program and this is what i'm trying to accomplish (, ) = { ≤ 0 ≤ 0 + ( − 2, ) ≥ + (, − 3) < } Why does my program not output anything? This is what i think i'm saying - If X...
[ 0.0040283203125, -0.002593994140625, -0.002899169921875, 0.01141357421875, 0.0036773681640625, 0.01495361328125, -0.0179443359375, 0.021484375, 0.00046539306640625, 0.01202392578125, 0.0194091796875, -0.02490234375, -0.0242919921875, 0.002044677734375, 0.0164794921875, -0.0142822265625...
[ 1250, 4867, 21954, 56211, 272, 109847, 2783, 18337, 195625, 1830, 234873, 502, 1193, 5428, 990, 8316, 903, 83, 759, 1528, 2367, 31577, 163846, 237637, 757, 997, 48768, 116, 220884, 8439, 4426, 44084, 14602, 959, 140992, 23937, 5351, 54433, ...
[ 0.1634521484375, 0.2320556640625, 0.09356689453125, 0.15869140625, 0.1268310546875, 0.144287109375, 0.13037109375, 0.032470703125, 0.241455078125, 0.0142364501953125, 0.174560546875, 0.11572265625, 0.1427001953125, 0.1190185546875, 0.1844482421875, 0.153564453125, 0.009124755859375, ...
embed
18546690_c0
18546690
prolog
0
Title: Wrong start Prolog in SublimeREPL Problem title: Wrong start Prolog in SublimeREPL Tags: character, newline, prolog, sublimerepl Problem: Wrong start Prolog in SublimeREPL I want to use Prolog in SublimeREPL. I set up correctly the interpreter (swipl or gprolog) in the config file of SublimeREPL and everything w...
Wrong start Prolog in SublimeREPL Wrong start Prolog in SublimeREPL character newline prolog sublimerepl Wrong Prolog SublimeREPL Wrong start Prolog in SublimeREPL I want to use Prolog in SublimeREPL. I set up correctly the interpreter (swipl or gprolog) in the config file of SublimeREPL and everything works fine excep...
[ -0.0093994140625, 0.0031585693359375, -0.0133056640625, -0.0038604736328125, -0.020263671875, 0.00101470947265625, 0.00628662109375, 0.014404296875, -0.0006561279296875, -0.00323486328125, -0.0034637451171875, 0.0247802734375, -0.0177001953125, 0.02099609375, 0.008056640625, -0.0208740...
[ 601, 35133, 4034, 1250, 4867, 23, 8273, 150, 282, 165547, 866, 62816, 3525, 2256, 502, 117584, 2424, 4527, 5423, 26785, 29481, 56, 2452, 3454, 153837, 26818, 43240, 5885, 32, 9, 111, 13315, 8306, 7639, 16750, 1542, 33000, 24234, 60816, 53...
[ 0.003509521484375, 0.167724609375, 0.200927734375, 0.158447265625, 0.227294921875, 0.020965576171875, 0.1258544921875, 0.117431640625, 0.0836181640625, 0.1109619140625, 0.1632080078125, 0.171142578125, 0.0767822265625, 0.1171875, 0.1175537109375, 0.213623046875, 0.1595458984375, 0....
embed
42933204_c0
42933204
prolog
0
Title: What&#x27;s wrong with Prolog&#x27;s append? Problem title: What&#x27;s wrong with Prolog&#x27;s append? Tags: prolog, append Problem: What's wrong with Prolog's append? According to my university's course in logic we could expect a different outcome than defined by Prolog for the following query: append([], a, ...
What&#x27;s wrong with Prolog&#x27;s append? What&#x27;s wrong with Prolog&#x27;s append? prolog append What Prolog What's wrong with Prolog's append? According to my university's course in logic we could expect a different outcome than defined by Prolog for the following query: (which unifies for X=a ). However I don'...
[ 0.0196533203125, 0.022705078125, 0.018310546875, 0.00421142578125, -0.01336669921875, 0.010986328125, -0.004730224609375, 0.01025390625, 0.016357421875, 0.004730224609375, 0.00897216796875, -0.0206298828125, -0.022705078125, 0.0029144287109375, -0.00124359130859375, -0.00592041015625, ...
[ 4865, 3768, 7, 44691, 678, 1250, 4867, 114689, 71, 502, 152363, 15411, 62775, 5809, 41206, 12921, 184345, 3501, 61924, 25632, 41, 51, 27430, 100, 1193, 1369, 11, 18, 2046, 1300, 14578, 99, 5608, 84751, 35604, 57553, 40383, 27781, 158, 446...
[ 0.065185546875, 0.056884765625, 0.048675537109375, 0.2139892578125, 0.0888671875, 0.1761474609375, 0.2509765625, 0.249755859375, 0.2275390625, 0.1387939453125, 0.0635986328125, 0.00726318359375, 0.1142578125, 0.055328369140625, 0.1431884765625, 0.09552001953125, 0.1549072265625, 0....
embed
50898421_c0
50898421
prolog
0
Title: Why does these rules work? (finding last element in list in prolog) Problem title: Why does these rules work? (finding last element in list in prolog) Tags: prolog Problem: Why does these rules work? (finding last element in list in prolog) I am trying to understand the following set of rules, which supposed to ...
Why does these rules work? (finding last element in list in prolog) Why does these rules work? (finding last element in list in prolog) prolog Why my_list my_last Why does these rules work? (finding last element in list in prolog) I am trying to understand the following set of rules, which supposed to find the last ele...
[ 0.008056640625, 0.017333984375, 0.0079345703125, 0.0107421875, -0.002410888671875, 0.017578125, -0.00775146484375, 0.009765625, 0.0220947265625, -0.0228271484375, 0.0283203125, -0.03076171875, 0.001556396484375, 0.00518798828125, 0.01025390625, -0.002593994140625, 0.02734375, 0.016...
[ 44084, 14602, 6097, 91736, 4488, 111607, 4568, 12830, 23, 5303, 502, 4867, 759, 6562, 19777, 214, 31577, 28219, 25632, 5423, 134598, 7413, 1542, 133063, 96386, 76199, 1193, 76067, 15824, 83, 111, 2174, 4734, 3642, 17932, 79986, 33342, 114453,...
[ 0.194580078125, 0.127685546875, 0.1119384765625, 0.212890625, 0.1962890625, 0.1112060546875, 0.253173828125, 0.1873779296875, 0.03302001953125, 0.1927490234375, 0.1741943359375, 0.2265625, 0.1541748046875, 0.22021484375, 0.2464599609375, 0.00360107421875, 0.005401611328125, 0.07177...
embed
42628400_c0
42628400
prolog
0
Title: Defining a series of facts in SWI-Prolog Problem title: Defining a series of facts in SWI-Prolog Tags: prolog Problem: Defining a series of facts in SWI-Prolog Prolog newbie here; I'm trying to define multiple facts at once, but I keep getting the error below: ?- assert(robin(damian, dick)). true. ?- robin(damia...
Defining a series of facts in SWI-Prolog Defining a series of facts in SWI-Prolog prolog Defining SWI-Prolog ERROR Undefined However Defining a series of facts in SWI-Prolog Prolog newbie here; I'm trying to define multiple facts at once, but I keep getting the error below: The statements individually seem to work fine...
[ 0.01416015625, 0.00482177734375, -0.0057373046875, 0.02880859375, -0.033203125, -0.006103515625, 0.00775146484375, 0.003204345703125, 0.006866455078125, -0.003448486328125, -0.000118255615234375, 0.00830078125, -0.01904296875, 0.003997802734375, 0.0216064453125, 0.017578125, 0.032714...
[ 88606, 449, 36549, 15824, 7, 159, 38969, 10752, 4867, 23, 502, 151206, 24638, 79912, 5983, 297, 33306, 1250, 9014, 31577, 61924, 48716, 24145, 13695, 18499, 35064, 63805, 11651, 48903, 4488, 5885, 9077, 6002, 86531, 678, 5117, 13315, 151134, ...
[ 0.2169189453125, 0.0256500244140625, 0.144287109375, 0.1993408203125, 0.0689697265625, 0.080322265625, 0.206787109375, 0.1279296875, 0.1767578125, 0.01812744140625, 0.10101318359375, 0.170166015625, 0.10205078125, 0.1131591796875, 0.229248046875, 0.04180908203125, 0.0968017578125, ...
embed
10914155_c0
10914155
prolog
0
Title: A searchable Prolog language description online Problem title: A searchable Prolog language description online Tags: iso-prolog, prolog, standards Problem: A searchable Prolog language description online Is there a description of Prolog language (syntax and semantics) available online? There are a lot of referen...
A searchable Prolog language description online A searchable Prolog language description online iso-prolog prolog standards Prolog A searchable Prolog language description online Is there a description of Prolog language (syntax and semantics) available online? There are a lot of reference manuals for implementations. ...
[ 0.0361328125, 0.0279541015625, 0.006805419921875, -0.0098876953125, -0.0234375, 0.010498046875, 0.0087890625, -0.01397705078125, 0.000050067901611328125, -0.0478515625, 0.0157470703125, -0.00543212890625, -0.0169677734375, 0.0118408203125, 0.0306396484375, 0.0059814453125, 0.00094223...
[ 33938, 2886, 1250, 4867, 46876, 76811, 1118, 62, 13882, 3454, 502, 5570, 2685, 10, 111, 12654, 86531, 484, 109109, 19882, 5915, 91067, 23009, 208124, 2725, 9319, 159, 38969, 117249, 3493, 15005, 5423, 42840, 28412, 15122, 91376, 300, 26534, ...
[ 0.154296875, 0.14697265625, 0.1949462890625, 0.2900390625, 0.23876953125, 0.1966552734375, 0.20263671875, 0.01812744140625, 0.1058349609375, 0.106201171875, 0.09881591796875, 0.158447265625, 0.01568603515625, 0.008026123046875, 0.009918212890625, 0.07757568359375, 0.158935546875, 0...
embed
64723988_c0
64723988
prolog
0
Title: count number of times Y happen in fact(X,Y) in Prolog Programming Problem title: count number of times Y happen in fact(X,Y) in Prolog Programming Tags: prolog Problem: count number of times Y happen in fact(X,Y) in Prolog Programming I am new in prolog programming and I trying to experiment with it I have 2 que...
count number of times Y happen in fact(X,Y) in Prolog Programming count number of times Y happen in fact(X,Y) in Prolog Programming prolog Prolog Programming count number of times Y happen in fact(X,Y) in Prolog Programming I am new in prolog programming and I trying to experiment with it I have 2 questions suppose I h...
[ 0.034423828125, 0.00106048583984375, 0.00081634521484375, 0.025634765625, 0.00360107421875, 0.01251220703125, -0.0142822265625, -0.0086669921875, 0.0089111328125, -0.045654296875, -0.01177978515625, -0.0250244140625, -0.00506591796875, -0.00885009765625, -0.0003070831298828125, -0.0150...
[ 54529, 14012, 20028, 990, 53383, 23, 15824, 1542, 1723, 1250, 4867, 27958, 4, 502, 3525, 56037, 449, 31577, 28007, 116, 17582, 139124, 765, 284, 571, 397, 33022, 1193, 186, 111, 138, 142424, 441, 79986, 2046, 3642, 5941, 1556, 80836, 3516...
[ 0.22607421875, 0.1448974609375, 0.258544921875, 0.187255859375, 0.1722412109375, 0.05084228515625, 0.2196044921875, 0.087158203125, 0.14990234375, 0.171630859375, 0.2420654296875, 0.142822265625, 0.014129638671875, 0.122314453125, 0.04168701171875, 0.120361328125, 0.0654296875, 0.0...
embed
40852913_c0
40852913
prolog
0
Title: adding element to list multiple times prolog Problem title: adding element to list multiple times prolog Tags: prolog, list, append Problem: adding element to list multiple times prolog So here is the problem: Write a predicate triple(Xs,Ys) <- Each element in Ys is member of Xs and occurs three successive times...
adding element to list multiple times prolog adding element to list multiple times prolog prolog list append adding element to list multiple times prolog So here is the problem: Write a predicate triple(Xs,Ys) <- Each element in Ys is member of Xs and occurs three successive times in Ys Example: triple(Xs,Ys):- add(X,X...
[ 0.005645751953125, 0.004852294921875, 0.0126953125, -0.01422119140625, -0.0169677734375, 0.0189208984375, -0.0147705078125, -0.0084228515625, 0.027099609375, -0.048095703125, 0.02880859375, -0.00286865234375, 0.0037841796875, 0.0047607421875, -0.0045166015625, 0.0198974609375, 0.0246...
[ 154107, 12830, 47, 5303, 48716, 20028, 502, 4867, 114689, 71, 2967, 601, 18781, 1653, 2063, 67, 162738, 1542, 7, 1723, 98423, 990, 32786, 1193, 136, 74918, 17262, 208479, 132, 15190, 6468, 55769, 705, 133063, 96386, 866, 339, 122101, 201, ...
[ 0.144775390625, 0.1717529296875, 0.090576171875, 0.1788330078125, 0.23291015625, 0.242431640625, 0.1605224609375, 0.191162109375, 0.184326171875, 0.10888671875, 0.0841064453125, 0.000823974609375, 0.052276611328125, 0.15185546875, 0.1688232421875, 0.050384521484375, 0.25341796875, ...
embed
32804303_c0
32804303
prolog
0
Title: Artificial Intelligence propositional symbol Problem title: Artificial Intelligence propositional symbol Tags: prolog Problem: Artificial Intelligence propositional symbol If the sun shines then it is true that I get wet if it rains. If the sun shines then it is summer. It is not summer. Therefore, I get wet if ...
Artificial Intelligence propositional symbol Artificial Intelligence propositional symbol prolog Artificial Intelligence Artificial Intelligence propositional symbol If the sun shines then it is true that I get wet if it rains. If the sun shines then it is summer. It is not summer. Therefore, I get wet if the sun shine...
[ 0.0157470703125, 0.006805419921875, 0.00555419921875, 0.03173828125, -0.02880859375, 0.02783203125, -0.005828857421875, 0.0169677734375, -0.000843048095703125, -0.011962890625, -0.0032196044921875, 0.0157470703125, -0.01544189453125, 0.0033416748046875, 0.0022735595703125, 0.0346679687...
[ 231996, 157075, 89261, 289, 26582, 502, 4867, 4263, 70, 4262, 158618, 7, 7068, 29568, 450, 87, 2046, 36311, 2174, 442, 102044, 5, 83, 51065, 1650, 959, 228072, 62, 33636, 9844, 831, 40101, 707, 98320, 27781, 140526, 106, 116, 136, 1398, ...
[ 0.1817626953125, 0.1982421875, 0.320556640625, 0.150634765625, 0.310302734375, 0.09930419921875, 0.154052734375, 0.097412109375, 0.02825927734375, 0.1644287109375, 0.192626953125, 0.1077880859375, 0.052398681640625, 0.2078857421875, 0.018157958984375, 0.0870361328125, 0.107421875, ...
embed
23533281_c0
23533281
prolog
0
Title: Create a list of nodes from a graph in Prolog? Problem title: Create a list of nodes from a graph in Prolog? Tags: recursion, prolog, graph-theory, list Problem: Create a list of nodes from a graph in Prolog? I'm trying to use the information from edges in a graph. I want to create a list of nodes from the edges...
Create a list of nodes from a graph in Prolog? Create a list of nodes from a graph in Prolog? recursion prolog graph-theory list a Create Prolog List Create a list of nodes from a graph in Prolog? I'm trying to use the information from edges in a graph. I want to create a list of nodes from the edges in the graph I'm g...
[ -0.00084686279296875, 0.01806640625, 0.0030364990234375, 0.002288818359375, 0.004302978515625, 0.002410888671875, -0.0205078125, 0.014892578125, 0.01434326171875, -0.036865234375, -0.00860595703125, -0.052490234375, -0.02392578125, 0.0038299560546875, 0.0152587890625, 0.010498046875, ...
[ 151313, 5303, 111, 110, 988, 1295, 41382, 23, 1250, 4867, 195625, 1830, 502, 2347, 30675, 32036, 31577, 4527, 4677, 121303, 3444, 28282, 34475, 3647, 7225, 6528, 54, 51359, 4488, 10002, 3525, 4358 ]
[ 0.1341552734375, 0.1824951171875, 0.0546875, 0.173828125, 0.1871337890625, 0.14599609375, 0.2108154296875, 0.043670654296875, 0.1455078125, 0.2242431640625, 0.1221923828125, 0.002044677734375, 0.08929443359375, 0.028839111328125, 0.0214996337890625, 0.1810302734375, 0.04058837890625,...
embed
75129310_c0
75129310
prolog
0
Title: Prolog : Never Ending Process Problem title: Prolog : Never Ending Process Tags: prolog, prolog-toplevel Problem: Prolog : Never Ending Process I am trying to use get_coeff_value() but the process never end. get_coeff_value(Val,[],[]). get_coeff_value(Val, [X|T],Coeff_List):- get_coeff_value(Val,T,Coeff_List1), ...
Prolog : Never Ending Process Prolog : Never Ending Process prolog prolog-toplevel Prolog Never Ending Process get_coeff_value Val Coeff_List Coeff_List1 get_val Coeff insert_end Prolog : Never Ending Process I am trying to use get_coeff_value() but the process never end. command : get_coeff_value('H', ['H'-5, 'C'-2], ...
[ -0.01165771484375, 0.018798828125, 0.0014801025390625, 0.00115203857421875, -0.011962890625, 0.001312255859375, -0.006591796875, -0.002197265625, 0.0208740234375, -0.0303955078125, 0.01806640625, -0.00145721435546875, 0.00506591796875, -0.01275634765625, -0.00762939453125, 0.0036163330...
[ 1250, 4867, 89726, 357, 6238, 123996, 502, 13784, 67919, 2046, 587, 68053, 27494, 4769, 1311, 154663, 418, 1405, 183540, 3611, 31577, 4527, 9433, 8306, 3564, 75101, 841, 10342, 90173, 37842, 169123, 44116, 16750, 35166, 89289, 100, 7279 ]
[ 0.1258544921875, 0.2200927734375, 0.0902099609375, 0.09759521484375, 0.1756591796875, 0.1646728515625, 0.0853271484375, 0.0447998046875, 0.1202392578125, 0.0789794921875, 0.08697509765625, 0.256591796875, 0.1778564453125, 0.1683349609375, 0.083740234375, 0.1529541015625, 0.0066223144...
embed
8423308_c0
8423308
prolog
0
Title: How do you find missing number in list? Problem title: How do you find missing number in list? Tags: prolog Problem: How do you find missing number in list? Say I have a List [1,2,4,5], I would like to have a predicate that returns 3 as the missing element. You can assuming that the input list is always sorted s...
How do you find missing number in list? How do you find missing number in list? prolog How missing_number ListToBeChecked ListToBeCompared MissingNum Head Tail Rest Number Node How do you find missing number in list? Say I have a List [1,2,4,5], I would like to have a predicate that returns 3 as the missing element. Yo...
[ -0.0135498046875, 0.006683349609375, 0.019287109375, 0.00677490234375, -0.00604248046875, 0.0341796875, -0.003509521484375, 0.01251220703125, 0.0079345703125, -0.0191650390625, 0.01422119140625, -0.0108642578125, -0.0162353515625, 0.0247802734375, 0.005859375, -0.00156402587890625, 0...
[ 11249, 54, 398, 7413, 132283, 14012, 23, 5303, 502, 4867, 2606, 1297, 32036, 7763, 6766, 202567, 108161, 11, 16771, 214, 839, 316, 44816, 1218, 379, 49756, 103332, 438, 112, 765, 133063, 80389, 2806, 1884, 1653, 2063, 67, 30646, 138, 237,...
[ 0.1021728515625, 0.04266357421875, 0.017425537109375, 0.1697998046875, 0.276123046875, 0.242431640625, 0.1142578125, 0.2357177734375, 0.059844970703125, 0.1009521484375, 0.1851806640625, 0.145263671875, 0.18701171875, 0.0389404296875, 0.0162200927734375, 0.1279296875, 0.0609436035156...
embed
16265203_c0
16265203
prolog
0
Title: Clp ECLiPSe Prolog Dynamic Constraint Problem title: Clp ECLiPSe Prolog Dynamic Constraint Tags: dynamic, eclipse-clp, prolog Problem: Clp ECLiPSe Prolog Dynamic Constraint I have this constraint: B #> P1*V1 + P2*V2 + P3*V3+ P4*V4 + P5*V5 + P6*V6 +P7*V7 + P8*V8 + P9*V9 + P10*V10 with P=[1,2,3,4,5,6,7,8,9,10] and...
Clp ECLiPSe Prolog Dynamic Constraint Clp ECLiPSe Prolog Dynamic Constraint dynamic eclipse-clp prolog Clp ECLiPSe Prolog Dynamic Constraint P10 V10 V::0..1 Clp ECLiPSe Prolog Dynamic Constraint I have this constraint: with P=[1,2,3,4,5,6,7,8,9,10] and V=[V1,V2,V3,....], V::0..1 I want implement this constraint in dyna...
[ 0.00909423828125, 0.00238037109375, 0.006561279296875, 0.0133056640625, 0.00171661376953125, -0.005828857421875, -0.03759765625, 0.00921630859375, 0, -0.06201171875, 0.00081634521484375, 0.006927490234375, 0.006011962890625, -0.005950927734375, 0.005096435546875, 0.00262451171875, 0....
[ 313, 26775, 59947, 9506, 9059, 13, 1250, 4867, 73327, 21068, 1657, 2816, 4288, 84079, 28, 106371, 184, 502, 436, 963, 310, 53861, 418, 765, 158, 133063, 80389, 136555, 145180, 856, 304, 363, 12, 3444, 29479, 903, 3917, 678, 541, 80854, ...
[ 0.050048828125, 0.2119140625, 0.10205078125, 0.162353515625, 0.1265869140625, 0.138671875, 0.177978515625, 0.2030029296875, 0.1732177734375, 0.069091796875, 0.154052734375, 0.2158203125, 0.137939453125, 0.1971435546875, 0.01177978515625, 0.1922607421875, 0.0877685546875, 0.10314941...
embed
30698619_c0
30698619
prolog
0
Title: SWI Prolog pass a goal with non-zero arity through the command line arguments Problem title: SWI Prolog pass a goal with non-zero arity through the command line arguments Tags: bash, logic-programming, prolog, swi-prolog Problem: SWI Prolog pass a goal with non-zero arity through the command line arguments SWI P...
SWI Prolog pass a goal with non-zero arity through the command line arguments SWI Prolog pass a goal with non-zero arity through the command line arguments bash logic-programming prolog swi-prolog SWI Prolog consultingfile.pl SWI Prolog pass a goal with non-zero arity through the command line arguments SWI Prolog allow...
[ 0.002593994140625, 0.02685546875, -0.0201416015625, -0.005767822265625, -0.0255126953125, 0.0035400390625, 0.00592041015625, -0.0035247802734375, -0.00830078125, -0.0211181640625, 0.0185546875, 0.0211181640625, -0.01470947265625, 0.0032958984375, 0.0068359375, -0.00188446044921875, 0...
[ 159, 38969, 1250, 4867, 27875, 69236, 678, 351, 80510, 187, 2481, 8305, 75101, 13315, 10750, 87109, 62775, 28966, 502, 91, 2452, 3454, 75463, 29822, 114864, 71924, 8108, 2663, 17366, 45234, 3229, 1653, 2063, 58735, 28960, 76199, 18499, 5608, ...
[ 0.06915283203125, 0.228271484375, 0.1553955078125, 0.214599609375, 0.157958984375, 0.2435302734375, 0.0819091796875, 0.1854248046875, 0.196533203125, 0.192138671875, 0.170166015625, 0.0438232421875, 0.1673583984375, 0.1220703125, 0.19091796875, 0.1163330078125, 0.09771728515625, 0....
embed
55679316_c0
55679316
prolog
0
Title: How to call a predicate from another predicate - Prolog Problem title: How to call a predicate from another predicate - Prolog Tags: predicate, prolog Problem: How to call a predicate from another predicate - Prolog I have this predicate: start:- write(‘Type your numbers:’), read(L1), call(oc([L1],N)). % Point 1...
How to call a predicate from another predicate - Prolog How to call a predicate from another predicate - Prolog predicate prolog another How Prolog Type Point How to call a predicate from another predicate - Prolog I have this predicate: oc is another predicate like this: How can I do this? When I am at Point 1 and use...
[ -0.002044677734375, 0.0113525390625, -0.019775390625, 0.00555419921875, 0.000904083251953125, 0.00162506103515625, 0.00836181640625, -0.0052490234375, 0.0169677734375, -0.0576171875, 0.00124359130859375, -0.0019378662109375, -0.00677490234375, -0.011962890625, 0.02392578125, -0.0257568...
[ 11249, 47, 11782, 1653, 2063, 67, 1295, 15700, 1250, 4867, 10, 502, 60457, 41097, 44043, 1884, 831, 106, 34292, 339, 418, 77336, 959, 20697, 11675, 18151, 29568, 32354, 51042, 27875, 4343 ]
[ 0.073974609375, 0.002777099609375, 0.226318359375, 0.1767578125, 0.2225341796875, 0.0950927734375, 0.183837890625, 0.142822265625, 0.11279296875, 0.1876220703125, 0.028076171875, 0.08251953125, 0.1038818359375, 0.1229248046875, 0.201171875, 0.03424072265625, 0.001495361328125, 0.00...
embed
67010370_c1
67010370
prolog
1
1], L1). delete(X, [Y|L], [Y|L1]):-delete(X,L,L1). % this predicate check if a element respect a criteria goal([],_). goal([Criteria|Cs],Element) :- criteria(Criteria,Element), goal(Cs,Element). :- dynamic criteria/2. criteria(blue,(car(Color, _))) :- Color = blue, car(Color, _). criteria(price,(car(_, Price))) :- Pric...
1], L1). delete(X, [Y|L], [Y|L1]):-delete(X,L,L1). % this predicate check if a element respect a criteria goal([],_). goal([Criteria|Cs],Element) :- criteria(Criteria,Element), goal(Cs,Element). :- dynamic criteria/2. criteria(blue,(car(Color, _))) :- Color = blue, car(Color, _). criteria(price,(car(_, Price))) :- Pric...
[ 0.006591796875, 0.008544921875, -0.00872802734375, 0.00848388671875, 0.00982666015625, 0.0113525390625, -0.005157470703125, 0.0130615234375, 0.029052734375, -0.037353515625, 0.018798828125, 0.00113677978515625, -0.01953125, -0.0174560546875, 0.02294921875, 0.00897216796875, 0.0145874...
[ 106, 268, 339, 17727, 154109, 1542, 1723, 866, 76172, 8520, 67, 132, 5, 1745, 903, 1653, 2063, 12765, 2174, 12830, 15072, 55738, 11, 69236, 194, 416, 26206, 441, 19929, 84079, 12477, 143802, 3284, 10625, 1484, 51193, 57571, 2258, 5293, 48...
[ 0.06951904296875, 0.005340576171875, 0.0914306640625, 0.0950927734375, 0.25830078125, 0.1263427734375, 0.06005859375, 0.09716796875, 0.071533203125, 0.2086181640625, 0.1787109375, 0.061737060546875, 0.004486083984375, 0.054443359375, 0.0222015380859375, 0.1456298828125, 0.17321777343...
embed
44099222_c0
44099222
prolog
0
Title: Code difference in Prolog Problem title: Code difference in Prolog Tags: prolog Problem: Code difference in Prolog What exactly is making these two seemingly identical pieces of code behave differently. My guess is I'm not taking a fundamental Prolog concept into account. % creates list from X to Y (integers) in...
Code difference in Prolog Code difference in Prolog prolog X Prolog Code difference in Prolog What exactly is making these two seemingly identical pieces of code behave differently. My guess is I'm not taking a fundamental Prolog concept into account. The output from this is as desired, an interval with specific endpoi...
[ 0.014892578125, 0.00145721435546875, 0.01068115234375, 0.0235595703125, -0.0027618408203125, 0.017822265625, -0.004150390625, 0.0037384033203125, 0.006011962890625, 0.0013885498046875, 0.01104736328125, 0.0042724609375, -0.0157470703125, 0.010498046875, 0.024658203125, 0.0079345703125,...
[ 28864, 60212, 1250, 4867, 23, 502, 1193, 66161, 20662, 6097, 6626, 48903, 31943, 6827, 126371, 18151, 186, 68991, 12921, 57767, 20531, 23755, 15426, 140992, 237, 104851, 51514, 29458, 3564, 38496, 63847, 16195, 933, 16750, 13538, 7077 ]
[ 0.1878662109375, 0.228515625, 0.1650390625, 0.2166748046875, 0.030426025390625, 0.10888671875, 0.14111328125, 0.01007080078125, 0.06329345703125, 0.02093505859375, 0.076416015625, 0.064208984375, 0.10107421875, 0.080810546875, 0.0921630859375, 0.167724609375, 0.0222320556640625, 0....
embed
30351916_c1
30351916
prolog
1
iddle, Visited)), pathloop(Middle, End, [Middle|Visited], PathRest), Path = [Start|PathRest]. can_call(PersonA, PersonB, Route) :- telephone(_-Area1-_, name(PersonA, _)), telephone(_-Area2-_, name(PersonB, _)), pathloop(Area1, Area2,_, Route). Everything runs except pathloop the base runs but the recursive one must to ...
iddle, Visited)), pathloop(Middle, End, [Middle|Visited], PathRest), Path = [Start|PathRest]. can_call(PersonA, PersonB, Route) :- telephone(_-Area1-_, name(PersonA, _)), telephone(_-Area2-_, name(PersonB, _)), pathloop(Area1, Area2,_, Route). Everything runs except pathloop the base runs but the recursive one must to ...
[ 0.0296630859375, 0.01544189453125, 0.0274658203125, 0.037841796875, 0.00616455078125, 0.0189208984375, -0.0123291015625, -0.00188446044921875, 0.0208740234375, -0.052001953125, 0.0091552734375, 0.0216064453125, -0.016357421875, 0.029541015625, 0.017333984375, -0.0184326171875, 0.0168...
[ 3447, 19298, 98684, 297, 60875, 28354, 532, 18878, 65331, 14, 3674, 108421, 1052, 525, 2203, 126597, 10519, 831, 85763, 160054, 284, 15270, 571, 106015, 203599, 1283, 20268, 9351, 18504, 247, 79200, 304, 171581, 127877, 40494, 3647, 1284, 195...
[ 0.09619140625, 0.225830078125, 0.1793212890625, 0.11767578125, 0.2183837890625, 0.273193359375, 0.039459228515625, 0.1253662109375, 0.0841064453125, 0.057861328125, 0.0855712890625, 0.2108154296875, 0.05279541015625, 0.1103515625, 0.0258941650390625, 0.09820556640625, 0.10791015625, ...
embed
34680535_c0
34680535
prolog
0
Title: Using Prolog to process a list Problem title: Using Prolog to process a list Tags: list, prolog Problem: Using Prolog to process a list I have a problem in Prolog. Consider a list where each element is referring to a position/location in the same list. I want to write a program which returns true if I start with...
Using Prolog to process a list Using Prolog to process a list list prolog Using Prolog Head1 Tail1 Var1 Using Prolog to process a list I have a problem in Prolog. Consider a list where each element is referring to a position/location in the same list. I want to write a program which returns true if I start with the sam...
[ 0.00482177734375, 0.0052490234375, 0.003936767578125, 0.0076904296875, -0.017822265625, 0.0030670166015625, 0.0047607421875, 0.0177001953125, 0.0164794921875, -0.03076171875, 0.0174560546875, 0.03125, -0.007293701171875, 0.000926971435546875, 0.0086669921875, -0.0054931640625, 0.0187...
[ 345, 1250, 4867, 9433, 5303, 10, 502, 44816, 418, 1218, 379, 3323, 2967, 23, 137399, 12638, 12830, 15005, 2852, 19069, 87632, 5701, 3444, 33022, 1528, 30646, 29568, 2174, 4034, 678, 31913, 3564, 8337, 7413, 9, 7, 363, 216969, 76172, 77495...
[ 0.0706787109375, 0.187744140625, 0.263427734375, 0.1785888671875, 0.2294921875, 0.012237548828125, 0.14697265625, 0.130859375, 0.052703857421875, 0.06524658203125, 0.054779052734375, 0.145263671875, 0.10528564453125, 0.0618896484375, 0.03814697265625, 0.041229248046875, 0.15454101562...
embed
40165838_c0
40165838
prolog
0
Title: How to read data from file into Prolog Problem title: How to read data from file into Prolog Tags: wumpus-world, prolog Problem: How to read data from file into Prolog I am using SWI-Prolog to create a Wumpus World project. I am supposed to read the locations of the gold, pits, and the Wumpus from a .txt file th...
How to read data from file into Prolog How to read data from file into Prolog wumpus-world prolog file How Prolog GOLD WUMPUS PIT How to read data from file into Prolog I am using SWI-Prolog to create a Wumpus World project. I am supposed to read the locations of the gold, pits, and the Wumpus from a .txt file that loo...
[ 0.020751953125, 0.000713348388671875, -0.01336669921875, 0.0225830078125, -0.0093994140625, 0.01104736328125, 0.01361083984375, -0.000457763671875, -0.00860595703125, -0.0390625, -0.00098419189453125, -0.005035400390625, -0.0306396484375, -0.057373046875, 0.009033203125, -0.00836181640...
[ 11249, 12301, 2053, 1295, 11435, 3934, 1250, 4867, 47, 148, 316, 7332, 32554, 502, 213865, 601, 149101, 8762, 436, 6371, 159, 38969, 10752, 28282, 6661, 13452, 134598, 31913, 86761, 13380, 124326, 33342, 34153, 135812, 36746, 5117, 14012, 424...
[ 0.0567626953125, 0.2310791015625, 0.1690673828125, 0.1466064453125, 0.2125244140625, 0.1875, 0.1754150390625, 0.238525390625, 0.008148193359375, 0.0267181396484375, 0.1029052734375, 0.199462890625, 0.1065673828125, 0.1468505859375, 0.196044921875, 0.057373046875, 0.0794677734375, 0...
embed
16569901_c1
16569901
prolog
1
2(List, Rest). /* GENERAL CASE: A moves list can be a single move followed by a list of moves. The difference of List1 and Rest is a valid move if it is TRUE that: the difference between List1 and List 2 is a step the difference between List2 and Rest is a move */ move2(List1, Rest) :- step2(List1, List2), move2(List2,...
2(List, Rest). /* GENERAL CASE: A moves list can be a single move followed by a list of moves. The difference of List1 and Rest is a valid move if it is TRUE that: the difference between List1 and List 2 is a step the difference between List2 and Rest is a move */ move2(List1, Rest) :- step2(List1, List2), move2(List2,...
[ -0.002899169921875, 0.000274658203125, 0.0091552734375, 0.033935546875, 0.015869140625, 0.044677734375, -0.0142822265625, 0.017822265625, 0.05029296875, 0.006011962890625, 0.00494384765625, 0.01007080078125, -0.00433349609375, 0.01470947265625, -0.01251220703125, 0.00168609619140625, ...
[ 116, 154663, 49756, 210557, 25813, 7, 5303, 831, 186, 11001, 134629, 60212, 32036, 418, 136, 10, 35604, 149842, 17721, 29954, 304, 10461, 1653, 2063, 125663, 2037, 707, 34695, 1295, 1052, 525, 29481, 91084, 6097, 79986, 6868, 26389, 5122, 2...
[ 0.1729736328125, 0.2147216796875, 0.243408203125, 0.1612548828125, 0.1981201171875, 0.060821533203125, 0.2159423828125, 0.0430908203125, 0.019683837890625, 0.1080322265625, 0.051605224609375, 0.182861328125, 0.2164306640625, 0.0823974609375, 0.043609619140625, 0.1185302734375, 0.1721...
embed
3576166_c0
3576166
prolog
0
Title: Hello world in Prolog Problem title: Hello world in Prolog Tags: read-eval-print-loop, prolog Problem: Hello world in Prolog I'm tearing my hair out trying to find how to just write a Hello World program in Prolog. I just want to create a program that runs like so: > ./hw Hello, world! > The problem is that ever...
Hello world in Prolog Hello world in Prolog read-eval-print-loop prolog Hello Prolog hello_world Yes World Hello world in Prolog I'm tearing my hair out trying to find how to just write a Hello World program in Prolog. I just want to create a program that runs like so: The problem is that every single example I can fin...
[ 0.01953125, -0.004150390625, 0.0169677734375, 0.007537841796875, -0.01507568359375, 0.021240234375, 0.006866455078125, -0.0203857421875, 0.020263671875, -0.036865234375, -0.0152587890625, -0.023681640625, -0.017333984375, -0.003936767578125, 0.00946044921875, -0.018798828125, -0.0035...
[ 35378, 8999, 23, 1250, 4867, 12301, 13, 1405, 35662, 28354, 502, 33600, 31, 32554, 32635, 6661, 24887, 33022, 1528, 3444, 28282, 127877, 1884, 221, 2967, 11907, 11001, 27781, 7413, 43240, 9069, 21130, 5701, 36069, 4527, 180300, 4717, 46876, ...
[ 0.2236328125, 0.2091064453125, 0.07891845703125, 0.2017822265625, 0.2578125, 0.1434326171875, 0.019683837890625, 0.1990966796875, 0.162353515625, 0.1878662109375, 0.1368408203125, 0.135498046875, 0.1732177734375, 0.1539306640625, 0.122802734375, 0.2174072265625, 0.101318359375, 0.1...
embed
72850634_c0
72850634
prolog
0
Title: Match anything except if a negative rule matches Problem title: Match anything except if a negative rule matches Tags: dcg, prolog Problem: Match anything except if a negative rule matches I have a rule that matches bc . When I encounter that in a string, I don't want to parse that string, otherwise parse anythi...
Match anything except if a negative rule matches Match anything except if a negative rule matches dcg prolog Match Prolog not_bc Match anything except if a negative rule matches I have a rule that matches bc . When I encounter that in a string, I don't want to parse that string, otherwise parse anything else. Simplifie...
[ 0.0162353515625, 0.00177764892578125, 0.0011749267578125, 0.0084228515625, 0.01141357421875, 0.0205078125, 0.033447265625, 0.0087890625, 0.0341796875, -0.003936767578125, -0.029296875, -0.018310546875, 0.008056640625, -0.00098419189453125, 0.00958251953125, -0.004302978515625, 0.0005...
[ 67407, 23937, 40494, 2174, 40907, 79986, 14858, 90, 104, 238, 177, 502, 4867, 1250, 959, 65037, 190647, 450, 79315, 2301, 18, 3444, 366, 184, 2967, 219736, 51347, 178851, 194927, 47, 391, 56367, 84420, 22829, 20697 ]
[ 0.23193359375, 0.142578125, 0.12744140625, 0.0697021484375, 0.187255859375, 0.185791015625, 0.18798828125, 0.106201171875, 0.008392333984375, 0.0118408203125, 0.0830078125, 0.104248046875, 0.214599609375, 0.13427734375, 0.0985107421875, 0.15869140625, 0.1116943359375, 0.00381469726...
embed
35961884_c0
35961884
prolog
0
Title: How to use VSProlog in Visual Studio 2015? Problem title: How to use VSProlog in Visual Studio 2015? Tags: visual-studio, prolog, vsprolog Problem: How to use VSProlog in Visual Studio 2015? I have installed the VSProlog extension in my Visual Studio 2015, from here: https://visualstudiogallery.msdn.microsoft.co...
How to use VSProlog in Visual Studio 2015? How to use VSProlog in Visual Studio 2015? visual-studio prolog vsprolog How VSProlog Visual Studio How to use VSProlog in Visual Studio 2015? I have installed the VSProlog extension in my Visual Studio 2015, from here: https://visualstudiogallery.msdn.microsoft.com/50f0f293-b...
[ 0.0181884765625, 0.0057373046875, 0.01104736328125, 0.0167236328125, -0.0155029296875, 0.025390625, -0.007110595703125, 0.005126953125, -0.00592041015625, -0.0279541015625, 0.01220703125, -0.000171661376953125, -0.00836181640625, -0.0042724609375, 0.001739501953125, -0.0018234252929687...
[ 11249, 47, 4527, 44160, 10752, 4867, 23, 73372, 22968, 918, 21176, 52629, 502, 81, 47606, 14071, 20600, 111938, 24635, 1824, 151570, 138410, 119296, 19279, 128872, 114419, 225081, 37202, 5885, 28282, 8781, 5, 2424, 1686, 11435, 42724, 46568, ...
[ 0.06988525390625, 0.034332275390625, 0.1334228515625, 0.1910400390625, 0.192138671875, 0.25634765625, 0.05718994140625, 0.19140625, 0.20068359375, 0.223388671875, 0.12451171875, 0.135009765625, 0.153076171875, 0.0860595703125, 0.0684814453125, 0.189697265625, 0.0966796875, 0.140502...
embed
27210472_c0
27210472
prolog
0
Title: How do I check if the first occurrence of a number equals to x? Problem title: How do I check if the first occurrence of a number equals to x? Tags: nested-lists, recursion, list, prolog Problem: How do I check if the first occurrence of a number equals to x? I'm am trying to find a way to check if the first fir...
How do I check if the first occurrence of a number equals to x? How do I check if the first occurrence of a number equals to x? nested-lists recursion list prolog How How do I check if the first occurrence of a number equals to x? I'm am trying to find a way to check if the first first a number in a nested list equals ...
[ -0.01446533203125, 0.00921630859375, -0.00115203857421875, 0.01123046875, 0.006561279296875, 0.0185546875, 0.0008544921875, -0.00848388671875, 0.01416015625, -0.033203125, 0.00537109375, -0.00897216796875, -0.0166015625, -0.0062255859375, 0.0181884765625, -0.00732421875, 0.0172119140...
[ 11249, 54, 87, 12765, 2174, 5117, 74918, 42, 6620, 14012, 105950, 7, 47, 1022, 8512, 71, 6562, 195625, 1830, 5303, 502, 4867, 3917, 23, 2965, 28219, 51515, 1250, 6528, 49878, 67, 12830, 83, 1193, 4358 ]
[ 0.073486328125, 0.044952392578125, 0.031524658203125, 0.2279052734375, 0.135009765625, 0.205078125, 0.1788330078125, 0.1531982421875, 0.1031494140625, 0.1905517578125, 0.1959228515625, 0.106689453125, 0.1204833984375, 0.152099609375, 0.1981201171875, 0.0794677734375, 0.156982421875, ...
embed
32408653_c0
32408653
prolog
0
Title: Prolog, working with recursion Problem title: Prolog, working with recursion Tags: prolog, recursion Problem: Prolog, working with recursion I am trying to build this program but having a really hard time. So I started off writing this program, I have a long program that almost works but is long and messy. Can a...
Prolog, working with recursion Prolog, working with recursion prolog recursion Prolog Prolog, working with recursion I am trying to build this program but having a really hard time. So I started off writing this program, I have a long program that almost works but is long and messy. Can anyone give me hints or be able ...
[ -0.006744384765625, 0.02587890625, 0.0072021484375, 0.01092529296875, -0.00098419189453125, 0.03515625, -0.0260009765625, -0.00811767578125, -0.00152587890625, -0.03076171875, 0.006622314453125, -0.021728515625, -0.0228271484375, -0.025634765625, 0.0140380859375, 0.0135498046875, 0.0...
[ 1250, 4867, 20697, 678, 195625, 1830, 502, 31577, 45367, 1528, 1284, 19441, 6183, 7941, 1733, 26859, 5773, 32562, 4989, 39555, 43240, 136, 163, 46048, 5122, 7639, 3642, 33022, 23, 3647, 7225, 26366, 5608, 3714, 157167, 36766, 110, 112, 83, ...
[ 0.19775390625, 0.27734375, 0.093505859375, 0.08123779296875, 0.236328125, 0.134765625, 0.1624755859375, 0.051300048828125, 0.087158203125, 0.1396484375, 0.008270263671875, 0.031524658203125, 0.025115966796875, 0.06243896484375, 0.06854248046875, 0.010833740234375, 0.03369140625, 0....
embed
34701479_c0
34701479
prolog
0
Title: Searching for a element in a List using DCG in Prolog Problem title: Searching for a element in a List using DCG in Prolog Tags: swi-prolog, dcg, prolog Problem: Searching for a element in a List using DCG in Prolog I have a list [-r,-R,-f,-i,-p] My test case is to check if the element is present in the List usi...
Searching for a element in a List using DCG in Prolog Searching for a element in a List using DCG in Prolog swi-prolog dcg prolog DCG an Searching List Prolog atom_codes cp_list ASCII Use sub_element sub_atom Searching for a element in a List using DCG in Prolog I have a list My test case is to check if the element is ...
[ 0.00146484375, -0.0052490234375, 0.01220703125, 0.0211181640625, 0.007049560546875, 0.01708984375, 0.0152587890625, -0.00836181640625, 0.0029754638671875, -0.023681640625, -0.0001068115234375, -0.010986328125, 0.00016021728515625, 0.01055908203125, -0.006317138671875, 0.0159912109375, ...
[ 33086, 214, 100, 12830, 23, 32036, 17368, 391, 56367, 1250, 4867, 10, 2452, 3454, 104, 238, 177, 502, 34627, 40899, 7, 254, 6562, 125429, 10001, 1614, 62766, 5928, 765, 5303, 3034, 7225, 12765, 2174, 13379, 29479, 2806, 903 ]
[ 0.1868896484375, 0.078369140625, 0.1142578125, 0.1954345703125, 0.0928955078125, 0.1846923828125, 0.05621337890625, 0.1307373046875, 0.2529296875, 0.1529541015625, 0.247314453125, 0.019989013671875, 0.158935546875, 0.1192626953125, 0.0625, 0.0584716796875, 0.130859375, 0.1130371093...
embed