Skip to content

Commit bbf6229

Browse files
authored
Merge pull request #704 from secure-software-engineering/development
PhASAR Release 2403
2 parents 956972a + 49ad944 commit bbf6229

File tree

436 files changed

+22304
-7317
lines changed

Some content is hidden

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

436 files changed

+22304
-7317
lines changed

.clang-tidy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Checks: '-*,
44
misc-*,
55
-misc-non-private-member-variables-in-classes,
66
-misc-no-recursion,
7+
-misc-use-anonymous-namespace,
78
readability-*,
89
-readability-function-cognitive-complexity,
910
-readability-else-after*,
@@ -25,12 +26,13 @@ Checks: '-*,
2526
-cppcoreguidelines-non-private-member-variables-in-classes,
2627
-cppcoreguidelines-init-variables,
2728
-cppcoreguidelines-macro-usage,
29+
-cppcoreguidelines-avoid-do-while,
2830
bugprone-*,
2931
-bugprone-easily-swappable-parameters,
3032
modernize-*,
3133
-modernize-use-trailing-return-type,
3234
performance-*,
33-
clang-analyzer-*,
35+
clang-analyzer-*
3436
'
3537

3638
FormatStyle: LLVM
@@ -55,7 +57,7 @@ CheckOptions:
5557
- key: readability-identifier-naming.ParameterIgnoredRegexp
5658
value: (d|d1|d2|d3|d4|d5|eP|f|n)
5759
- key: readability-identifier-naming.FunctionIgnoredRegexp
58-
value: (try_emplace|from_json|to_json|equal_to|to_string)
60+
value: (try_emplace|from_json|to_json|equal_to|to_string|DToString|NToString|FToString|LToString)
5961
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
6062
value: 1
6163
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ Dockerfile @janniclas
2626
/.docker/ @janniclas
2727

2828
/include/phasar/Utils/Logger.h @MMory
29+
/include/phasar/Utils/AnalysisPrinterBase.h @sritejakv
30+
/include/phasar/Utils/DefaultAnalysisPrinter.h @sritejakv
31+
/include/phasar/Utils/NullAnalysisPrinter.h @sritejakv
32+
/include/phasar/Utils/OnTheFlyAnalysisPrinter.h @sritejakv
33+
/include/phasar/PhasarLLVM/Utils/SourceMgrPrinter.h @sritejakv
34+
/lib/PhasarLLVM/Utils/SourceMgrPrinter.cpp @sritejakv

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ assignees: ''
1111
Replace the empty checkboxes [ ] below with checked ones [x] accordingly. -->
1212

1313
- [ ] I have searched open and closed issues for duplicates
14-
- [ ] I made sure that I am not using an old project version (DO: pull Phasar, update git submodules, rebuild the project and check if the bug is still there)
14+
- [ ] I made sure that I am not using an old project version (DO: pull PhASAR, update git submodules, rebuild the project and check if the bug is still there)
1515

1616
----------------------------------------
1717

@@ -24,9 +24,9 @@ Describe here the issue that you are experiencing.
2424
- that reproduce the bug
2525
- e.g. cli arguments and flags
2626

27-
**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behaviour)
27+
**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behavior)
2828

29-
**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)
29+
**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behavior)
3030

3131
### Context (Environment)
3232

@@ -35,7 +35,7 @@ Describe here the issue that you are experiencing.
3535
- **phasar:** \[commit-id]
3636
- **googletest:** \[commit-id]
3737
- **json:** \[commit-id]
38-
- **WALi-OpenNWA:** \[commit-id]
38+
- **json-schema-validator** \[commit-id]
3939

4040
<!-- Which operating system are you using? -->
4141

@@ -48,11 +48,12 @@ Describe here the issue that you are experiencing.
4848

4949
**Build Type:**
5050
- [ ] cmake
51+
- [ ] bootstrap.sh
5152
- [ ] custom build
5253

5354
### Possible solution
5455

