Sorry, I forgot to outline a more concrete suggestion of how you might avoid programming in C: The idea is to keep the search goal in ECLiPSe, so what you could do is write a do_search goal in ECLiPSe that is designed to be called from C: do_search(<My options>, <return data>) :- <process options>, search(.....), <process return data>. and keep My options and return data as simple data structures, and you write process_options to process the incoming data to produce what you need for the call to search, and you process the results afterwards to return to C. Cheers, Kish On 24/11/2011 17:36, Bogdan Tanasa wrote: > Hi, > > > > I am trying to call bb_min from C. > > I am doing something like this: > > > > search = ec_term(ec_did("search", 6), > > varList, > > ec_long(0), > > ec_atom(ec_did("most_constrained", 0)), > > ec_atom(ec_did("indomain", 0)), > > ec_atom(ec_did("complete", 0)), > > ec_nil() > > ); > > > > bb_min = ec_term(ec_did("bb_min", 3), > > search, > > objFunc, > > ec_atom(ec_did("bb_options{strategy:continue}", > 0))); > > ec_post_goal(ec_term(ec_did("writeln", 1), bb_min)); > > ec_post_goal(bb_min); > > > > I get the following error from CLP: > > > > type error in > > bb_min( > > search([_49506{[0, 1]}, _49524{[0, 1]}, _49542{[0, 1]}, _49560{[0, 1]}], 0, > most_constrained, indomain, complete, []), 1.0 * _49506 + 1.0 * _49524 + > 1.0 * _49542 + 1.0 * _49560, > > 'bb_options{strategy:continue}') in module eclipse > > > > The problem is passing the bb_options arguments. > > Can you please tell me how to fix it? > > > > Bogdan. > > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > > > > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECLiPSe-CLP-Users_at_lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users -- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Cisco Systems Limited (Company Number: 02558939), is registered in England and Wales with its registered office at 1 Callaghan Square, Cardiff, South Glamorgan CF10 5BT.Received on Fri Nov 25 2011 - 19:12:33 CET
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST