clause_weight | set_variable_weight | term_weight | |
init_weight_scheme | set_weights_by_arity |
int clause_weight(Clause c);
void init_weight_scheme(Plist p);
void set_variable_weight(int weight);Set the weight of all variables to the specified value.
void set_weights_by_arity(int arity, int weight);Set weights of all symbols of the given arity to the specified value.
int term_weight(Term t);
You give init_weight_scheme a list of weight assignments, for example,
weight(a, -5). weight(g(x), 0). weight(~x, -3). % This is how to assign a weight to the negation symbol.For non-constants, you have to include arguments so that the arity is known; those arguments are ignored, and the convention is to use x.
These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.