55-
We are happy to discuss possible solutions to this problem, especially if it origniates from a design flaw.
56+
We are happy to discuss possible solutions to this problem, especially if it originates from a design flaw.
5657

5758
### Example files
5859

.github/workflows/ci.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,25 @@ jobs:
1414
matrix:
1515
compiler: [ [clang++-14, clang-14] ]
1616
build: [ Debug, Release ]
17+
include:
18+
- build: Debug
19+
flags: -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON
20+
- build: Release
21+
flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON
1722

1823
continue-on-error: false
1924
steps:
2025
- name: Checkout
21-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2227
with:
2328
fetch-depth: 0
2429
submodules: recursive
2530

26-
- name: Install Basic Dependencies
27-
shell: bash
28-
run: |
29-
sudo apt-get update
30-
sudo apt-get -y install --no-install-recommends \
31-
cmake \
32-
ninja-build \
33-
libstdc++6 \
34-
libboost-all-dev
35-
3631
- name: Install Phasar Dependencies
3732
shell: bash
3833
run: |
3934
./utils/InstallAptDependencies.sh
35+
sudo apt-get -y install --no-install-recommends libboost-graph-dev
4036
4137
- name: Install Strategy Dependencies
4238
shell: bash
@@ -55,19 +51,21 @@ jobs:
5551
libclang-rt-14-dev
5652
5753
- uses: swift-actions/setup-swift@v1
54+
with:
55+
swift-version: "5.8.1"
5856
- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
5957
env:
60-
BUILD_TYPE: ${{ matrix.build }}
6158
CXX: ${{ matrix.compiler[0] }}
6259
CC: ${{ matrix.compiler[1] }}
6360
shell: bash
6461
run: |
6562
mkdir build
6663
cd build
6764
cmake .. \
68-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
69-
-DCMAKE_CXX_COMPILER=$CXX \
70-
-DBUILD_SWIFT_TESTS=1 \
65+
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
66+
-DBUILD_SWIFT_TESTS=ON \
67+
-DPHASAR_USE_Z3=ON \
68+
${{ matrix.flags }} \
7169
-G Ninja
7270
cmake --build .
7371

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ bin/*
66
# build directories for cmake
77
build/
88
build_*/
9+
build-*/
910

