not needed
[prop.git] / prop-src / options.h
blob9e325d479f5a228caec8a3e60be337b4a4fe6ed4
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // This file describes the options selected during translation.
4 //
5 ///////////////////////////////////////////////////////////////////////////////
6 #ifndef prop_options_h
7 #define prop_options_h
9 #include <AD/generic/generic.h>
10 #include <iostream>
12 ///////////////////////////////////////////////////////////////////////////////
14 // Include file dependency
16 ///////////////////////////////////////////////////////////////////////////////
17 struct IncludeDependency {
18 const char * file_name;
19 IncludeDependency * next;
20 inline IncludeDependency(const char * f, IncludeDependency * n)
21 : file_name(f), next(n) {}
22 static IncludeDependency * dependences;
23 static void add_dependency (const char *);
24 static void print_dependences ();
27 ///////////////////////////////////////////////////////////////////////////////
29 // Options are described by the following structure.
31 ///////////////////////////////////////////////////////////////////////////////
32 class PropOptions
34 PropOptions(const PropOptions&);
35 void operator = (const PropOptions&);
36 public:
37 Bool debug, // Turn on debugging
38 emit_code, // Emit code
39 strict_checking, // Be strict in semantic checking
40 line_directives, // Generate line directives in output
41 trace, // Generate tracing code in output
42 nonlinear_patterns, // Allow nonlinear patterns
43 merge_match, // Use merging in patterns
44 generate_report, // Generate report
45 burs, // Use the BURS algorithm
46 fast_string_match, // Use fast string matching algorithm
47 adaptive_matching, // Use adaptive pattern matching
48 inline_casts, // Generate inline casts
49 save_space, // Use space saving scheme
50 tagged_pointer, // Use tagged pointer scheme
51 GNU_style_message, // Use GNU style error messages
52 new_type_format, // Use new type format
53 gen_dependences, // Generate #include file dependences
54 new_list_format, // Generate new list code
55 visualization, // Generate VCG output
56 generate_html, // Generate html output
57 optimize_rewrite; // Optimize rewriting
58 int max_vector_len, // The maximum length of vector literals
59 verbosity; // Verbosity level
60 int optimization_level; // Optimization level
61 int max_embedded_tags; // Maximum number of embedded pointer tags
62 const char * prog_name; // name of prop
63 char output_file_name[256]; // name of output file
64 char search_paths[1024]; // search paths
65 const char * input_file_name; // name of input file
66 int file_count; // number of input files
67 const char * input_files[512]; // name of input files
68 int option_count; // number of options
69 const char * input_options[64];// options
70 char file_prefix[256]; // prefix of file name
71 char mangled_file_prefix[256]; // encoded for program use
72 char mangled_file_name[256]; // encoded for program use
73 char current_file_path[1024]; // file path of current input file
74 Bool to_stdout; // send output to stdout
75 Bool automake; // automatically recompile changed files
77 PropOptions();
78 ~PropOptions();
79 void process_command_line_arguments(int argc, const char * argv[]);
80 void compute_output_file_name();
81 std::istream * open_input_file(const char file_name[]);
84 extern PropOptions options;
86 ///////////////////////////////////////////////////////////////////////////////
88 // Features used are described by the following structure. We generate
89 // code so that only the features actually used are emitted. We'll keep
90 // track of which features are actually used in this structure.
92 ///////////////////////////////////////////////////////////////////////////////
93 struct Used {
94 static Bool rewriting, // Rewriting feature is used
95 infer, // Inference feature is used
96 gc, // Garbage collection is used
97 regexp, // Regular expressions are used
98 string_match, // String matching is used
99 printer, // Pretty printer is used
100 refcount, // Reference counting is used
101 persistence, // Persistence is used
102 objc, // Objective-C is used
103 equality, // Equality is used
104 unification, // Unification is used
105 vector, // Vector is used
106 parser, // Parser is generated
107 quark, // Quark literals are used
108 bigint, // Big integer literals are used
109 graph_type, // graph types are used
110 * tuple; // Tuples are used
113 #endif