@@ -138,35 +138,35 @@ static void processMethod(MethodKtests &ktestChunk,
138
138
bool hasError = false ;
139
139
for (auto const &entry : fs::directory_iterator (kleeOut)) {
140
140
auto const &path = entry.path ();
141
- if (Paths::isKtestJson (path)) {
141
+ if (Paths::isKtest (path)) {
142
142
if (Paths::hasEarly (path)) {
143
143
hasTimeout = true ;
144
144
} else if (Paths::hasInternalError (path)) {
145
145
hasError = true ;
146
146
} else {
147
- std::unique_ptr<TestCase , decltype (&TestCase_free )> ktestData{
148
- TC_fromFile (path.c_str ()), TestCase_free
147
+ std::unique_ptr<KTest , decltype (&kTest_free )> ktestData{
148
+ kTest_fromFile (path.c_str ()), kTest_free
149
149
};
150
150
if (ktestData == nullptr ) {
151
- LOG_S (WARNING) << " Unable to open .ktestjson file" ;
151
+ LOG_S (WARNING) << " Unable to open .ktest file" ;
152
152
continue ;
153
153
}
154
154
const std::vector<fs::path> &errorDescriptorFiles =
155
- Paths::getErrorDescriptors (path);
155
+ Paths::getErrorDescriptors (path);
156
156
157
157
UTBotKTest::Status status = errorDescriptorFiles.empty ()
158
- ? UTBotKTest::Status::SUCCESS
159
- : UTBotKTest::Status::FAILED;
160
- std::vector<ConcretizedObject > kTestObjects (
161
- ktestData-> objects , ktestData->objects + ktestData->n_objects );
158
+ ? UTBotKTest::Status::SUCCESS
159
+ : UTBotKTest::Status::FAILED;
160
+ std::vector<KTestObject > kTestObjects (ktestData-> objects ,
161
+ ktestData->objects + ktestData->numObjects );
162
162
163
- std::vector<UTBotKTestObject> objects = CollectionUtils::transform (
164
- kTestObjects , [](const ConcretizedObject &kTestObject ) {
163
+ std::vector<UTBotKTestObject> objects =
164
+ CollectionUtils::transform ( kTestObjects , [](const KTestObject &kTestObject ) {
165
165
return UTBotKTestObject{ kTestObject };
166
166
});
167
167
168
- std::vector<std::string> errorDescriptors = CollectionUtils::transform (
169
- errorDescriptorFiles, [](const fs::path &errorFile) {
168
+ std::vector<std::string> errorDescriptors =
169
+ CollectionUtils::transform ( errorDescriptorFiles, [](const fs::path &errorFile) {
170
170
std::ifstream fileWithError (errorFile.c_str (), std::ios_base::in);
171
171
std::string content ((std::istreambuf_iterator<char >(fileWithError)),
172
172
std::istreambuf_iterator<char >());
@@ -209,29 +209,32 @@ std::pair<std::vector<std::string>, fs::path>
209
209
KleeRunner::createKleeParams (const tests::TestMethod &testMethod,
210
210
const tests::Tests &tests,
211
211
const std::string &methodNameOrEmptyForFolder) {
212
- fs::path kleeOut = Paths::kleeOutDirForEntrypoints (projectContext,
213
- tests.sourceFilePath ,
212
+ fs::path kleeOut = Paths::kleeOutDirForEntrypoints (projectContext, tests.sourceFilePath ,
214
213
methodNameOrEmptyForFolder);
215
214
fs::create_directories (kleeOut.parent_path ());
216
215
217
- std::vector<std::string> argvData = { " klee" ,
218
- " --entry-point=" + KleeUtils::entryPointFunction (tests, testMethod.methodName , true ),
219
- " --libc=klee" ,
220
- " --utbot" ,
221
- " --posix-runtime" ,
222
- " --type-system=CXX" ,
223
- " --fp-runtime" ,
224
- " --only-output-states-covering-new" ,
225
- " --allocate-determ" ,
226
- " --external-calls=all" ,
227
- " --timer-interval=1000ms" ,
228
- " --bcov-check-interval=8s" ,
229
- " -istats-write-interval=5s" ,
230
- " --disable-verify" ,
231
- " --check-div-zero=false" ,
232
- " --check-overshift=false" ,
233
- " --skip-not-lazy-and-symbolic-pointers" ,
234
- " --output-dir=" + kleeOut.string ()};
216
+ std::vector<std::string> argvData = {
217
+ " klee" ,
218
+ " --entry-point=" + KleeUtils::entryPointFunction (tests, testMethod.methodName , true ),
219
+ " --libc=klee" ,
220
+ " --utbot" ,
221
+ " --posix-runtime" ,
222
+ " --skip-not-lazy-initialized" ,
223
+ " --type-system=CXX" ,
224
+ " --fp-runtime" ,
225
+ " --only-output-states-covering-new" ,
226
+ " --allocate-determ" ,
227
+ " --external-calls=all" ,
228
+ " --timer-interval=1000ms" ,
229
+ " --use-cov-check=instruction-based" ,
230
+ " -istats-write-interval=5s" ,
231
+ " --disable-verify" ,
232
+ " --check-div-zero=false" ,
233
+ " --check-overshift=false" ,
234
+ " --skip-not-symbolic-objects" ,
235
+ " --use-tbaa" ,
236
+ " --output-dir=" + kleeOut.string ()
237
+ };
235
238
if (settingsContext.useDeterministicSearcher ) {
236
239
argvData.emplace_back (" --search=dfs" );
237
240
}
@@ -240,7 +243,7 @@ KleeRunner::createKleeParams(const tests::TestMethod &testMethod,
240
243
argvData.emplace_back (" --allocate-determ-size=" + std::to_string (1 ));
241
244
argvData.emplace_back (" --allocate-determ-start-address=" + std::to_string (0x10000 ));
242
245
}
243
- return {argvData, kleeOut};
246
+ return { argvData, kleeOut };
244
247
}
245
248
246
249
void KleeRunner::addTailKleeInitParams (std::vector<std::string> &argvData, const std::string &bitcodeFilePath)
0 commit comments