2002-01-20 22:54:45 +00:00
|
|
|
/* Title: ValueSet.h -*- C++ -*-
|
2001-07-24 17:14:13 +00:00
|
|
|
Author: Ruchira Sasanka
|
|
|
|
Date: Jun 30, 01
|
|
|
|
Purpose: Contains a mathematical set of Values. LiveVarSet is derived from
|
2001-08-20 21:11:01 +00:00
|
|
|
this. Contains both class and method definitions.
|
2001-07-24 17:14:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VALUE_SET_H
|
|
|
|
#define VALUE_SET_H
|
|
|
|
|
2002-01-20 22:54:45 +00:00
|
|
|
class Value;
|
2002-02-04 16:33:18 +00:00
|
|
|
#include <set>
|
2001-07-24 17:14:13 +00:00
|
|
|
|
2001-08-20 21:11:01 +00:00
|
|
|
//------------------- Class Definition for ValueSet --------------------------
|
2001-07-24 17:14:13 +00:00
|
|
|
|
2002-02-04 16:33:18 +00:00
|
|
|
void printValue( const Value *v); // func to print a Value
|
2001-07-24 17:14:13 +00:00
|
|
|
|
2002-02-04 16:33:18 +00:00
|
|
|
struct ValueSet : public std::set<const Value*> {
|
2001-08-20 21:11:01 +00:00
|
|
|
bool setUnion( const ValueSet *const set1); // for performing set union
|
|
|
|
void setSubtract( const ValueSet *const set1); // for performing set diff
|
|
|
|
|
2001-07-24 17:14:13 +00:00
|
|
|
void setDifference( const ValueSet *const set1, const ValueSet *const set2);
|
|
|
|
|
2001-08-20 21:11:01 +00:00
|
|
|
void printSet() const; // for printing a live variable set
|
2001-07-24 17:14:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|