1
/* Copyright (C) 2006, 2007 William McCune
3
This file is part of the LADR Deduction Library.
5
The LADR Deduction Library is free software; you can redistribute it
6
and/or modify it under the terms of the GNU General Public License,
9
The LADR Deduction Library is distributed in the hope that it will be
10
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with the LADR Deduction Library; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28
/* Public definitions */
31
INPUT_JUST, /* Primary */
32
GOAL_JUST, /* Primary */
33
DENY_JUST, /* Primary int (ID) */
34
CLAUSIFY_JUST, /* Primary int (ID) */
35
COPY_JUST, /* Primary int (ID) */
36
BACK_DEMOD_JUST, /* Primary int (ID) */
37
BACK_UNIT_DEL_JUST, /* Primary int (ID) */
38
NEW_SYMBOL_JUST, /* Primary int (ID) */
39
EXPAND_DEF_JUST, /* Primary Ilist (ID,def-ID) */
40
BINARY_RES_JUST, /* Primary Ilist */
41
HYPER_RES_JUST, /* Primary Ilist */
42
UR_RES_JUST, /* Primary Ilist */
43
FACTOR_JUST, /* Primary Ilist (ID,lit1,lit2) */
44
XXRES_JUST, /* Primary Ilist (ID,lit) */
45
PARA_JUST, /* Primary Parajust */
46
PARA_FX_JUST, /* Primary Parajust */
47
PARA_IX_JUST, /* Primary Parajust */
48
PARA_FX_IX_JUST, /* Primary Parajust */
49
INSTANCE_JUST, /* Primary Instancejust */
50
PROPOSITIONAL_JUST, /* Primary int (ID) */
52
DEMOD_JUST, /* Secondary I3list */
53
UNIT_DEL_JUST, /* Secondary Ilist (lit,ID) */
54
FLIP_JUST, /* Secondary int (lit) */
55
XX_JUST, /* Secondary int (lit) */
56
MERGE_JUST, /* Secondary int (lit) */
57
EVAL_JUST, /* Secondary int (count) */
59
IVY_JUST, /* Primary Ivyjust */
61
UNKNOWN_JUST /* probably an error */
64
typedef struct parajust * Parajust;
73
typedef struct instancejust * Instancejust;
80
typedef struct ivyjust * Ivyjust;
83
Just_type type; /* input,resolve,paramod,instantiate,flip,propositional */
88
Plist pairs; /* for instantiate */
91
typedef struct just * Just;
101
Instancejust instance;
106
/* A justification starts with a Primary part and then
107
has a sequence (maybe none) of Secondary parts.
108
Each type has some data, an integer or Ilist (integer
109
list) giving clause IDs, or positions of literals or
113
/* End of public definitions */
115
/* Public function prototypes from just.c */
119
Parajust get_parajust(void);
121
Instancejust get_instancejust(void);
123
void fprint_just_mem(FILE *fp, BOOL heading);
127
Just ivy_just(Just_type type,
128
int parent1, Ilist pos1,
129
int parent2, Ilist pos2,
132
Just input_just(void);
134
Just goal_just(void);
136
Just deny_just(Topform tf);
138
Just clausify_just(Topform tf);
140
Just expand_def_just(Topform tf, Topform def);
142
Just copy_just(Topform c);
144
Just propositional_just(Topform c);
146
Just new_symbol_just(Topform c);
148
Just back_demod_just(Topform c);
150
Just back_unit_deletion_just(Topform c);
152
Just binary_res_just(Topform c1, int n1, Topform c2, int n2);
154
Just binary_res_just_by_id(int c1, int n1, int c2, int n2);
156
Just factor_just(Topform c, int lit1, int lit2);
158
Just xxres_just(Topform c, int lit);
160
Just resolve_just(Ilist g, Just_type type);
162
Just demod_just(I3list steps);
164
Just para_just(Just_type rule,
165
Topform from, Ilist from_vec,
166
Topform into, Ilist into_vec);
168
Just instance_just(Topform parent, Plist pairs);
170
Just para_just_rev_copy(Just_type rule,
171
Topform from, Ilist from_vec,
172
Topform into, Ilist into_vec);
174
Just unit_del_just(Topform deleter, int literal_num);
176
Just flip_just(int n);
180
Just merge_just(int n);
182
Just eval_just(int n);
184
Just append_just(Just j1, Just j2);
186
Just copy_justification(Just j);
188
char *jstring(Just j);
190
int jmap1(I3list map, int i);
192
char *jmap2(I3list map, int i, char *a);
194
void sb_append_id(String_buf sb, int id, I3list map);
196
void sb_write_ids(String_buf sb, Ilist p, I3list map);
198
void sb_write_just(String_buf sb, Just just, I3list map);
200
void sb_xml_write_just(String_buf sb, Just just, I3list map);
204
void zap_just(Just just);
206
Ilist get_parents(Just just, BOOL all);
208
Topform first_negative_parent(Topform c);
210
Plist get_clause_ancestors(Topform c);
212
int proof_length(Plist proof);
214
void map_just(Just just, I2list map);
216
int just_count(Just j);
218
void mark_parents_as_used(Topform c);
220
int clause_level(Topform c);
222
Just term_to_just(Term lst);
224
BOOL primary_just_type(Topform c, Just_type t);
226
BOOL has_input_just(Topform c);
228
BOOL has_copy_just(Topform c);
230
BOOL has_copy_flip_just(Topform c);
232
void sb_tagged_write_just(String_buf sb, Just just, I3list map);
234
#endif /* conditional compilation of whole file */