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