-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump What4 submodule, use new bitvector helpers, hlint
- Loading branch information
1 parent
383ddb8
commit 2fc98be
Showing
8 changed files
with
60 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: lint | ||
on: | ||
push: | ||
branches: [master, "release-**"] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
name: lint | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: false | ||
|
||
- shell: bash | ||
run: | | ||
curl --location -o hlint.tar.gz \ | ||
https://github.com/ndmitchell/hlint/releases/download/v3.8/hlint-3.8-x86_64-linux.tar.gz | ||
tar xvf hlint.tar.gz | ||
(cd crucible/; ../hlint-3.8/hlint src test) | ||
(cd crucible-cli/; ../hlint-3.8/hlint src test) | ||
(cd crucible-concurrency/; ../hlint-3.8/hlint src test) | ||
(cd crucible-go/; ../hlint-3.8/hlint src tests) | ||
(cd crucible-jvm/; ../hlint-3.8/hlint src tests) | ||
(cd crucible-llvm-cli/; ../hlint-3.8/hlint src test) | ||
(cd crucible-llvm-syntax/; ../hlint-3.8/hlint src test) | ||
(cd crucible-mir/; ../hlint-3.8/hlint src) | ||
(cd crucible-saw/; ../hlint-3.8/hlint src) | ||
(cd crucible-symio/; ../hlint-3.8/hlint src tests) | ||
(cd crucible-syntax/; ../hlint-3.8/hlint src test) | ||
(cd crucible-wasm/; ../hlint-3.8/hlint src test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,14 @@ | ||
# HLint configuration file | ||
# https://github.com/ndmitchell/hlint | ||
########################## | ||
# HLint's default suggestions are opinionated, so we disable all of them by | ||
# default and enable just a small subset we can agree on. | ||
|
||
- modules: | ||
- {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set' | ||
- {name: [Data.List], as: List} | ||
- {name: [Data.Sequence], as: Seq} | ||
- ignore: {} # ignore all | ||
|
||
# Add custom hints for this project | ||
# | ||
# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar" | ||
# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x} | ||
- error: | ||
name: Use bvZero | ||
lhs: "What4.Interface.bvLit sym w (Data.BitVector.Sized.zero w)" | ||
rhs: 'What4.Interface.bvZero sym w' | ||
|
||
# We should use "panic", not "error". | ||
# - error: | ||
# lhs: "error x" | ||
# rhs: 'panic "nameOfFunction" [x, "more lines of details"]' | ||
|
||
# TODO: specialize these to the modules they are needed | ||
- ignore: {name: 'Use :'} | ||
- ignore: {name: Avoid lambda using `infix`} | ||
- ignore: {name: Avoid lambda} | ||
- ignore: {name: Avoid restricted qualification} | ||
- ignore: {name: Eta reduce} | ||
- ignore: {name: Functor law} | ||
- ignore: {name: Move brackets to avoid $} | ||
- ignore: {name: Parse error} | ||
- ignore: {name: Reduce duplication} | ||
- ignore: {name: Redundant $} | ||
- ignore: {name: Redundant ==} | ||
- ignore: {name: Redundant bracket} | ||
- ignore: {name: Redundant case} | ||
- ignore: {name: Redundant do} | ||
- ignore: {name: Redundant flip} | ||
- ignore: {name: Redundant guard} | ||
- ignore: {name: Redundant lambda} | ||
- ignore: {name: Redundant return} | ||
- ignore: {name: Unused LANGUAGE pragma} | ||
- ignore: {name: Use $>} | ||
- ignore: {name: Use &&} | ||
- ignore: {name: Use ++} | ||
- ignore: {name: Use .} | ||
- ignore: {name: Use <$>} | ||
- ignore: {name: Use <=<} | ||
- ignore: {name: Use =<<} | ||
- ignore: {name: Use ==} | ||
- ignore: {name: Use >=>} | ||
- ignore: {name: Use String} | ||
- ignore: {name: Use asks} | ||
- ignore: {name: Use camelCase} | ||
- ignore: {name: Use const} | ||
- ignore: {name: Use fewer imports} | ||
- ignore: {name: Use fmap} | ||
- ignore: {name: Use forM_} | ||
- ignore: {name: Use fromMaybe, within: [Lang.Crucible.Analysis.Shape, Lang.Crucible.JVM.Class, Lang.Crucible.JVM.Translation.Class]} | ||
- ignore: {name: Use record patterns, within: [Lang.Crucible.Simulator.EvalStmt, Lang.Crucible.Simulator.Profiling, Lang.Crucible.CFG.Core]} | ||
- ignore: {name: Use guards} | ||
- ignore: {name: Use hPrint} | ||
- ignore: {name: Use if} | ||
- ignore: {name: Use isNothing} | ||
- ignore: {name: Use lambda-case} | ||
- ignore: {name: Use list comprehension} | ||
- ignore: {name: Use maybe} | ||
- ignore: {name: Use newtype instead of data} | ||
- ignore: {name: Use record patterns} | ||
- ignore: {name: Use otherwise} | ||
- ignore: {name: Use section} | ||
- ignore: {name: Use sortOn} | ||
- ignore: {name: Use tuple-section} | ||
- ignore: {name: Use uncurry} | ||
- ignore: {name: Use unless} | ||
- ignore: {name: Use unwords} | ||
- ignore: {name: Use void} | ||
- ignore: {name: Use when} | ||
- error: | ||
name: Use bvOne | ||
lhs: "What4.Interface.bvLit sym w (Data.BitVector.Sized.one w)" | ||
rhs: 'What4.Interface.bvOne sym w' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule what4
updated
19 files
+1 −0 | .github/workflows/gen_matrix.pl | |
+24 −0 | .github/workflows/lint.yml | |
+1 −0 | .github/workflows/test.yml | |
+11 −72 | .hlint.yaml | |
+1 −1 | dependencies/aig | |
+1 −1 | what4-abc/what4-abc.cabal | |
+1 −1 | what4-blt/what4-blt.cabal | |
+1 −1 | what4-transition-system/what4-transition-system.cabal | |
+2 −2 | what4/src/What4/Expr/App.hs | |
+7 −7 | what4/src/What4/Expr/Builder.hs | |
+2 −2 | what4/src/What4/Expr/MATLAB.hs | |
+22 −4 | what4/src/What4/Interface.hs | |
+31 −6 | what4/src/What4/Protocol/SMTLib2.hs | |
+8 −2 | what4/test/AdapterTest.hs | |
+3 −1 | what4/test/ConfigTest.hs | |
+3 −3 | what4/test/ExprBuilderSMTLib2.hs | |
+2 −2 | what4/test/InvariantSynthesis.hs | |
+3 −1 | what4/test/ProbeSolvers.hs | |
+1 −1 | what4/what4.cabal |