Skip to content

HowToAddNewDomain

caballa edited this page Mar 16, 2022 · 2 revisions

All abstract domains must derive from the abstract_domain_api class (domains/abstract_domain.hpp) and expose publicly all its public typedef's.

Consider a new domain called my_new_domain:

 template<typename Number, typename VariableName>
 class my_new_domain final: public
     abstract_domain_api<my_new_domain<Number,VariableName>> {
     ...
     bool is_bottom() const override {...}
     bool is_top() const override {...}
     ...
 };
 
 template<typename Number, typename VariableName>
  struct abstract_domain_traits<my_new_domain<Number,VariableName>> {
    using number_t = Number;
    using varname_t = VariableName;
  };
Clone this wiki locally