1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.6),
3 // last updated on Nov 2, 1999.
4 // The original source file is "rwmix.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
8 ///////////////////////////////////////////////////////////////////////////////
10 // This file implements the rewriting partial evaluator/supercompiler.
11 // This is used to optimize Prop's rewriting systems.
13 ///////////////////////////////////////////////////////////////////////////////
14 #include <AD/automata/topdowng.h>
24 ///////////////////////////////////////////////////////////////////////////////
26 // The constructors and destructors
28 ///////////////////////////////////////////////////////////////////////////////
29 RewriteMix::RewriteMix() { reduction_limit
= 10; }
30 RewriteMix::~RewriteMix() {}
32 ///////////////////////////////////////////////////////////////////////////////
34 // Method to optimize a set of rewrite rules.
35 // Currently, we'll only optimize if there are no other rules
36 // except bottomup rules.
38 ///////////////////////////////////////////////////////////////////////////////
39 void RewriteMix::optimize_rewrite()
40 { if (options
.optimize_rewrite
&& Fmap
!= 0)
41 { if (Fmap
->topdown_rule_map
.size() > 0 ||
42 Fmap
->preorder_rule_map
.size() > 0 ||
43 Fmap
->postorder_rule_map
.size() > 0 ||
44 Fmap
->before_rule_map
.size() > 0)
45 { msg("%Lrewrite class %s will not be optimized due to the presence"
46 " of non-bottomup rules\n",Fmap
->class_name
);
50 msg("%Lpartial evaluating rewrite class %s\n", Fmap
->class_name
);
53 msg("%Lfinished optimizing rewrite class %s\n", Fmap
->class_name
);
58 ------------------------------- Statistics -------------------------------
59 Merge matching rules = yes
60 Number of DFA nodes merged = 0
61 Number of ifs generated = 0
62 Number of switches generated = 0
65 Adaptive matching = enabled
66 Fast string matching = disabled
67 Inline downcasts = enabled
68 --------------------------------------------------------------------------