Skip to content

Run CI for install z3 in CI + z3 SMT struct fix [DO NOT REVIEW] #5949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

thomasspriggs
Copy link
Contributor

Run CI for install z3 in CI + z3 SMT struct fix [DO NOT REVIEW]

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #5949 (cd88b8f) into develop (a387193) will increase coverage by 0.10%.
The diff coverage is 94.81%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5949      +/-   ##
===========================================
+ Coverage    75.04%   75.14%   +0.10%     
===========================================
  Files         1433     1435       +2     
  Lines       155817   156303     +486     
===========================================
+ Hits        116932   117455     +523     
+ Misses       38885    38848      -37     
Impacted Files Coverage Δ
...nalyses/variable-sensitivity/abstract_object_set.h 100.00% <ø> (ø)
...lyses/variable-sensitivity/abstract_value_object.h 87.71% <ø> (ø)
...ses/variable-sensitivity/constant_abstract_value.h 100.00% <ø> (ø)
...s/variable-sensitivity/value_set_abstract_object.h 100.00% <ø> (ø)
src/ansi-c/c_typecheck_base.h 100.00% <ø> (ø)
src/ansi-c/expr2c_class.h 100.00% <ø> (ø)
src/goto-programs/goto_convert_class.h 87.30% <ø> (ø)
src/goto-symex/goto_state.h 100.00% <ø> (ø)
src/solvers/smt2/smt2_conv.h 100.00% <ø> (ø)
src/util/expr.h 97.84% <ø> (ø)
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44b5936...cd88b8f. Read the comment docs.

@SaswatPadhi
Copy link
Contributor

@thomasspriggs Looks like the z3 version on Windows (from chocolatey) and Ubuntu 18.04 are too old and do not handle datatypes.

I think instead of using package manager version, we should be grabbing binaries from https://github.com/Z3Prover/z3/releases/tag/z3-4.8.10.

@thomasspriggs
Copy link
Contributor Author

The Ubuntu 18 job is just missing z3. I still need to investigate the Windows jobs.

@SaswatPadhi
Copy link
Contributor

SaswatPadhi commented Mar 18, 2021

It could be that they support datatype to some extent, but the version in the Ubuntu 18.04 repo for Z3 is 4.4.1 (tagged 5 years ago) and the version in Chocolatey repo is 4.3.2 (tagged 6 years ago). The latest z3 version is 4.8.10.

I think having different solver versions on different platforms is problematic.

@thomasspriggs thomasspriggs force-pushed the tas/smt_struct_fix_ci_test branch from d8e422d to e17e8c8 Compare March 25, 2021 14:14
@thomasspriggs thomasspriggs force-pushed the tas/smt_struct_fix_ci_test branch 7 times, most recently from 76672da to 7b582be Compare March 29, 2021 16:58
This was previously missing, which would cause any tests which needed Z3
to fail this job.
Because the `choco` installation of `z3` seems to be broken/outdated.

Using `Invoke-WebRequest` instead of `choco` allows us to pin the
version installed and to get a version which includes the `z3.exe`, not
just `z3.dll`. Using `nuget` was also considered, so that we were still
using a package manager. But the up to date `nuget` package was missing
the `.exe` file.

`wget` is supposed to be aliased to `Invoke-WebRequest` in powershell.
However `Invoke-WebRequest` is used rather than `wget` as `wget` does
not seem to work for windows github actions jobs.
This was previously missing, which would cause any tests which needed Z3
to fail this job.
For confirmation of version and that installation is successfull. This
supports easier debugging for both the github actions `.yaml` and for
future test failures. As a bonus we get fast failing CI jobs if the
dependency isn't installed properly, because it fails at this step
rather than during testing.

This z3 version check is done as a separate step because adding to
`$env:GITHUB_PATH` doesn't take effect the path until the next step.
@thomasspriggs thomasspriggs force-pushed the tas/smt_struct_fix_ci_test branch from 7b582be to bcf08be Compare March 30, 2021 16:28
thomasspriggs and others added 4 commits March 30, 2021 17:53
This confirms that Z3 is present and working in CI, as well as that
cbmc's support for Z3 is not entirely broken.
This commit fixes a `key not found` exception in `convert_type` during SMT2 encoding of structs using data types. Although structs were being mapped to SMT2 datatypes (in `datatype_map`) struct_tags were not.
This prevents auto upgrade of z3, in order to keep it inline with the
version used on Windows. Note that the version currently being installed
on Mac is already 4.8.10.
@thomasspriggs thomasspriggs force-pushed the tas/smt_struct_fix_ci_test branch from bcf08be to cd88b8f Compare March 30, 2021 16:53
@thomasspriggs
Copy link
Contributor Author

The work we wanted from this PR is merged. So the PR itself is no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants