@@ -33,7 +33,7 @@ typedef struct clause_struct Clause;
33
33
struct clause_struct
34
34
{
35
35
Clause * next ;
36
- float cost ;
36
+ float totcost ;
37
37
float maxcost ;
38
38
Tconnector * c ;
39
39
};
@@ -138,7 +138,7 @@ static Clause * build_clause(Exp *e, clause_context *ct, Clause **c_last)
138
138
Clause * c1 = pool_alloc (ct -> Clause_pool );
139
139
c1 -> c = NULL ;
140
140
c1 -> next = NULL ;
141
- c1 -> cost = 0.0 ;
141
+ c1 -> totcost = 0.0 ;
142
142
c1 -> maxcost = 0.0 ;
143
143
for (Exp * opd = e -> operand_first ; opd != NULL ; opd = opd -> operand_next )
144
144
{
@@ -154,7 +154,7 @@ static Clause * build_clause(Exp *e, clause_context *ct, Clause **c_last)
154
154
155
155
Clause * c5 = pool_alloc (ct -> Clause_pool );
156
156
if ((c_head == NULL ) && (c_last != NULL )) * c_last = c5 ;
157
- c5 -> cost = c3 -> cost + c4 -> cost ;
157
+ c5 -> totcost = c3 -> totcost + c4 -> totcost ;
158
158
c5 -> maxcost = maxcost ;
159
159
c5 -> c = catenate (c4 -> c , c3 -> c , ct -> Tconnector_pool );
160
160
c5 -> next = c_head ;
@@ -191,7 +191,7 @@ static Clause * build_clause(Exp *e, clause_context *ct, Clause **c_last)
191
191
{
192
192
c = pool_alloc (ct -> Clause_pool );
193
193
c -> c = build_terminal (e , ct );
194
- c -> cost = 0.0 ;
194
+ c -> totcost = 0.0 ;
195
195
c -> maxcost = 0.0 ;
196
196
c -> next = NULL ;
197
197
if (c_last != NULL ) * c_last = c ;
@@ -204,7 +204,7 @@ static Clause * build_clause(Exp *e, clause_context *ct, Clause **c_last)
204
204
/* c now points to the list of clauses */
205
205
for (Clause * c1 = c ; c1 != NULL ; c1 = c1 -> next )
206
206
{
207
- c1 -> cost += e -> cost ;
207
+ c1 -> totcost += e -> cost ;
208
208
/* c1->maxcost = MAX(c1->maxcost,e->cost); */
209
209
/* Above is how Dennis had it. Someone changed it to below.
210
210
* However, this can sometimes lead to a maxcost that is less
@@ -286,7 +286,7 @@ build_disjunct(Sentence sent, Clause * cl, const char * string,
286
286
if (sat_solver || (!IS_GENERATION (sent -> dict ) || (' ' != string [0 ])))
287
287
{
288
288
ndis -> word_string = string ;
289
- ndis -> cost = cl -> cost ;
289
+ ndis -> cost = cl -> totcost ;
290
290
ndis -> is_category = 0 ;
291
291
}
292
292
else
@@ -300,8 +300,8 @@ build_disjunct(Sentence sent, Clause * cl, const char * string,
300
300
assert (sat_solver || ((ndis -> category [0 ].num > 0 ) &&
301
301
(ndis -> category [0 ].num < 64 * 1024 )),
302
302
"Insane category %u" , ndis -> category [0 ].num );
303
- ndis -> category [0 ].cost = cl -> cost ;
304
- // ndis->cost = cl->cost ; No! clobbers memory!
303
+ ndis -> category [0 ].cost = cl -> totcost ;
304
+ // ndis->cost = cl->totcost ; No! clobbers memory!
305
305
}
306
306
307
307
ndis -> originating_gword = (gword_set * )gs ; /* XXX remove constness */
@@ -364,7 +364,7 @@ GNUC_UNUSED static void print_clause_list(Clause * c)
364
364
{
365
365
for (;c != NULL ; c = c -> next ) {
366
366
printf (" Clause: " );
367
- printf ("(%4.2f, %4.2f) " , c -> cost , c -> maxcost );
367
+ printf ("(%4.2f, %4.2f) " , c -> totcost , c -> maxcost );
368
368
print_Tconnector_list (c -> c );
369
369
printf ("\n" );
370
370
}
0 commit comments