metaSMT git
|
assertion groups. More...
Classes | |
struct | metaSMT::Group_Context< Solver > |
Namespaces | |
namespace | metaSMT::features |
Typedefs | |
typedef unsigned | metaSMT::guard_type |
Functions | |
template<typename Context > | |
guard_type | metaSMT::create_group (Context &ctx) |
create a new constraint group | |
template<typename Context > | |
void | metaSMT::delete_group (Context &ctx, guard_type guard) |
delete a constraint group | |
template<typename Context > | |
void | metaSMT::change_group (Context &ctx, guard_type guard) |
change the current constraint group | |
template<typename Context > | |
guard_type | metaSMT::current_group (Context &ctx) |
get the current group guard |
assertion groups.
An API that allows grouping of constraints. groups can be freely created and destroyed. The assertions and assumptions are automatically added to the currently selected group. Changing group is possible at any time.
Groups are created by adding a guard variable (implication) to each expression.
// enable Group API for ctx DirectSolver_Context< Group_Context<Context> > ctx; guard_type main = current_group(ctx); // create and select a group guard_type g1 = create_group(ctx); // add assertions and solve assertion( equal(True, False); solve(ctx); // UNSAT, remove the Group change_group(ctx, main); delete_group(ctx, g1);
Note that the current group can not be deleted because the current group would be undefined or non-deterministic.
typedef unsigned metaSMT::guard_type |
Definition at line 21 of file Group_Context.hpp.
void metaSMT::change_group | ( | Context & | ctx, |
guard_type | guard | ||
) |
change the current constraint group
ctx | The context to work on |
guard | The group to change to |
Definition at line 211 of file Group_Context.hpp.
guard_type metaSMT::create_group | ( | Context & | ctx | ) |
create a new constraint group
ctx | The context to work on |
Definition at line 175 of file Group_Context.hpp.
guard_type metaSMT::current_group | ( | Context & | ctx | ) |
get the current group guard
ctx | The context to work on |
Definition at line 226 of file Group_Context.hpp.
void metaSMT::delete_group | ( | Context & | ctx, |
guard_type | guard | ||
) |
delete a constraint group
ctx | The context to work on |
guard | The group to delete |
Behaviour is undefined if the current group is deleted. Call change_group before deleting the current group.
Definition at line 194 of file Group_Context.hpp.