Skip to content

Commit c7d0694

Browse files
committed
Merge branch 'release-2.8.0' into main
2 parents 466dabf + 6d30af2 commit c7d0694

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+902
-468
lines changed

.github/workflows/smack-ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
"--exhaustive --folder=c/strings",
2525
"--exhaustive --folder=c/special",
2626
"--exhaustive --folder=c/targeted-checks",
27+
"--exhaustive --folder=c/unroll",
2728
"--exhaustive --folder=rust/array --languages=rust",
2829
"--exhaustive --folder=rust/basic --languages=rust",
2930
"--exhaustive --folder=rust/box --languages=rust",

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ add_library(smackTranslator STATIC
120120
include/smack/RewriteBitwiseOps.h
121121
include/smack/NormalizeLoops.h
122122
include/smack/RustFixes.h
123+
include/smack/AnnotateLoopExits.h
123124
include/smack/SplitAggregateValue.h
124125
include/smack/Prelude.h
125126
include/smack/SmackWarnings.h
@@ -146,6 +147,7 @@ add_library(smackTranslator STATIC
146147
lib/smack/RewriteBitwiseOps.cpp
147148
lib/smack/NormalizeLoops.cpp
148149
lib/smack/RustFixes.cpp
150+
lib/smack/AnnotateLoopExits.cpp
149151
lib/smack/SplitAggregateValue.cpp
150152
lib/smack/Prelude.cpp
151153
lib/smack/SmackWarnings.cpp

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ items before you start contributing:
88
By participating, you are expected to honor this code.
99
* We use this [git branching
1010
model](http://nvie.com/posts/a-successful-git-branching-model/). Please avoid
11-
working directly on the `master` branch.
11+
working directly on the `main` branch.
1212
* We follow guidelines for [good git commit
1313
practice](https://wiki.openstack.org/wiki/GitCommitMessages)
1414
* We follow the [LLVM Coding

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#---------------------------------------------------------------------------
66
DOXYFILE_ENCODING = UTF-8
77
PROJECT_NAME = smack
8-
PROJECT_NUMBER = 2.7.1
8+
PROJECT_NUMBER = 2.8.0
99
PROJECT_BRIEF = "A bounded software verifier."
1010
PROJECT_LOGO =
1111
OUTPUT_DIRECTORY = docs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![master branch ci status](https://github.com/smackers/smack/workflows/SMACK%20CI/badge.svg?branch=master)](https://github.com/smackers/smack/actions)
1+
[![main branch ci status](https://github.com/smackers/smack/workflows/SMACK%20CI/badge.svg?branch=main)](https://github.com/smackers/smack/actions)
22
[![develop branch ci status](https://github.com/smackers/smack/workflows/SMACK%20CI/badge.svg?branch=develop)](https://github.com/smackers/smack/actions)
33

44
<img src="docs/smack-logo.png" width=400 alt="SMACK Logo" align="right">

bin/build.sh

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ source ${SMACK_DIR}/bin/versions
6060

6161
SMACKENV=${ROOT_DIR}/smack.environment
6262
WGET="wget --no-verbose"
63+
Z3_DOWNLOAD_LINK="https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VERSION}/z3-${Z3_VERSION}-x64-glibc-2.31.zip"
6364

6465
# Install prefix -- system default is used if left unspecified
6566
INSTALL_PREFIX=
@@ -190,30 +191,14 @@ puts "Detected distribution: $distro"
190191
# Set platform-dependent flags
191192
case "$distro" in
192193
linux-opensuse*)
193-
Z3_DOWNLOAD_LINK="https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VERSION}/z3-${Z3_VERSION}-x64-debian-8.10.zip"
194194
if [ ${INSTALL_LLVM} -eq 1 ] ; then
195195
DEPENDENCIES+=" llvm-clang llvm-devel"
196196
fi
197197
DEPENDENCIES+=" gcc-c++ make"
198198
DEPENDENCIES+=" ncurses-devel"
199199
;;
200200

201-
linux-@(ubuntu|neon)-16*)
202-
Z3_DOWNLOAD_LINK="https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VERSION}/z3-${Z3_VERSION}-x64-ubuntu-18.04.zip"
203-
if [ ${INSTALL_LLVM} -eq 1 ] ; then
204-
DEPENDENCIES+=" clang-${LLVM_SHORT_VERSION} llvm-${LLVM_SHORT_VERSION}-dev"
205-
fi
206-
;;
207-
208-
linux-@(ubuntu|neon)-18*)
209-
Z3_DOWNLOAD_LINK="https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VERSION}/z3-${Z3_VERSION}-x64-ubuntu-18.04.zip"
210-
if [ ${INSTALL_LLVM} -eq 1 ] ; then
211-
DEPENDENCIES+=" clang-${LLVM_SHORT_VERSION} llvm-${LLVM_SHORT_VERSION}-dev"
212-
fi
213-
;;
214-
215-
linux-@(ubuntu|neon)-20*)
216-
Z3_DOWNLOAD_LINK="https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VERSION}/z3-${Z3_VERSION}-x64-ubuntu-18.04.zip"
201+
linux-@(ubuntu|neon)-@(16|18|20)*)
217202
if [ ${INSTALL_LLVM} -eq 1 ] ; then
218203
DEPENDENCIES+=" clang-${LLVM_SHORT_VERSION} llvm-${LLVM_SHORT_VERSION}-dev"
219204
fi
@@ -489,7 +474,9 @@ if [ ${BUILD_SMACK} -eq 1 ] ; then
489474

490475
mkdir -p ${SMACK_DIR}/build
491476
cd ${SMACK_DIR}/build
492-
cmake ${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Debug .. -G Ninja
477+
cmake -DCMAKE_CXX_COMPILER=clang++-${LLVM_SHORT_VERSION} \
478+
-DCMAKE_C_COMPILER=clang-${LLVM_SHORT_VERSION} ${CMAKE_INSTALL_PREFIX} \
479+
-DCMAKE_BUILD_TYPE=Debug .. -G Ninja
493480
ninja
494481

495482
if [ -n "${CMAKE_INSTALL_PREFIX}" ] ; then

bin/versions

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Z3_VERSION="4.8.10"
1+
Z3_VERSION="4.8.12"
22
CVC4_VERSION="1.8"
33
YICES2_VERSION="2.6.2"
4-
BOOGIE_VERSION="2.9.1"
4+
BOOGIE_VERSION="2.9.6"
55
CORRAL_VERSION="1.1.8"
66
SYMBOOGLIX_COMMIT="ccb2e7f2b3"
77
LOCKPWN_COMMIT="12ba58f1ec"
8-
LLVM_SHORT_VERSION="11"
9-
LLVM_FULL_VERSION="11.1.0"
8+
LLVM_SHORT_VERSION="12"
9+
LLVM_FULL_VERSION="12.0.1"
1010
RUST_VERSION="nightly-2021-03-01"

docs/installation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ the following configurations:
5151
SMACK's Docker container images can be pulled from Docker Hub directly:
5252

5353
```shell
54-
docker pull smackers/smack:stable # built from the master branch
54+
docker pull smackers/smack:stable # built from the main branch
5555
docker pull smackers/smack:latest # built from the develop branch
5656
```
5757

@@ -74,16 +74,16 @@ to Docker's official documentation.
7474

7575
SMACK depends on the following projects:
7676

77-
* [LLVM][] version [11.1.0][LLVM-11.1.0]
78-
* [Clang][] version [11.1.0][Clang-11.1.0]
77+
* [LLVM][] version [12.0.1][LLVM-12.0.1]
78+
* [Clang][] version [12.0.1][Clang-12.0.1]
7979
* [Boost][] version 1.55 or greater
8080
* [Python][] version 3.6.8 or greater
8181
* [Ninja][] version 1.5.1 or greater
8282
* [Z3][] or compatible SMT-format theorem prover
8383
* [Boogie][] or [Corral][] or compatible Boogie-format verifier
8484
* [sea-dsa][]
8585

86-
See [here](https://github.com/smackers/smack/blob/master/bin/versions) for
86+
See [here](https://github.com/smackers/smack/blob/main/bin/versions) for
8787
compatible version numbers of [Boogie][] and [Corral][]. See the appropriate
8888
installation instructions below for installing these requirements.
8989

@@ -189,16 +189,16 @@ shell in the `test` directory by executing
189189
[CMake]: http://www.cmake.org
190190
[Python]: http://www.python.org
191191
[LLVM]: http://llvm.org
192-
[LLVM-11.1.0]: http://llvm.org/releases/download.html#11.1.0
192+
[LLVM-12.0.1]: http://llvm.org/releases/download.html#12.0.1
193193
[Clang]: http://clang.llvm.org
194-
[Clang-11.1.0]: http://llvm.org/releases/download.html#11.1.0
194+
[Clang-12.0.1]: http://llvm.org/releases/download.html#12.0.1
195195
[Boogie]: https://github.com/boogie-org/boogie
196196
[Corral]: https://github.com/boogie-org/corral
197197
[Z3]: https://github.com/Z3Prover/z3/
198198
[Mono]: http://www.mono-project.com/
199199
[Cygwin]: https://www.cygwin.com
200200
[.NET]: https://msdn.microsoft.com/en-us/vstudio/aa496123.aspx
201-
[build.sh]: https://github.com/smackers/smack/blob/master/bin/build.sh
201+
[build.sh]: https://github.com/smackers/smack/blob/main/bin/build.sh
202202
[Xcode]: https://developer.apple.com/xcode/
203203
[Homebrew]: http://brew.sh/
204204
[Homebrew Cask]: https://formulae.brew.sh/cask/

include/smack/AnnotateLoopExits.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// This file is distributed under the MIT License. See LICENSE for details.
3+
//
4+
#ifndef ANNOTATELOOPEXITS_H
5+
#define ANNOTATELOOPEXITS_H
6+
7+
#include "llvm/IR/Function.h"
8+
#include "llvm/IR/Instructions.h"
9+
#include "llvm/IR/Module.h"
10+
#include "llvm/Pass.h"
11+
#include <map>
12+
13+
namespace smack {
14+
15+
class AnnotateLoopExits : public llvm::FunctionPass {
16+
private:
17+
llvm::Function *LoopExitFunction;
18+
19+
public:
20+
static char ID; // Pass identification, replacement for typeid
21+
AnnotateLoopExits() : llvm::FunctionPass(ID) {}
22+
bool doInitialization(llvm::Module &M) override;
23+
virtual llvm::StringRef getPassName() const override;
24+
virtual bool runOnFunction(llvm::Function &F) override;
25+
virtual void getAnalysisUsage(llvm::AnalysisUsage &) const override;
26+
};
27+
} // namespace smack
28+
29+
#endif // ANNOTATELOOPEXITS_H

0 commit comments

Comments
 (0)