33PhASAR a LLVM-based Static Analysis Framework
44=============================================
55
6- [ ![ Codacy Badge] ( https://api.codacy.com/project/badge/Grade/c944f18c7960488798a0728db9380eb5 )] ( https://app.codacy.com/app/pdschubert/phasar?utm_source=github.com&utm_medium=referral&utm_content=secure-software-engineering/phasar&utm_campaign=Badge_Grade_Dashboard )
76[ ![ C++ Standard] ( https://img.shields.io/badge/C++_Standard-C%2B%2B17-blue.svg?style=flat&logo=c%2B%2B )] ( https://isocpp.org/ )
87[ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blueviolet.svg )] ( https://raw.githubusercontent.com/secure-software-engineering/phasar/master/LICENSE.txt )
98
@@ -12,63 +11,59 @@ Version 0521
1211Secure Software Engineering Group
1312---------------------------------
1413
15- + Philipp Schubert (philipp.schubert@upb.de ) and others
14+ + Philipp Dominik Schubert (philipp.schubert@upb.de ) and others
1615+ Please also refer to https://phasar.org/
1716
18- | branch | status |
19- | :---: | :---: |
20- | master | <img src =" https://travis-ci.org/secure-software-engineering/phasar.svg?branch=master " > |
21- | development | <img src =" https://travis-ci.org/secure-software-engineering/phasar.svg?branch=development " > |
22-
2317Required version of the C++ standard
2418------------------------------------
25- Phasar requires C++-17.
19+ PhASAR requires C++-17.
2620
2721Currently supported version of LLVM
2822-----------------------------------
29- Phasar is currently set up to support LLVM-12.0.
23+ PhASAR is currently set up to support LLVM-12.0.
3024
31- What is Phasar ?
25+ What is PhASAR ?
3226---------------
33- Phasar is a LLVM-based static analysis framework written in C++. It allows users
34- to specify arbitrary data-flow problems which are then solved in a
27+ PhASAR is a LLVM-based static analysis framework written in C++. It allows users
28+ to specify arbitrary data-flow problems which are then solved in a
3529fully-automated manner on the specified LLVM IR target code. Computing points-to
3630information, call-graph(s), etc. is done by the framework, thus you can focus on
3731what matters.
3832
39- How do I get started with Phasar ?
33+ How do I get started with PhASAR ?
4034---------------------------------
41- We have some documentation on Phasar in our [ _ ** wiki** _ ] ( https://github.com/secure-software-engineering/phasar/wiki ) . You probably would like to read
35+ We have some documentation on PhASAR in our [ _ ** wiki** _ ] ( https://github.com/secure-software-engineering/phasar/wiki ) . You probably would like to read
4236this README first and then have a look on the material provided on https://phasar.org/
43- as well. Please also have a look on Phasar 's project directory and notice the project directory
37+ as well. Please also have a look on PhASAR 's project directory and notice the project directory
4438examples/ as well as the custom tool tools/myphasartool.cpp.
4539
46- Building Phasar
40+ Building PhASAR
4741---------------
48- If you cannot work with one of the pre-built versions of Phasar and would like to
49- compile Phasar yourself, then please check the wiki for installing the
50- prerequisites and compilation. It is recommended to compile Phasar yourself in
51- order to get the full C++ experience and to have full control over the build
42+ If you cannot work with one of the pre-built versions of PhASAR and would like to
43+ compile PhASAR yourself, then please check the wiki for installing the
44+ prerequisites and compilation. It is recommended to compile PhASAR yourself in
45+ order to get the full C++ experience and to have full control over the build
5246mode.
5347
54- Please help us to improve Phasar
48+ Please help us to improve PhASAR
5549--------------------------------
56- You are using Phasar and would like to help us in the future? Then please
50+ You are using PhASAR and would like to help us in the future? Then please
5751support us by filling out this [ web form] ( https://goo.gl/forms/YG6m3M7sxeUJmKyi1 ) .
5852
59- By giving us feedback you help to decide in what direction Phasar should stride in
53+ By giving us feedback you help to decide in what direction PhASAR should stride in
6054the future and give us clues about our user base. Thank you very much!
6155
6256
6357Installation
6458------------
65- Phasar can be installed using the installer scripts as explained in the following.
59+ PhASAR can be installed using the installer scripts as explained in the following.
60+
6661
67- ### Installing Phasar on an Ubuntu system
68- In the following, we would like to give an complete example of how to install
69- Phasar using an Ubuntu or Unix-like system.
62+ ### Installing PhASAR on an Ubuntu system
63+ In the following, we would like to give an complete example of how to install
64+ PhASAR using an Ubuntu or Unix-like system.
7065
71- Therefore, we provide an installation script. To install Phasar , just navigate to the top-level
66+ Therefore, we provide an installation script. To install PhASAR , just navigate to the top-level
7267directory of PhASAR and use the following command:
7368```
7469$ sudo ./bootstrap.sh
@@ -77,7 +72,7 @@ $ sudo ./bootstrap.sh
7772Done!
7873
7974
80- ### Installing Phasar a MacOS system
75+ ### Installing PhASAR a MacOS system
8176Mac OS 10.13.1 or higher only!
8277To install the framework on a Mac we will rely on Homebrew. (https://brew.sh/ )
8378
@@ -87,13 +82,13 @@ Please follow the instructions down below.
8782$ brew install boost
8883$ brew install python3
8984# Install llvm version 10
90- $ brew install llvm
85+ $ brew install llvm
9186# Setting the paths
9287# Use LLVM's Clang rather than Apple's Clang compiler
9388$ export CC=/usr/local/opt/llvm/bin/clang
9489$ export CXX=/usr/local/opt/llvm/bin/clang++
9590# Set PATH env variable to /usr/local/opt/llvm/bin
96- # Go to Phasar directory run the following commands
91+ # Go to PhASAR directory run the following commands
9792$ git submodule init
9893$ git submodule update
9994$ mkdir build
@@ -103,11 +98,8 @@ $ make -j $(nproc) # or use a different number of cores to compile it
10398$ sudo make install # if you wish a system-wise installation
10499```
105100
106- ### Installing Phasar on a Windows system
107-
108- ** A solution is under implementation.**
109101
110- ### Compiling Phasar (if not already done using the installation scripts)
102+ ### Compiling PhASAR (if not already done using the installation scripts)
111103Set the system's variables for the C and C++ compiler to clang:
112104```
113105$ export CC=/usr/local/bin/clang
@@ -126,23 +118,23 @@ If you downloaded PhASAR as a compressed release (e.g. .zip or .tar.gz) you can
126118$ utils/init-submodules-release.sh
127119```
128120
129- Navigate into the Phasar directory. The following commands will do the job and compile the Phasar framework:
121+ Navigate into the PhASAR directory. The following commands will do the job and compile the PhASAR framework:
130122
131123```
132124$ mkdir build
133125$ cd build/
134126$ cmake -DCMAKE_BUILD_TYPE=Release ..
135127$ make -j $(nproc) # or use a different number of cores to compile it
136- $ sudo make install # if you wish to install Phasar system wide
128+ $ sudo make install # if you wish to install PhASAR system wide
137129```
138130
139- When you have used the ` bootstrap.sh ` script to install Phasar , the above steps are already done.
140- Use them as a reference if you wish to modify Phasar and recompile it.
131+ When you have used the ` bootstrap.sh ` script to install PhASAR , the above steps are already done.
132+ Use them as a reference if you wish to modify PhASAR and recompile it.
141133
142134After compilation using cmake the following two binaries can be found in the build/ directory:
143135
144- + phasar-llvm - the actual Phasar command-line tool
145- + myphasartool - an example tool that shows how tools can be build on top of Phasar
136+ + phasar-llvm - the actual PhASAR command-line tool
137+ + myphasartool - an example tool that shows how tools can be build on top of PhASAR
146138
147139Use the command:
148140
@@ -154,15 +146,17 @@ in order to display the manual and help message.
154146
155147Please be careful and check if errors occur during the compilation.
156148
157- When using CMake to compile Phasar the following optional parameters can be used:
149+ When using CMake to compile PhASAR the following optional parameters can be used:
158150
159151| Parameter : Type| Effect |
160152| -----------| --------|
161- | <b >BUILD_SHARED_LIBS</b > : BOOL | Build shared libraries (default is OFF) |
162- | <b >CMAKE_BUILD_TYPE</b > : STRING | Build Phasar in 'Debug' or 'Release' mode <br > (default is 'Debug') |
163- | <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) |
164- | <b >PHASAR_BUILD_DOC</b > : BOOL | Build Phasar documentation (default is OFF) |
165- | <b >PHASAR_BUILD_UNITTESTS</b > : BOOL | Build Phasar unittests (default is OFF) |
153+ | <b >BUILD_SHARED_LIBS</b > : BOOL | Build shared libraries (default is ON) |
154+ | <b >CMAKE_BUILD_TYPE</b > : STRING | Build PhASAR in 'Debug' or 'Release' mode <br > (default is 'Debug') |
155+ | <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) |
156+ | <b >PHASAR_BUILD_DOC</b > : BOOL | Build PhASAR documentation (default is OFF) |
157+ | <b >PHASAR_BUILD_UNITTESTS</b > : BOOL | Build PhASAR unit tests (default is ON) |
158+ | <b >PHASAR_BUILD_IR</b > : BOOL | Build PhASAR IR (required for running the unit tests) (default is ON) |
159+ | <b >PHASAR_BUILD_OPENSSL_TS_UNITTESTS</b > : BOOL | Build PhASAR unit tests that require OpenSSL (default is OFF) |
166160| <b >PHASAR_ENABLE_PAMM</b > : STRING | Enable the performance measurement mechanism <br > ('Off', 'Core' or 'Full', default is Off) |
167161| <b >PHASAR_ENABLE_PIC</b > : BOOL | Build Position-Independed Code (default is ON) |
168162| <b >PHASAR_ENABLE_WARNINGS</b > : BOOL | Enable compiler warnings (default is ON) |
@@ -180,6 +174,22 @@ To test if everything works as expected please run the following command:
180174
181175If you obtain output other than a segmentation fault or an exception terminating the program abnormally everything works as expected.
182176
183- How to use Phasar ?
177+ How to use PhASAR ?
184178------------------
185- Please consult our [ Phasar wiki pages] ( https://github.com/secure-software-engineering/phasar/wiki ) .
179+ Please consult our [ PhASAR wiki pages] ( https://github.com/secure-software-engineering/phasar/wiki ) .
180+
181+
182+ ### Installing PhASAR's Git pre-commit hook
183+ You are very much welcome to contribute to the PhASAR project.
184+ 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.
185+ For more details please consult [ Coding Conventions] ( https://github.com/secure-software-engineering/phasar/wiki/Coding-Conventions ) and [ Contributing to PhASAR] ( https://github.com/secure-software-engineering/phasar/wiki/Contributing-to-PhASAR ) .
186+
187+ To install the pre-commit hook, please run the following commands in PhASAR's root directory:
188+
189+ ```
190+ $ pip install pre-commit
191+ $ pre-commit install
192+
193+ ```
194+
195+ Thanks. And have fun with the project.
0 commit comments