#include "mace.h"

This page has information from files mace.h and mace.c.

Contents


Public Routines in File mace.c

Index

fprint_mace_memmace_first_modelp_mace_mem
mace_cancelmace_next_modelprint_model

Details


void fprint_mace_mem(FILE *fp, BOOL heading);
This routine prints (to FILE *fp) memory usage statistics for data types associated with mace. The Boolean argument heading tells whether to print a heading on the table.
void mace_cancel(Mace_state ms);
This routine should be called if you get some, but not all, models from mace_first_model()/mace_next_model(). It frees memory used by the Mace_state.
Term mace_first_model(Clist lst,
		      int domain_size,
		      BOOL distinct_constants,
		      BOOL elements_in_input,
		      int max_seconds,
		      int max_megabytes,
		      BOOL flip_equations,
		      BOOL subsume,
		      FILE *fp,
		      Mace_state *msp,
		      int *rcp);
This routine looks for the first model of a set of unsorted clauses. The domain size is fixed. If a model is found, a term representation of the model is returned. (NULL is returned if there is no model of the requested size.)
Term mace_next_model(Mace_state ms, int *rcp);
Get the next model. Return codes are the same as for mace_first_model(). The max_seconds parameter given to mace_first_model() applies here as well, and the time spent includes the call to mace_first_model. The max_megabytes parameter given to mace_first_model() is irrelevant, because mace_next_model() never allocates additional memory.
void p_mace_mem();
This routine prints (to stdout) memory usage statistics for data types associated with mace.
void print_model(FILE *fp);
This routine prints the current first-order model in readable format.

(This routine is almost obsolete. See interp.h for routines to print interpretations.)


Public Definitions in File mace.h

#define MAX_MACE_RELATION_ARITY   4
#define MAX_MACE_FUNCTION_ARITY   3

typedef struct mace_state * Mace_state;


Introduction

This package looks for (small) finite models of (unsorted first order) clause sets. You call mace_first_model() with a list of clauses and a bunch of parameters, and if it succeeds, it returns a term representation of the model. Also see the package interp, which allows you to do things with the model, such as print it and evaluate clauses and formulas w.r.t. it.

These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.