Skip to content

Commit 5230c1f

Browse files
fabianbs96vulder
andauthored
Rework Folder Structure (#574)
* Move generic stuff out of PhasarLLVM + add separate libraries for phasar_* and phasar_llvm_* * Move Mono * Remove unnecessary stuff + minor * Make demangling more precise * Rename phasar_phasarllvm_utils to phasar_llvm_utils + rename phasar-llvm to phasar-cli * pre-commit * Changes according to review + get rid of LLVMShorthands in InitialSeeds * update BreakingChanges.md * Fixes linking issues * Update breakingChanges.md with linker-related changes --------- Co-authored-by: Florian Sattler <vuld3r@gmail.com>
1 parent ef202dc commit 5230c1f

File tree

353 files changed

+1463
-1712
lines changed

Some content is hidden

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

353 files changed

+1463
-1712
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
/img @pdschubert
1616

17-
/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h @pdschubert @vulder
18-
/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96
19-
/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h @fabianbs96
20-
/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp @fabianbs96
21-
/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96
17+
/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.h @pdschubert @vulder
18+
/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96
19+
/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.h @fabianbs96
20+
/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp @fabianbs96
21+
/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96
2222

2323
/include/phasar/PhasarLLVM/AnalysisStrategy/ @pdschubert
2424

BreakingChanges.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22

33
## development HEAD
44

5-
- `LLVMPointsTo*` has been renamed to `LLVMAlias*`
5+
- 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/`.
6+
An incomplete list of moved/renamed files:
7+
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*` => `phasar/DataFlow/IfdsIde/Solver/*`
8+
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h` => `phasar/DataFlow/IfdsIde/IDETabulationProblem.h`
9+
- `phasar/DB/LLVMProjectIRDB.h` => `phasar/PhasarLLVM/DB/LLVMProjectIRDB.h`
10+
- ...
11+
- Renamed and split up some libraries:
12+
- `phasar_phasarllvm_utils` => `phasar_llvm_utils`
13+
- `phasar_typehierarchy` => `phasar_llvm_typehierarchy`
14+
- `phasar_ifdside` => `phasar_llvm_ifdside`
15+
- `phasar_controlflow` has its LLVM dependent stuff moved to `phasar_llvm_controlflow`
16+
- `phasar_db` has its LLVM dependent stuff moved to `phasar_llvm_db`
17+
- `phasar_pointer` has its LLVM dependent stuff moved to `phasar_llvm_pointer`
18+
- Renamed the phasar tool `phasar-llvm` to `phasar-cli`
19+
- `LLVMPointsTo[.*]` has been renamed to `LLVMAlias[.*]`
620
- 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.
721
- The `PointsToInfo` interface has been replaced by the CRTP interface `AliasInfoBase`. Introduced two type-erased implementation of that interface: `AliasInfo` and `AliasInfoRef`. In most cases you should replace `PointsToInfo*` and `LLVMPointsToInfo*` by `AliasInfoRef`, bzw. `LLVMAliasInfoRef`.
822
- 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)

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ endif()
309309

310310
set(INCLUDE_INSTALL_DIR include/ CACHE PATH "Install dir of headers")
311311

312-
# Install targets of phasar-llvm, other executables, and libraries are to be
312+
# Install targets of phasar-cli, other executables, and libraries are to be
313313
# found in the individual subdirectories of tools/
314314

315315
# Install Phasar include directory

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ RUN mkdir -p build && cd build && \
5858
-G Ninja && \
5959
cmake --build .
6060

61-
ENTRYPOINT [ "./build/tools/phasar-llvm/phasar-llvm" ]
61+
ENTRYPOINT [ "./build/tools/phasar-cli/phasar-cli" ]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ Use them as a reference if you wish to modify PhASAR and recompile it.
131131

132132
After compilation using cmake the following two binaries can be found in the build/ directory:
133133

134-
+ phasar-llvm - the actual PhASAR command-line tool
134+
+ phasar-cli - the actual PhASAR command-line tool (previously called `phasar-llvm`)
135135
+ myphasartool - an example tool that shows how tools can be build on top of PhASAR
136136

137137
Use the command:
138138

139-
`$ ./phasar-llvm --help`
139+
`$ ./phasar-cli --help`
140140

141141
in order to display the manual and help message.
142142

@@ -167,7 +167,7 @@ C++'s long compile times are always a pain. As shown in the above, when using cm
167167
### Running a test solver
168168
To test if everything works as expected please run the following command:
169169

170-
`$ phasar-llvm --module test/build_systems_tests/installation_tests/module.ll -D ifds-solvertest`
170+
`$ phasar-cli -m test/build_systems_tests/installation_tests/module.ll -D ifds-solvertest`
171171

172172
If you obtain output other than a segmentation fault or an exception terminating the program abnormally everything works as expected.
173173

cmake/phasar_macros.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,21 @@ function(add_phasar_unittest test_name)
1616
LINK_PUBLIC
1717
phasar_config
1818
phasar_controller
19+
phasar_llvm_controlflow
1920
phasar_controlflow
20-
phasar_phasarllvm_utils
21+
phasar_llvm_utils
2122
phasar_analysis_strategy
22-
phasar_ifdside
23+
phasar_llvm_ifdside
2324
phasar_utils
2425
phasar_mono
26+
phasar_llvm_db
2527
phasar_db
2628
# phasar_clang
2729
phasar_passes
30+
phasar_llvm_pointer
2831
phasar_pointer
29-
phasar_typehierarchy
32+
phasar_llvm_typehierarchy
33+
phasar_llvm
3034
phasar_taintconfig
3135
nlohmann_json_schema_validator
3236
${SQLITE3_LIBRARY}

examples/llvm-hello-world/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include <memory>
2-
#include <string>
3-
41
#include "llvm/IR/DebugLoc.h"
52
#include "llvm/IR/Function.h"
63
#include "llvm/IR/Instruction.h"
@@ -15,6 +12,9 @@
1512
#include "llvm/Support/SourceMgr.h"
1613
#include "llvm/Support/raw_ostream.h"
1714

15+
#include <memory>
16+
#include <string>
17+
1818
int main(int argc, char **argv) {
1919
if (argc != 2) {
2020
llvm::errs() << "usage: <prog> <IR file>\n";

0 commit comments

Comments
 (0)