metaSMT git

metaSMT/Debug_Context.hpp

Go to the documentation of this file.
00001 #pragma once
00002 #include "Features.hpp"
00003 #include "support/protofy.hpp"
00004 #include <boost/proto/debug.hpp>
00005 #include <cstdio>
00006 
00007 namespace metaSMT {
00008 
00009   template<typename Solver>
00010   struct Debug_Context : Solver {};
00011   
00012   template <typename Solver, typename Expr>
00013   void assertion( Debug_Context<Solver> & ctx, Expr const & e )
00014   {
00015     std::printf("DEBUG assertion:\n");
00016     boost::proto::display_expr(detail::protofy(e));
00017     metaSMT::assertion( (Solver&) ctx, e );
00018   }
00019   
00020   template <typename Solver, typename Expr>
00021   void assumption( Debug_Context<Solver> & ctx, Expr const & e )
00022   {
00023     std::printf("DEBUG assumption:\n");
00024     boost::proto::display_expr(detail::protofy(e));
00025     metaSMT::assumption( (Solver&) ctx, e );
00026   }
00027 
00028   namespace features {
00029     template<typename Context, typename Feature>
00030     struct supports< Debug_Context<Context>, Feature>
00031     : supports<Context, Feature>::type {};
00032   }
00033 
00034   
00035 } /* metaSMT */
00036 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines