gcc config
[prop.git] / prop-src / infgen.h
blobfdc2a5f3134787568324093f291624698f46ff79
1 ///////////////////////////////////////////////////////////////////////////////
2 // The inference compiler
3 ///////////////////////////////////////////////////////////////////////////////
4 #ifndef inference_compiler_h
5 #define inference_compiler_h
7 #include "rwgen.h"
8 #include "classdef.h"
10 ///////////////////////////////////////////////////////////////////////////////
12 // Class to represent an inference class.
14 ///////////////////////////////////////////////////////////////////////////////
15 class InferenceClass : public ClassDefinition
16 { InferenceClass(const InferenceClass&);
17 void operator = (const InferenceClass&);
18 public:
19 InferenceClass(Id, Inherits, TyQual, Decls);
20 ~InferenceClass();
21 virtual void gen_class_interface(CodeGen&);
24 ///////////////////////////////////////////////////////////////////////////////
26 // Inference compiler.
28 ///////////////////////////////////////////////////////////////////////////////
29 class InferenceCompiler : virtual public RewritingCompiler {
31 InferenceCompiler(const InferenceCompiler&); // no copy constructor
32 void operator = (const InferenceCompiler&); // no assignment
34 public:
35 ////////////////////////////////////////////////////////////////////////////
36 // Constructor and destructor
37 ////////////////////////////////////////////////////////////////////////////
38 InferenceCompiler();
39 ~InferenceCompiler();
41 protected:
42 ////////////////////////////////////////////////////////////////////////////
43 // Methods for compiling inference rules
44 ////////////////////////////////////////////////////////////////////////////
45 void gen_inference_rules (Id, InferenceRules);
46 void gen_alpha_tests (Id, int, class HashTable&);
47 void gen_beta_tests (Id, int, InferenceRule[], class HashTable&);
48 void gen_inference_axioms (Id, InferenceRules);
49 void gen_inference_actions (Id, InferenceRules);
50 void gen_dispatch_table (Id, class HashTable&);
51 int gen_network_table (Id, int, InferenceRule[], class HashTable&);
52 void gen_inference_constructor (Id, int, class HashTable&);
53 void gen_conclusions (Conclusions);
54 void gen_conclusion (Conclusion);
57 #endif