Skip to content

Commit 72d0ed0

Browse files
committed
rename post_process to finish_eager_conversion
This renames a set of solver methods from post_process to finish_eager_conversion. The term 'post processing' may be used either in lazy or eager solving. The new name clarifies that this is about an eager conversion.
1 parent 9b72a5c commit 72d0ed0

File tree

12 files changed

+28
-23
lines changed

12 files changed

+28
-23
lines changed

src/solvers/flattening/arrays.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class arrayst:public equalityt
3636
message_handlert &message_handler,
3737
bool get_array_constraints = false);
3838

39-
void post_process() override
39+
void finish_eager_conversion() override
4040
{
41-
post_process_arrays();
42-
SUB::post_process();
41+
finish_eager_conversion_arrays();
42+
SUB::finish_eager_conversion();
4343
if(get_array_constraints)
4444
display_array_constraint_count();
4545
}
@@ -55,7 +55,7 @@ class arrayst:public equalityt
5555
messaget log;
5656
message_handlert &message_handler;
5757

58-
virtual void post_process_arrays()
58+
virtual void finish_eager_conversion_arrays()
5959
{
6060
add_array_constraints();
6161
}

src/solvers/flattening/boolbv.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ class boolbvt:public arrayst
7272
bv_cache.clear();
7373
}
7474

75-
void post_process() override
75+
void finish_eager_conversion() override
7676
{
77-
post_process_quantifiers();
78-
functions.post_process();
79-
SUB::post_process();
77+
finish_eager_conversion_quantifiers();
78+
functions.finish_eager_conversion();
79+
SUB::finish_eager_conversion();
8080
}
8181

8282
enum class unbounded_arrayt { U_NONE, U_ALL, U_AUTO };
@@ -266,7 +266,7 @@ class boolbvt:public arrayst
266266
typedef std::list<quantifiert> quantifier_listt;
267267
quantifier_listt quantifier_list;
268268

269-
void post_process_quantifiers();
269+
void finish_eager_conversion_quantifiers();
270270

271271
typedef std::vector<std::size_t> offset_mapt;
272272
offset_mapt build_offset_map(const struct_typet &src);

src/solvers/flattening/boolbv_quantifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ literalt boolbvt::convert_quantifier(const quantifier_exprt &src)
271271
return quantifier_list.back().l;
272272
}
273273

274-
void boolbvt::post_process_quantifiers()
274+
void boolbvt::finish_eager_conversion_quantifiers()
275275
{
276276
if(quantifier_list.empty())
277277
return;

src/solvers/flattening/bv_pointers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,10 +976,10 @@ void bv_pointerst::do_postponed(
976976
UNREACHABLE;
977977
}
978978

979-
void bv_pointerst::post_process()
979+
void bv_pointerst::finish_eager_conversion()
980980
{
981981
// post-processing arrays may yield further objects, do this first
982-
SUB::post_process();
982+
SUB::finish_eager_conversion();
983983

984984
for(postponed_listt::const_iterator
985985
it=postponed_list.begin();

src/solvers/flattening/bv_pointers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class bv_pointerst:public boolbvt
2424
message_handlert &message_handler,
2525
bool get_array_constraints = false);
2626

27-
void post_process() override;
27+
void finish_eager_conversion() override;
2828

2929
std::size_t boolbv_width(const typet &type) const override
3030
{

src/solvers/flattening/equality.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ class equalityt:public prop_conv_solvert
2626

2727
virtual literalt equality(const exprt &e1, const exprt &e2);
2828

29-
void post_process() override
29+
using SUB = prop_conv_solvert;
30+
31+
void finish_eager_conversion() override
3032
{
3133
add_equality_constraints();
32-
prop_conv_solvert::post_process();
34+
SUB::finish_eager_conversion();
3335
typemap.clear(); // if called incrementally, don't do it twice
3436
}
3537

@@ -50,6 +52,8 @@ class equalityt:public prop_conv_solvert
5052
typemapt typemap;
5153

5254
virtual literalt equality2(const exprt &e1, const exprt &e2);
55+
56+
// an eager conversion of the transitivity constraints
5357
virtual void add_equality_constraints();
5458
virtual void add_equality_constraints(const typestructt &typestruct);
5559
};

src/solvers/lowering/functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class functionst
3333

3434
void record(const function_application_exprt &function_application);
3535

36-
virtual void post_process()
36+
virtual void finish_eager_conversion()
3737
{
3838
add_function_constraints();
3939
}

src/solvers/prop/prop_conv_solver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ void prop_conv_solvert::ignoring(const exprt &expr)
429429
log.warning() << "warning: ignoring " << expr.pretty() << messaget::eom;
430430
}
431431

432-
void prop_conv_solvert::post_process()
432+
void prop_conv_solvert::finish_eager_conversion()
433433
{
434434
}
435435

@@ -441,7 +441,7 @@ decision_proceduret::resultt prop_conv_solvert::dec_solve()
441441
const auto post_process_start = std::chrono::steady_clock::now();
442442

443443
log.statistics() << "Post-processing" << messaget::eom;
444-
post_process();
444+
finish_eager_conversion();
445445
post_processing_done = true;
446446

447447
const auto post_process_stop = std::chrono::steady_clock::now();

src/solvers/prop/prop_conv_solver.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class prop_conv_solvert : public conflict_providert,
3535

3636
virtual ~prop_conv_solvert() = default;
3737

38+
// non-iterative eager conversion
39+
virtual void finish_eager_conversion();
40+
3841
// overloading from decision_proceduret
3942
decision_proceduret::resultt dec_solve() override;
4043
void print_assignment(std::ostream &out) const override;
@@ -99,8 +102,6 @@ class prop_conv_solvert : public conflict_providert,
99102
void enable_hardness_collection() override;
100103

101104
protected:
102-
virtual void post_process();
103-
104105
bool post_processing_done = false;
105106

106107
/// Get a _boolean_ value from the model if the formula is satisfiable.

src/solvers/refinement/bv_refinement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class bv_refinementt:public bv_pointerst
4949
protected:
5050

5151
// Refine array
52-
void post_process_arrays() override;
52+
void finish_eager_conversion_arrays() override;
5353

5454
// Refine arithmetic
5555
bvt convert_mult(const mult_exprt &expr) override;

src/solvers/refinement/bv_refinement_loop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ decision_proceduret::resultt bv_refinementt::dec_solve()
2525
{
2626
// do the usual post-processing
2727
log.status() << "BV-Refinement: post-processing" << messaget::eom;
28-
post_process();
28+
finish_eager_conversion();
2929

3030
log.debug() << "Solving with " << prop.solver_text() << messaget::eom;
3131

src/solvers/refinement/refine_arrays.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Author: Daniel Kroening, [email protected]
1818
#include <solvers/sat/satcheck.h>
1919

2020
/// generate array constraints
21-
void bv_refinementt::post_process_arrays()
21+
void bv_refinementt::finish_eager_conversion_arrays()
2222
{
2323
collect_indices();
2424
// at this point all indices should in the index set

0 commit comments

Comments
 (0)