gcc config
[prop.git] / prop-src / dataflow.ph
blobf3bad5784d344fca44fc4f911ccf4545918d33dc
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 //  This file contains the interface of the dataflow analyzer generator.
4 //
5 ///////////////////////////////////////////////////////////////////////////////
6 #ifndef dataflow_analyzer_generator_h
7 #define dataflow_analyzer_generator_h
9 #include "basics.ph"
10 #include "codegen.h"
11 #include "classdef.h"
13 ///////////////////////////////////////////////////////////////////////////////
15 //  Forward type definitions
17 ///////////////////////////////////////////////////////////////////////////////
18 datatype Ty and Exp;
20 ///////////////////////////////////////////////////////////////////////////////
22 //  Datatype 'Domain' is denotes the structure of an abstract domain.
24 ///////////////////////////////////////////////////////////////////////////////
25 datatype Domain : public Loc =
26     UNITdom                 // unit
27   | FINSETdom    Ty         // finite set of a type
28   | LIFTdom      Domain     // lifted domain
29   | SUMdom       Domains    // sum domain
30   | PRODUCTdom   Domains    // product domain
32 where type Domains = List<Domain>  // a sequence of domains.
35 ///////////////////////////////////////////////////////////////////////////////
37 //  Pretty printing methods
39 ///////////////////////////////////////////////////////////////////////////////
40 extern ostream& operator << (ostream&, Domain);
42 ///////////////////////////////////////////////////////////////////////////////
44 //  Dataflow class definitions
46 ///////////////////////////////////////////////////////////////////////////////
47 class DataflowClass : public ClassDefinition
48 {  DataflowClass(const DataflowClass&);
49    void operator = (const DataflowClass&);
50 public:
51    DataflowClass(Id, Inherits, TyQual, Decls);
52   ~DataflowClass();
53    virtual void gen_class_interface(CodeGen&);
56 ///////////////////////////////////////////////////////////////////////////////
58 //  The interface of the dataflow analyzer compiler.
60 ///////////////////////////////////////////////////////////////////////////////
61 class DataflowCompiler : public virtual CodeGen { 
62     DataflowCompiler(const DataflowCompiler&);
63     void operator = (const DataflowCompiler&);
64 public:
65    ////////////////////////////////////////////////////////////////////////////
66    //
67    //  Constructor and destructor
68    //
69    ////////////////////////////////////////////////////////////////////////////
70              DataflowCompiler ();
71     virtual ~DataflowCompiler ();
75 #endif