00001 #ifndef __OCCURENCES__
00002 #define __OCCURENCES__
00003
00004 #include "tlib.hh"
00005
00006
00007 class Occurences
00008 {
00009 const int fXVariability;
00010 int fOccurences[4];
00011 bool fMultiOcc;
00012 bool fOutDelayOcc;
00013 int fMaxDelay;
00014
00015 public:
00016 Occurences(int v, int r);
00017
00018 Occurences* incOccurences(int v, int r, int d);
00019
00020 bool hasMultiOccurences() const;
00021 bool hasOutDelayOccurences() const;
00022 int getMaxDelay() const;
00023 };
00024
00025
00030 class OccMarkup
00031 {
00032 Tree fRootTree;
00033 Tree fPropKey;
00034
00035 void incOcc (Tree env, int v, int r, int d, Tree t);
00036 Occurences* getOcc (Tree t);
00037 void setOcc (Tree t, Occurences* occ);
00038
00039 public:
00040 void mark(Tree root);
00041 Occurences* retrieve(Tree t);
00042 };
00043
00044
00045
00046 #endif