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 |
|
|
24 |
|
#include "cvc5_export.h" |
25 |
|
|
26 |
|
namespace cvc5 { |
27 |
|
|
28 |
|
/** |
29 |
|
* Represents the (static) configuration of cvc5. |
30 |
|
*/ |
31 |
|
class CVC5_EXPORT Configuration |
32 |
|
{ |
33 |
|
private: |
34 |
|
/** Private default ctor: Disallow construction of this class */ |
35 |
|
Configuration(); |
36 |
|
|
37 |
|
// these constants are filled in by the build system |
38 |
|
static const bool IS_GIT_BUILD; |
39 |
|
static const char* const GIT_BRANCH_NAME; |
40 |
|
static const char* const GIT_COMMIT; |
41 |
|
static const bool GIT_HAS_MODIFICATIONS; |
42 |
|
|
43 |
|
public: |
44 |
|
|
45 |
|
static std::string getName(); |
46 |
|
|
47 |
|
static bool isDebugBuild(); |
48 |
|
|
49 |
2599 |
static constexpr bool isStatisticsBuild() |
50 |
|
{ |
51 |
|
#ifdef CVC5_STATISTICS_ON |
52 |
2599 |
return true; |
53 |
|
#else |
54 |
|
return false; |
55 |
|
#endif |
56 |
|
} |
57 |
|
|
58 |
|
static bool isTracingBuild(); |
59 |
|
|
60 |
|
static bool isDumpingBuild(); |
61 |
|
|
62 |
|
static bool isMuzzledBuild(); |
63 |
|
|
64 |
|
static bool isAssertionBuild(); |
65 |
|
|
66 |
|
static bool isCoverageBuild(); |
67 |
|
|
68 |
|
static bool isProfilingBuild(); |
69 |
|
|
70 |
|
static bool isAsanBuild(); |
71 |
|
|
72 |
|
static bool isUbsanBuild(); |
73 |
|
|
74 |
|
static bool isTsanBuild(); |
75 |
|
|
76 |
|
static bool isCompetitionBuild(); |
77 |
|
|
78 |
|
static bool isStaticBuild(); |
79 |
|
|
80 |
|
static std::string getPackageName(); |
81 |
|
|
82 |
|
static std::string getVersionString(); |
83 |
|
|
84 |
|
static unsigned getVersionMajor(); |
85 |
|
|
86 |
|
static unsigned getVersionMinor(); |
87 |
|
|
88 |
|
static unsigned getVersionRelease(); |
89 |
|
|
90 |
|
static std::string getVersionExtra(); |
91 |
|
|
92 |
|
static std::string copyright(); |
93 |
|
|
94 |
|
static std::string about(); |
95 |
|
|
96 |
|
static bool licenseIsGpl(); |
97 |
|
|
98 |
|
static bool isBuiltWithGmp(); |
99 |
|
|
100 |
|
static bool isBuiltWithCln(); |
101 |
|
|
102 |
|
static bool isBuiltWithGlpk(); |
103 |
|
|
104 |
|
static bool isBuiltWithAbc(); |
105 |
|
|
106 |
|
static bool isBuiltWithCryptominisat(); |
107 |
|
|
108 |
|
static bool isBuiltWithKissat(); |
109 |
|
|
110 |
|
static bool isBuiltWithEditline(); |
111 |
|
|
112 |
|
static bool isBuiltWithPoly(); |
113 |
|
|
114 |
|
/* Return the number of debug tags */ |
115 |
|
static unsigned getNumDebugTags(); |
116 |
|
/* Return a sorted array of the debug tags name */ |
117 |
|
static char const* const* getDebugTags(); |
118 |
|
/* Test if the given argument is a known debug tag name */ |
119 |
|
static bool isDebugTag(char const *); |
120 |
|
|
121 |
|
/* Return the number of trace tags */ |
122 |
|
static unsigned getNumTraceTags(); |
123 |
|
/* Return a sorted array of the trace tags name */ |
124 |
|
static char const* const* getTraceTags(); |
125 |
|
/* Test if the given argument is a known trace tag name */ |
126 |
|
static bool isTraceTag(char const *); |
127 |
|
|
128 |
|
static bool isGitBuild(); |
129 |
|
static const char* getGitBranchName(); |
130 |
|
static const char* getGitCommit(); |
131 |
|
static bool hasGitModifications(); |
132 |
|
static std::string getGitId(); |
133 |
|
|
134 |
|
static std::string getCompiler(); |
135 |
|
static std::string getCompiledDateTime(); |
136 |
|
|
137 |
|
}; /* class Configuration */ |
138 |
|
|
139 |
|
} // namespace cvc5 |
140 |
|
|
141 |
|
#endif /* CVC5__CONFIGURATION_H */ |