1011
# LLVM project
1112
llvm-project/*

BreakingChanges.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
# Breaking Changes
22

3+
## v2403
4+
5+
- Versioning scheme has been changed from `<month><year>` to `<year><month>`
6+
- Default build mode is no longer `SHARED` but `STATIC`. To build in shared mode, use the cmake option `BUILD_SHARED_LIBS` which we don't recommend anymore. Consider using `PHASAR_BUILD_DYNLIB` instead to build one big libphasar.so.
7+
- Build type `DebugSan` has been removed in favor of a new CMake option `PHASAR_ENABLE_SANITIZERS` that not only works in `Debug` mode.
8+
39
## v0323
410

511
- `EdgeFunctionPtrType` is no longer a `std::shared_ptr`. Instead `EdgeFunction<l_t>` should be used directly. `EdgeFunction` is now a *value-type* that encapsulates its memory management by itself.
612
- Concrete `EdgeFunction` types no longer derive from any base-class. Instead they just need to implement the required API functions. `EdgeFunction` implementations should me move-constructible and can be implicitly cast to `EdgeFunction`. To verify that your type implements the edge function interface use the `IsEdgeFunction` type trait. The API functions have been changed as follows:
7-
- All API functions of `EdgeFunction` must be `const` qualified.
8-
- `EdgeFunctionPtrType composeWith(EdgeFunctionPtrType SecondFunction)` and `EdgeFunctionPtrType joinWith(EdgeFunctionPtrType OtherFunction)` have been changed to `static EdgeFunction<l_t> compose(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& SecondFunction)` and `static EdgeFunction<l_t> join(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& OtherFunction)` respectively. Here, the `This` parameter models the former `shared_from_this()`.
9-
- `bool equal_to(EdgeFunctionPtrType Other)const` has been changed to `bool operator==(const T &Other)const noexcept`, where `T` is your concrete edge function type.
10-
- `void print(llvm::raw_ostream &OS, bool IsForDebug)` has been changed to `friend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const T& EF)`.
13+
- All API functions of `EdgeFunction` must be `const` qualified.
14+
- `EdgeFunctionPtrType composeWith(EdgeFunctionPtrType SecondFunction)` and `EdgeFunctionPtrType joinWith(EdgeFunctionPtrType OtherFunction)` have been changed to `static EdgeFunction<l_t> compose(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& SecondFunction)` and `static EdgeFunction<l_t> join(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& OtherFunction)` respectively. Here, the `This` parameter models the former `shared_from_this()`.
15+
- `bool equal_to(EdgeFunctionPtrType Other)const` has been changed to `bool operator==(const T &Other)const noexcept`, where `T` is your concrete edge function type.
16+
- `void print(llvm::raw_ostream &OS, bool IsForDebug)` has been changed to `friend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const T& EF)`.
1117
- `EdgeFunction` is tagged with `[[clang::trivial_abi]]`. Hence, you should not rely on any destruction order within a top-level statement that uses temporary `EdgeFunction` objects.
1218
- `EdgeFunctionSingletonFactory` has been removed. Use `EdgeFunctionSingletonCache` instead.
1319
- `TaintConfig` has been renamed to `LLVMTaintConfig`. For generic code you may want to use the LLVM-independent `TaintConfigBase` CRTP interface instead.
1420
- Renamed `phasar/PhasarLLVM/DataFlowSolver/` to either `phasar/DataFlow/` or `phasar/PhasarLLVM/DataFlow/` depending on whether the components need LLVMCore. Analoguous changes in `lib/` and `unittests/`.
1521
An incomplete list of moved/renamed files:
16-
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*` => `phasar/DataFlow/IfdsIde/Solver/*`
17-
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h` => `phasar/DataFlow/IfdsIde/IDETabulationProblem.h`
18-
- `phasar/DB/LLVMProjectIRDB.h` => `phasar/PhasarLLVM/DB/LLVMProjectIRDB.h`
19-
- ...
22+
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*` => `phasar/DataFlow/IfdsIde/Solver/*`
23+
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h` => `phasar/DataFlow/IfdsIde/IDETabulationProblem.h`
24+
- `phasar/DB/LLVMProjectIRDB.h` => `phasar/PhasarLLVM/DB/LLVMProjectIRDB.h`
25+
- ...
2026
- Renamed and split up some libraries:
21-
- `phasar_phasarllvm_utils` => `phasar_llvm_utils`
22-
- `phasar_typehierarchy` => `phasar_llvm_typehierarchy`
23-
- `phasar_ifdside` => `phasar_llvm_ifdside`
24-
- `phasar_controlflow` has its LLVM dependent stuff moved to `phasar_llvm_controlflow`
25-
- `phasar_db` has its LLVM dependent stuff moved to `phasar_llvm_db`
26-
- `phasar_pointer` has its LLVM dependent stuff moved to `phasar_llvm_pointer`
27+
- `phasar_phasarllvm_utils` => `phasar_llvm_utils`
28+
- `phasar_typehierarchy` => `phasar_llvm_typehierarchy`
29+
- `phasar_ifdside` => `phasar_llvm_ifdside`
30+
- `phasar_controlflow` has its LLVM dependent stuff moved to `phasar_llvm_controlflow`
31+
- `phasar_db` has its LLVM dependent stuff moved to `phasar_llvm_db`
32+
- `phasar_pointer` has its LLVM dependent stuff moved to `phasar_llvm_pointer`
2733
- Renamed the phasar tool `phasar-llvm` to `phasar-cli`
2834
- `LLVMPointsTo[.*]` has been renamed to `LLVMAlias[.*]`
2935
- The ctor of `LLVMAliasSet` now takes the `LLVMProjectIRDB` as pointer instead of a reference to better document that it may capture the IRDB by reference.

0 commit comments

Comments
 (0)