You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(23) |
Nov
(29) |
Dec
(21) |
2007 |
Jan
(48) |
Feb
(9) |
Mar
(49) |
Apr
(49) |
May
(33) |
Jun
(28) |
Jul
(34) |
Aug
(51) |
Sep
(52) |
Oct
(26) |
Nov
(15) |
Dec
(26) |
2008 |
Jan
(21) |
Feb
(22) |
Mar
(19) |
Apr
(35) |
May
(23) |
Jun
(62) |
Jul
(11) |
Aug
(20) |
Sep
(35) |
Oct
(46) |
Nov
(22) |
Dec
(3) |
2009 |
Jan
(45) |
Feb
(59) |
Mar
(24) |
Apr
(19) |
May
(10) |
Jun
(17) |
Jul
(16) |
Aug
(30) |
Sep
(41) |
Oct
(55) |
Nov
(37) |
Dec
(18) |
2010 |
Jan
(13) |
Feb
(103) |
Mar
(64) |
Apr
(134) |
May
(35) |
Jun
(47) |
Jul
(31) |
Aug
(27) |
Sep
(29) |
Oct
(6) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(20) |
Feb
(6) |
Mar
(8) |
Apr
(19) |
May
(36) |
Jun
(23) |
Jul
(10) |
Aug
(14) |
Sep
(54) |
Oct
(15) |
Nov
(29) |
Dec
(19) |
2012 |
Jan
(20) |
Feb
(11) |
Mar
(21) |
Apr
(7) |
May
(17) |
Jun
(3) |
Jul
(9) |
Aug
(10) |
Sep
(19) |
Oct
(46) |
Nov
(22) |
Dec
(3) |
2013 |
Jan
(6) |
Feb
(27) |
Mar
(9) |
Apr
(13) |
May
(9) |
Jun
(18) |
Jul
(33) |
Aug
(32) |
Sep
(10) |
Oct
(16) |
Nov
(3) |
Dec
(16) |
2014 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(3) |
May
(5) |
Jun
(4) |
Jul
(1) |
Aug
(13) |
Sep
(9) |
Oct
(5) |
Nov
(12) |
Dec
(39) |
2015 |
Jan
(14) |
Feb
(15) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(12) |
Jul
(6) |
Aug
|
Sep
(1) |
Oct
(15) |
Nov
(6) |
Dec
(5) |
2016 |
Jan
|
Feb
(11) |
Mar
(17) |
Apr
|
May
(1) |
Jun
(6) |
Jul
(3) |
Aug
(1) |
Sep
(9) |
Oct
|
Nov
(7) |
Dec
|
2017 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(6) |
Jul
|
Aug
(3) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
(1) |
Feb
(8) |
Mar
|
Apr
(5) |
May
(4) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2019 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(1) |
Nov
(1) |
Dec
(5) |
2020 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
(4) |
May
|
Jun
(13) |
Jul
(10) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(1) |
2022 |
Jan
(1) |
Feb
(4) |
Mar
(1) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(5) |
2023 |
Jan
|
Feb
(6) |
Mar
(11) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2025 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Marco G. <mar...@un...> - 2016-03-22 08:00:46
|
On 22/03/16 04:18, Edgaonkar, Shrirang wrote: > Similar to "once / 1" I would like to write "twice / 1" goal so that > the first solution backtracks and finds the second solution. I wish > to get both the solutions. In order to get two solutions (without recomputing the first), you need to store some information in a way that survives backtracks. The first idea that comes to my mind is to use assert and retract, that are standard and work in all Prolog compilers: :- dynamic previously_solved/0. twice(Goal):- call(Goal), (previously_solved -> !, retract(previously_solved) ; assert(previously_solved)). In ECLiPSe you can have better, reentrant code by using non-logical storage predicates: http://eclipseclp.org/doc/userman/umsroot050.html Best, Marco -- http://docente.unife.it/marco.gavanelli |
From: <ms...@an...> - 2016-03-22 06:24:42
|
On Tue, 22 Mar 2016, Edgaonkar, Shrirang wrote: > findall(X,(twice top([A,B])),List) so that List contains both the solutions. Your constraint problem has far more than two solutions, so saying you want "both" of them is confusing. I guess you're using the backtrack() limitation to try to force it to return the solutions in different sequences, and you want the first solution from each sequence, but it would be better to write the constraints to really produce the set of solutions you actually want. Changing the search algorithm is a very hard-to-control substitute for that. What is it you're really trying to accomplish here? -- Matthew Skala ms...@an... People before principles. http://ansuz.sooke.bc.ca/ |
From: Edgaonkar, S. <Shr...@nt...> - 2016-03-22 03:18:51
|
Dear Clp users, Similar to "once / 1" I would like to write "twice / 1" goal so that the first solution backtracks and finds the second solution. I wish to get both the solutions. I have tried the following:- I can run Code1 followed by Code2 to get both the solutions. Code1: :-lib(ic). top([A,B]):- A :: -100..100, B :: -100..100, A #> B, A #\= -98, search([A,B],0,input_order,indomain,complete,[backtrack(0)]). -------------------------------------------------------------------------------------- Code2: :-lib(ic). top([A,B]):- A :: -100..100, B :: -100..100, A #> B, A #\= -98, search([A,B],0,input_order,indomain,complete,[backtrack(1)]). But I wish to do something like this. findall(X,(twice top([A,B])),List) so that List contains both the solutions. I wish to know how does once / 1 is able to fail the goal after first run. Similarly I can make it fail after backtracking one more time. Hope I have written it in detail. Kindly guide me on how to do this. Thanks and Regards, Shrirang Edgaonkar ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Paulo M. <pm...@lo...> - 2016-03-11 01:05:37
|
> On 10/03/2016, at 11:47, Panagiotis Stamatopoulos <ta...@di...> wrote: > > Hello everybody, > > Just a simple question, mainly to the ECLiPSe developers: > Does the following behavior comply with the standard? > > [eclipse 1]: X = 5+3, Y is X+7. > number expected in +(5 + 3, 7, _360) > Abort > > Other Prolog systems accept the query and instantiate Y to 15. If you use ECLiPSe ISO libraries you get: [user 27]: X = 5+3, Y is X+7. X = 5 + 3 Y = 15 Yes (0.00s cpu) Cheers, Paulo ----------------------------------------------------------------- Paulo Moura Logtalk developer Email: <mailto:pm...@lo...> Web: <http://logtalk.org/> ----------------------------------------------------------------- |
From: Joachim S. <jsc...@co...> - 2016-03-10 16:24:27
|
On 10/03/16 11:47, Panagiotis Stamatopoulos wrote: > Hello everybody, > > Just a simple question, mainly to the ECLiPSe developers: > Does the following behavior comply with the standard? > > [eclipse 1]: X = 5+3, Y is X+7. > number expected in +(5 + 3, 7, _360) > Abort > > Other Prolog systems accept the query and instantiate Y to 15. You are right, the default behaviour of ECLiPSe differs here from the ISO-Prolog standard. The clean way to write this in ECLiPSe is [eclipse 1]: X = 5+3, Y is eval(X)+7. X = 5 + 3 Y = 15 Yes (0.00s cpu) There are good reasons for the ECLiPSe behaviour, both from a typing standpoint (is X a numeric variable or a symbolic expression variable?), and for enabling compile-time optimizations. There are other Prolog implementers who agree that the standard should have been less permissive here, and therefore you find the eval/1 feature also in other systems, e.g. SWI-Prolog (http://www.swi-prolog.org/pldoc/doc_for?object=f%28eval/1%29) However, if needed, you can get full standard-conforming behaviour by using ECLiPSe's iso or iso_strict library, either via a command line option, or any other of the methods described in http://eclipseclp.org/doc/bips/lib/iso/index.html coninferpc$ eclipse -L iso ... [eclipse 1]: X = 5+3, Y is X+7. X = 5 + 3 Y = 15 Yes (0.00s cpu) But note that the eval/1 formulation will be more efficient. Cheers, Joachim |
From: Panagiotis S. <ta...@di...> - 2016-03-10 16:13:36
|
Thank you Maxime, but my question was whether the ECLiPSe behavior on the query I posted was in accordance with the standard. I was not looiking for an alternative way to do this (and, certainly, I didn't need to load the ic library to do some simple arithmetic). Paulo answered my question. If we start ECLiPSe with "eclipse -L iso", then it complies with the standard. Regards, Panagiotis On 10-Mar-16 2:49 PM, maxime diab wrote: > Hello, > two way to do that in eclipse: > lib(ic), X #= 5+3, Y is X+7. > or > X is 5+3, Y is X+7. > > Regards > Maxime > > 2016-03-10 12:47 GMT+01:00 Panagiotis Stamatopoulos <ta...@di... > <mailto:ta...@di...>>: > > Hello everybody, > > Just a simple question, mainly to the ECLiPSe developers: > Does the following behavior comply with the standard? > > [eclipse 1]: X = 5+3, Y is X+7. > number expected in +(5 + 3, 7, _360) > Abort > > Other Prolog systems accept the query and instantiate Y to 15. > > Best Regards, > > Panagiotis Stamatopoulos > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECL...@li... > <mailto:ECL...@li...> > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users > > |
From: maxime d. <max...@gm...> - 2016-03-10 12:50:18
|
Hello, two way to do that in eclipse: lib(ic), X #= 5+3, Y is X+7. or X is 5+3, Y is X+7. Regards Maxime 2016-03-10 12:47 GMT+01:00 Panagiotis Stamatopoulos <ta...@di...>: > Hello everybody, > > Just a simple question, mainly to the ECLiPSe developers: > Does the following behavior comply with the standard? > > [eclipse 1]: X = 5+3, Y is X+7. > number expected in +(5 + 3, 7, _360) > Abort > > Other Prolog systems accept the query and instantiate Y to 15. > > Best Regards, > > Panagiotis Stamatopoulos > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECL...@li... > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users > |
From: Panagiotis S. <ta...@di...> - 2016-03-10 12:17:31
|
Hello everybody, Just a simple question, mainly to the ECLiPSe developers: Does the following behavior comply with the standard? [eclipse 1]: X = 5+3, Y is X+7. number expected in +(5 + 3, 7, _360) Abort Other Prolog systems accept the query and instantiate Y to 15. Best Regards, Panagiotis Stamatopoulos |
From: Kish S. <kis...@gm...> - 2016-03-09 01:20:51
|
Hi Shrirang, > I know cursor execute would just run the query. But even that wasn't happening. I don't understand why you sent the code in your previous message to the mailing list. If you read and understood the documentation, did you not see that the code you sent was incorrect? If you are getting some errors with giving an integer as the parameter in cursor_next_execute/2 (the name Result2 you used is misleading because that is not its purpose -- it is a parameter, not a result), then please send this code, and also the error you are getting. >qlprepare had an issue on windows version some time back so I thought I should confirm. If you are referring to the issue with session_sql_prepare/4 from last October, then I remember asking you to confirm if the changes I made fixed the problem, but I never heard back from you on that -- I did not have access to MySQL running on Windows then (or now), so I could not do the test myself. In any case, your current problem does not seem to be in session_sql_prepare/4. If you are getting exceptions or other errors (I don't really know what you mean by 'that wasn't happening' - please give precise descriptions of the errors you are getting) with the parameter set correctly, then please send that code. Cheers, Kish On Tue, Mar 8, 2016 at 9:09 PM, Edgaonkar, Shrirang < Shr...@nt...> wrote: > Dear Kish, > > I have read the document and tried all combinations possible. Even Result2 > was replaced by an integer. I know cursor execute would just run the query. > But even that wasn't happening. Sqlprepare had an issue on windows version > some time back so I thought I should confirm. > > Thanks, > Shrirang > > On 09-Mar-2016, at 5:37 AM, Kish Shen <kis...@gm...> wrote: > > Shrirang, > > >Kindly let me know what could be wrong. > > It looks like you are not using cursor_next_execute/2 correctly. Have you > read the documentation for lib(dbi) -- both the chapter in the embedding > and interface manual > > http://eclipseclp.org/doc/embedding/embroot059.html > > and the reference documentations for the library predicates, such as > cursor_next_execute/2: > > http://eclipseclp.org/doc/bips/lib/dbi/cursor_next_execute-2.html > > both these explains how to use prepared SQL statements, and should have > the information on your problem.. > > I think the reason you are getting the bad template error is because you > are calling cursor_next_execute(Cursor, Result1) with Result1 being > count(Result2) where Result2 being a variable. Judging from your code, you > seem to be expecting cursor_next_execute/2 to be returning results from > some results to be returned from the prepared SQL query. This is incorrect-- > cursor_execute/2 is actually used to *execute* the prepared SQL statement > from session_sql_prepare/4: this should be clear from the summary of the > reference documentation: > > cursor_next_execute(++Cursor, +Tuple) Executes the parametrised prepared > SQL statement represented by Cursor. *Cursor*A cursor handle*Tuple*A > tuple of parameter values matching the template for this cursor (structure) > The second argument, which you call Resuts1, is actually there to supply > the parameter value for the prepared SQL statement represented by Cursor - > the ? in your "select count(column) from table where column > ?" so in > your case, if you call cursor_next_execute(Cursor, count(7), that will > execute the SQL query > > "select count(column) from table where column > 7". > > Your code is also missing a predicate such as cursor_all_tuples/2 to > collect the results from the SQL query. Again, this is stated clearly in > the reference documentation: > > >If the SQL statement is a query, and was prepared as a query using > session_sql_prepare_query/5, results can be obtained from the query by the > cursor_*_tuple family of predicates. > > Cheers, > > Kish > > > > On Tue, Mar 8, 2016 at 4:28 AM, Edgaonkar, Shrirang < > Shr...@nt...> wrote: > >> Dear clp users, >> >> >> >> I am facing a problem with prepare statement in 32 bit as well as 64 >> bit Windows OS using respective ECLipSe. >> >> Eclipse version is 6.1 217. Kindly let me know what could be wrong. >> Please find the console output at the end of the email. >> >> >> >> :- lib(dbi). >> :- lib(ic). >> solveDB(Result):- >> Result2 :: 1..10, >> Template = count(24), >> session_start("blah"@"blah", "blah", [dbname:"blah"], Session), >> writeln("TEST"), >> SQL = "select count(column) from table where column > ?", >> writeln("TEST1"), >> session_sql_prepare(Session, Template, SQL, Cursor), >> writeln([Cursor,"TEST2"]), >> Result1 = count(Result2), >> cursor_next_execute(Cursor, Result1), >> writeln(Result1), >> cursor_close(Cursor). >> >> >> >> >> ---------------------------------------------------------------------------------------------------------------- >> >> >> >> console output:- >> >> >> >> TEST >> TEST1 >> [cursor('MySQLC'(16'327ee0), 'MySQLS'(16'327e40)), TEST2] >> DBI General exception Code:-5 in >> cursor_next_exec(cursor('MySQLC'(16'327ee0), 'M >> ySQLS'(16'327e40)), count(_138309), options(_138404, _138405, "client", >> "read_on >> ly")) >> DBI-005: bad template >> Aborting execution ... >> abort >> >> Thanks and Regards, >> >> Shrirang Edgaonkar >> >> >> >> ______________________________________________________________________ >> Disclaimer: This email and any attachments are sent in strictest >> confidence >> for the sole use of the addressee and may contain legally privileged, >> confidential, and proprietary data. If you are not the intended recipient, >> please advise the sender by replying promptly to this email and then >> delete >> and destroy this email and any attachments without any further use, >> copying >> or forwarding. >> >> >> ------------------------------------------------------------------------------ >> Transform Data into Opportunity. >> Accelerate data analysis in your applications with >> Intel Data Analytics Acceleration Library. >> Click to learn more. >> http://makebettercode.com/inteldaal-eval >> _______________________________________________ >> ECLiPSe-CLP-Users mailing list >> ECL...@li... >> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users >> >> > > ______________________________________________________________________ > Disclaimer: This email and any attachments are sent in strictest confidence > for the sole use of the addressee and may contain legally privileged, > confidential, and proprietary data. If you are not the intended recipient, > please advise the sender by replying promptly to this email and then delete > and destroy this email and any attachments without any further use, copying > or forwarding. > |
From: Edgaonkar, S. <Shr...@nt...> - 2016-03-08 21:10:05
|
Dear Kish, I have read the document and tried all combinations possible. Even Result2 was replaced by an integer. I know cursor execute would just run the query. But even that wasn't happening. Sqlprepare had an issue on windows version some time back so I thought I should confirm. Thanks, Shrirang On 09-Mar-2016, at 5:37 AM, Kish Shen <kis...@gm...<mailto:kis...@gm...>> wrote: Shrirang, >Kindly let me know what could be wrong. It looks like you are not using cursor_next_execute/2 correctly. Have you read the documentation for lib(dbi) -- both the chapter in the embedding and interface manual http://eclipseclp.org/doc/embedding/embroot059.html and the reference documentations for the library predicates, such as cursor_next_execute/2: http://eclipseclp.org/doc/bips/lib/dbi/cursor_next_execute-2.html both these explains how to use prepared SQL statements, and should have the information on your problem.. I think the reason you are getting the bad template error is because you are calling cursor_next_execute(Cursor, Result1) with Result1 being count(Result2) where Result2 being a variable. Judging from your code, you seem to be expecting cursor_next_execute/2 to be returning results from some results to be returned from the prepared SQL query. This is incorrect-- cursor_execute/2 is actually used to *execute* the prepared SQL statement from session_sql_prepare/4: this should be clear from the summary of the reference documentation: cursor_next_execute(++Cursor, +Tuple) Executes the parametrised prepared SQL statement represented by Cursor. Cursor A cursor handle Tuple A tuple of parameter values matching the template for this cursor (structure) The second argument, which you call Resuts1, is actually there to supply the parameter value for the prepared SQL statement represented by Cursor - the ? in your "select count(column) from table where column > ?" so in your case, if you call cursor_next_execute(Cursor, count(7), that will execute the SQL query "select count(column) from table where column > 7". Your code is also missing a predicate such as cursor_all_tuples/2 to collect the results from the SQL query. Again, this is stated clearly in the reference documentation: >If the SQL statement is a query, and was prepared as a query using session_sql_prepare_query/5, results can be obtained from the query by the cursor_*_tuple family of predicates. Cheers, Kish On Tue, Mar 8, 2016 at 4:28 AM, Edgaonkar, Shrirang <Shr...@nt...<mailto:Shr...@nt...>> wrote: Dear clp users, I am facing a problem with prepare statement in 32 bit as well as 64 bit Windows OS using respective ECLipSe. Eclipse version is 6.1 217. Kindly let me know what could be wrong. Please find the console output at the end of the email. :- lib(dbi). :- lib(ic). solveDB(Result):- Result2 :: 1..10, Template = count(24), session_start("blah"@"blah<mailto:%22blah%22@%22blah>", "blah", [dbname:"blah"], Session), writeln("TEST"), SQL = "select count(column) from table where column > ?", writeln("TEST1"), session_sql_prepare(Session, Template, SQL, Cursor), writeln([Cursor,"TEST2"]), Result1 = count(Result2), cursor_next_execute(Cursor, Result1), writeln(Result1), cursor_close(Cursor). ---------------------------------------------------------------------------------------------------------------- console output:- TEST TEST1 [cursor('MySQLC'(16'327ee0), 'MySQLS'(16'327e40)), TEST2] DBI General exception Code:-5 in cursor_next_exec(cursor('MySQLC'(16'327ee0), 'M ySQLS'(16'327e40)), count(_138309), options(_138404, _138405, "client", "read_on ly")) DBI-005: bad template Aborting execution ... abort Thanks and Regards, Shrirang Edgaonkar ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. --------------------------------------------------------------------------- ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. --- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval _______________________________________________ ECLiPSe-CLP-Users mailing list ECL...@li...<mailto:ECL...@li...> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Kish S. <kis...@gm...> - 2016-03-08 20:37:38
|
Shrirang, >Kindly let me know what could be wrong. It looks like you are not using cursor_next_execute/2 correctly. Have you read the documentation for lib(dbi) -- both the chapter in the embedding and interface manual http://eclipseclp.org/doc/embedding/embroot059.html and the reference documentations for the library predicates, such as cursor_next_execute/2: http://eclipseclp.org/doc/bips/lib/dbi/cursor_next_execute-2.html both these explains how to use prepared SQL statements, and should have the information on your problem.. I think the reason you are getting the bad template error is because you are calling cursor_next_execute(Cursor, Result1) with Result1 being count(Result2) where Result2 being a variable. Judging from your code, you seem to be expecting cursor_next_execute/2 to be returning results from some results to be returned from the prepared SQL query. This is incorrect-- cursor_execute/2 is actually used to *execute* the prepared SQL statement from session_sql_prepare/4: this should be clear from the summary of the reference documentation: cursor_next_execute(++Cursor, +Tuple)Executes the parametrised prepared SQL statement represented by Cursor.*Cursor*A cursor handle*Tuple*A tuple of parameter values matching the template for this cursor (structure) The second argument, which you call Resuts1, is actually there to supply the parameter value for the prepared SQL statement represented by Cursor - the ? in your "select count(column) from table where column > ?" so in your case, if you call cursor_next_execute(Cursor, count(7), that will execute the SQL query "select count(column) from table where column > 7". Your code is also missing a predicate such as cursor_all_tuples/2 to collect the results from the SQL query. Again, this is stated clearly in the reference documentation: >If the SQL statement is a query, and was prepared as a query using session_sql_prepare_query/5, results can be obtained from the query by the cursor_*_tuple family of predicates. Cheers, Kish On Tue, Mar 8, 2016 at 4:28 AM, Edgaonkar, Shrirang < Shr...@nt...> wrote: > Dear clp users, > > > > I am facing a problem with prepare statement in 32 bit as well as 64 bit > Windows OS using respective ECLipSe. > > Eclipse version is 6.1 217. Kindly let me know what could be wrong. Please > find the console output at the end of the email. > > > > :- lib(dbi). > :- lib(ic). > solveDB(Result):- > Result2 :: 1..10, > Template = count(24), > session_start("blah"@"blah", "blah", [dbname:"blah"], Session), > writeln("TEST"), > SQL = "select count(column) from table where column > ?", > writeln("TEST1"), > session_sql_prepare(Session, Template, SQL, Cursor), > writeln([Cursor,"TEST2"]), > Result1 = count(Result2), > cursor_next_execute(Cursor, Result1), > writeln(Result1), > cursor_close(Cursor). > > > > > ---------------------------------------------------------------------------------------------------------------- > > > > console output:- > > > > TEST > TEST1 > [cursor('MySQLC'(16'327ee0), 'MySQLS'(16'327e40)), TEST2] > DBI General exception Code:-5 in > cursor_next_exec(cursor('MySQLC'(16'327ee0), 'M > ySQLS'(16'327e40)), count(_138309), options(_138404, _138405, "client", > "read_on > ly")) > DBI-005: bad template > Aborting execution ... > abort > > Thanks and Regards, > > Shrirang Edgaonkar > > > > ______________________________________________________________________ > Disclaimer: This email and any attachments are sent in strictest confidence > for the sole use of the addressee and may contain legally privileged, > confidential, and proprietary data. If you are not the intended recipient, > please advise the sender by replying promptly to this email and then delete > and destroy this email and any attachments without any further use, copying > or forwarding. > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://makebettercode.com/inteldaal-eval > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECL...@li... > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users > > |
From: Edgaonkar, S. <Shr...@nt...> - 2016-03-08 04:48:44
|
Dear clp users, I am facing a problem with prepare statement in 32 bit as well as 64 bit Windows OS using respective ECLipSe. Eclipse version is 6.1 217. Kindly let me know what could be wrong. Please find the console output at the end of the email. :- lib(dbi). :- lib(ic). solveDB(Result):- Result2 :: 1..10, Template = count(24), session_start("blah"@"blah<mailto:"blah"@"blah>", "blah", [dbname:"blah"], Session), writeln("TEST"), SQL = "select count(column) from table where column > ?", writeln("TEST1"), session_sql_prepare(Session, Template, SQL, Cursor), writeln([Cursor,"TEST2"]), Result1 = count(Result2), cursor_next_execute(Cursor, Result1), writeln(Result1), cursor_close(Cursor). ---------------------------------------------------------------------------------------------------------------- console output:- TEST TEST1 [cursor('MySQLC'(16'327ee0), 'MySQLS'(16'327e40)), TEST2] DBI General exception Code:-5 in cursor_next_exec(cursor('MySQLC'(16'327ee0), 'M ySQLS'(16'327e40)), count(_138309), options(_138404, _138405, "client", "read_on ly")) DBI-005: bad template Aborting execution ... abort Thanks and Regards, Shrirang Edgaonkar ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Joachim S. <jsc...@co...> - 2016-02-13 17:19:38
|
On 13/02/16 08:30, Rana Mohamed wrote: > Please i want to know what are the libraries i can use to connect java with > constraint logic especially that i'm using symbolic domain and intervals Vague question. The Java interface is described in http://eclipseclp.org/doc/embedding/embroot.html -- Joachim |
From: Rana M. <eng...@gm...> - 2016-02-13 08:30:42
|
> Please i want to know what are the libraries i can use to connect java with constraint logic especially that i'm using symbolic domain and intervals |
From: Rana M. <eng...@gm...> - 2016-02-12 21:51:54
|
Please i want to know what are the libraries i can use to connect java with constraint logic especially that i'm using symbolic domain and intervals |
From: Joachim S. <jsc...@co...> - 2016-02-08 11:51:23
|
On 08/02/16 04:01, Edgaonkar, Shrirang wrote: > Dear clp users, > > Following is the script that executes:- Maybe it would help if you stopped thinking of your programs as "scripts", and understand them as logical statements that the system interprets. > > Script 1: > > :- lib(ic). > solveNull(A,B):- > > A #:: 0..1, > B #:: 0..1, > > A #\= B, > B #= 1. > > It provides the solution of A as 0 and B as 1 but I do not wish to have A as 0. The beauty of Logic Programming is that it can make logical inferences for you *automatically*. If you say that A is 0 or 1, and it isn't 1, then the system can infer that A is 0, and it can do this *at any time*. > I wish to restrict A to be var(See the script 2 below. It should pass.). Being "var" is not a logical restriction/constraint. It is a temporary state during computation, and the constraint system may replace the variable with a value *at any time*. Try not to fight the system, work with it! > ... but I wanted my search subroutine to decide the value of A. Fix your search routine. It cannot expect all variables still to be uninstantiated ("var"). Search routines usually can simply ignore variables that are already instantiated (because there is no need to "search" for their value any more). -- Joachim |
From: Edgaonkar, S. <Shr...@nt...> - 2016-02-08 05:16:02
|
Dear clp users, Sorry but I found the solution. :- lib(ic). solveNull(A,B):- A #:: 0..1, B #:: 0..1, A ~= B, B = 1, var(A). Using the sound difference operator works for me. Thanks and Regards, Shrirang Edgaonkar ________________________________ From: Edgaonkar, Shrirang [Shr...@nt...] Sent: 08 February 2016 13:01:49 To: ecl...@li... Subject: [eclipse-clp-users] Boolean value behaviour Dear clp users, Following is the script that executes:- Script 1: :- lib(ic). solveNull(A,B):- A #:: 0..1, B #:: 0..1, A #\= B, B #= 1. It provides the solution of A as 0 and B as 1 but I do not wish to have A as 0. I wish to restrict A to be var(See the script 2 below. It should pass.). One solution is to change the domain of A to 0..2 or 0..3. Is there a cleaner way of doing it? Script 2: :- lib(ic). solveNull(A,B):- A #:: 0..1, B #:: 0..1, A #\= B, B #= 1, var(A). I am almost sure there isn't any solution to it but I wanted my search subroutine to decide the value of A. Kindly help me. Thanks and Regards, Shrirang Edgaonkar ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Edgaonkar, S. <Shr...@nt...> - 2016-02-08 04:02:05
|
Dear clp users, Following is the script that executes:- Script 1: :- lib(ic). solveNull(A,B):- A #:: 0..1, B #:: 0..1, A #\= B, B #= 1. It provides the solution of A as 0 and B as 1 but I do not wish to have A as 0. I wish to restrict A to be var(See the script 2 below. It should pass.). One solution is to change the domain of A to 0..2 or 0..3. Is there a cleaner way of doing it? Script 2: :- lib(ic). solveNull(A,B):- A #:: 0..1, B #:: 0..1, A #\= B, B #= 1, var(A). I am almost sure there isn't any solution to it but I wanted my search subroutine to decide the value of A. Kindly help me. Thanks and Regards, Shrirang Edgaonkar ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Joachim S. <jsc...@co...> - 2016-02-06 14:49:49
|
On 04/02/16 22:36, Edgaonkar, Shrirang wrote: > Dear Joachim, > > Not sure if I need it, but can we 'wake' such a suspension without actually > changing the tentative value? It is similar to constrained(String) if the it > is as String constrained. Yes, suspensions and waking conditions are orthogonal concepts in ECLiPSe. You can specify multiple (alternative) waking condition in the suspend/3,4 operation, for example suspend(cast(Number,String), 0, String->[constrained,tentative:tent_chg]) or suspend(cast(Number,String), 0, [String->tentative:tent_chg,Number->inst]) See http://eclipseclp.org/doc/bips/kernel/suspensions/suspend-3.html Cheers, Joachim |
From: Edgaonkar, S. <Shr...@nt...> - 2016-02-04 22:36:42
|
Dear Joachim, Not sure if I need it, but can we 'wake' such a suspension without actually changing the tentative value? It is similar to constrained(String) if the it is as String constrained. Regards, Shrirang > On 04-Feb-2016, at 9:51 PM, Joachim Schimpf <jsc...@co...> wrote: > >> On 04/02/16 02:01, Edgaonkar, Shrirang wrote: >> Dear clp users, >> >> I wish to suspend a predicate till a change in tentative value occurs to one >> of its variables. I get the following error "out of range in suspend(cast(_612, >> _613), 1, _613 -> tent_chg, 'SUSP-5-susp') in module eclipse" >> >> for the following script >> >> :- lib(tentative). >> solve(R):- >> cast(Number,String), >> tent_set(String, 1). >> >> >> cast(Number,String):- >> (var(String)-> >> suspend(cast(Number,String), >> 1, String->tent_chg, Susp2);writeln(instantiated),true). >> >> Whenever tentative value of String changes it should invoke cast(Number,String) >> is the intention. > > Two issues here: > > 1. write String->tentative:tent_chg instead of just String->tent_chg > (this is wrong in the manual, sorry) > > 2. you can only suspend on the tent_chg condition when the variable > already has a tentative value. So you have to call tent_set/2 before. > > And a third recommendation: don't use 1 as the suspension priority > (it is the highest priority, and reserved for debugging purposes). > Use 0 for default, or 2 and higher. > > > Cheers, > Joachim > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECL...@li... > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Joachim S. <jsc...@co...> - 2016-02-04 12:50:49
|
On 04/02/16 02:01, Edgaonkar, Shrirang wrote: > Dear clp users, > > I wish to suspend a predicate till a change in tentative value occurs to one > of its variables. I get the following error "out of range in suspend(cast(_612, > _613), 1, _613 -> tent_chg, 'SUSP-5-susp') in module eclipse" > > for the following script > > :- lib(tentative). > solve(R):- > cast(Number,String), > tent_set(String, 1). > > > cast(Number,String):- > (var(String)-> > suspend(cast(Number,String), > 1, String->tent_chg, Susp2);writeln(instantiated),true). > > Whenever tentative value of String changes it should invoke cast(Number,String) > is the intention. Two issues here: 1. write String->tentative:tent_chg instead of just String->tent_chg (this is wrong in the manual, sorry) 2. you can only suspend on the tent_chg condition when the variable already has a tentative value. So you have to call tent_set/2 before. And a third recommendation: don't use 1 as the suspension priority (it is the highest priority, and reserved for debugging purposes). Use 0 for default, or 2 and higher. Cheers, Joachim |
From: Edgaonkar, S. <Shr...@nt...> - 2016-02-04 02:22:22
|
Dear clp users, I wish to suspend a predicate till a change in tentative value occurs to one of its variables. I get the following error "out of range in suspend(cast(_612, _613), 1, _613 -> tent_chg, 'SUSP-5-susp') in module eclipse" for the following script :- lib(tentative). solve(R):- cast(Number,String), tent_set(String, 1). cast(Number,String):- (var(String)-> suspend(cast(Number,String), 1, String->tent_chg, Susp2);writeln(instantiated),true). Whenever tentative value of String changes it should invoke cast(Number,String) is the intention. Kindly guide me into this. I also checked the register_fornotification but its usage was not clear to me from the example. Thanks and Regards, Shrirang Edgaonkar ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. |
From: Sergii D. <ki...@gm...> - 2016-02-01 19:41:55
|
Hi, I wonder if ECLiPSe project developers considered participating in Google Summer of Code https://developers.google.com/open-source/gsoc/ ? >From http://en.flossmanuals.net/gsocmentoring/what-is-gsoc/: What is Google Summer of Code? Google Summer of Code (GSoC) is a program that matches mentoring organizations with college and university student developers who are paid to write open source code. Each year, Google works with many open source, free software and technology-related groups to identify and fund proposals for student open source projects. I think we can identify an interesting project idea or two that can be done in a couple month period by a student. Here is an example from a different project what kind of feature can be implemented - Diophantine Equation Module for SymPy https://www.google-melange.com/gsoc/project/details/google/gsoc2013/thilinarmtb/5780175576891392 The 2016 Mentor Organization application window is February 8th to 19th - https://developers.google.com/open-source/gsoc/timeline -Sergii. |
From: Joachim S. <jsc...@co...> - 2015-12-31 04:11:27
|
On 31/12/15 01:29, Sergii Dymchenko wrote: > Workshop's video has been published: LambdaConf 2015 - Introduction to > Constraint Logic Programming with ECLiPSe - > https://www.youtube.com/watch?v=84amHOgCEe8 Thanks Sergii, I have added a link to the ECLiPSe web site. Contributions like this are of course very welcome, and so is help with coding, maintenance, documentation, distribution. So if anyone hasn't made their New Year's resolutions yet, please have a look at http://eclipseclp.org/reports/help.html and get in touch! I'd also like to mention that ECLiPSe 7, which has been in the works for quite a while, is finally nearing its release. There is still some work to do, but I hope it will be worth the wait. Happy New Year, Joachim |
From: Sergii D. <ki...@gm...> - 2015-12-31 01:29:25
|
Workshop's video has been published: LambdaConf 2015 - Introduction to Constraint Logic Programming with ECLiPSe - https://www.youtube.com/watch?v=84amHOgCEe8 -Sergii. On Fri, Jan 30, 2015 at 4:39 AM, Claudio Cesar de Sá <cla...@ud...> wrote: > Sergi > > > Congratulations ... I saw the link, it's seems a great event. > For your presentation, some suggestions: > > 1. Start for a quick comparision between functional and logic paradigms > show some small examples in Haskell (everybody knows it) and Prolog. > > For example: > > Code in Haskell > > length [] = 0 > > length (head:tail) = 1 + length tail > > > In Prolog: > > length([], 0). > > length( [Head| Tail], N) :- length(Tail, Naux), N is (Naux - 1). > > > and so on,..., some trick examples for syntax familiarization. > > > 2. The loops structures as you mentioned, and constraints (relations, > simmetries, > ... reifed constraints, sliding constraints, regular constraints, etc) > Try to show some principles from CP that are not directly embeded in > Functional Programming. > > > 3. One example Cripto-example, as you mentioned, aiming the structure > models in Eclipse. > > 4. Finally, a "killer example' such stable marriage ... from Hakank > http://www.hakank.org/eclipse/stable_marriage.ecl > > or > > http://www.hakank.org/eclipse/warehouse.ecl > > > that's my contribution > > > claudio > > > > > > > 2015-01-27 6:13 GMT-02:00 Sergii Dymchenko <ki...@gm...>: > >> Hello, >> >> I will be running "Introduction to constraint logic programming" workshop >> at LambdaConf http://www.degoesconsulting.com/lambdaconf-2015/ (May >> 22-24, Boulder CO). >> >> This is a non-academic conference mostly about functional programming, >> not logic programming, so I assume that most people there will not be very >> familiar with Prolog. >> >> I will use ECLiPSe for the workshop, probably the ic library only. >> >> The workshop duration is 2 hours. Currently I don't have an estimate how >> many people will participate; my wild guess is 20. >> >> I plan to give very brief and narrow Prolog introduction, explain ECLiPSe >> loops, give some motivation for constraint programming vs Prolog, give one >> or two very simple examples (like cryptarithmetic puzzles). Then I want to >> ask the audience to model and solve (with my one-on-one help) either a >> variant of the problem I explained, or some new simple problem that don't >> have an ECLiPSe solution available on the Internet ( >> http://www.hakank.org/eclipse/). After that there should be some time to >> present my "reference solution" to the problem. >> >> My teaching experience is very limited. >> Do you think the plan I described is feasible given the time constraints >> and the audience? Any suggestions for the problems to use? Any other >> suggestions? >> >> -Sergii. >> >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming. The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> ECLiPSe-CLP-Users mailing list >> ECL...@li... >> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users >> >> > > > -- > > Obrigado > > claudio > ( > )) > |""|-. > |__|-' > > > ********************************************************************** > WeChat: ccs1664 > http://github.com/claudiosa > http://www.joinville.udesc.br/coca > *********************************************************************** > |