/*******************************************************************\

Module:

Author: Daniel Kroening, kroening@cs.cmu.edu

\*******************************************************************/

#ifndef CPROVER_PROPDEC_AND_GRAPH_PROP_H
#define CPROVER_PROPDEC_AND_GRAPH_PROP_H

#include <assert.h>

#include <iostream>

#include "and_graph.h"

class and_graph_propt:public and_grapht, public propt
{
public:
  and_graph_propt()
  {
  }

  virtual bool has_set_to() { return false; }
 
  virtual literalt land(literalt a, literalt b);
  virtual literalt lor(literalt a, literalt b);
  virtual literalt land(const bvt &bv);
  virtual literalt lor(const bvt &bv);
  virtual void lcnf(const bvt &bv) { assert(0); }
  virtual literalt lnot(literalt a);
  virtual literalt lxor(literalt a, literalt b);
  virtual literalt lxor(const bvt &bv);
  virtual literalt lnand(literalt a, literalt b);
  virtual literalt lnor(literalt a, literalt b);
  virtual literalt lequal(literalt a, literalt b);
  virtual literalt limplies(literalt a, literalt b);
  virtual literalt lselect(literalt a, literalt b, literalt c); // a?b:c

  virtual literalt constant(bool value)
  {
    return value?_const_1:_const_0;
  }

  virtual literalt new_literal()
  {
    return new_node();
  }

  virtual unsigned no_literals() const
  { return nodes.size(); }

  virtual void l_set_to(literalt a, bool value);

  virtual const std::string solver_text()
  { return "conversion into and-inverter graph"; }

  virtual tvt l_get(literalt a) const
  { assert(0); return tvt(tvt::TV_UNKNOWN); }
  
  virtual resultt prop_solve()
  { assert(0); return P_ERROR; }
};

#endif
