end_of_list_term | fwrite_formula_list | read_formula | zap_term_list |
fwrite_clause | fwrite_term_list | read_formula_list | |
fwrite_clause_list | read_clause | read_term_list | |
fwrite_formula | read_clause_list | zap_formula_list |
BOOL end_of_list_term(Term t);Check if a term is the constant "end_of_list".
void fwrite_clause(FILE *fp, Clause c, BOOL print_id);This routine prints (to FILE *fp) a clause in mixfix form, followed by ".\n".
void fwrite_clause_list(FILE *fp, Clist lst, BOOL print_ids);This routine prints (to FILE *fp) a list of clauses in mixfix form. Example:
list(sos). a = b. end_of_list.If the name of the list is "", it is written as list(anonymous).
void fwrite_formula(FILE *fp, Formula f);This routine prints a formula, followed by ".\n" to a file. This version does not print extra parentheses (it first translates the formula to a term, then prints the term, then frees the term). To print the formula directly, with extra parentheses, call fprint_formula() instead.
void fwrite_formula_list(FILE *fp, Glist lst, char *name);This routine prints (to FILE *fp) a list of formulas in mixfix form. Example:
list(sos). a = b. end_of_list.If the name of the list is "", it is written as list(anonymous).
void fwrite_term_list(FILE *fp, Glist lst, char *name);This routine prints (to FILE *fp) a list of terms in mixfix form. Example:
list(sos). a = b. end_of_list.If the name of the list is "" or NULL, it is written as list(anonymous).
Clause read_clause(FILE *fin, FILE *fout);This routine reads a clause from FILE *fin. If there are no more clauses in *fin, NULL is returned.
If any error occurs, a message is sent to FILE *fout and a fatal_error occurs.
Variables are "set", upward links ar made from all subterms to the clause, and ac_canonical() is called on each atom.
Clist read_clause_list(FILE *fin, FILE *fout, char *name, BOOL assign_id);This routine reads a list of clauses from FILE *fin. If you with the list to have a name, send a string; othersize send NULL. (You can name the list later with name_clist().) If there are no more clauses in *fin, an empty Clist is returned.
If any error occurs, a message is sent to FILE *fout and a fatal_error occurs.
Formula read_formula(FILE *fin, FILE *fout);This routine reads a formula from FILE *fin. If there are no more formulas in *fin, NULL is returned.
If any error occurs, a message is sent to FILE *fout and a fatal_error occurs.
Glist read_formula_list(FILE *fin, FILE *fout);This routine reads a list of formulas from FILE *fin. If there are no more formulas in *fin, NULL is returned.
If any error occurs, a message is sent to FILE *fout and a fatal_error occurs.
Glist read_term_list(FILE *fin, FILE *fout);This routine reads a list of terms from FILE *fin. If there are no more terms in *fin, NULL is returned.
None of the returned terms or their subterms will have type VARIABLE, even if it looks like a variable (e.g., x).
If any error occurs, a message is sent to FILE *fout and a fatal_error occurs.
void zap_formula_list(Glist lst);Free a Glist of formulas.
void zap_term_list(Glist lst);Free a Glist of terms.
These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.