Version 2503
PhASAR is a LLVM-based static analysis framework written in C++. It allows users to specify arbitrary data-flow problems which are then solved in a fully-automated manner on the specified LLVM IR target code. Computing points-to information, call-graph(s), etc. is done by the framework, thus you can focus on what matters.
You can find available literature on PhASAR here.
We have some documentation on PhASAR in our Wiki. You probably would like to read this README first.
Please also have a look on PhASAR's project directory and notice the project directory examples as well as the custom tool tools/example-tool/myphasartool.cpp
.
NEW: You can find PhASAR's API reference here.
PhASAR is primarily developed and maintained by the Secure Software Engineering Group at Heinz Nixdorf Institute (University of Paderborn) and Fraunhofer IEM.
PhASAR was initially developed by Philipp Dominik Schubert (@pdschubert)(philipp.schubert@upb.de).
Currently, PhASAR is maintained by
- Fabian Schiebel (@fabianbs96)(fabian.schiebel@iem.fraunhofer.de)
- Sriteja Kummita (@sritejakv)
- Lucas Briese (@jusito)
- Martin Mory (@MMory)(martin.mory@upb.de)
- others
PhASAR requires at least C++-17.
However, building in C++20 mode is supported. You may enable this setting the cmake variable CMAKE_CXX_STANDARD
to 20
.
Although phasar currently does not make use of C++-20 features (except for some concept
s behind an #ifdef border), your client application that just uses phasar as a library may want to use C++20 earlier.
NEW: PhASAR supports C++20 modules as an experimental feature.
PhASAR is currently set up to support LLVM-15.0.*
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 for detailed information on what was broken recently and how to migrate.
Please refer to BUILD.md for instructions on how to build PhASAR.
We recomment using phasar as a library with cmake
or conan
.
If you already have installed phasar, Use-PhASAR-as-a-library may be a good start.
Otherwise, we recommend adding PhASAR as a git submodule to your repository.
In this case, just add_subdirectory
the phasar submodule directory within your CMakeLists.txt
.
Assuming you have checked out phasar in external/phasar
, the phasar-related cmake commands may look like this:
add_subdirectory(external/phasar EXCLUDE_FROM_ALL) # Build phasar with your tool
...
target_link_libraries(yourphasartool
...
phasar # Make your tool link against phasar
)
Depending on your use of PhASAR you also may need to add LLVM to your build.
For more information please consult our PhASAR wiki pages.
To export the recipe and dependencies execute from repo root:
conan export utils/conan/llvm-core/ --version 15.0.7 --user secure-software-engineering
conan export utils/conan/clang/ --version 15.0.7 --user secure-software-engineering
conan export .
- View exported
conan list "phasar/*"
- Consume the package
If you just want to use phasar-cli:
conan install --tool-requires phasar/... --build=missing -of .
source conanbuild.sh
phasar-cli --help
You are using PhASAR and would like to help us in the future? Then please support us by filling out this web form.
By giving us feedback you help to decide in what direction PhASAR should stride in the future and give us clues about our user base. Thank you very much!
You are very much welcome to contribute to the PhASAR project. Please make sure that you install our pre-commit hook that ensures your commit adheres to the most important coding rules of the PhASAR project. For more details please consult Coding Conventions and Contributing to PhASAR.
To install the pre-commit hook, please run the following commands in PhASAR's root directory:
pip install pre-commit
pre-commit install
Thanks. And have fun with the project.