You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`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.
6
+
- 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)`.
11
+
-`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.
12
+
-`EdgeFunctionSingletonFactory` has been removed. Use `EdgeFunctionSingletonCache` instead.
13
+
-`TaintConfig` has been renamed to `LLVMTaintConfig`. For generic code you may want to use the LLVM-independent `TaintConfigBase` CRTP interface instead.
14
+
- 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/`.
-`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
+
- Renamed the phasar tool `phasar-llvm` to `phasar-cli`
28
+
-`LLVMPointsTo[.*]` has been renamed to `LLVMAlias[.*]`
29
+
- 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.
30
+
- The `PointsToInfo` interface has been replaced by the CRTP interface `AliasInfoBase`. Introduced two type-erased implementations of that interface: `AliasInfo` and `AliasInfoRef`. In most cases you should replace `PointsToInfo *` and `LLVMPointsToInfo *` by `AliasInfoRef`, bzw. `LLVMAliasInfoRef`.
31
+
- Introduced a new interface `PointsToInfoBase` and type-erased implementations `PointstoInfo` and `PointsToInfoRef`. Don't confuse them with the old `PointsToInfo`!!! (However, they have different APIs, so you should encounter compilation errors then)
32
+
33
+
## v1222
34
+
35
+
- Removed virtual interfaces `CFG<N,F>` and `ICFG<N,F>` and replaced by CRTP interfaces `CFGBase` and `ICFGBase`. Use the concrete types `LLVMBasedICFG` and `LLVMBasedCFG` instead. In template code you can use the type traits `is_crtp_base_of_v` and `is_icfg_v` to check for conformance to the interfaces.
36
+
- The `LLVMBasedICFG` now takes the IRDB as pointer instead of a reference to better document that it may capture the IRDB by reference.
37
+
- Renamed `ProjectIRDB` to `LLVMProjectIRDB` and added a generic CRTP interface `ProjectIRDBBase` that does not depend on LLVM
38
+
- Changed the API of `LLVMProjectIRDB`: The IRDB does no longer link multiple LLVM modules together, i.e. the ctor that reads a module from a file now takes a single filename instead of a vector. If you still want to link multiple LLVM modules together, use LLVM's Linker functionality instead. `ProjecIRDB::getAllModules()` has been removed and `ProjectIRDB::getWPAModule()` has been renamed to `LLVMProjectIRDB::getModule()`.
39
+
- The `LLVMProjectIRDB` ctor that takes a raw-pointer to `llvm::Module` does no longer preprocess the module (i.e. attaching metadata IDs to it). You can still explicitly use the `ValueAnnotationPass` to do so manually.
40
+
- The type `WholeProgramAnalysis` has been removed. Use `AnalysisController` instead.
41
+
- The IFDS and IDE TabulationProblems no longer take all of `LLVMProjectIRDB*`, `LLVMTypeHierarchy*`, `LLVMPointsToInfo*` and `LLVMBasedICFG*` as an argument. Instead, they only get what they need.
42
+
- The `IFDSSolver` and `IDESolver` now take an instance of the `ICFGBase` interface as additional argument to their ctor (because the analysis problems now not necessarily store a reference to it anymore).
43
+
- The `IDETabulationProblem` is now a base class of `IFDSTabulationProblem` (and not vice versa as it was previously). In their ctors they only take the bare minimum of arguments: The IRDB, the entrypoints and optionally the special zero-value. If the zero-value is not passed in the ctor (as it was previously), it has to be set from within the client analysis' ctor. You may use the new function `initializeZeroValue(d_t)` for this.
message(STATUS"Detected CMAKE_INSTALL_LIBDIR that deviates from 'lib': ${CMAKE_INSTALL_LIBDIR}. Add ${CMAKE_INSTALL_PREFIX}/lib to the RPATH as json-schema-validator needs it")
set(PHASAR_CUSTOM_CONFIG_INSTALL_DIR ""CACHESTRING"If set, customizes the directory, where configuration files for PhASAR are installed (default is /usr/local/.phasar-config)")
135
+
if ("${PHASAR_CUSTOM_CONFIG_INSTALL_DIR}"STREQUAL"")
+ Philipp Dominik Schubert (philipp.schubert@upb.de) and others
14
+
+Fabian Schiebel (fabian.schiebel@iem.fraunhofer.de), Martin Mory (martin.mory@upb.de), Philipp Dominik Schubert (philipp.schubert@upb.de) and others
15
15
+ Please also refer to https://phasar.org/
16
16
17
17
Required version of the C++ standard
@@ -30,9 +30,13 @@ fully-automated manner on the specified LLVM IR target code. Computing points-to
30
30
information, call-graph(s), etc. is done by the framework, thus you can focus on
31
31
what matters.
32
32
33
+
Breaking Changes
34
+
----------------
35
+
To keep PhASAR in a state that it is well suited for state-of-the-art research in static analysis, as well as for productive use, we have to make breaking changes. Please refer to [Breaking Changes](./BreakingChanges.md) for detailed information on what was broken recently and how to migrate.
36
+
33
37
How do I get started with PhASAR?
34
38
---------------------------------
35
-
We have some documentation on PhASAR in our [_**wiki**_](https://github.com/secure-software-engineering/phasar/wiki). You probably would like to read
39
+
We have some documentation on PhASAR in our [_**Wiki**_](https://github.com/secure-software-engineering/phasar/wiki). You probably would like to read
36
40
this README first and then have a look on the material provided on https://phasar.org/
37
41
as well. Please also have a look on PhASAR's project directory and notice the project directory
38
42
examples/ as well as the custom tool tools/myphasartool.cpp.
@@ -45,6 +49,21 @@ prerequisites and compilation. It is recommended to compile PhASAR yourself in
45
49
order to get the full C++ experience and to have full control over the build
46
50
mode.
47
51
52
+
As a shortcut for the very first PhASAR build on your system, you can use our [bootstrap](./bootstrap.sh) script:
53
+
54
+
```bash
55
+
$ ./bootstrap.sh
56
+
```
57
+
58
+
Note: If you want to do changes within PhASAR, it is recommended to build it in Debug mode:
59
+
```bash
60
+
$ ./bootstrap.sh -DCMAKE_BUILD_TYPE=Debug
61
+
```
62
+
63
+
The bootstrap script may ask for superuser permissions (to install the dependencies); however it is not recommended to start the whole script with `sudo`.
64
+
65
+
For subsequent builds, see [Compiling PhASAR](#compiling-phasar-if-not-already-done-using-the-installation-scripts).
66
+
48
67
Please help us to improve PhASAR
49
68
--------------------------------
50
69
You are using PhASAR and would like to help us in the future? Then please
@@ -65,10 +84,12 @@ PhASAR using an Ubuntu or Unix-like system.
65
84
66
85
Therefore, we provide an installation script. To install PhASAR, just navigate to the top-level
67
86
directory of PhASAR and use the following command:
68
-
```
69
-
$ sudo ./bootstrap.sh
87
+
```bash
88
+
$ ./bootstrap.sh --install
70
89
```
71
90
91
+
The bootstrap script may ask for superuser permissions.
You may need to adjust the paths according to your system. When you cloned PhASAR from Github you need to initialize PhASAR's submodules before building it:
87
108
88
109
```
89
-
$ git submodule init
90
-
$ git submodule update
110
+
$ git submodule update --init
91
111
```
92
112
93
113
If you downloaded PhASAR as a compressed release (e.g. .zip or .tar.gz) you can use the `init-submodules-release.sh` script that manually clones the required submodules:
@@ -101,27 +121,25 @@ Navigate into the PhASAR directory. The following commands will do the job and c
101
121
```
102
122
$ mkdir build
103
123
$ cd build/
104
-
$ cmake -DCMAKE_BUILD_TYPE=Release ..
105
-
$ make -j $(nproc) # or use a different number of cores to compile it
106
-
$ sudo make install # if you wish to install PhASAR system wide
124
+
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
125
+
$ ninja -j $(nproc) # or use a different number of cores to compile it
126
+
$ sudo ninja install # only if you wish to install PhASAR system wide
107
127
```
108
128
109
129
When you have used the `bootstrap.sh` script to install PhASAR, the above steps are already done.
110
130
Use them as a reference if you wish to modify PhASAR and recompile it.
111
131
112
132
After compilation using cmake the following two binaries can be found in the build/ directory:
113
133
114
-
+ phasar-llvm - the actual PhASAR command-line tool
134
+
+ phasar-cli - the actual PhASAR command-line tool (previously called `phasar-llvm`)
115
135
+ myphasartool - an example tool that shows how tools can be build on top of PhASAR
116
136
117
137
Use the command:
118
138
119
-
`$ ./phasar-llvm --help`
139
+
`$ ./phasar-cli --help`
120
140
121
141
in order to display the manual and help message.
122
142
123
-
`$ sudo make install`
124
-
125
143
Please be careful and check if errors occur during the compilation.
126
144
127
145
When using CMake to compile PhASAR the following optional parameters can be used:
@@ -130,7 +148,8 @@ When using CMake to compile PhASAR the following optional parameters can be used
| <b>CMAKE_BUILD_TYPE</b> : STRING | Build PhASAR in 'Debug' or 'Release' mode <br> (default is 'Debug') |
133
-
| <b>CMAKE_INSTALL_PREFIX</b> : PATH | Path where PhASAR will be installed if <br> “make install” is invoked or the “install” <br> target is built (default is /usr/local/phasar) |
151
+
| <b>CMAKE_INSTALL_PREFIX</b> : PATH | Path where PhASAR will be installed if <br> "ninja install” is invoked or the “install” <br> target is built (default is /usr/local/phasar) |
152
+
| <b>PHASAR_CONFIG_INSTALL_PREFIX</b> : PATH | Path where PhASAR's configuration files will be installed if <br> ninja install” is invoked or the “install” <br> target is built. Expression will be evaluated within CMAKE_INSTALL_PREFIX, so prefer absolute paths (default is $(HOME)/.config/) |
0 commit comments