Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Miniscope.hpp

Go to the documentation of this file.
00001 
00027 //
00028 //  file Miniscope.hpp
00029 //  defines class Miniscope for miniscoping
00030 //  Torrevieja, April 2003
00031 //
00032 
00033 #ifndef __Miniscope__
00034 #define __Miniscope__
00035 
00036 
00037 #include "Position.hpp"
00038 #include "Formula.hpp"
00039 
00040 
00041 class Miniscope 
00042 {
00043  public:
00044   // constructor, destructor
00045   Miniscope (Formula::Connective Q, 
00046              const VarList& vars, 
00047              const Formula&,
00048              const Position& pos);
00049   ~Miniscope ();
00050 
00051   bool noMiniscoping () const; // no miniscoping is possible
00052   void pushOnes (InferenceList&);
00053   bool pushMany (InferenceList&);
00054   void result (Formula& res); // set res to result
00055 
00056  private:
00057   Formula::Connective _quant; //
00058   const Formula& _formula;
00059   const int _nfs; // number of formulas
00060   int _realNfs;   // number of non-deleted formulas
00061   int _nvs;       // number of variables
00062   bool** _occ;    // array or arrays to allocate occurrences
00063   bool* _mem;     // memory for storing _occ[i]
00064   bool** _index;   // for every variable, give its allocation in the array, needed only in the constructor
00065   Var* _vars;     // array of variables
00066   int* _N;        // N[i] is the number of formulas among Fj in which vi occurs
00067   Var _maxV;      // maximal variable in vs
00068   Formula* _formulas; // formulas in the list, 0 if deleted
00069   Position _position;
00070 
00071   void count (const Formula&, int formNumber);
00072   void count (const Term&, int formNumber);
00073   void pushOne (Var v, int k, InferenceList&);
00074   void occurInSameFormulas (int v, IntList& vs) const; 
00075   bool occurInSameFormulas (int v, int w) const; 
00076   void decodeVars (const IntList& in, VarList& out) const;
00077   void decodeFormulas (const IntList& in, IntList& out) const;
00078   void decodeFormulas (const IntList& in, IntList& out, 
00079                        int inIndex, int outIndex) const;
00080   void deleteVars (const IntList& vs);
00081   void partition (const FormulaList& F, Var v, FormulaList& G, FormulaList& H);
00082 }; // class Miniscope
00083 
00084 
00085 #endif // __Miniscope__

Generated on Sat Jun 28 15:08:57 2003 for Vampire by doxygen 1.3.2