2 * Ruby policy backend for SAT solver
10 static const Pool *pool;
14 policy_init( const Pool *p )
18 rb_set_safe_level(0); //FIXME
20 /* give the ruby code a name */
21 ruby_script("satsolver_policy");
23 cPolicy = rb_define_class( "SatPolicy", rb_cObject );
25 /* load the policy implementation */
26 rb_require( "satsolver_policy" );
41 /*-----------------------------------------------*/
43 policy_printrules( void )
45 static VALUE id = Qnil;
47 /* check if ruby implementation available */
49 id = rb_intern( "printrules" );
50 if (rb_respond_to( cPolicy, id ) == Qfalse) {
55 /* call ruby, if available */
57 return RTEST( rb_funcall( cPolicy, id, 0 ) );