// -*- C++ -*- (c) 2016 Henrich Lauko #pragma once #include #include #include #include #include #include DIVINE_RELAX_WARNINGS #include DIVINE_UNRELAX_WARNINGS namespace lart { namespace abstract { struct Substitution : lart::Pass { enum Type { Trivial, Zero, Symbolic }; Substitution( Type t ) : type( t ) {} Substitution( Substitution && s ) : type( s.type ), builder( std::move( s.builder ) ) {} virtual ~Substitution() {} static PassMeta meta() { return passMetaC( "Substitution", "Substitutes abstract values by concrete abstraction.", []( llvm::ModulePassManager &mgr, std::string opt ) { return mgr.addPass( Substitution( getType( opt ) ) ); } ); } static Type getType( std::string opt ) { if ( opt == "trivial" ) return Type::Trivial; if ( opt == "zero" ) return Type::Zero; if ( opt == "sym" ) return Type::Symbolic; std::cerr << "Unsupported abstraction " << opt <