#ifndef __FORENSICS_SHIFTPROPAGATOR_HH__
#define __FORENSICS_SHIFTPROPAGATOR_HH__

#include "forensics-gecode.hh"


class Shift : public Gecode::Propagator
{
protected:
  Gecode::Int::IntView x0;
  Gecode::Int::IntView x1;
  int64_t m_block_offset;

public:
  Shift (Gecode::Space& home, Gecode::Int::IntView x0, Gecode::Int::IntView x1, int64_t block_offset);

  Shift (Gecode::Space& home, bool share, Shift& p);

  virtual Propagator* copy (Gecode::Space& home, bool share);

  virtual size_t dispose (Gecode::Space& home);

  virtual Gecode::PropCost cost (const Gecode::Space& home, const Gecode::ModEventDelta& med) const;
  
  virtual Gecode::ExecStatus propagate (Gecode::Space& home, const Gecode::ModEventDelta& med);

  static Gecode::ExecStatus post (Gecode::Space& home, Gecode::Int::IntView x0, Gecode::Int::IntView x1, int64_t block_offset);
};


void shift (Gecode::Space& home, Gecode::IntVar x0, Gecode::IntVar x1, int64_t block_offset);

#endif

