Closed
Description
I have created a JBMC repository where all the Java stuff will eventually go: https://github.com/diffblue/jbmc
(I'll populate below as my investigations progress)
Step 1a: Move jbmc
and java_bytecode/library
into new repo (in progress, see master
branch of jbmc
repo)
- TODO: update once we switch over (this could be done any time, removes JDK dependencies from CBMC build, see Java bytecode build fixes #1970)
Step 1b: Separate out java-diff from goto-diff
- TODO: tbd
Step 1c: Separate out java-analyzer from goto-analyzer
- TODO: tbd
Step 2: Introduce required extension mechanisms into language-agnostic framework.
The following java_bytecode dependencies have been fixed:
- goto-programs/replace_java_nondet
- moved to java_bytecode in Essential Java dependencies clean up #1935
- goto-programs/remove_instance_of
- requires
languaget::root_base_class_type()
: fixed in Essential Java dependencies clean up #1935 ID_java_instanceof
can be renamed toID_instanceof
- there's nothing java-specific in there
- requires
- solvers/refinement/string_constraint_generator
- fixed in Essential Java dependencies clean up #1935
- some java-specifcs left, but no dependency on java_bytecode
- solvers/refinement/string_refinement
- fixed in Essential Java dependencies clean up #1935
- some java-specifcs left, but no dependency on java_bytecode
- goto-programs/remove_virtual_functions
- requires
languaget::root_base_class_type().get_identifier()
: fixed in Essential Java dependencies clean up #1935
- requires
- util/json_expr
- call through
languaget
interface: fixed in Essential Java dependencies clean up #1935 - there remains a dependency on
langapi
, see Remove langapi dependency from util #1942
- call through
The following java_bytecode dependencies must be removed:
- goto-programs/goto_convert:
- TODO: handle ID_*_new through separate goto passes
There are non-java_bytecode Java dependencies in (exhaustive list):
- analyses/goto_check
- requires java_source_location Introduce a java_source_locationt to contain Java specific source location information #1824, but no dependency on java_bytecode
- analyses/uncaught_exception_analysis
- special-casing AssertionError seems wrong and should be removed, otherwise there is nothing java-specific and no java_bytecode dependency
- goto-analyzer/taint_analysis
- prefix comparison should be fixed up, but no dep on java_bytecode
- goto-instrument/call_sequences
- use pretty name from symbol table instead of string manipulation, but no dep on java_bytecode
- goto-instrument/cover_basic_blocks
- requires java_source_location
- factor out cover_basic_blocks_javat into separate class
- but no dep on java_bytecode
- goto-instrument/cover_filter
- java built-ins should be done via a tag in the symbol table (see show_goto-functions), but no dep on java_bytecode
- goto-programs/remove_exceptions
- special-casing AssertionError seems wrong and should be removed, otherwise there is nothing java-specific and no dep on java_bytecode
- inflight exception identifier can have a language-independent prefix
- goto-programs/show_goto_functions
- fix
languaget::system_library_symbols
for tagging symbols in the symbol table, but no dependency on java_bytecode
- fix
- goto-symex/symex_assign, goto-symex/symex_builtin_functions
- separate out cpp/java_new_array and unify, get mode from an lhs symbol
- Ideally replace cpp_new by allocate in frontend
- but no dependency on java_bytecode
- pointer-analysis/value_set_dereference
- silent failure should be replaced by an invariant, but no dependency on java_bytecode
- util/source_location
- requires java_source_location, but no dependency on java_bytecode
- util/config
- requires a bigger refactoring to make this non-global, non-critical for now
- util/irep_ids.def
- requires ability to extend irep_ids.def in a dependent repo, but no dependency on java_bytecode
- util/unicode
- used by string solver, seems uncritical
Step 3: Move java specifics into jbmc repo and update submodules in dependent repos