Bool full_possibly_negative( Fact *f ) { int adr; if ( gis_deleted[f->predicate] ) { return TRUE; } adr = instantiated_fact_adress( f ); if ( lini[f->predicate][adr] > 0 ) { return FALSE; } else { return TRUE; } }
Bool full_possibly_positive( Fact *f ) { int adr; if ( gis_added[f->predicate] ) { return TRUE; } adr = instantiated_fact_adress( f ); if ( lunknown_ini[f->predicate][adr] > 0 ) { return TRUE; } if ( lini[f->predicate][adr] > 0 ) { return TRUE; } else { return FALSE; } }
void build_hard_action_templates( void ) { int i, j, size, adr; MixedOperator *o; /* if there are no hard ops --> nothing to do! */ if ( gnum_hard_operators == 0 ) { return; } /* remove unused params; empty types are already recognised during * domain translation; have to be handled after (or while) * unaries encoding (if done), though. */ cleanup_hard_domain(); if ( gcmd_line.display_info == 115 ) { printf("\n\ncleaned up hard domain representation is:\n\n"); for ( i = 0; i < gnum_hard_operators; i++ ) { print_Operator( ghard_operators[i] ); } } /* create local table of instantiated facts that occur in the * initial state. for fast finding out if fact is in ini or not. */ for ( i = 0; i < gnum_predicates; i++ ) { size = 1; for ( j = 0; j < garity[i]; j++ ) { size *= gnum_constants; } lini[i] = ( int_pointer ) calloc( size, sizeof( int ) ); for ( j = 0; j < size; j++ ) { lini[i][j] = 0; } for ( j = 0; j < gnum_initial_predicate[i]; j++ ) { adr = instantiated_fact_adress( &ginitial_predicate[i][j] ); lini[i][adr]++; } } /* create mixed op for each param combination */ multiply_hard_op_parameters(); if ( gcmd_line.display_info == 116 ) { printf("\n\nmixed hard domain representation is:\n\n"); for ( o = ghard_mixed_operators; o; o = o->next ) { print_MixedOperator( o ); } } /* create pseudo op for each mixed op */ multiply_hard_effect_parameters(); if ( gcmd_line.display_info == 117 ) { printf("\n\npseudo hard domain representation is:\n\n"); for ( i = 0; i < gnum_hard_templates; i++ ) { print_PseudoAction( ghard_templates[i] ); } } }