forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "TG-374 Feature/java support generics"
- Loading branch information
Showing
21 changed files
with
49 additions
and
1,015 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
KNOWNBUG | ||
CORE | ||
iterator2.class | ||
--cover location --unwind 3 --function iterator2.f | ||
--cover location --unwind 3 --function iterator2.f | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^.*SATISFIED$ | ||
-- | ||
^warning: ignoring | ||
-- | ||
https://diffblue.atlassian.net/browse/TG-610 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
KNOWNBUG | ||
CORE | ||
DetectSplitPackagesTask.class | ||
--show-symbol-table | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
-- | ||
-- | ||
cf. https://diffblue.atlassian.net/browse/TG-610 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ Author: Daniel Kroening, [email protected] | |
#include "java_bytecode_language.h" | ||
#include "java_utils.h" | ||
|
||
#include <util/c_types.h> | ||
#include <util/arith_tools.h> | ||
#include <util/namespace.h> | ||
#include <util/std_expr.h> | ||
|
@@ -102,25 +101,6 @@ void java_bytecode_convert_classt::convert(const classt &c) | |
} | ||
|
||
java_class_typet class_type; | ||
if(c.signature.has_value()) | ||
{ | ||
java_generics_class_typet generic_class_type; | ||
#ifdef DEBUG | ||
std::cout << "INFO: found generic class signature " | ||
<< c.signature.value() | ||
<< " in parsed class " | ||
<< c.name << "\n"; | ||
#endif | ||
for(auto t : java_generic_type_from_string( | ||
id2string(c.name), | ||
c.signature.value())) | ||
{ | ||
generic_class_type.generic_types() | ||
.push_back(to_java_generic_parameter(t)); | ||
} | ||
|
||
class_type=generic_class_type; | ||
} | ||
|
||
class_type.set_tag(c.name); | ||
class_type.set(ID_base_name, c.name); | ||
|
@@ -194,7 +174,7 @@ void java_bytecode_convert_classt::convert(const classt &c) | |
const irep_idt method_identifier= | ||
id2string(qualified_classname)+ | ||
"."+id2string(method.name)+ | ||
":"+method.descriptor; | ||
":"+method.signature; | ||
// Always run the lazy pre-stage, as it symbol-table | ||
// registers the function. | ||
debug() << "Adding symbol: method '" << method_identifier << "'" << eom; | ||
|
@@ -215,48 +195,7 @@ void java_bytecode_convert_classt::convert( | |
symbolt &class_symbol, | ||
const fieldt &f) | ||
{ | ||
typet field_type; | ||
if(f.signature.has_value()) | ||
{ | ||
field_type=java_type_from_string( | ||
f.signature.value(), | ||
id2string(class_symbol.name)); | ||
|
||
/// this is for a free type variable, e.g., a field of the form `T f;` | ||
if(is_java_generic_parameter(field_type)) | ||
{ | ||
#ifdef DEBUG | ||
std::cout << "fieldtype: generic " | ||
<< to_java_generic_parameter(field_type).type_variable() | ||
.get_identifier() | ||
<< " name " << f.name << "\n"; | ||
#endif | ||
} | ||
|
||
/// this is for a field that holds a generic type, wither with instantiated | ||
/// or with free type variables, e.g., `List<T> l;` or `List<Integer> l;` | ||
else if(is_java_generic_type(field_type)) | ||
{ | ||
java_generic_typet &with_gen_type= | ||
to_java_generic_type(field_type); | ||
#ifdef DEBUG | ||
std::cout << "fieldtype: generic container type " | ||
<< std::to_string(with_gen_type.generic_type_variables().size()) | ||
<< " type " << with_gen_type.id() | ||
<< " name " << f.name | ||
<< " subtype id " << with_gen_type.subtype().id() << "\n"; | ||
#endif | ||
field_type=with_gen_type; | ||
} | ||
|
||
/// This case is not possible, a field is either a non-instantiated type | ||
/// variable or a generics container type. | ||
INVARIANT( | ||
!is_java_generic_inst_parameter(field_type), | ||
"Cannot be an instantiated type variable here."); | ||
} | ||
else | ||
field_type=java_type_from_string(f.descriptor); | ||
typet field_type=java_type_from_string(f.signature); | ||
|
||
// is this a static field? | ||
if(f.is_static) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <set> | ||
|
||
#include <util/optional.h> | ||
#include <util/std_code.h> | ||
#include <util/std_types.h> | ||
|
||
|
@@ -55,17 +54,16 @@ class java_bytecode_parse_treet | |
class membert | ||
{ | ||
public: | ||
std::string descriptor; | ||
optionalt<std::string> signature; | ||
std::string signature; | ||
irep_idt name; | ||
bool is_public, is_protected, is_private, is_static, is_final; | ||
annotationst annotations; | ||
|
||
virtual void output(std::ostream &out) const = 0; | ||
|
||
membert(): | ||
is_public(false), is_protected(false), | ||
is_private(false), is_static(false), is_final(false) | ||
is_public(false), is_protected(false), is_private(false), | ||
is_static(false), is_final(false) | ||
{ | ||
} | ||
}; | ||
|
@@ -102,8 +100,7 @@ class java_bytecode_parse_treet | |
{ | ||
public: | ||
irep_idt name; | ||
std::string descriptor; | ||
optionalt<std::string> signature; | ||
std::string signature; | ||
std::size_t index; | ||
std::size_t start_pc; | ||
std::size_t length; | ||
|
@@ -177,7 +174,7 @@ class java_bytecode_parse_treet | |
|
||
typedef std::list<irep_idt> implementst; | ||
implementst implements; | ||
optionalt<std::string> signature; | ||
|
||
typedef std::list<fieldt> fieldst; | ||
typedef std::list<methodt> methodst; | ||
fieldst fields; | ||
|
Oops, something went wrong.