Skip to content

Commit 19c8d8d

Browse files
committed
Suppress loading methods with nondet signatures
1 parent f85494b commit 19c8d8d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/java_bytecode/java_bytecode_convert_method.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Author: Daniel Kroening, [email protected]
3131
#include <algorithm>
3232
#include <functional>
3333
#include <unordered_set>
34+
#include <regex>
3435

3536
class patternt
3637
{
@@ -2531,6 +2532,29 @@ void java_bytecode_convert_method(
25312532
safe_pointer<std::vector<irep_idt> > needed_methods,
25322533
safe_pointer<std::set<irep_idt> > needed_classes)
25332534
{
2535+
static const std::unordered_set<std::string> methods_to_ignore
2536+
{
2537+
"nondetBoolean",
2538+
"nondetByte",
2539+
"nondetChar",
2540+
"nondetShort",
2541+
"nondetInt",
2542+
"nondetLong",
2543+
"nondetFloat",
2544+
"nondetDouble",
2545+
"nondetWithNull",
2546+
"nondetWithoutNull",
2547+
};
2548+
2549+
if(std::regex_match(
2550+
id2string(class_symbol.name),
2551+
std::regex(".*org\\.cprover\\.CProver.*")) &&
2552+
methods_to_ignore.find(id2string(method.name))!=methods_to_ignore.end())
2553+
{
2554+
// Ignore these methods, rely on default stubbing behaviour.
2555+
return;
2556+
}
2557+
25342558
java_bytecode_convert_methodt java_bytecode_convert_method(
25352559
symbol_table,
25362560
message_handler,

0 commit comments

Comments
 (0)