Skip to content
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

Produce summary for unsupported features in top 100 crates experiment #1400

Merged
merged 4 commits into from
Aug 4, 2022

Conversation

adpaco-aws
Copy link
Contributor

@adpaco-aws adpaco-aws commented Jul 21, 2022

Description of changes:

No changes to Kani itself, just adds/changes scripts related to the top 100 crates experiment. In particular, it adds:

  1. A script to filter all unsupported constructs expressions. Before this change, the top-level script printed only the first 3 lines after a warning, which means the data was not complete.
  2. A script to produce a summary (table) from unsupported features data.

The top-level script is called the same way, but now it produces the following output at the end:

--- OVERALL STATS ---
10 crates failed to compile
33 crates had warning(s)

SUMMARY - UNSUPPORTED FEATURES
=========================================================
Unsupported feature | Crates impacted | Instances of use
---------------------------------------------------------
                      Rvalue::ThreadLocalRef  |  20 |  33
                         'simd_or' intrinsic  |  14 |  17
                         'simd_eq' intrinsic  |  11 |  13
                         'simd_gt' intrinsic  |  10 |  10
          Constant slice value with 2+ bytes  |   9 |  74
                   'simd_shuffle4' intrinsic  |   6 |  27
                        'simd_xor' intrinsic  |   6 |  12
                        'simd_and' intrinsic  |   6 |  11
                   'simd_shuffle8' intrinsic  |   5 |  20
                                         try  |   4 |  13
                  'simd_shuffle16' intrinsic  |   4 |  12
                   'simd_shuffle2' intrinsic  |   4 |   9
                        'simd_add' intrinsic  |   4 |   9
                     'simd_insert' intrinsic  |   3 |  11
                    'simd_extract' intrinsic  |   3 |   5
               PointerCast::ClosureFnPointer  |   2 |   6
                  'simd_shuffle32' intrinsic  |   1 |  34
  drop_in_place for drop_unimplemented__RINvN |   1 |   1
  drop_in_place for drop_unimplemented__RINvN |   1 |   1
  drop_in_place for drop_unimplemented__RINvN |   1 |   1
  drop_in_place for drop_unimplemented__RINvN |   1 |   1
  drop_in_place for drop_unimplemented__RINvN |   1 |   1
  Unsupported drop unsized struct: std::cell: |   1 |   1
                         'sqrtf64' intrinsic  |   1 |   1
                         'powif64' intrinsic  |   1 |   1
                         'powif32' intrinsic  |   1 |   1
                          'logf64' intrinsic  |   1 |   1
                          'expf64' intrinsic  |   1 |   1
=========================================================

Call-outs:

Testing:

  • How is this change tested? Locally.

  • Is this a refactor change? No.

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@adpaco-aws adpaco-aws requested a review from a team as a code owner July 21, 2022 19:05
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

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

Is there a reason why we have these functionalities as separate scripts? Do we expect to run these separately?

I really wish we would use less bash scripts. They can get rather complicated.

@adpaco-aws adpaco-aws force-pushed the top-100-complete-summary branch from b8343d4 to 66f4122 Compare August 2, 2022 20:37
@adpaco-aws
Copy link
Contributor Author

Is there a reason why we have these functionalities as separate scripts? Do we expect to run these separately?

I really wish we would use less bash scripts. They can get rather complicated.

I put these as separate because otherwise I've to escape the regexes until they're no longer readable. I agree we should less bash scripts, and we intend to replace them with an actual tool soon. But in the meantime, these scripts will help us process data for unsupported features.

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.

2 participants