1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Morgan Deters, Gereon Kremer, Mathias Preiner |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* Interface to a public class that provides compile-time information |
14 |
|
* about the cvc5 library. |
15 |
|
*/ |
16 |
|
|
17 |
|
#include "cvc5_public.h" |
18 |
|
|
19 |
|
#ifndef CVC5__CONFIGURATION_H |
20 |
|
#define CVC5__CONFIGURATION_H |
21 |
|
|
22 |
|
#include <string> |
23 |
|
#include <vector> |
24 |
|
|
25 |
|
#include "cvc5_export.h" |
26 |
|
|
27 |
|
namespace cvc5 { |
28 |
|
|
29 |
|
/** |
30 |
|
* Represents the (static) configuration of cvc5. |
31 |
|
*/ |
32 |
|
class CVC5_EXPORT Configuration |
33 |
|
{ |
34 |
|
private: |
35 |
|
/** Private default ctor: Disallow construction of this class */ |
36 |
|
Configuration(); |
37 |
|
|
38 |
|
// these constants are filled in by the build system |
39 |
|
static const bool GIT_BUILD; |
40 |
|
static const bool CVC5_IS_RELEASE; |
41 |
|
static const char* const CVC5_VERSION; |
42 |
|
static const char* const CVC5_FULL_VERSION; |
43 |
|
static const char* const CVC5_GIT_INFO; |
44 |
|
|
45 |
|
public: |
46 |
|
|
47 |
|
static std::string getName(); |
48 |
|
|
49 |
|
static bool isDebugBuild(); |
50 |
|
|
51 |
2726 |
static constexpr bool isStatisticsBuild() |
52 |
|
{ |
53 |
|
#ifdef CVC5_STATISTICS_ON |
54 |
2726 |
return true; |
55 |
|
#else |
56 |
|
return false; |
57 |
|
#endif |
58 |
|
} |
59 |
|
|
60 |
|
static bool isTracingBuild(); |
61 |
|
|
62 |
|
static bool isDumpingBuild(); |
63 |
|
|
64 |
|
static bool isMuzzledBuild(); |
65 |
|
|
66 |
|
static bool isAssertionBuild(); |
67 |
|
|
68 |
|
static bool isCoverageBuild(); |
69 |
|
|
70 |
|
static bool isProfilingBuild(); |
71 |
|
|
72 |
|
static bool isAsanBuild(); |
73 |
|
|
74 |
|
static bool isUbsanBuild(); |
75 |
|
|
76 |
|
static bool isTsanBuild(); |
77 |
|
|
78 |
|
static bool isCompetitionBuild(); |
79 |
|
|
80 |
|
static bool isStaticBuild(); |
81 |
|
|
82 |
|
static std::string getPackageName(); |
83 |
|
|
84 |
|
static std::string getVersionString(); |
85 |
|
|
86 |
|
static std::string copyright(); |
87 |
|
|
88 |
|
static std::string about(); |
89 |
|
|
90 |
|
static bool licenseIsGpl(); |
91 |
|
|
92 |
|
static bool isBuiltWithGmp(); |
93 |
|
|
94 |
|
static bool isBuiltWithCln(); |
95 |
|
|
96 |
|
static bool isBuiltWithGlpk(); |
97 |
|
|
98 |
|
static bool isBuiltWithCryptominisat(); |
99 |
|
|
100 |
|
static bool isBuiltWithKissat(); |
101 |
|
|
102 |
|
static bool isBuiltWithEditline(); |
103 |
|
|
104 |
|
static bool isBuiltWithPoly(); |
105 |
|
|
106 |
|
/* Return a sorted array of the debug tags name */ |
107 |
|
static const std::vector<std::string>& getDebugTags(); |
108 |
|
/* Test if the given argument is a known debug tag name */ |
109 |
|
static bool isDebugTag(const std::string& tag); |
110 |
|
|
111 |
|
/* Return a sorted array of the trace tags name */ |
112 |
|
static const std::vector<std::string>& getTraceTags(); |
113 |
|
/* Test if the given argument is a known trace tag name */ |
114 |
|
static bool isTraceTag(const std::string& tag); |
115 |
|
|
116 |
|
static bool isGitBuild(); |
117 |
|
static std::string getGitInfo(); |
118 |
|
|
119 |
|
static std::string getCompiler(); |
120 |
|
static std::string getCompiledDateTime(); |
121 |
|
|
122 |
|
}; /* class Configuration */ |
123 |
|
|
124 |
|
} // namespace cvc5 |
125 |
|
|
126 |
|
#endif /* CVC5__CONFIGURATION_H */ |