metaSMT git
Classes | Namespaces | Functions

Assertion Stack API

API

push and pop over assertions. More...

Classes

struct  metaSMT::Stack_emulation< Context >
struct  metaSMT::Stack< Context >

Namespaces

namespace  metaSMT::features

Functions

template<typename Context >
boost::enable_if
< features::supports< Context,
features::stack_api > >::type 
metaSMT::push (Context &ctx, unsigned howmany=1)
 assertion stack push funtion
template<typename Context >
boost::enable_if
< features::supports< Context,
features::stack_api > >::type 
metaSMT::pop (Context &ctx, unsigned howmany=1)
 assertion stack pop funtion

Detailed Description

push and pop over assertions.

Stack provides the ability to use SMT2-like push and pop operations.

For solvers without native support for stack operations push and pop can be emulated by using assumptions with Stack_emulation. However to ensure the availability of push and pop the context can be wrapped in Stack which will do the right thing.

  // ensure ctx supports push/pop
  DirectSolver_Context<Stack<Context> > ctx;
  
  // add a stack level
  push(ctx);
  // add assertions and solve
  assertion( equal(True, False);
  
  solve(ctx);
  // UNSAT, remove this stack level again
  pop(ctx);

Function Documentation

template<typename Context >
boost::enable_if< features::supports<Context, features::stack_api> >::type metaSMT::pop ( Context &  ctx,
unsigned  howmany = 1 
)

assertion stack pop funtion

Parameters:
ctxThe context to work on
howmanynumber of stack leves to pop, defaults to 1
Returns:
void

Definition at line 143 of file Stack.hpp.

template<typename Context >
boost::enable_if< features::supports<Context, features::stack_api> >::type metaSMT::push ( Context &  ctx,
unsigned  howmany = 1 
)

assertion stack push funtion

Parameters:
ctxThe context to work on
howmanynumber of stack leves to push, defaults to 1
Returns:
void

Definition at line 130 of file Stack.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines