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

Add verification loggers and report generator #38

Merged
merged 42 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aed044e
Add NatSeq and Io libraries
sarahc7 Sep 2, 2021
59bb5ad
Style changes
sarahc7 Sep 3, 2021
7f246e0
Remove explicit triggers
sarahc7 Sep 3, 2021
8781a8d
Add copyright headers
sarahc7 Sep 3, 2021
c6c0764
Update LICENSE
sarahc7 Sep 3, 2021
13cf6c2
Fix copyright headers
sarahc7 Sep 3, 2021
7906775
Remove Io
sarahc7 Sep 7, 2021
2c3bd36
Change expect file
sarahc7 Sep 7, 2021
30a8c34
Remove {:nativeType} attributes
sarahc7 Sep 9, 2021
d6a2aaf
Name changes
sarahc7 Sep 13, 2021
6013e6e
Add example with custom small and large widths
sarahc7 Sep 13, 2021
0c527a2
More name changes
sarahc7 Sep 13, 2021
0d0649e
Pick up Dafny 3.3, add verification results report
robin-aws Nov 5, 2021
6c5d6ec
See if using an environment allows CI to post results from a fork
robin-aws Nov 5, 2021
03d2c9e
No luck, try documented workaround
robin-aws Nov 5, 2021
caf667a
Merge branch 'master' of github.com:dafny-lang/libraries
robin-aws Nov 5, 2021
1fc5c6d
Merge pull request #1 from robin-aws/verification-logger
robin-aws Nov 5, 2021
0d19733
Dummy verification-breaking change
robin-aws Nov 5, 2021
6460f3d
Fix wrong workflow symbol
robin-aws Nov 5, 2021
0f2e495
Revert "Dummy verification-breaking change"
robin-aws Nov 5, 2021
089c493
Merge pull request #2 from robin-aws/test-pr
robin-aws Nov 5, 2021
043a867
Merge branch 'master' of github.com:dafny-lang/libraries into verific…
robin-aws Feb 9, 2022
e56325b
Merge branch 'master' of github.com:robin-aws/libraries into verifica…
robin-aws Feb 9, 2022
b52462d
Move to Dafny 3.4 and add CSV verification output
robin-aws Feb 9, 2022
f1c4890
Merge branch 'master' of github.com:dafny-lang/libraries into verific…
robin-aws Mar 2, 2022
045408a
Fix bad quotes
robin-aws Mar 2, 2022
3be0e51
Trying to fix ** globbing
robin-aws Mar 2, 2022
f675930
Avoid NonLinearArithmetic for now
robin-aws Mar 2, 2022
9bc2e6d
Ah Sequences is hiding some /noNLArith flags as well
robin-aws Mar 2, 2022
aa1927e
Typo
robin-aws Mar 2, 2022
12426a0
Sigh
robin-aws Mar 2, 2022
548a9df
Add Dafny verification report
robin-aws Mar 9, 2022
717d820
Trying to get globbing to work
robin-aws Mar 10, 2022
f6ad164
Missing flag
robin-aws Mar 10, 2022
5fc4b19
Remove dafny option that overrides dafny exit code
robin-aws Mar 10, 2022
94f9189
Fix jobs (hopefully)
robin-aws Mar 10, 2022
27c350c
Put lit back
robin-aws Mar 10, 2022
ab26e78
Set bound of 1 second
robin-aws Mar 10, 2022
519f1c9
Too aggressive, fall back to 10 seconds for now
robin-aws Mar 10, 2022
a410700
Fix upload path pattern, fail if nothing matches
robin-aws Mar 10, 2022
feedfa8
Naming improvement
robin-aws Mar 11, 2022
48340eb
Update .github/workflows/tests.yml
robin-aws Mar 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/generate-test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Generate Test Report'
on:
workflow_run:
workflows: ['tests'] # runs after CI workflow
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: verification-results
name: Verification Results
path: '*.trx'
reporter: dotnet-trx
17 changes: 14 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ jobs:
with:
dafny-version: "3.4.2"

- uses: actions/setup-python@v1
- name: Install Dafny report generator
run: dotnet tool install --global dafny-reportgenerator

