Skip to content

Conversation

FrNecas
Copy link
Contributor

@FrNecas FrNecas commented Apr 16, 2021

Related: peterschrammel/cbmc#23

Changes:

  • domains must now implement is_bottom and is_top methods
  • ID_malloc deprecated
  • some changes to exprt constructors
  • union_fidn can no longer be inherited from, fixed by using it as an attribute
  • CBMC_VERSION is now passed to CBMC during compilation which seems to make it impossible to mention it in the help message
  • GOTO program reading simplification
  • Constant propagation now works as expected (except for one test where it produces a wrong result) so I decided to re-enable it

Also memsafety tests which are correct are broken (one of the assertions failed). We tried to investigate the problem with @viktormalik and it seems to be related to changes in CBMC free implementation. Fixing this may be difficult so we agreed that it may be a good idea to leave it for a stable version (once the rebase is finished).

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments + 2 linting errors

class twols_parse_optionst:
public parse_options_baset,
public language_uit
public messaget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Preferably add a messaget log member than deriving from messaget.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to follow CBMC's example (cbmc_parse_optionst used to inherit from language_uit and now inherits from messaget). Moving from inheritance to a member would require a lot of changes throughout the whole module, so I'd rather keep it as is for now to keep the changes minimal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

@peterschrammel
Copy link
Member

Please update the submodule pointer and merge.

FrNecas added 4 commits April 23, 2021 08:21
Fix adjust_float_expressions include
Fix bv_refinementt creation
Add missing is_bottom and is_top methods
Replace ID_malloc with ID_allocate
Assign symbol_expr to function_application_exprt
Replace deprecated forall_symbols
FIx pointer_type creation
Fix construction of address_of_exprt
Convert ns.lookup argument to symbol_exprt
Correctly construct pointer types
Convert union_find from inheritance to attribute
Fix langapi include
Get rid of unused and deprecated time measuring
Do not mention CBMC_VERSION in help
 - The header file cbmc/version.h has been removed and the version is now
   provided in the build process making it not possible to reference it in
   2LS.
Simplify GOTO program reading
 - CBMC 5.9 introduced a convenient API to parse the source program into a
   goto_modelt, make use of the API, simplify 2LS program reading. Also
   enable --show-symbol-table option
Fix JSON trace outputting
Remove deprecated java_bytecode include
Fix write_goto_binary call
Fix make_goto call
Update symbol table manipulation
Replace deprecated goto_functions_template
Link unwindset
Make malloc-related modifications more robust
Revert "Disable constant propagation by default"
Temporary commit, CBMC 5.9 introduced internal changes to built-in
functions (such as malloc and free) breaking one of the assertions.
Fixing this will likely be complicated and may be prone to changes in
other versions.

Signed-off-by: František Nečas <[email protected]>
Signed-off-by: František Nečas <[email protected]>
@viktormalik viktormalik merged commit 4e08c62 into diffblue:master Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants