BOOL bad_constants_in_clause(Clause c);Given a clause, check if it contains any constants that satisfy variable_name(). If so, print a message for each and return TRUE.
void check_constants_in_clist(Clist l);Given a list of clauses, check if it contains any constants that satisfy variable_name(). If so, print messages and die by calling fatal_error().
Clause clause_reader(BOOL fast);If your program has optional fast parsing/writing, you can use this routine to save a few lines of code. The flag "fast" says whether or not to use fast parse form. A clause is read from stdin (NULL if there are none). Errors are fatal.
void clause_writer(Clause c, BOOL fast);If your program has optional fast parsing/writing, you can use this routine to save a few lines of code. The flag "fast" says whether or not to use fast parse form. The clause is written to stdout, with a period and newline.
BOOL end_of_commands_term(Term t);Check if a term is the constant "end_of_commands".
BOOL end_of_list_clause(Clause c);
BOOL end_of_list_formula(Formula f);
BOOL end_of_list_term(Term t);Check if a term is the constant "end_of_list".
void f_clause(Clause c);Write a clause to stdout, with id, with justification last.
void f_clauses(Plist p);
void fwrite_clause(FILE *fp, Clause c, BOOL print_id_just, BOOL justification_last);This routine prints (to FILE *fp) a clause in mixfix form, followed by ".\n".
void fwrite_clause_clist(FILE *fp, Clist lst, BOOL print_ids, BOOL justifications_last);This routine prints (to FILE *fp) a Clist 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_clause_jmap(FILE *fp, Clause c, BOOL print_id_just, BOOL justification_last, Ilist map);This routine prints (to FILE *fp) a clause in mixfix form, followed by ".\n".
void fwrite_clause_list(FILE *fp, Plist lst, char *name);This routine prints (to FILE *fp) a Plist 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_demod_clist(FILE *fp, Clist lst, BOOL print_ids, BOOL justifications_last);Similar to fwirte_clause_clist, except that lex-dep demodulators are noted.
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, Plist 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, Plist 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 parse_clause_from_string(char *s);
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_clist(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.
Plist read_clause_list(FILE *fin, FILE *fout, BOOL assign_id);Read clauses, up to end_of_list (or EOF), and return them in a Plist.
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.
Plist 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.
Plist 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 sb_write_clause(String_buf sb, Clause c, BOOL print_id, BOOL justification_last);This routine prints (to FILE *fp) a clause in mixfix form, followed by ".\n".
void sb_write_clause_jmap(String_buf sb, Clause c, BOOL print_id_just, BOOL justification_last, Ilist map);This routine writes a clause (in mixfix form, with ".\n") to a String_buf.
Term term_reader(BOOL fast);If your program has optional fast parsing/writing, you can use this routine to save a few lines of code. The flag "fast" says whether or not to use fast parse form. A term is read from stdin (NULL if there are none). Errors are fatal.
void term_writer(Term t, BOOL fast);If your program has optional fast parsing/writing, you can use this routine to save a few lines of code. The flag "fast" says whether or not to use fast parse form. The term is written to stdout, with a period and newline.
void zap_formula_list(Plist lst);Free a Plist of formulas.
void zap_term_list(Plist lst);Free a Plist of terms.
These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.