- name: Install lit
run: pip install lit OutputCheck

- name: Verify/Test Dafny code
run: lit --time-tests -v .
- name: Verify Dafny Code
run: lit --time-tests -v --param 'dafny_params=/verificationLogger:trx /verificationLogger:csv' .

- name: Generate Report
run: find . -name '*.csv' -print0 | xargs -0 --verbose dafny-reportgenerator summarize-csv-results --max-duration-seconds 10

- uses: actions/upload-artifact@v2 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: verification-results
path: '**/TestResults/*.trx'
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/Output/
**/TestResults/
3 changes: 1 addition & 2 deletions examples/LittleEndianNat/LittleEndianNatCustomExample.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:3 /noNLarith "%s"

/*******************************************************************************
* Copyright by the contributors to the Dafny Project
Expand Down
3 changes: 1 addition & 2 deletions examples/LittleEndianNat/LittleEndianNatExample.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:3 /noNLarith "%s"

/*******************************************************************************
* Copyright by the contributors to the Dafny Project
Expand Down
3 changes: 1 addition & 2 deletions examples/Wrappers.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:3 "%s"

include "../src/Wrappers.dfy"

Expand Down
3 changes: 0 additions & 3 deletions lit.site.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ dafnyExecutable += ' -useBaseNameForFileName'

dafnyExecutable += ' -timeLimit:30'

# The following option adjusts the exit codes of the Dafny executable
dafnyExecutable += ' -countVerificationErrors:0'

# We do not want output such as "Compiled program written to Foo.cs"
# from the compilers, since that changes with the target language
dafnyExecutable += ' -compileVerbose:0'
Expand Down
3 changes: 1 addition & 2 deletions src/BoundedInts.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

module BoundedInts {
const TWO_TO_THE_0: int := 1
Expand Down
2 changes: 0 additions & 2 deletions src/BoundedInts.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Maps/Imaps.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original: Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
Expand Down
2 changes: 0 additions & 2 deletions src/Collections/Maps/Imaps.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Maps/Maps.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original: Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
Expand Down
2 changes: 0 additions & 2 deletions src/Collections/Maps/Maps.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Sequences/LittleEndianNat.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) 2020 Secure Foundations Lab
Expand Down
2 changes: 0 additions & 2 deletions src/Collections/Sequences/LittleEndianNat.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Sequences/LittleEndianNatConversions.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Copyright by the contributors to the Dafny Project
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Sequences/Seq.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original Copyright under the following:
Expand Down
2 changes: 0 additions & 2 deletions src/Collections/Sequences/Seq.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Sets/Isets.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original Copyright under the following:
Expand Down
2 changes: 0 additions & 2 deletions src/Collections/Sets/Isets.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Collections/Sets/Sets.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original Copyright under the following:
Expand Down
2 changes: 0 additions & 2 deletions src/Collections/Sets/Sets.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Functions.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original Copyright under the following:
Expand Down
2 changes: 0 additions & 2 deletions src/Functions.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Math.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Copyright by the contributors to the Dafny Project
Expand Down
2 changes: 0 additions & 2 deletions src/Math.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/DivMod.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
6 changes: 0 additions & 6 deletions src/NonlinearArithmetic/DivMod.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/DivInternals.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Internals/DivInternals.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/DivInternalsNonlinear.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/GeneralInternals.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Internals/GeneralInternals.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/ModInternals.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Internals/ModInternals.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/ModInternalsNonlinear.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/MulInternals.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Internals/MulInternals.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Internals/MulInternalsNonlinear.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Mul.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Mul.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Power.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Power.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/NonlinearArithmetic/Power2.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 /noNLarith "%s"

/*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
Expand Down
2 changes: 0 additions & 2 deletions src/NonlinearArithmetic/Power2.dfy.expect

This file was deleted.

3 changes: 1 addition & 2 deletions src/Wrappers.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %dafny /compile:0 "%s"

/*******************************************************************************
* Copyright by the contributors to the Dafny Project
Expand Down
2 changes: 0 additions & 2 deletions src/Wrappers.dfy.expect

This file was deleted.