--segv-nospin is now default.
[cvc5.git] / src / main / main.h
1 /********************* */
2 /*! \file main.h
3 ** \verbatim
4 ** Original author: Morgan Deters
5 ** Major contributors: none
6 ** Minor contributors (to current version): none
7 ** This file is part of the CVC4 project.
8 ** Copyright (c) 2009-2013 New York University and The University of Iowa
9 ** See the file COPYING in the top-level source directory for licensing
10 ** information.\endverbatim
11 **
12 ** \brief Header for main CVC4 driver
13 **
14 ** Header for main CVC4 driver.
15 **/
16
17 #include <exception>
18 #include <string>
19
20 #include "options/options.h"
21 #include "expr/expr_manager.h"
22 #include "smt/smt_engine.h"
23 #include "util/exception.h"
24 #include "util/statistics.h"
25 #include "util/tls.h"
26 #include "util/statistics_registry.h"
27 #include "cvc4autoconfig.h"
28
29 #ifndef __CVC4__MAIN__MAIN_H
30 #define __CVC4__MAIN__MAIN_H
31
32 namespace CVC4 {
33 namespace main {
34
35 class CommandExecutor;
36
37 /** Full argv[0] */
38 extern const char* progPath;
39
40 /** Just the basename component of argv[0] */
41 extern const char* progName;
42
43 /** A reference for use by the signal handlers to print statistics */
44 extern CVC4::main::CommandExecutor* pExecutor;
45
46 /** A reference for use by the signal handlers to print statistics */
47 extern CVC4::TimerStat* pTotalTime;
48
49 /**
50 * If true, will not spin on segfault even when CVC4_DEBUG is on.
51 * Useful for nightly regressions, noninteractive performance runs
52 * etc. See util.cpp.
53 */
54 extern bool segvSpin;
55
56 /** A pointer to the options in play */
57 extern CVC4_THREADLOCAL(Options*) pOptions;
58
59 /** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. */
60 void cvc4_init() throw(Exception);
61
62 }/* CVC4::main namespace */
63 }/* CVC4 namespace */
64
65 /** Actual Cvc4 driver functions **/
66 int runCvc4(int argc, char* argv[], CVC4::Options&);
67 void printUsage(CVC4::Options&, bool full = false);
68
69 #endif /* __CVC4__MAIN__MAIN_H */