diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 10f582ec0..bfd339c16 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,11 +14,11 @@ /img @pdschubert -/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h @pdschubert @vulder -/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96 -/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h @fabianbs96 -/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp @fabianbs96 -/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96 +/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.h @pdschubert @vulder +/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96 +/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.h @fabianbs96 +/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp @fabianbs96 +/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ @fabianbs96 /include/phasar/PhasarLLVM/AnalysisStrategy/ @pdschubert diff --git a/BreakingChanges.md b/BreakingChanges.md index 2d8fd3dc0..0addc2d26 100644 --- a/BreakingChanges.md +++ b/BreakingChanges.md @@ -2,7 +2,21 @@ ## development HEAD -- `LLVMPointsTo*` has been renamed to `LLVMAlias*` +- 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/`. + An incomplete list of moved/renamed files: + - `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*` => `phasar/DataFlow/IfdsIde/Solver/*` + - `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h` => `phasar/DataFlow/IfdsIde/IDETabulationProblem.h` + - `phasar/DB/LLVMProjectIRDB.h` => `phasar/PhasarLLVM/DB/LLVMProjectIRDB.h` + - ... +- Renamed and split up some libraries: + - `phasar_phasarllvm_utils` => `phasar_llvm_utils` + - `phasar_typehierarchy` => `phasar_llvm_typehierarchy` + - `phasar_ifdside` => `phasar_llvm_ifdside` + - `phasar_controlflow` has its LLVM dependent stuff moved to `phasar_llvm_controlflow` + - `phasar_db` has its LLVM dependent stuff moved to `phasar_llvm_db` + - `phasar_pointer` has its LLVM dependent stuff moved to `phasar_llvm_pointer` +- Renamed the phasar tool `phasar-llvm` to `phasar-cli` +- `LLVMPointsTo[.*]` has been renamed to `LLVMAlias[.*]` - 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. - 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`. - 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) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b40adea2..b512cce5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,7 +309,7 @@ endif() set(INCLUDE_INSTALL_DIR include/ CACHE PATH "Install dir of headers") -# Install targets of phasar-llvm, other executables, and libraries are to be +# Install targets of phasar-cli, other executables, and libraries are to be # found in the individual subdirectories of tools/ # Install Phasar include directory diff --git a/Dockerfile b/Dockerfile index 527a7741c..7bc1363f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,4 +58,4 @@ RUN mkdir -p build && cd build && \ -G Ninja && \ cmake --build . -ENTRYPOINT [ "./build/tools/phasar-llvm/phasar-llvm" ] +ENTRYPOINT [ "./build/tools/phasar-cli/phasar-cli" ] diff --git a/README.md b/README.md index 4bd600cff..27fa3c817 100644 --- a/README.md +++ b/README.md @@ -131,12 +131,12 @@ Use them as a reference if you wish to modify PhASAR and recompile it. After compilation using cmake the following two binaries can be found in the build/ directory: -+ phasar-llvm - the actual PhASAR command-line tool ++ phasar-cli - the actual PhASAR command-line tool (previously called `phasar-llvm`) + myphasartool - an example tool that shows how tools can be build on top of PhASAR Use the command: -`$ ./phasar-llvm --help` +`$ ./phasar-cli --help` in order to display the manual and help message. @@ -167,7 +167,7 @@ C++'s long compile times are always a pain. As shown in the above, when using cm ### Running a test solver To test if everything works as expected please run the following command: -`$ phasar-llvm --module test/build_systems_tests/installation_tests/module.ll -D ifds-solvertest` +`$ phasar-cli -m test/build_systems_tests/installation_tests/module.ll -D ifds-solvertest` If you obtain output other than a segmentation fault or an exception terminating the program abnormally everything works as expected. diff --git a/cmake/phasar_macros.cmake b/cmake/phasar_macros.cmake index 3ec6f49bb..67f68741b 100644 --- a/cmake/phasar_macros.cmake +++ b/cmake/phasar_macros.cmake @@ -16,17 +16,21 @@ function(add_phasar_unittest test_name) LINK_PUBLIC phasar_config phasar_controller + phasar_llvm_controlflow phasar_controlflow - phasar_phasarllvm_utils + phasar_llvm_utils phasar_analysis_strategy - phasar_ifdside + phasar_llvm_ifdside phasar_utils phasar_mono + phasar_llvm_db phasar_db # phasar_clang phasar_passes + phasar_llvm_pointer phasar_pointer - phasar_typehierarchy + phasar_llvm_typehierarchy + phasar_llvm phasar_taintconfig nlohmann_json_schema_validator ${SQLITE3_LIBRARY} diff --git a/examples/llvm-hello-world/main.cpp b/examples/llvm-hello-world/main.cpp index fe8d6f776..3cb439b21 100644 --- a/examples/llvm-hello-world/main.cpp +++ b/examples/llvm-hello-world/main.cpp @@ -1,6 +1,3 @@ -#include -#include - #include "llvm/IR/DebugLoc.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instruction.h" @@ -15,6 +12,9 @@ #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" +#include +#include + int main(int argc, char **argv) { if (argc != 2) { llvm::errs() << "usage: \n"; diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/AnalysisSetup.h b/include/phasar/AnalysisStrategy/AnalysisSetup.h similarity index 100% rename from include/phasar/PhasarLLVM/AnalysisStrategy/AnalysisSetup.h rename to include/phasar/AnalysisStrategy/AnalysisSetup.h diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/DemandDrivenAnalysis.h b/include/phasar/AnalysisStrategy/DemandDrivenAnalysis.h similarity index 100% rename from include/phasar/PhasarLLVM/AnalysisStrategy/DemandDrivenAnalysis.h rename to include/phasar/AnalysisStrategy/DemandDrivenAnalysis.h diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/IncrementalUpdateAnalysis.h b/include/phasar/AnalysisStrategy/IncrementalUpdateAnalysis.h similarity index 100% rename from include/phasar/PhasarLLVM/AnalysisStrategy/IncrementalUpdateAnalysis.h rename to include/phasar/AnalysisStrategy/IncrementalUpdateAnalysis.h diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/ModuleWiseAnalysis.h b/include/phasar/AnalysisStrategy/ModuleWiseAnalysis.h similarity index 100% rename from include/phasar/PhasarLLVM/AnalysisStrategy/ModuleWiseAnalysis.h rename to include/phasar/AnalysisStrategy/ModuleWiseAnalysis.h diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/Strategies.def b/include/phasar/AnalysisStrategy/Strategies.def similarity index 100% rename from include/phasar/PhasarLLVM/AnalysisStrategy/Strategies.def rename to include/phasar/AnalysisStrategy/Strategies.def diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/Strategies.h b/include/phasar/AnalysisStrategy/Strategies.h similarity index 94% rename from include/phasar/PhasarLLVM/AnalysisStrategy/Strategies.h rename to include/phasar/AnalysisStrategy/Strategies.h index 91c38d0f1..16c17655e 100644 --- a/include/phasar/PhasarLLVM/AnalysisStrategy/Strategies.h +++ b/include/phasar/AnalysisStrategy/Strategies.h @@ -24,7 +24,7 @@ namespace psr { enum class AnalysisStrategy { None, #define ANALYSIS_STRATEGY_TYPES(NAME, CMDFLAG, DESC) NAME, -#include "phasar/PhasarLLVM/AnalysisStrategy/Strategies.def" +#include "phasar/AnalysisStrategy/Strategies.def" }; diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/VariationalAnalysis.h b/include/phasar/AnalysisStrategy/VariationalAnalysis.h similarity index 86% rename from include/phasar/PhasarLLVM/AnalysisStrategy/VariationalAnalysis.h rename to include/phasar/AnalysisStrategy/VariationalAnalysis.h index 7ab61ff4d..3211a0091 100644 --- a/include/phasar/PhasarLLVM/AnalysisStrategy/VariationalAnalysis.h +++ b/include/phasar/AnalysisStrategy/VariationalAnalysis.h @@ -10,8 +10,7 @@ #ifndef PHASAR_PHASARLLVM_ANALYSISSTRATEGY_VARIATIONALANALYSIS_H_ #define PHASAR_PHASARLLVM_ANALYSISSTRATEGY_VARIATIONALANALYSIS_H_ -#include "phasar/PhasarLLVM/AnalysisStrategy/AnalysisSetup.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/IntraMonoSolver.h" +#include "phasar/AnalysisStrategy/AnalysisSetup.h" #include diff --git a/include/phasar/PhasarLLVM/ControlFlow/CFGBase.h b/include/phasar/ControlFlow/CFGBase.h similarity index 100% rename from include/phasar/PhasarLLVM/ControlFlow/CFGBase.h rename to include/phasar/ControlFlow/CFGBase.h diff --git a/include/phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.def b/include/phasar/ControlFlow/CallGraphAnalysisType.def similarity index 100% rename from include/phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.def rename to include/phasar/ControlFlow/CallGraphAnalysisType.def diff --git a/include/phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h b/include/phasar/ControlFlow/CallGraphAnalysisType.h similarity index 92% rename from include/phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h rename to include/phasar/ControlFlow/CallGraphAnalysisType.h index 99bbda20c..31d6193ce 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h +++ b/include/phasar/ControlFlow/CallGraphAnalysisType.h @@ -18,7 +18,7 @@ namespace psr { enum class CallGraphAnalysisType { #define CALL_GRAPH_ANALYSIS_TYPE(NAME, CMDFLAG, DESC) NAME, -#include "phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.def" +#include "phasar/ControlFlow/CallGraphAnalysisType.def" Invalid }; diff --git a/include/phasar/PhasarLLVM/ControlFlow/ICFGBase.h b/include/phasar/ControlFlow/ICFGBase.h similarity index 99% rename from include/phasar/PhasarLLVM/ControlFlow/ICFGBase.h rename to include/phasar/ControlFlow/ICFGBase.h index 308b51ed4..e85520de2 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/ICFGBase.h +++ b/include/phasar/ControlFlow/ICFGBase.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_CONTROLFLOW_ICFGBASE_H #define PHASAR_PHASARLLVM_CONTROLFLOW_ICFGBASE_H -#include "phasar/PhasarLLVM/ControlFlow/CFGBase.h" +#include "phasar/ControlFlow/CFGBase.h" #include "phasar/Utils/TypeTraits.h" #include "llvm/ADT/StringRef.h" diff --git a/include/phasar/PhasarLLVM/ControlFlow/SpecialMemberFunctionType.def b/include/phasar/ControlFlow/SpecialMemberFunctionType.def similarity index 100% rename from include/phasar/PhasarLLVM/ControlFlow/SpecialMemberFunctionType.def rename to include/phasar/ControlFlow/SpecialMemberFunctionType.def diff --git a/include/phasar/PhasarLLVM/ControlFlow/SpecialMemberFunctionType.h b/include/phasar/ControlFlow/SpecialMemberFunctionType.h similarity index 93% rename from include/phasar/PhasarLLVM/ControlFlow/SpecialMemberFunctionType.h rename to include/phasar/ControlFlow/SpecialMemberFunctionType.h index 9f6e488b0..b6e86f6c2 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/SpecialMemberFunctionType.h +++ b/include/phasar/ControlFlow/SpecialMemberFunctionType.h @@ -29,7 +29,7 @@ namespace psr { enum class SpecialMemberFunctionType { #define SPECIAL_MEMBER_FUNCTION_TYPES(NAME, TYPE) TYPE, -#include "phasar/PhasarLLVM/ControlFlow/SpecialMemberFunctionType.def" +#include "phasar/ControlFlow/SpecialMemberFunctionType.def" }; std::string toString(SpecialMemberFunctionType SMFT); diff --git a/include/phasar/Controller/AnalysisController.h b/include/phasar/Controller/AnalysisController.h index 4df2c6bc9..35671ff61 100644 --- a/include/phasar/Controller/AnalysisController.h +++ b/include/phasar/Controller/AnalysisController.h @@ -10,20 +10,19 @@ #ifndef PHASAR_CONTROLLER_ANALYSISCONTROLLER_H #define PHASAR_CONTROLLER_ANALYSISCONTROLLER_H +#include "phasar/AnalysisStrategy/Strategies.h" #include "phasar/Controller/AnalysisControllerEmitterOptions.h" -#include "phasar/DB/LLVMProjectIRDB.h" -#include "phasar/PhasarLLVM/AnalysisStrategy/HelperAnalyses.h" -#include "phasar/PhasarLLVM/AnalysisStrategy/SimpleAnalysisConstructor.h" -#include "phasar/PhasarLLVM/AnalysisStrategy/Strategies.h" +#include "phasar/DataFlow/IfdsIde/IFDSIDESolverConfig.h" +#include "phasar/DataFlow/IfdsIde/Solver/IDESolver.h" +#include "phasar/DataFlow/IfdsIde/Solver/IFDSSolver.h" +#include "phasar/DataFlow/IfdsIde/SolverResults.h" +#include "phasar/DataFlow/Mono/Solver/InterMonoSolver.h" +#include "phasar/DataFlow/Mono/Solver/IntraMonoSolver.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IFDSSolver.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/IntraMonoSolver.h" +#include "phasar/PhasarLLVM/DB/LLVMProjectIRDB.h" +#include "phasar/PhasarLLVM/HelperAnalyses.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasSet.h" -#include "phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h" +#include "phasar/PhasarLLVM/SimpleAnalysisConstructor.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "phasar/PhasarLLVM/Utils/DataFlowAnalysisType.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionComposer.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctionComposer.h similarity index 95% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionComposer.h rename to include/phasar/DataFlow/IfdsIde/EdgeFunctionComposer.h index 2c1a44d70..16e7e6578 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionComposer.h +++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctionComposer.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_EDGEFUNCTIONCOMPOSER_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_EDGEFUNCTIONCOMPOSER_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionSingletonFactory.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctionSingletonFactory.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionSingletonFactory.h rename to include/phasar/DataFlow/IfdsIde/EdgeFunctionSingletonFactory.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h rename to include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h index 637f2be70..c86f446c2 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h +++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h @@ -7,12 +7,12 @@ * Philipp Schubert, Fabian Schiebel and others *****************************************************************************/ -#ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_EDGEFUNCTIONUTILS_H_ -#define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_EDGEFUNCTIONUTILS_H_ +#ifndef PHASAR_DATAFLOW_IFDSIDE_EDGEFUNCTIONUTILS_H_ +#define PHASAR_DATAFLOW_IFDSIDE_EDGEFUNCTIONUTILS_H_ -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" #include "phasar/Utils/ByRef.h" +#include "phasar/Utils/JoinLattice.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctions.h similarity index 99% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h rename to include/phasar/DataFlow/IfdsIde/EdgeFunctions.h index 7d247821a..946f5b0c7 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h +++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctions.h @@ -17,8 +17,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_EDGEFUNCTIONS_H_ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_EDGEFUNCTIONS_H_ -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h" #include "phasar/Utils/ByRef.h" +#include "phasar/Utils/JoinLattice.h" #include "phasar/Utils/TypeTraits.h" #include "llvm/ADT/ArrayRef.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h b/include/phasar/DataFlow/IfdsIde/FlowFunctions.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h rename to include/phasar/DataFlow/IfdsIde/FlowFunctions.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h b/include/phasar/DataFlow/IfdsIde/IDETabulationProblem.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h rename to include/phasar/DataFlow/IfdsIde/IDETabulationProblem.h index c907b42ed..bddccc0be 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h +++ b/include/phasar/DataFlow/IfdsIde/IDETabulationProblem.h @@ -10,19 +10,20 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IDETABULATIONPROBLEM_H_ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IDETABULATIONPROBLEM_H_ +#include "phasar/ControlFlow/ICFGBase.h" #include "phasar/DB/ProjectIRDBBase.h" -#include "phasar/PhasarLLVM/ControlFlow/ICFGBase.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h" -#include "phasar/PhasarLLVM/Utils/Printer.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/DataFlow/IfdsIde/IFDSIDESolverConfig.h" +#include "phasar/DataFlow/IfdsIde/InitialSeeds.h" +#include "phasar/DataFlow/IfdsIde/SolverResults.h" +#include "phasar/Utils/JoinLattice.h" +#include "phasar/Utils/Printer.h" #include "phasar/Utils/Soundness.h" #include #include +#include #include #include #include @@ -55,13 +56,11 @@ class IDETabulationProblem : public FlowFunctions, using ConfigurationTy = HasNoConfigurationType; - explicit IDETabulationProblem(const db_t *IRDB, + explicit IDETabulationProblem(const ProjectIRDBBase *IRDB, std::vector EntryPoints, std::optional ZeroValue) : IRDB(IRDB), EntryPoints(std::move(EntryPoints)), ZeroValue(std::move(ZeroValue)) { - static_assert(std::is_base_of_v, db_t>, - "db_t must implement the ProjectIRDBBase interface!"); assert(IRDB != nullptr); } @@ -128,7 +127,7 @@ class IDETabulationProblem : public FlowFunctions, return generateFlow(std::move(FactToGenerate), getZeroValue()); } - const db_t *IRDB{}; + const ProjectIRDBBase *IRDB{}; std::vector EntryPoints; std::optional ZeroValue; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h b/include/phasar/DataFlow/IfdsIde/IFDSIDESolverConfig.h similarity index 85% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h rename to include/phasar/DataFlow/IfdsIde/IFDSIDESolverConfig.h index 7524e2911..e402ada1c 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h +++ b/include/phasar/DataFlow/IfdsIde/IFDSIDESolverConfig.h @@ -42,12 +42,6 @@ enum class SolverConfigOptions : uint32_t { struct IFDSIDESolverConfig { IFDSIDESolverConfig() noexcept = default; IFDSIDESolverConfig(SolverConfigOptions Options) noexcept; - ~IFDSIDESolverConfig() = default; - IFDSIDESolverConfig(const IFDSIDESolverConfig &) noexcept = default; - IFDSIDESolverConfig & - operator=(const IFDSIDESolverConfig &) noexcept = default; - IFDSIDESolverConfig(IFDSIDESolverConfig &&) noexcept = default; - IFDSIDESolverConfig &operator=(IFDSIDESolverConfig &&) noexcept = default; [[nodiscard]] bool followReturnsPastSeeds() const; [[nodiscard]] bool autoAddZero() const; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h b/include/phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h rename to include/phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h index bb0d9f085..54ee72b58 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h +++ b/include/phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h @@ -10,10 +10,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSTABULATIONPROBLEM_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSTABULATIONPROBLEM_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" -#include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" -#include "phasar/PhasarLLVM/Utils/BinaryDomain.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" +#include "phasar/Domain/AnalysisDomain.h" +#include "phasar/Domain/BinaryDomain.h" #include #include @@ -40,7 +40,7 @@ class IFDSTabulationProblem using typename Base::t_t; using typename Base::v_t; - explicit IFDSTabulationProblem(const db_t *IRDB, + explicit IFDSTabulationProblem(const ProjectIRDBBase *IRDB, std::vector EntryPoints, d_t ZeroValue) : Base(IRDB, std::move(EntryPoints), std::move(ZeroValue)) {} diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h b/include/phasar/DataFlow/IfdsIde/InitialSeeds.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h rename to include/phasar/DataFlow/IfdsIde/InitialSeeds.h index 7f89d566d..d12fca954 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h +++ b/include/phasar/DataFlow/IfdsIde/InitialSeeds.h @@ -10,8 +10,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_INITIALSEEDS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_INITIALSEEDS_H -#include "phasar/PhasarLLVM/Utils/BinaryDomain.h" -#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" +#include "phasar/Domain/BinaryDomain.h" +#include "phasar/Utils/TypeTraits.h" + +#include "llvm/Support/Compiler.h" #include #include @@ -72,19 +74,21 @@ template class InitialSeeds { [[nodiscard]] const GeneralizedSeeds &getSeeds() const & { return Seeds; } [[nodiscard]] GeneralizedSeeds getSeeds() && { return std::move(Seeds); } - void dump(llvm::raw_ostream &OS = llvm::errs()) { + void dump(llvm::raw_ostream &OS = llvm::errs()) const { auto printNode = [&](auto &&Node) { // NOLINT - if constexpr (std::is_same_v) { - OS << llvmIRToString(Node); + if constexpr (std::is_pointer_v && + is_llvm_printable_v>) { + OS << *Node; } else { OS << Node; } }; auto printFact = [&](auto &&Node) { // NOLINT - if constexpr (std::is_same_v) { - OS << llvmIRToString(Node); + if constexpr (std::is_pointer_v && + is_llvm_printable_v>) { + OS << *Node; } else { OS << Node; } diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowEdgeFunctionCache.h b/include/phasar/DataFlow/IfdsIde/Solver/FlowEdgeFunctionCache.h similarity index 99% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowEdgeFunctionCache.h rename to include/phasar/DataFlow/IfdsIde/Solver/FlowEdgeFunctionCache.h index d960462ee..fe3d40968 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowEdgeFunctionCache.h +++ b/include/phasar/DataFlow/IfdsIde/Solver/FlowEdgeFunctionCache.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_FLOWEDGEFUNCTIONCACHE_H_ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_FLOWEDGEFUNCTIONCACHE_H_ -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" #include "phasar/Utils/EquivalenceClassMap.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/PAMMMacros.h" @@ -26,6 +26,10 @@ #include #include +namespace llvm { +class Value; +} // namespace llvm + namespace psr { template class DefaultMapKeyCompressor { public: diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h b/include/phasar/DataFlow/IfdsIde/Solver/IDESolver.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h rename to include/phasar/DataFlow/IfdsIde/Solver/IDESolver.h index bab12b3f0..c9297e808 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h +++ b/include/phasar/DataFlow/IfdsIde/Solver/IDESolver.h @@ -18,22 +18,22 @@ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_IDESOLVER_H #include "phasar/Config/Configuration.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowEdgeFunctionCache.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/PathEdge.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h" -#include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" -#include "phasar/PhasarLLVM/Utils/DOTGraph.h" -#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/InitialSeeds.h" +#include "phasar/DataFlow/IfdsIde/Solver/FlowEdgeFunctionCache.h" +#include "phasar/DataFlow/IfdsIde/Solver/JumpFunctions.h" +#include "phasar/DataFlow/IfdsIde/Solver/PathEdge.h" +#include "phasar/DataFlow/IfdsIde/SolverResults.h" +#include "phasar/Domain/AnalysisDomain.h" +#include "phasar/Utils/DOTGraph.h" +#include "phasar/Utils/JoinLattice.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/PAMMMacros.h" #include "phasar/Utils/Table.h" +#include "phasar/Utils/Utilities.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/raw_ostream.h" @@ -49,7 +49,14 @@ #include #include +namespace llvm { +class Instruction; +class Value; +} // namespace llvm + namespace psr { +// For sorting the results in dumpResults() +std::string getMetaDataID(const llvm::Value *V); /// Solves the given IDETabulationProblem as described in the 1996 paper by /// Sagiv, Horwitz and Reps. To solve the problem, call solve(). Results @@ -268,7 +275,7 @@ class IDESolver { IDEProblem.emitGraphicalReport(getSolverResults(), OS); } - virtual void dumpResults(llvm::raw_ostream &OS = llvm::outs()) { + void dumpResults(llvm::raw_ostream &OS = llvm::outs()) { PAMM_GET_INSTANCE; START_TIMER("DFA IDE Result Dumping", PAMM_SEVERITY_LEVEL::Full); OS << "\n***************************************************************\n" @@ -278,12 +285,11 @@ class IDESolver { if (Cells.empty()) { OS << "No results computed!" << '\n'; } else { - LLVMValueIDLess LLVMIDLess; std::sort( - Cells.begin(), Cells.end(), - [&LLVMIDLess](const auto &Lhs, const auto &Rhs) { + Cells.begin(), Cells.end(), [](const auto &Lhs, const auto &Rhs) { if constexpr (std::is_same_v) { - return LLVMIDLess(Lhs.getRowKey(), Rhs.getRowKey()); + return StringIDLess{}(getMetaDataID(Lhs.getRowKey()), + getMetaDataID(Rhs.getRowKey())); } else { // If non-LLVM IR is used return Lhs.getRowKey() < Rhs.getRowKey(); diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IFDSSolver.h b/include/phasar/DataFlow/IfdsIde/Solver/IFDSSolver.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IFDSSolver.h rename to include/phasar/DataFlow/IfdsIde/Solver/IFDSSolver.h index 12bb215f2..f9ed15d76 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IFDSSolver.h +++ b/include/phasar/DataFlow/IfdsIde/Solver/IFDSSolver.h @@ -17,9 +17,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_IFDSSOLVER_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_IFDSSOLVER_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h" -#include "phasar/PhasarLLVM/Utils/BinaryDomain.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/Solver/IDESolver.h" +#include "phasar/Domain/BinaryDomain.h" #include #include @@ -30,9 +30,6 @@ namespace psr { template class IFDSSolver : public IDESolver> { - static_assert(std::is_same_v, - "Expect an IFDS analysis domain"); - public: using ProblemTy = IFDSTabulationProblem; using d_t = typename AnalysisDomainTy::d_t; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h b/include/phasar/DataFlow/IfdsIde/Solver/JumpFunctions.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h rename to include/phasar/DataFlow/IfdsIde/Solver/JumpFunctions.h index 62b4ef799..a9c3f839e 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h +++ b/include/phasar/DataFlow/IfdsIde/Solver/JumpFunctions.h @@ -17,8 +17,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_JUMPFUNCTIONS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_JUMPFUNCTIONS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Table.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/PathEdge.h b/include/phasar/DataFlow/IfdsIde/Solver/PathEdge.h similarity index 67% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/PathEdge.h rename to include/phasar/DataFlow/IfdsIde/Solver/PathEdge.h index 1ab42af3c..84c16b706 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/PathEdge.h +++ b/include/phasar/DataFlow/IfdsIde/Solver/PathEdge.h @@ -7,35 +7,31 @@ * Philipp Schubert and others *****************************************************************************/ -/* - * PathEdge.h - * - * Created on: 16.08.2016 - * Author: pdschbrt - */ - #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_PATHEDGE_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_PATHEDGE_H -#include +#include "llvm/Support/raw_ostream.h" + +#include namespace psr { template class PathEdge { -private: - const N Target; - const D DSource; - const D DTarget; public: - PathEdge(D DSource, N Target, D DTarget) - : Target(Target), DSource(DSource), DTarget(DTarget) {} + PathEdge(D DSource, N Target, D DTarget) noexcept + : Target(std::move(Target)), DSource(std::move(DSource)), + DTarget(std::move(DTarget)) {} ~PathEdge() = default; - PathEdge(const PathEdge &) = default; + PathEdge(const PathEdge &) noexcept( + std::is_nothrow_copy_constructible_v + &&std::is_nothrow_copy_constructible_v) = default; - PathEdge &operator=(const PathEdge &) = default; + PathEdge &operator=(const PathEdge &) noexcept( + std::is_nothrow_copy_assignable_v + &&std::is_nothrow_copy_assignable_v) = default; PathEdge(PathEdge &&) noexcept = default; @@ -52,6 +48,11 @@ template class PathEdge { return OS << "<" << Edge.DSource << "> -> <" << Edge.Target << "," << Edge.DTarget << ">"; } + +private: + N Target; + D DSource; + D DTarget; }; } // namespace psr diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h b/include/phasar/DataFlow/IfdsIde/SolverResults.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h rename to include/phasar/DataFlow/IfdsIde/SolverResults.h index 18112840d..6795f673f 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h +++ b/include/phasar/DataFlow/IfdsIde/SolverResults.h @@ -17,7 +17,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_SOLVERRESULTS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SOLVER_SOLVERRESULTS_H -#include "phasar/PhasarLLVM/Utils/BinaryDomain.h" +#include "phasar/Domain/BinaryDomain.h" #include "phasar/Utils/Table.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/SpecialSummaries.h b/include/phasar/DataFlow/IfdsIde/SpecialSummaries.h similarity index 93% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/SpecialSummaries.h rename to include/phasar/DataFlow/IfdsIde/SpecialSummaries.h index 4b24842f2..6861e2452 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/SpecialSummaries.h +++ b/include/phasar/DataFlow/IfdsIde/SpecialSummaries.h @@ -18,10 +18,10 @@ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_SPECIALSUMMARIES_H #include "phasar/Config/Configuration.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/Utils/BinaryDomain.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/Domain/BinaryDomain.h" #include "phasar/Utils/IO.h" // readFile #include "llvm/IR/Function.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h b/include/phasar/DataFlow/Mono/Contexts/CallStringCTX.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h rename to include/phasar/DataFlow/Mono/Contexts/CallStringCTX.h index 9bfd10dd4..07a7693c7 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h +++ b/include/phasar/DataFlow/Mono/Contexts/CallStringCTX.h @@ -1,7 +1,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_CONTEXTS_CALLSTRINGCTX_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_CONTEXTS_CALLSTRINGCTX_H -#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" +#include "phasar/Utils/Printer.h" + +#include "llvm/Support/raw_ostream.h" #include "boost/functional/hash.hpp" @@ -14,7 +16,7 @@ namespace psr { template class CallStringCTX { protected: std::deque CallString; - static const unsigned KLimit = K; + static constexpr unsigned KLimit = K; friend struct std::hash>; public: @@ -66,21 +68,16 @@ template class CallStringCTX { return Lhs.cs < Rhs.cs; } - void print(llvm::raw_ostream &OS) const { + llvm::raw_ostream &print(llvm::raw_ostream &OS, + const NodePrinterBase &NP) const { OS << "Call string: [ "; for (auto C : CallString) { - OS << llvmIRToString(C); + NP.printNode(OS, C); if (C != CallString.back()) { OS << " * "; } } - OS << " ]"; - } - - friend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, - const CallStringCTX &C) { - C.print(OS); - return OS; + return OS << " ]"; } [[nodiscard]] bool empty() const { return CallString.empty(); } diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h b/include/phasar/DataFlow/Mono/InterMonoProblem.h similarity index 84% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h rename to include/phasar/DataFlow/Mono/InterMonoProblem.h index 06c69df8d..5d119ac64 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h +++ b/include/phasar/DataFlow/Mono/InterMonoProblem.h @@ -17,10 +17,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_INTERMONOPROBLEM_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_INTERMONOPROBLEM_H -#include "phasar/DB/ProjectIRDBBase.h" -#include "phasar/PhasarLLVM/ControlFlow/ICFGBase.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h" -#include "phasar/PhasarLLVM/Pointer/AliasInfo.h" +#include "phasar/ControlFlow/ICFGBase.h" +#include "phasar/DataFlow/Mono/IntraMonoProblem.h" +#include "phasar/Pointer/AliasInfo.h" #include "phasar/Utils/BitVectorSet.h" #include @@ -48,15 +47,14 @@ class InterMonoProblem : public IntraMonoProblem { const i_t *ICF; public: - InterMonoProblem(const db_t *IRDB, const TypeHierarchy *TH, - const i_t *ICF, AliasInfoRef PT, + InterMonoProblem(const ProjectIRDBBase *IRDB, + const TypeHierarchy *TH, const i_t *ICF, + AliasInfoRef PT, std::vector EntryPoints = {}) : IntraMonoProblem(IRDB, TH, ICF, PT, EntryPoints), ICF(ICF) { static_assert(is_icfg_v, "Type parameter i_t must implement the ICFG interface!"); - static_assert(std::is_base_of_v, db_t>, - "db_t must implement the ProjectIRDBBase interface!"); } ~InterMonoProblem() override = default; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h b/include/phasar/DataFlow/Mono/IntraMonoProblem.h similarity index 79% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h rename to include/phasar/DataFlow/Mono/IntraMonoProblem.h index 5983f13bb..4f5927d81 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h +++ b/include/phasar/DataFlow/Mono/IntraMonoProblem.h @@ -17,11 +17,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_INTRAMONOPROBLEM_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_INTRAMONOPROBLEM_H -#include "phasar/DB/LLVMProjectIRDB.h" -#include "phasar/PhasarLLVM/ControlFlow/CFGBase.h" -#include "phasar/PhasarLLVM/Pointer/AliasInfo.h" -#include "phasar/PhasarLLVM/Utils/Printer.h" -#include "phasar/Utils/BitVectorSet.h" +#include "phasar/ControlFlow/CFGBase.h" +#include "phasar/PhasarLLVM/DB/LLVMProjectIRDB.h" +#include "phasar/Pointer/AliasInfo.h" +#include "phasar/Utils/Printer.h" #include "phasar/Utils/Soundness.h" #include @@ -54,9 +53,9 @@ class IntraMonoProblem : public NodePrinter, using ProblemAnalysisDomain = AnalysisDomainTy; protected: - const db_t *IRDB; + const ProjectIRDBBase *IRDB; const TypeHierarchy *TH; - const c_t *CF; + const CFGBase *CF; AliasInfoRef PT; std::vector EntryPoints; [[maybe_unused]] Soundness S = Soundness::Soundy; @@ -66,16 +65,12 @@ class IntraMonoProblem : public NodePrinter, // a user problem can override the type of configuration to be used, if any using ConfigurationTy = HasNoConfigurationType; - IntraMonoProblem(const db_t *IRDB, const TypeHierarchy *TH, - const c_t *CF, AliasInfoRef PT, + IntraMonoProblem(const ProjectIRDBBase *IRDB, + const TypeHierarchy *TH, const CFGBase *CF, + AliasInfoRef PT, std::vector EntryPoints = {}) : IRDB(IRDB), TH(TH), CF(CF), PT(PT), - EntryPoints(std::move(EntryPoints)) { - static_assert(is_cfg_v, - "c_t must implement the CFG interface!"); - static_assert(std::is_base_of_v, db_t>, - "db_t must implement the ProjectIRDBBase interface!"); - } + EntryPoints(std::move(EntryPoints)) {} ~IntraMonoProblem() override = default; @@ -95,13 +90,15 @@ class IntraMonoProblem : public NodePrinter, return EntryPoints; } - [[nodiscard]] const db_t *getProjectIRDB() const { return IRDB; } + [[nodiscard]] const ProjectIRDBBase *getProjectIRDB() const { + return IRDB; + } [[nodiscard]] const TypeHierarchy *getTypeHierarchy() const { return TH; } - [[nodiscard]] const c_t *getCFG() const { return CF; } + [[nodiscard]] const CFGBase *getCFG() const { return CF; } [[nodiscard]] AliasInfoRef getPointstoInfo() const { return PT; } diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h b/include/phasar/DataFlow/Mono/Solver/InterMonoSolver.h similarity index 93% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h rename to include/phasar/DataFlow/Mono/Solver/InterMonoSolver.h index 414a5423a..c1a7285b6 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h +++ b/include/phasar/DataFlow/Mono/Solver/InterMonoSolver.h @@ -17,9 +17,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_SOLVER_INTERMONOSOLVER_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_SOLVER_INTERMONOSOLVER_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h" -#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" +#include "phasar/DataFlow/Mono/Contexts/CallStringCTX.h" +#include "phasar/DataFlow/Mono/InterMonoProblem.h" #include #include @@ -86,8 +85,8 @@ template class InterMonoSolver { void printWorkList() { llvm::outs() << "CURRENT WORKLIST:\n"; for (auto &[Src, Dst] : Worklist) { - llvm::outs() << llvmIRToString(Src) << " --> " << llvmIRToString(Dst) - << '\n'; + llvm::outs() << IMProblem.NtoString(Src) << " --> " + << IMProblem.NtoString(Dst) << '\n'; } llvm::outs() << "-----------------\n"; } @@ -179,8 +178,8 @@ template class InterMonoSolver { llvm::outs() << "Handle normal flow\n"; auto Src = Edge.first; auto Dst = Edge.second; - llvm::outs() << "Src: " << llvmIRToString(Src) << '\n'; - llvm::outs() << "Dst: " << llvmIRToString(Dst) << '\n'; + llvm::outs() << "Src: " << IMProblem.NtoString(Src) << '\n'; + llvm::outs() << "Dst: " << IMProblem.NtoString(Dst) << '\n'; std::unordered_map, mono_container_t> Out; for (auto &[Ctx, Facts] : Analysis[Src]) { Out[Ctx] = IMProblem.normalFlow(Src, Analysis[Src][Ctx]); @@ -225,8 +224,8 @@ template class InterMonoSolver { std::unordered_map, mono_container_t> Out; if (!isIntraEdge(Edge)) { llvm::outs() << "Handle call flow\n"; - llvm::outs() << "Src: " << llvmIRToString(Src) << '\n'; - llvm::outs() << "Dst: " << llvmIRToString(Dst) << '\n'; + llvm::outs() << "Src: " << IMProblem.NtoString(Src) << '\n'; + llvm::outs() << "Dst: " << IMProblem.NtoString(Dst) << '\n'; for (auto &[Ctx, Facts] : Analysis[Src]) { auto CTXAdd(Ctx); CTXAdd.push_back(Src); @@ -254,8 +253,8 @@ template class InterMonoSolver { } else { // Handle call-to-ret flow llvm::outs() << "Handle call to ret flow\n"; - llvm::outs() << "Src: " << llvmIRToString(Src) << '\n'; - llvm::outs() << "Dst: " << llvmIRToString(Dst) << '\n'; + llvm::outs() << "Src: " << IMProblem.NtoString(Src) << '\n'; + llvm::outs() << "Dst: " << IMProblem.NtoString(Dst) << '\n'; for (auto &[Ctx, Facts] : Analysis[Src]) { // call-to-ret flow does not modify contexts Out[Ctx] = IMProblem.callToRetFlow( @@ -289,11 +288,11 @@ template class InterMonoSolver { std::unordered_map, mono_container_t> Out; llvm::outs() << "\nHandle ret flow in: " << ICF->getFunctionName(ICF->getFunctionOf(Src)) << '\n'; - llvm::outs() << "Src: " << llvmIRToString(Src) << '\n'; - llvm::outs() << "Dst: " << llvmIRToString(Dst) << '\n'; + llvm::outs() << "Src: " << IMProblem.NtoString(Src) << '\n'; + llvm::outs() << "Dst: " << IMProblem.NtoString(Dst) << '\n'; for (auto &[Ctx, Facts] : Analysis[Src]) { auto CTXRm(Ctx); - llvm::outs() << "CTXRm: " << CTXRm << '\n'; + CTXRm.print(llvm::outs() << "CTXRm: ", IMProblem) << '\n'; // we need to use several call- and retsites if the context is empty llvm::SmallVector CallSites; @@ -320,7 +319,7 @@ template class InterMonoSolver { // TODO! llvm::outs() << "ResSites.size(): " << RetSites.size() << '\n'; for (auto RetSite : RetSites) { - llvm::outs() << "RetSite: " << llvmIRToString(RetSite) << '\n'; + llvm::outs() << "RetSite: " << IMProblem.NtoString(RetSite) << '\n'; llvm::outs() << "Return facts: "; IMProblem.printContainer(llvm::outs(), Out[CTXRm]); llvm::outs() << '\n'; @@ -403,18 +402,18 @@ template class InterMonoSolver { virtual void dumpResults(llvm::raw_ostream &OS = llvm::outs()) { OS << "======= DUMP LLVM-INTER-MONOTONE-SOLVER RESULTS =======\n"; for (auto &[Node, ContextMap] : this->Analysis) { - OS << "Instruction:\n" << this->IMProblem.NtoString(Node); + OS << "Instruction:\n" << IMProblem.NtoString(Node); OS << "\nFacts:\n"; if (ContextMap.empty()) { OS << "\tEMPTY\n"; } else { for (auto &[Context, FlowFacts] : ContextMap) { - OS << Context << '\n'; + Context.print(OS, IMProblem) << '\n'; if (FlowFacts.empty()) { OS << "\tEMPTY\n"; } else { for (auto FlowFact : FlowFacts) { - OS << this->IMProblem.DtoString(FlowFact); + OS << IMProblem.DtoString(FlowFact); } } } diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/IntraMonoSolver.h b/include/phasar/DataFlow/Mono/Solver/IntraMonoSolver.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/IntraMonoSolver.h rename to include/phasar/DataFlow/Mono/Solver/IntraMonoSolver.h index f5d874471..0283ce9d4 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/IntraMonoSolver.h +++ b/include/phasar/DataFlow/Mono/Solver/IntraMonoSolver.h @@ -17,7 +17,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_SOLVER_INTRAMONOSOLVER_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_SOLVER_INTRAMONOSOLVER_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h" +#include "phasar/DataFlow/Mono/IntraMonoProblem.h" #include "phasar/Utils/BitVectorSet.h" #include @@ -43,7 +43,7 @@ template class IntraMonoSolver { ProblemTy &IMProblem; std::deque> Worklist; std::unordered_map Analysis; - const c_t *CFG; + const CFGBase *CFG; void initialize() { const auto &EntryPoints = IMProblem.getEntryPoints(); diff --git a/include/phasar/PhasarLLVM/Domain/AnalysisDomain.h b/include/phasar/Domain/AnalysisDomain.h similarity index 100% rename from include/phasar/PhasarLLVM/Domain/AnalysisDomain.h rename to include/phasar/Domain/AnalysisDomain.h diff --git a/include/phasar/PhasarLLVM/Utils/BinaryDomain.h b/include/phasar/Domain/BinaryDomain.h similarity index 94% rename from include/phasar/PhasarLLVM/Utils/BinaryDomain.h rename to include/phasar/Domain/BinaryDomain.h index 29a0f23a9..80fe3d8ed 100644 --- a/include/phasar/PhasarLLVM/Utils/BinaryDomain.h +++ b/include/phasar/Domain/BinaryDomain.h @@ -17,7 +17,7 @@ #ifndef PHASAR_PHASARLLVM_UTILS_BINARYDOMAIN_H_ #define PHASAR_PHASARLLVM_UTILS_BINARYDOMAIN_H_ -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h" +#include "phasar/Utils/JoinLattice.h" #include diff --git a/include/phasar/PhasarLLVM/Utils/LatticeDomain.h b/include/phasar/Domain/LatticeDomain.h similarity index 96% rename from include/phasar/PhasarLLVM/Utils/LatticeDomain.h rename to include/phasar/Domain/LatticeDomain.h index 740ebe346..6694cf605 100644 --- a/include/phasar/PhasarLLVM/Utils/LatticeDomain.h +++ b/include/phasar/Domain/LatticeDomain.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_UTILS_LATTICEDOMAIN_H #define PHASAR_PHASARLLVM_UTILS_LATTICEDOMAIN_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h" #include "phasar/Utils/ByRef.h" +#include "phasar/Utils/JoinLattice.h" #include "phasar/Utils/TypeTraits.h" #include "llvm/Support/ErrorHandling.h" @@ -114,7 +114,7 @@ inline bool operator==(const LatticeDomain &Lhs, template < typename L, typename LL, typename = std::void_t() == std::declval())>> -inline bool operator==(const LL &Lhs, const LatticeDomain Rhs) { +inline bool operator==(const LL &Lhs, const LatticeDomain &Rhs) { if (auto RVal = Rhs.getValueOrNull()) { return Lhs == *RVal; } @@ -124,7 +124,7 @@ inline bool operator==(const LL &Lhs, const LatticeDomain Rhs) { template < typename L, typename LL, typename = std::void_t() == std::declval())>> -inline bool operator==(const LatticeDomain Lhs, const LL &Rhs) { +inline bool operator==(const LatticeDomain &Lhs, const LL &Rhs) { return Rhs == Lhs; } @@ -208,8 +208,7 @@ inline bool operator<(const LatticeDomain &Lhs, if (auto RhsPtr = Rhs.getValueOrNull()) { return *LhsPtr < *RhsPtr; } - } - if (Lhs.isBottom()) { + } else if (Lhs.isBottom()) { return false; } if (Rhs.isBottom()) { diff --git a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h index 9792fca22..a488e9b46 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h +++ b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h @@ -10,7 +10,6 @@ #ifndef PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDBACKWARDCFG_H_ #define PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDBACKWARDCFG_H_ -#include "phasar/PhasarLLVM/ControlFlow/CFGBase.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h" namespace llvm { diff --git a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.h b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.h index 61571a8d1..10a342488 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.h +++ b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDBACKWARDICFG_H_ #define PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDBACKWARDICFG_H_ -#include "phasar/PhasarLLVM/ControlFlow/ICFGBase.h" +#include "phasar/ControlFlow/ICFGBase.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h" #include "phasar/PhasarLLVM/Utils/LLVMBasedContainerConfig.h" diff --git a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h index 4bcbbaa7f..647a22e6a 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h +++ b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDCFG_H_ #define PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDCFG_H_ -#include "phasar/PhasarLLVM/ControlFlow/CFGBase.h" +#include "phasar/ControlFlow/CFGBase.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" diff --git a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h index 45499afc0..3878aa155 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h +++ b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h @@ -17,9 +17,9 @@ #ifndef PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDICFG_H_ #define PHASAR_PHASARLLVM_CONTROLFLOW_LLVMBASEDICFG_H_ -#include "phasar/PhasarLLVM/ControlFlow/ICFGBase.h" +#include "phasar/ControlFlow/CallGraphAnalysisType.h" +#include "phasar/ControlFlow/ICFGBase.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h" -#include "phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/PhasarLLVM/Utils/LLVMBasedContainerConfig.h" #include "phasar/Utils/MaybeUniquePtr.h" diff --git a/include/phasar/DB/LLVMProjectIRDB.h b/include/phasar/PhasarLLVM/DB/LLVMProjectIRDB.h similarity index 100% rename from include/phasar/DB/LLVMProjectIRDB.h rename to include/phasar/PhasarLLVM/DB/LLVMProjectIRDB.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h similarity index 87% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h index 8744d6a97..75129176f 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_BRANCHSWITCHINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_BRANCHSWITCHINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h index e8dd07049..efa2f22b9 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_CALLTORETFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_CALLTORETFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h index 4dee3bb83..2a9f2f5bf 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_CHECKOPERANDSFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_CHECKOPERANDSFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h similarity index 78% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h index efd8261c7..0117e364b 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h @@ -5,15 +5,11 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_FLOWFUNCTIONBASE_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_FLOWFUNCTIONBASE_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/Domain/ExtendedValue.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde//IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h" #include "llvm/IR/Instruction.h" -#include "llvm/IR/Instructions.h" - -#include "../Stats/TraceStats.h" -#include "../Utils/DataFlowUtils.h" -#include "../Utils/Log.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h index 85000b4fe..4ebf27b65 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_GEPINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_GEPINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h index 077cf95b9..969e7dd73 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_GENERATEFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_GENERATEFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h index b10b7c732..0aa541206 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_IDENTITYFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_IDENTITYFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h similarity index 77% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h index 824f0f4fd..fcca65bf6 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h @@ -5,15 +5,14 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MAPTAINTEDVALUESTOCALLEE_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MAPTAINTEDVALUESTOCALLEE_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/PhasarLLVM/Domain/ExtendedValue.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde//IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "llvm/IR/AbstractCallSite.h" #include "llvm/IR/Instruction.h" -#include "../Stats/TraceStats.h" - namespace psr { class MapTaintedValuesToCallee : public FlowFunction { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h similarity index 74% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h index 95909e1a2..57477a0ad 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h @@ -5,14 +5,13 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MAPTAINTEDVALUESTOCALLER_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MAPTAINTEDVALUESTOCALLER_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/PhasarLLVM/Domain/ExtendedValue.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde//IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "llvm/IR/Instructions.h" -#include "../Stats/TraceStats.h" - namespace psr { class MapTaintedValuesToCaller : public FlowFunction { @@ -28,7 +27,7 @@ class MapTaintedValuesToCaller : public FlowFunction { private: const llvm::CallInst *CallInst; const llvm::ReturnInst *RetInst; - ::psr::TraceStats &TraceStats; + TraceStats &TraceStats; ExtendedValue ZV; }; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h index c96ebf6f3..9c12e828b 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MEMSETINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MEMSETINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemTransferInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemTransferInstFlowFunction.h similarity index 87% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemTransferInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemTransferInstFlowFunction.h index 80df2e5dd..7d52a7458 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemTransferInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemTransferInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MEMTRANSFERINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_MEMTRANSFERINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/PHINodeFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/PHINodeFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/PHINodeFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/PHINodeFlowFunction.h index d6499dada..1aa55b8eb 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/PHINodeFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/PHINodeFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_PHINODEFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_PHINODEFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/ReturnInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/ReturnInstFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/ReturnInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/ReturnInstFlowFunction.h index 80172d59d..700699152 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/ReturnInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/ReturnInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_RETURNINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_RETURNINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/StoreInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/StoreInstFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/StoreInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/StoreInstFlowFunction.h index a54302f01..c2e121de1 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/StoreInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/StoreInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_STOREINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_STOREINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAEndInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAEndInstFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAEndInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAEndInstFlowFunction.h index 0f71e7f07..04949dae2 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAEndInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAEndInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_VAENDINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_VAENDINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAStartInstFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAStartInstFlowFunction.h similarity index 86% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAStartInstFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAStartInstFlowFunction.h index 470c06e90..3b7980bc5 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAStartInstFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/VAStartInstFlowFunction.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_VASTARTINSTFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_FLOWFUNCTIONS_VASTARTINSTFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovRetValWriter.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovRetValWriter.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovRetValWriter.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovRetValWriter.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovWriter.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovWriter.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovWriter.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LcovWriter.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberEntry.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberEntry.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberEntry.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberEntry.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberWriter.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberWriter.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberWriter.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/LineNumberWriter.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStatsWriter.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStatsWriter.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStatsWriter.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStatsWriter.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h index 73ab8ede0..cb936e237 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h @@ -5,7 +5,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_UTILS_DATAFLOWUTILS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_IFDSFIELDSENSTAINTANALYSIS_UTILS_DATAFLOWUTILS_H -#include "phasar/PhasarLLVM/Domain/ExtendedValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h" #include "llvm/IR/Instructions.h" diff --git a/include/phasar/PhasarLLVM/Domain/ExtendedValue.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h similarity index 100% rename from include/phasar/PhasarLLVM/Domain/ExtendedValue.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/Log.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/Log.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/Log.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/Log.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMFlowFunctions.h similarity index 99% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMFlowFunctions.h index 4d89b3e63..37fea2267 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMFlowFunctions.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_LLVMFLOWFUNCTIONS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_LLVMFLOWFUNCTIONS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/TypeTraits.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h similarity index 88% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h index bd581b6f3..b6df3aeb5 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h @@ -34,9 +34,9 @@ namespace psr { */ class LLVMZeroValue : public llvm::GlobalVariable { private: - LLVMZeroValue(llvm::Module &Mod); // NOLINT(modernize-use-equals-delete) + LLVMZeroValue(llvm::Module &Mod); - static constexpr auto LLVMZeroValueInternalName = "zero_value"; + static constexpr llvm::StringLiteral LLVMZeroValueInternalName = "zero_value"; public: LLVMZeroValue(const LLVMZeroValue &Z) = delete; @@ -45,7 +45,7 @@ class LLVMZeroValue : public llvm::GlobalVariable { LLVMZeroValue &operator=(LLVMZeroValue &&Z) = delete; ~LLVMZeroValue() = default; - [[nodiscard]] llvm::StringRef getName() const { + [[nodiscard]] llvm::StringRef getName() const noexcept { return LLVMZeroValueInternalName; } diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h similarity index 99% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h index 65904e5e1..5f7dbf727 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_ABSTRACTMEMORYLOCATION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_ABSTRACTMEMORYLOCATION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h index 2c5cc0222..aa27ef024 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_ABSTRACTMEMORYLOCATIONFACTORY_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_ABSTRACTMEMORYLOCATIONFACTORY_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ComposeEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ComposeEdgeFunction.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ComposeEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ComposeEdgeFunction.h index 478f2a917..a9ebecde5 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/ComposeEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/ComposeEdgeFunction.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_COMPOSEEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_COMPOSEEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" namespace psr::XTaint { class ComposeEdgeFunction : public EdgeFunctionBase { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h similarity index 89% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h index 4c665e880..d6414b11d 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_DEBUGEDGEIDENTITY_H_ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_DEBUGEDGEIDENTITY_H_ -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" namespace llvm { class Instruction; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h index 55594e770..662d2d566 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_EDGEDOMAIN_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_EDGEDOMAIN_H -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" +#include "phasar/Domain/LatticeDomain.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/IR/Instruction.h" // Need a complete type llvm::Instruction for llvm::PointerIntPair diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.h similarity index 92% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.h index a90c858e5..3f659f475 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_GENEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_GENEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" namespace llvm { class Instruction; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h index 0cb09fa79..c28d05317 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h @@ -10,10 +10,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_HELPERS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_HELPERS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/Domain/LatticeDomain.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallSet.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h similarity index 93% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h index 4e7a025c7..de93aab37 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_JOINCONSTEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_JOINCONSTEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" namespace psr::XTaint { class JoinConstEdgeFunction : public EdgeFunctionBase { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h similarity index 94% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h index 88a01beba..2c25f45da 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_JOINEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_JOINEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h similarity index 88% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h index c2b873eef..163f88f0f 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_KILLIFSANITIZEDEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_KILLIFSANITIZEDEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" namespace psr::XTaint { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h index e2149fc4d..d210083a6 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_TRANSFEREDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_TRANSFEREDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h" namespace psr::XTaint { class TransferEdgeFunction : public EdgeFunctionBase { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintAnalysisBase.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintAnalysisBase.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintAnalysisBase.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintAnalysisBase.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h index b29449931..fe89320c7 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintEdgeFunctionBase.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_XTAINTEDGEFUNCTIONBASE_H_ #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_EXTENDEDTAINTANALYSIS_XTAINTEDGEFUNCTIONBASE_H_ -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" #include "llvm/ADT/Hashing.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.h similarity index 94% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.h index 130e4bd4e..7baf9a7f0 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEExtendedTaintAnalysis.h @@ -10,20 +10,20 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEEXTENDEDTAINTANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEEXTENDEDTAINTANALYSIS_H -#include "phasar/DB/LLVMProjectIRDB.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintAnalysisBase.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" +#include "phasar/Domain/LatticeDomain.h" +#include "phasar/PhasarLLVM/DB/LLVMProjectIRDB.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocationFactory.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/ExtendedTaintAnalysis/XTaintAnalysisBase.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "phasar/PhasarLLVM/Utils/BasicBlockOrdering.h" -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallBitVector.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/AllBot.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/AllBot.h similarity index 77% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/AllBot.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/AllBot.h index c3a67e0d2..3abfd864c 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/AllBot.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/AllBot.h @@ -10,9 +10,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_ALLBOT_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_ALLBOT_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionUtils.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" namespace psr::glca { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/BinaryEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/BinaryEdgeFunction.h similarity index 84% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/BinaryEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/BinaryEdgeFunction.h index 2b3227fd3..78553a923 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/BinaryEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/BinaryEdgeFunction.h @@ -10,9 +10,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_BINARYEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_BINARYEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" namespace psr::glca { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/ConstantHelper.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/ConstantHelper.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/ConstantHelper.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/ConstantHelper.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValue.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValue.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValue.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValue.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h similarity index 92% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h index 3b3888e85..81dfb13b1 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_EDGEVALUESET_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_EDGEVALUESET_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValue.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/GenConstant.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/GenConstant.h similarity index 87% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/GenConstant.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/GenConstant.h index f5efbc5fb..8c2833030 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/GenConstant.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/GenConstant.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_GENCONSTANT_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_GENCONSTANT_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" namespace psr::glca { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h similarity index 93% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h index 49285fcea..d7c07ba73 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h @@ -10,11 +10,11 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_IDEGENERALIZEDLCA_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_IDEGENERALIZEDLCA_H +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" -#include "phasar/PhasarLLVM/Utils/Printer.h" +#include "phasar/Utils/Printer.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/JoinEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/JoinEdgeFunction.h similarity index 89% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/JoinEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/JoinEdgeFunction.h index 92f89a5d4..89f54b3d4 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/JoinEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/JoinEdgeFunction.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_JOINEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_JOINEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" namespace psr::glca { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/LCAEdgeFunctionComposer.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/LCAEdgeFunctionComposer.h similarity index 82% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/LCAEdgeFunctionComposer.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/LCAEdgeFunctionComposer.h index ffc64e127..2340af8f7 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/LCAEdgeFunctionComposer.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/LCAEdgeFunctionComposer.h @@ -10,9 +10,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_LCAEDGEFUNCTIONCOMPOSER_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_LCAEDGEFUNCTIONCOMPOSER_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionComposer.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionComposer.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" namespace psr::glca { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h similarity index 91% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h index b69c86621..f6a11eb95 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_MAPFACTSTOCALLEEFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_MAPFACTSTOCALLEEFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" namespace llvm { class CallBase; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h similarity index 89% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h index 3fbd34f70..50acbe5c6 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_MAPFACTSTOCALLERFLOWFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_MAPFACTSTOCALLERFLOWFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "llvm/IR/Function.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h similarity index 83% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h index fc7bb20c0..1d255b29c 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h @@ -10,9 +10,9 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_TYPECASTEDGEFUNCTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEGENERALIZEDLCA_TYPECASTEDGEFUNCTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/EdgeValueSet.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.h" namespace psr::glca { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.h index e27be6d4e..ea24d73b9 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.h @@ -10,21 +10,21 @@ #ifndef PHASAR_PHASARLLVM_IFDSIDE_PROBLEMS_IDEINSTINTERACTIONALYSIS_H #define PHASAR_PHASARLLVM_IFDSIDE_PROBLEMS_IDEINSTINTERACTIONALYSIS_H -#include "phasar/DB/LLVMProjectIRDB.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionComposer.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionSingletonFactory.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/SolverResults.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionComposer.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionSingletonFactory.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctions.h" +#include "phasar/DataFlow/IfdsIde/FlowFunctions.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/SolverResults.h" +#include "phasar/Domain/LatticeDomain.h" +#include "phasar/PhasarLLVM/DB/LLVMProjectIRDB.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMFlowFunctions.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToUtils.h" #include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" #include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include "phasar/Utils/BitVectorSet.h" #include "phasar/Utils/ByRef.h" #include "phasar/Utils/Logger.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDELinearConstantAnalysis.h similarity index 95% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDELinearConstantAnalysis.h index 67b784e0d..638451278 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDELinearConstantAnalysis.h @@ -10,10 +10,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDELINEARCONSTANTANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDELINEARCONSTANTANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionComposer.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/EdgeFunctionComposer.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" +#include "phasar/Domain/LatticeDomain.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include "llvm/Support/raw_ostream.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEProtoAnalysis.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEProtoAnalysis.h index dd0996fdc..20caaf6a4 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEProtoAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEPROTOANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDEPROTOANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.h index d39b8b4e2..189ed1175 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDESECUREHEAPPROPAGATION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDESECUREHEAPPROPAGATION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "llvm/ADT/StringRef.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESolverTest.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESolverTest.h index a40697cde..19d5165ba 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESolverTest.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDESOLVERTEST_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDESOLVERTEST_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.h similarity index 98% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.h index 5b7574028..ce4fe6cbc 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDETYPESTATEANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IDETYPESTATEANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IDETabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSConstAnalysis.h similarity index 99% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSConstAnalysis.h index 1c3446069..85ca53443 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSConstAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSCONSTANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSCONSTANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h similarity index 92% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h index baf8d5c2d..f1e345ab1 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h @@ -5,10 +5,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSFIELDSENSTAINTANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSFIELDSENSTAINTANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/PhasarLLVM/Domain/ExtendedValue.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde//IFDSFieldSensTaintAnalysis/Utils/ExtendedValue.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/IFDSFieldSensTaintAnalysis/Stats/TraceStats.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSProtoAnalysis.h similarity index 96% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSProtoAnalysis.h index a12032852..b978dd452 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSProtoAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSPROTOANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSPROTOANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSSignAnalysis.h similarity index 96% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSSignAnalysis.h index 7f059e250..a97e4a9c9 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSSignAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSSIGNANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSSIGNANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSSolverTest.h similarity index 96% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSSolverTest.h index 286cbbf47..69c0ea3eb 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSSolverTest.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSSOLVERTEST_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSSOLVERTEST_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSTaintAnalysis.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSTaintAnalysis.h index 75bca817c..84d0c2c36 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSTaintAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSTAINTANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSTAINTANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSTypeAnalysis.h similarity index 96% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSTypeAnalysis.h index 6009ba3ce..b8b4e060c 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSTypeAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSTYPEANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSTYPEANALYSIS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSUninitializedVariables.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSUninitializedVariables.h index 691549168..46db4b631 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IFDSUninitializedVariables.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSUNINITIALIZEDVARIABLES_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_IFDSUNINITIALIZEDVARIABLES_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h" +#include "phasar/DataFlow/IfdsIde/IFDSTabulationProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/CSTDFILEIOTypeStateDescription.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/CSTDFILEIOTypeStateDescription.h similarity index 96% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/CSTDFILEIOTypeStateDescription.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/CSTDFILEIOTypeStateDescription.h index e1b2da1f5..88e29ef1a 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/CSTDFILEIOTypeStateDescription.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/CSTDFILEIOTypeStateDescription.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_CSTDFILEIOTYPESTATEDESCRIPTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_CSTDFILEIOTYPESTATEDESCRIPTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFCTXDescription.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFCTXDescription.h similarity index 93% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFCTXDescription.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFCTXDescription.h index 80f8100de..580a4011a 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFCTXDescription.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFCTXDescription.h @@ -10,10 +10,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLEVPKDFCTXDESCRIPTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLEVPKDFCTXDESCRIPTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h" -#include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" +#include "phasar/DataFlow/IfdsIde/Solver/IDESolver.h" +#include "phasar/Domain/AnalysisDomain.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFDescription.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFDescription.h similarity index 96% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFDescription.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFDescription.h index 3a7286e1f..96bd98864 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFDescription.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLEVPKDFDescription.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLEVPKDFDESCRIPTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLEVPKDFDESCRIPTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureHeapDescription.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureHeapDescription.h similarity index 89% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureHeapDescription.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureHeapDescription.h index b0e9e5721..ca1205856 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureHeapDescription.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureHeapDescription.h @@ -10,10 +10,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLSECUREHEAPDESCRIPTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLSECUREHEAPDESCRIPTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h" -#include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" +#include "phasar/DataFlow/IfdsIde/Solver/IDESolver.h" +#include "phasar/Domain/AnalysisDomain.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureMemoryDescription.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureMemoryDescription.h similarity index 95% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureMemoryDescription.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureMemoryDescription.h index a72307f06..9078d0321 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureMemoryDescription.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/OpenSSLSecureMemoryDescription.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLSECUREMEMORYDESCRIPTION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_IFDSIDE_PROBLEMS_TYPESTATEDESCRIPTIONS_OPENSSLSECUREMEMORYDESCRIPTION_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" +#include "phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h rename to include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/TypeStateDescriptions/TypeStateDescription.h diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.h b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoFullConstantPropagation.h similarity index 93% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.h rename to include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoFullConstantPropagation.h index 1c048ab59..c2ab701a7 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.h +++ b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoFullConstantPropagation.h @@ -10,11 +10,11 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTERMONOFULLCONSTANTPROPAGATION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTERMONOFULLCONSTANTPROPAGATION_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.h" +#include "phasar/DataFlow/Mono/InterMonoProblem.h" +#include "phasar/Domain/LatticeDomain.h" +#include "phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoFullConstantPropagation.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.h b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoSolverTest.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.h rename to include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoSolverTest.h index b714ed0ca..2c5446829 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.h +++ b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoSolverTest.h @@ -17,7 +17,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTERMONOSOLVERTEST_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTERMONOSOLVERTEST_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h" +#include "phasar/DataFlow/Mono/InterMonoProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/Utils/BitVectorSet.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoTaintAnalysis.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.h rename to include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoTaintAnalysis.h index b87564ebb..fb6f69d03 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/InterMonoTaintAnalysis.h @@ -17,8 +17,8 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTERMONOTAINTANALYSIS_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTERMONOTAINTANALYSIS_H +#include "phasar/DataFlow/Mono/InterMonoProblem.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.h b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoFullConstantPropagation.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.h rename to include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoFullConstantPropagation.h index dfab9e949..d8b64028e 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.h +++ b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoFullConstantPropagation.h @@ -17,10 +17,10 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTRAMONOFULLCONSTANTPROPAGATION_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTRAMONOFULLCONSTANTPROPAGATION_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h" +#include "phasar/DataFlow/Mono/IntraMonoProblem.h" +#include "phasar/Domain/LatticeDomain.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" -#include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include "phasar/Utils/BitVectorSet.h" #include diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.h b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoSolverTest.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.h rename to include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoSolverTest.h index 4c888234c..cae80de31 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.h +++ b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoSolverTest.h @@ -17,7 +17,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTRAMONOSOLVERTEST_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTRAMONOSOLVERTEST_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h" +#include "phasar/DataFlow/Mono/IntraMonoProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/Utils/BitVectorSet.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.h b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoUninitVariables.h similarity index 97% rename from include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.h rename to include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoUninitVariables.h index 71a39b393..c3d4ac5a4 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.h +++ b/include/phasar/PhasarLLVM/DataFlow/Mono/Problems/IntraMonoUninitVariables.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTRAMONOUNINITVARIABLES_H #define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_PROBLEMS_INTRAMONOUNINITVARIABLES_H -#include "phasar/PhasarLLVM/DataFlowSolver/Mono/IntraMonoProblem.h" +#include "phasar/DataFlow/Mono/IntraMonoProblem.h" #include "phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/CallString.h b/include/phasar/PhasarLLVM/DataFlowSolver/Mono/CallString.h deleted file mode 100644 index e1c9a350b..000000000 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/CallString.h +++ /dev/null @@ -1,90 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2017 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Philipp Schubert and others - *****************************************************************************/ - -/* - * CallString.h - * - * Created on: 06.06.2017 - * Author: philipp - */ - -#ifndef PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_CALLSTRING_H -#define PHASAR_PHASARLLVM_DATAFLOWSOLVER_MONO_CALLSTRING_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/raw_ostream.h" - -#include -#include -#include -#include -#include - -namespace psr { - -template class CallString { -private: - std::deque CS; - static const unsigned KLimit = K; - -public: - CallString() = default; - CallString(std::initializer_list IList) : CS(IList) { - if (IList.size() > KLimit) { - throw std::runtime_error( - "initial call string length exceeds maximal length K"); - } - } - - void push(T S) { - if (CS.size() > KLimit - 1) { - CS.pop_front(); - } - CS.push_back(S); - } - - T returnSite() { - if (!CS.empty()) { - return CS.back(); - } - return {}; - } - - void pop() { - if (!CS.empty()) { - CS.pop_back(); - } - } - - size_t size() { return CS.size(); } - - std::deque getInternalCS() const { return CS; } - - friend bool operator==(const CallString &Lhs, const CallString &Rhs) { - return Lhs.cs == Rhs.cs; - } - - friend bool operator!=(const CallString &Lhs, const CallString &Rhs) { - return !(Lhs == Rhs); - } - - friend bool operator<(const CallString &Lhs, const CallString &Rhs) { - return Lhs.cs < Rhs.cs; - } - - friend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, - const CallString &C) { - llvm::interleave(C.CS, OS, " * "); - return OS; - } -}; - -} // namespace psr - -#endif diff --git a/include/phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h b/include/phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h index 68ec9fda9..11490fe20 100644 --- a/include/phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h +++ b/include/phasar/PhasarLLVM/Domain/LLVMAnalysisDomain.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_DOMAIN_LLVMANALYSISDOMAIN_H #define PHASAR_PHASARLLVM_DOMAIN_LLVMANALYSISDOMAIN_H -#include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" +#include "phasar/Domain/AnalysisDomain.h" namespace llvm { class Value; diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/HelperAnalyses.h b/include/phasar/PhasarLLVM/HelperAnalyses.h similarity index 94% rename from include/phasar/PhasarLLVM/AnalysisStrategy/HelperAnalyses.h rename to include/phasar/PhasarLLVM/HelperAnalyses.h index bd6a45460..07b09878d 100644 --- a/include/phasar/PhasarLLVM/AnalysisStrategy/HelperAnalyses.h +++ b/include/phasar/PhasarLLVM/HelperAnalyses.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_ANALYSISSTRATEGY_HELPERANALYSES_H_ #define PHASAR_PHASARLLVM_ANALYSISSTRATEGY_HELPERANALYSES_H_ -#include "phasar/PhasarLLVM/AnalysisStrategy/HelperAnalysisConfig.h" -#include "phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h" +#include "phasar/ControlFlow/CallGraphAnalysisType.h" +#include "phasar/PhasarLLVM/HelperAnalysisConfig.h" #include "nlohmann/json.hpp" diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/HelperAnalysisConfig.h b/include/phasar/PhasarLLVM/HelperAnalysisConfig.h similarity index 89% rename from include/phasar/PhasarLLVM/AnalysisStrategy/HelperAnalysisConfig.h rename to include/phasar/PhasarLLVM/HelperAnalysisConfig.h index 5d8139f92..d35195e76 100644 --- a/include/phasar/PhasarLLVM/AnalysisStrategy/HelperAnalysisConfig.h +++ b/include/phasar/PhasarLLVM/HelperAnalysisConfig.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_ANALYSISSTRATEGY_HELPERANALYSISCONFIG_H #define PHASAR_PHASARLLVM_ANALYSISSTRATEGY_HELPERANALYSISCONFIG_H -#include "phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h" -#include "phasar/PhasarLLVM/Pointer/AliasAnalysisType.h" +#include "phasar/ControlFlow/CallGraphAnalysisType.h" +#include "phasar/Pointer/AliasAnalysisType.h" #include "phasar/Utils/Soundness.h" #include "nlohmann/json.hpp" diff --git a/include/phasar/PhasarLLVM/Pointer/DynamicAliasSetPtr.h b/include/phasar/PhasarLLVM/Pointer/DynamicAliasSetPtr.h deleted file mode 100644 index 571b5c937..000000000 --- a/include/phasar/PhasarLLVM/Pointer/DynamicAliasSetPtr.h +++ /dev/null @@ -1,224 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2022 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Fabian Schiebel and others - *****************************************************************************/ - -#ifndef PHASAR_PHASARLLVM_POINTER_DYNAMICALIASSET_H -#define PHASAR_PHASARLLVM_POINTER_DYNAMICALIASSET_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/Hashing.h" - -#include - -namespace llvm { -class Value; -} // namespace llvm - -namespace psr { - -template > -class DynamicAliasSetConstPtr; -/// A Container** that behaves like a Container* -template > -class DynamicAliasSetPtr { -public: - using container_type = Container; - - constexpr DynamicAliasSetPtr() noexcept = default; - constexpr DynamicAliasSetPtr(std::nullptr_t) noexcept {} - constexpr DynamicAliasSetPtr(container_type **Value) noexcept : Value(Value) { - assert(Value != nullptr); - } - constexpr DynamicAliasSetPtr(const DynamicAliasSetPtr &) noexcept = default; - constexpr DynamicAliasSetPtr & - operator=(const DynamicAliasSetPtr &) noexcept = default; - ~DynamicAliasSetPtr() noexcept = default; - - [[nodiscard]] constexpr container_type *get() noexcept { return *Value; } - [[nodiscard]] constexpr const container_type *get() const noexcept { - return *Value; - } - - constexpr container_type *operator->() noexcept { return get(); } - constexpr const container_type *operator->() const noexcept { return get(); } - - constexpr container_type &operator*() noexcept { return **Value; } - constexpr const container_type &operator*() const noexcept { return **Value; } - - constexpr operator bool() const noexcept { - return Value && *Value != nullptr; - } - - [[nodiscard]] constexpr container_type **value() noexcept { return Value; } - [[nodiscard]] constexpr container_type const *const *value() const noexcept { - return Value; - } - - [[nodiscard]] friend constexpr llvm::hash_code - hash_value(DynamicAliasSetPtr // NOLINT(readability-identifier-naming) - Ptr) noexcept { - return llvm::hash_value(Ptr.Value); - } - - [[nodiscard]] friend constexpr bool - operator==(DynamicAliasSetPtr LHS, DynamicAliasSetPtr RHS) noexcept { - return LHS.Value == RHS.Value; - } - [[nodiscard]] friend constexpr bool - operator!=(DynamicAliasSetPtr LHS, DynamicAliasSetPtr RHS) noexcept { - return !(LHS == RHS); - } - - [[nodiscard]] friend constexpr bool - operator<(DynamicAliasSetPtr LHS, DynamicAliasSetPtr RHS) noexcept { - return LHS.Value < RHS.Value; - } - [[nodiscard]] friend constexpr bool - operator>(DynamicAliasSetPtr LHS, DynamicAliasSetPtr RHS) noexcept { - return LHS.Value > RHS.Value; - } - - [[nodiscard]] friend constexpr bool - operator<=(DynamicAliasSetPtr LHS, DynamicAliasSetPtr RHS) noexcept { - return LHS.Value <= RHS.Value; - } - [[nodiscard]] friend constexpr bool - operator>=(DynamicAliasSetPtr LHS, DynamicAliasSetPtr RHS) noexcept { - return LHS.Value >= RHS.Value; - } - -private: - friend class DynamicAliasSetConstPtr; - - container_type **Value = nullptr; -}; - -/// A Container const** that behaves like a const Container*. -/// NOTE: This is different to const DynamicAliasSetPtr which -/// propagates the const through all known layers of indirection -template -class DynamicAliasSetConstPtr : private DynamicAliasSetPtr { -public: - using DynamicAliasSetPtr::DynamicAliasSetPtr; - using DynamicAliasSetPtr::operator bool; - using typename DynamicAliasSetPtr::container_type; - - constexpr DynamicAliasSetConstPtr( - DynamicAliasSetPtr Other) noexcept - : DynamicAliasSetPtr(Other) {} - - [[nodiscard]] constexpr const container_type *get() const noexcept { - return DynamicAliasSetPtr::get(); - } - - constexpr const container_type *operator->() const noexcept { return get(); } - - constexpr const container_type &operator*() const noexcept { - return *DynamicAliasSetPtr::get(); - } - - [[nodiscard]] constexpr container_type const *const *value() const noexcept { - return DynamicAliasSetPtr::value(); - } - - [[nodiscard]] friend constexpr llvm::hash_code - hash_value(DynamicAliasSetConstPtr // NOLINT(readability-identifier-naming) - Ptr) noexcept { - return llvm::hash_value(Ptr.value()); - } - - [[nodiscard]] friend constexpr bool - operator==(DynamicAliasSetConstPtr LHS, - DynamicAliasSetConstPtr RHS) noexcept { - return LHS.value() == RHS.value(); - } - [[nodiscard]] friend constexpr bool - operator!=(DynamicAliasSetConstPtr LHS, - DynamicAliasSetConstPtr RHS) noexcept { - return !(LHS == RHS); - } - - [[nodiscard]] friend constexpr bool - operator<(DynamicAliasSetConstPtr LHS, DynamicAliasSetConstPtr RHS) noexcept { - return LHS.value() < RHS.value(); - } - [[nodiscard]] friend constexpr bool - operator>(DynamicAliasSetConstPtr LHS, DynamicAliasSetConstPtr RHS) noexcept { - return LHS.value() > RHS.value(); - } - - [[nodiscard]] friend constexpr bool - operator<=(DynamicAliasSetConstPtr LHS, - DynamicAliasSetConstPtr RHS) noexcept { - return LHS.value() <= RHS.value(); - } - [[nodiscard]] friend constexpr bool - operator>=(DynamicAliasSetConstPtr LHS, - DynamicAliasSetConstPtr RHS) noexcept { - return LHS.value() >= RHS.value(); - } -}; - -extern template class DynamicAliasSetPtr<>; -extern template class DynamicAliasSetConstPtr<>; -} // namespace psr - -namespace std { -template struct hash> { - constexpr size_t operator()(psr::DynamicAliasSetPtr Ptr) const noexcept { - return std::hash{}(Ptr.value()); - } -}; -template struct hash> { - constexpr size_t - operator()(psr::DynamicAliasSetConstPtr Ptr) const noexcept { - return std::hash{}(Ptr.value()); - } -}; -} // namespace std - -namespace llvm { -template struct DenseMapInfo> { - inline static psr::DynamicAliasSetPtr getEmptyKey() noexcept { - return DenseMapInfo::getEmptyKey(); - } - inline static psr::DynamicAliasSetPtr getTombstoneKey() noexcept { - return DenseMapInfo::getTombstoneKey(); - } - - inline static bool isEqual(psr::DynamicAliasSetPtr LHS, - psr::DynamicAliasSetPtr RHS) noexcept { - return LHS == RHS; - } - - inline static unsigned getHashValue(psr::DynamicAliasSetPtr Ptr) noexcept { - return hash_value(Ptr); - } -}; -template struct DenseMapInfo> { - inline static psr::DynamicAliasSetConstPtr getEmptyKey() noexcept { - return DenseMapInfo::getEmptyKey(); - } - inline static psr::DynamicAliasSetConstPtr getTombstoneKey() noexcept { - return DenseMapInfo::getTombstoneKey(); - } - - inline static bool isEqual(psr::DynamicAliasSetConstPtr LHS, - psr::DynamicAliasSetConstPtr RHS) noexcept { - return LHS == RHS; - } - - inline static unsigned - getHashValue(psr::DynamicAliasSetConstPtr Ptr) noexcept { - return hash_value(Ptr); - } -}; -} // namespace llvm - -#endif // PHASAR_PHASARLLVM_POINTER_DYNAMICALIASSET_H diff --git a/include/phasar/PhasarLLVM/Pointer/LLVMAliasGraph.h b/include/phasar/PhasarLLVM/Pointer/LLVMAliasGraph.h index d639a8f4e..c266980b1 100644 --- a/include/phasar/PhasarLLVM/Pointer/LLVMAliasGraph.h +++ b/include/phasar/PhasarLLVM/Pointer/LLVMAliasGraph.h @@ -11,11 +11,11 @@ #define PHASAR_PHASARLLVM_POINTER_LLVMALIASGRAPH_H_ #include "phasar/Config/Configuration.h" -#include "phasar/PhasarLLVM/Pointer/AliasInfoBase.h" -#include "phasar/PhasarLLVM/Pointer/AliasInfoTraits.h" -#include "phasar/PhasarLLVM/Pointer/AliasSetOwner.h" #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" #include "phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h" +#include "phasar/Pointer/AliasInfoBase.h" +#include "phasar/Pointer/AliasInfoTraits.h" +#include "phasar/Pointer/AliasSetOwner.h" #include "phasar/Utils/AnalysisProperties.h" #include "llvm/IR/AbstractCallSite.h" @@ -37,6 +37,9 @@ class Type; } // namespace llvm namespace psr { +extern template class BoxedPtr; +extern template class BoxedConstPtr; +extern template class AliasSetOwner; class LLVMAliasGraph; template <> @@ -263,7 +266,7 @@ class LLVMAliasGraph : public AnalysisPropertiesMixin, AliasSetOwner::memory_resource_type MRes; AliasSetOwner Owner{&MRes}; - std::unordered_map> Cache; + std::unordered_map> Cache; }; } // namespace psr diff --git a/include/phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h b/include/phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h index 7a83d0058..43d83a1f6 100644 --- a/include/phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h +++ b/include/phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h @@ -10,8 +10,7 @@ #ifndef PHASAR_PHASARLLVM_POINTER_LLVMALIASINFO_H_ #define PHASAR_PHASARLLVM_POINTER_LLVMALIASINFO_H_ -#include "phasar/PhasarLLVM/Pointer/AliasInfo.h" -#include "phasar/PhasarLLVM/Pointer/DynamicAliasSetPtr.h" +#include "phasar/Pointer/AliasInfo.h" namespace llvm { class Function; diff --git a/include/phasar/PhasarLLVM/Pointer/LLVMAliasSet.h b/include/phasar/PhasarLLVM/Pointer/LLVMAliasSet.h index 8ff9d2280..0775e98d2 100644 --- a/include/phasar/PhasarLLVM/Pointer/LLVMAliasSet.h +++ b/include/phasar/PhasarLLVM/Pointer/LLVMAliasSet.h @@ -10,12 +10,11 @@ #ifndef PHASAR_PHASARLLVM_POINTER_LLVMALIASSET_H #define PHASAR_PHASARLLVM_POINTER_LLVMALIASSET_H -#include "phasar/PhasarLLVM/Pointer/AliasInfoBase.h" -#include "phasar/PhasarLLVM/Pointer/AliasInfoTraits.h" -#include "phasar/PhasarLLVM/Pointer/AliasResult.h" -#include "phasar/PhasarLLVM/Pointer/AliasSetOwner.h" -#include "phasar/PhasarLLVM/Pointer/DynamicAliasSetPtr.h" #include "phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h" +#include "phasar/Pointer/AliasInfoBase.h" +#include "phasar/Pointer/AliasInfoTraits.h" +#include "phasar/Pointer/AliasResult.h" +#include "phasar/Pointer/AliasSetOwner.h" #include "phasar/Utils/AnalysisProperties.h" #include "phasar/Utils/StableVector.h" @@ -52,8 +51,7 @@ class LLVMAliasSet : public AnalysisPropertiesMixin, using AliasSetTy = traits_t::AliasSetTy; using AliasSetPtrTy = traits_t::AliasSetPtrTy; using AllocationSiteSetPtrTy = traits_t::AllocationSiteSetPtrTy; - using AliasSetMap = - llvm::DenseMap>; + using AliasSetMap = llvm::DenseMap>; /** * Creates points-to set(s) for all functions in the IRDB. If @@ -134,8 +132,7 @@ class LLVMAliasSet : public AnalysisPropertiesMixin, void mergeAliasSets(const llvm::Value *V1, const llvm::Value *V2); - void mergeAliasSets(DynamicAliasSetPtr PTS1, - DynamicAliasSetPtr PTS2); + void mergeAliasSets(BoxedPtr PTS1, BoxedPtr PTS2); bool interIsReachableAllocationSiteTy(const llvm::Value *V, const llvm::Value *P) const; @@ -149,7 +146,7 @@ class LLVMAliasSet : public AnalysisPropertiesMixin, void addPointer(llvm::AAResults &AA, const llvm::DataLayout &DL, const llvm::Value *V, std::vector &Reps); - [[nodiscard]] static DynamicAliasSetPtr getEmptyAliasSet(); + [[nodiscard]] static BoxedPtr getEmptyAliasSet(); LLVMBasedAliasAnalysis PTA; llvm::DenseSet AnalyzedFunctions; diff --git a/include/phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h b/include/phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h index b97b3a257..e724a0c4d 100644 --- a/include/phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h +++ b/include/phasar/PhasarLLVM/Pointer/LLVMBasedAliasAnalysis.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_POINTER_LLVMBASEDALIASANALYSIS_H_ #define PHASAR_PHASARLLVM_POINTER_LLVMBASEDALIASANALYSIS_H_ -#include "phasar/PhasarLLVM/Pointer/AliasAnalysisType.h" +#include "phasar/Pointer/AliasAnalysisType.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/IR/PassManager.h" diff --git a/include/phasar/PhasarLLVM/AnalysisStrategy/SimpleAnalysisConstructor.h b/include/phasar/PhasarLLVM/SimpleAnalysisConstructor.h similarity index 98% rename from include/phasar/PhasarLLVM/AnalysisStrategy/SimpleAnalysisConstructor.h rename to include/phasar/PhasarLLVM/SimpleAnalysisConstructor.h index 554ab4a05..7976a42ac 100644 --- a/include/phasar/PhasarLLVM/AnalysisStrategy/SimpleAnalysisConstructor.h +++ b/include/phasar/PhasarLLVM/SimpleAnalysisConstructor.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_ANALYSISSTRATEGY_SIMPLEANALYSISCONSTRUCTOR_H_ #define PHASAR_PHASARLLVM_ANALYSISSTRATEGY_SIMPLEANALYSISCONSTRUCTOR_H_ -#include "phasar/PhasarLLVM/AnalysisStrategy/HelperAnalyses.h" +#include "phasar/PhasarLLVM/HelperAnalyses.h" #include #include diff --git a/include/phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h b/include/phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h index b9263c5f4..6024792d8 100644 --- a/include/phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h +++ b/include/phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h @@ -18,7 +18,7 @@ #define PHASAR_PHASARLLVM_TYPEHIERARCHY_LLVMTYPEHIERARCHY_H_ #include "phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h" -#include "phasar/PhasarLLVM/TypeHierarchy/TypeHierarchy.h" +#include "phasar/TypeHierarchy/TypeHierarchy.h" #include "llvm/ADT/StringRef.h" diff --git a/include/phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h b/include/phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h index 85022a7d9..2feb38f3a 100644 --- a/include/phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h +++ b/include/phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_TYPEHIERARCHY_LLVMVFTABLE_H_ #define PHASAR_PHASARLLVM_TYPEHIERARCHY_LLVMVFTABLE_H_ -#include "phasar/PhasarLLVM/TypeHierarchy/VFTable.h" +#include "phasar/TypeHierarchy/VFTable.h" #include "nlohmann/json.hpp" diff --git a/include/phasar/PhasarLLVM/Utils/IOFormat.def b/include/phasar/PhasarLLVM/Utils/IOFormat.def deleted file mode 100644 index 1c353935a..000000000 --- a/include/phasar/PhasarLLVM/Utils/IOFormat.def +++ /dev/null @@ -1,18 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2020 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Philipp Schubert and others - *****************************************************************************/ - -#ifndef IO_FORMAT_TYPES -#define IO_FORMAT_TYPES(NAME, CMDFLAG, TYPE) -#endif - -IO_FORMAT_TYPES("JSON", "json", JSON) -IO_FORMAT_TYPES("SARIF", "sarif", SARIF) -IO_FORMAT_TYPES("None", "none", None) - -#undef IO_FORMAT_TYPES diff --git a/include/phasar/PhasarLLVM/Utils/IOFormat.h b/include/phasar/PhasarLLVM/Utils/IOFormat.h deleted file mode 100644 index 32e8d022b..000000000 --- a/include/phasar/PhasarLLVM/Utils/IOFormat.h +++ /dev/null @@ -1,34 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2020 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Philipp Schubert and others - *****************************************************************************/ - -#ifndef PHASAR_PHASARLLVM_UTILS_IOFORMAT_H_ -#define PHASAR_PHASARLLVM_UTILS_IOFORMAT_H_ - -namespace llvm { -class raw_ostream; -} - -#include - -namespace psr { - -enum class IOFormat { -#define IO_FORMAT_TYPES(NAME, CMDFLAG, TYPE) TYPE, -#include "phasar/PhasarLLVM/Utils/IOFormat.def" -}; - -std::string toString(const IOFormat &D); - -IOFormat toIOFormat(const std::string &S); - -llvm::raw_ostream &operator<<(llvm::raw_ostream &Os, const IOFormat &D); - -} // namespace psr - -#endif diff --git a/include/phasar/PhasarLLVM/Utils/LLVMShorthands.h b/include/phasar/PhasarLLVM/Utils/LLVMShorthands.h index 18599565e..0504b6bf6 100644 --- a/include/phasar/PhasarLLVM/Utils/LLVMShorthands.h +++ b/include/phasar/PhasarLLVM/Utils/LLVMShorthands.h @@ -113,8 +113,6 @@ std::string getMetaDataID(const llvm::Value *V); * underlying types for their ID's, size_t and string respectively. */ struct LLVMValueIDLess { - StringIDLess Sless; - LLVMValueIDLess() : Sless(StringIDLess()) {} bool operator()(const llvm::Value *Lhs, const llvm::Value *Rhs) const; }; diff --git a/include/phasar/PhasarLLVM/Utils/Printer.h b/include/phasar/PhasarLLVM/Utils/Printer.h deleted file mode 100644 index ef4dce53d..000000000 --- a/include/phasar/PhasarLLVM/Utils/Printer.h +++ /dev/null @@ -1,127 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2017 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Philipp Schubert and others - *****************************************************************************/ - -/* - * Printer.h - * - * Created on: 07.09.2018 - * Author: rleer - */ - -#ifndef PHASAR_PHASARLLVM_UTILS_PRINTER_H -#define PHASAR_PHASARLLVM_UTILS_PRINTER_H - -#include "llvm/Support/raw_ostream.h" - -#include - -namespace psr { - -template struct NodePrinter { - using N = typename AnalysisDomainTy::n_t; - virtual ~NodePrinter() = default; - - virtual void printNode(llvm::raw_ostream &OS, N Stmt) const = 0; - - virtual std::string NtoString(N Stmt) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printNode(StrS, Stmt); - return StrS.str(); - } -}; - -template struct DataFlowFactPrinter { - using D = typename AnalysisDomainTy::d_t; - - virtual ~DataFlowFactPrinter() = default; - - virtual void printDataFlowFact(llvm::raw_ostream &OS, D Fact) const = 0; - - [[nodiscard]] virtual std::string DtoString(D Fact) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printDataFlowFact(StrS, Fact); - return StrS.str(); - } -}; - -template struct ValuePrinter { - virtual ~ValuePrinter() = default; - - virtual void printValue(llvm::raw_ostream &OS, V Val) const = 0; - - virtual std::string VtoString(V Val) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printValue(StrS, Val); - return StrS.str(); - } -}; - -template struct TypePrinter { - virtual ~TypePrinter() = default; - - virtual void printType(llvm::raw_ostream &OS, T Ty) const = 0; - - virtual std::string TtoString(T Ty) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printType(StrS, Ty); - return StrS.str(); - } -}; - -template struct EdgeFactPrinter { - using l_t = typename AnalysisDomainTy::l_t; - - virtual ~EdgeFactPrinter() = default; - - virtual void printEdgeFact(llvm::raw_ostream &OS, l_t L) const = 0; - - [[nodiscard]] virtual std::string LtoString(l_t L) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printEdgeFact(StrS, L); - return StrS.str(); - } -}; - -template struct FunctionPrinter { - using F = typename AnalysisDomainTy::f_t; - - virtual ~FunctionPrinter() = default; - - virtual void printFunction(llvm::raw_ostream &OS, F Func) const = 0; - - virtual std::string FtoString(F Func) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printFunction(StrS, Func); - return StrS.str(); - } -}; - -template struct ContainerPrinter { - virtual ~ContainerPrinter() = default; - - virtual void printContainer(llvm::raw_ostream &OS, - ContainerTy Container) const = 0; - - virtual std::string ContainertoString(ContainerTy Container) const { // NOLINT - std::string Buffer; - llvm::raw_string_ostream StrS(Buffer); - printContainer(StrS, Container); - return StrS.str(); - } -}; - -} // namespace psr - -#endif diff --git a/include/phasar/PhasarLLVM/Utils/Scopes.h b/include/phasar/PhasarLLVM/Utils/Scopes.h deleted file mode 100644 index b43d7e9bf..000000000 --- a/include/phasar/PhasarLLVM/Utils/Scopes.h +++ /dev/null @@ -1,28 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2017 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Philipp Schubert and others - *****************************************************************************/ - -#ifndef PHASAR_PHASARLLVM_UTILS_SCOPES_H_ -#define PHASAR_PHASARLLVM_UTILS_SCOPES_H_ - -#include -#include - -namespace llvm { -class raw_ostream; -} // namespace llvm - -namespace psr { - -enum class Scope { function, module, project }; - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, Scope S); - -} // namespace psr - -#endif diff --git a/include/phasar/PhasarLLVM/Utils/SummaryStrategy.h b/include/phasar/PhasarLLVM/Utils/SummaryStrategy.h deleted file mode 100644 index f4cb78d0b..000000000 --- a/include/phasar/PhasarLLVM/Utils/SummaryStrategy.h +++ /dev/null @@ -1,41 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2017 Philipp Schubert. - * All rights reserved. This program and the accompanying materials are made - * available under the terms of LICENSE.txt. - * - * Contributors: - * Philipp Schubert and others - *****************************************************************************/ - -#ifndef PHASAR_PHASARLLVM_UTILS_SUMMARYSTRATEGY_H_ -#define PHASAR_PHASARLLVM_UTILS_SUMMARYSTRATEGY_H_ - -#include -#include - -namespace llvm { -class raw_ostream; -} - -namespace psr { - -enum class SummaryGenerationStrategy { - always_all = 0, - powerset, - all_and_none, - all_observed, - always_none -}; - -extern const std::map - SummaryGenerationStrategyToString; - -extern const std::map - StringToSummaryGenerationStrategy; - -llvm::raw_ostream &operator<<(llvm::raw_ostream &Os, - const SummaryGenerationStrategy &S); - -} // namespace psr - -#endif diff --git a/include/phasar/PhasarLLVM/Pointer/AliasAnalysisType.def b/include/phasar/Pointer/AliasAnalysisType.def similarity index 100% rename from include/phasar/PhasarLLVM/Pointer/AliasAnalysisType.def rename to include/phasar/Pointer/AliasAnalysisType.def diff --git a/include/phasar/PhasarLLVM/Pointer/AliasAnalysisType.h b/include/phasar/Pointer/AliasAnalysisType.h similarity index 90% rename from include/phasar/PhasarLLVM/Pointer/AliasAnalysisType.h rename to include/phasar/Pointer/AliasAnalysisType.h index 8f8cf5641..c05177920 100644 --- a/include/phasar/PhasarLLVM/Pointer/AliasAnalysisType.h +++ b/include/phasar/Pointer/AliasAnalysisType.h @@ -9,7 +9,7 @@ namespace psr { enum class AliasAnalysisType { #define ALIAS_ANALYSIS_TYPE(NAME, CMDFLAG, TYPE) NAME, -#include "phasar/PhasarLLVM/Pointer/AliasAnalysisType.def" +#include "phasar/Pointer/AliasAnalysisType.def" Invalid }; diff --git a/include/phasar/PhasarLLVM/Pointer/AliasInfo.h b/include/phasar/Pointer/AliasInfo.h similarity index 99% rename from include/phasar/PhasarLLVM/Pointer/AliasInfo.h rename to include/phasar/Pointer/AliasInfo.h index 815299800..eee1eca61 100644 --- a/include/phasar/PhasarLLVM/Pointer/AliasInfo.h +++ b/include/phasar/Pointer/AliasInfo.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_POINTER_ALIASINFO_H_ #define PHASAR_PHASARLLVM_POINTER_ALIASINFO_H_ -#include "phasar/PhasarLLVM/Pointer/AliasInfoTraits.h" -#include "phasar/PhasarLLVM/Pointer/AliasResult.h" +#include "phasar/Pointer/AliasInfoTraits.h" +#include "phasar/Pointer/AliasResult.h" #include "phasar/Utils/AnalysisProperties.h" #include "phasar/Utils/ByRef.h" diff --git a/include/phasar/PhasarLLVM/Pointer/AliasInfoBase.h b/include/phasar/Pointer/AliasInfoBase.h similarity index 98% rename from include/phasar/PhasarLLVM/Pointer/AliasInfoBase.h rename to include/phasar/Pointer/AliasInfoBase.h index a8fc9aee8..ae0488651 100644 --- a/include/phasar/PhasarLLVM/Pointer/AliasInfoBase.h +++ b/include/phasar/Pointer/AliasInfoBase.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_POINTER_ALIASINFOBASE_H #define PHASAR_PHASARLLVM_POINTER_ALIASINFOBASE_H -#include "phasar/PhasarLLVM/Pointer/AliasInfoTraits.h" +#include "phasar/Pointer/AliasInfoTraits.h" #include "llvm/ADT/DenseSet.h" #include "llvm/Support/raw_ostream.h" diff --git a/include/phasar/PhasarLLVM/Pointer/AliasInfoTraits.h b/include/phasar/Pointer/AliasInfoTraits.h similarity index 89% rename from include/phasar/PhasarLLVM/Pointer/AliasInfoTraits.h rename to include/phasar/Pointer/AliasInfoTraits.h index 42b812539..ad25d1141 100644 --- a/include/phasar/PhasarLLVM/Pointer/AliasInfoTraits.h +++ b/include/phasar/Pointer/AliasInfoTraits.h @@ -10,14 +10,14 @@ #ifndef PHASAR_PHASARLLVM_POINTER_ALIASINFOTRAITS_H #define PHASAR_PHASARLLVM_POINTER_ALIASINFOTRAITS_H +#include "phasar/Utils/BoxedPointer.h" + #include "llvm/ADT/DenseSet.h" #include namespace psr { -template class DynamicAliasSetConstPtr; - template struct AliasInfoTraits { // using n_t; // using v_t; @@ -30,7 +30,7 @@ template struct DefaultAATraits { using n_t = N; using v_t = V; using AliasSetTy = llvm::DenseSet; - using AliasSetPtrTy = DynamicAliasSetConstPtr; + using AliasSetPtrTy = BoxedConstPtr; using AllocationSiteSetPtrTy = std::unique_ptr; }; } // namespace psr diff --git a/include/phasar/PhasarLLVM/Pointer/AliasResult.def b/include/phasar/Pointer/AliasResult.def similarity index 100% rename from include/phasar/PhasarLLVM/Pointer/AliasResult.def rename to include/phasar/Pointer/AliasResult.def diff --git a/include/phasar/PhasarLLVM/Pointer/AliasResult.h b/include/phasar/Pointer/AliasResult.h similarity index 94% rename from include/phasar/PhasarLLVM/Pointer/AliasResult.h rename to include/phasar/Pointer/AliasResult.h index 1879a6174..29e62fff7 100644 --- a/include/phasar/PhasarLLVM/Pointer/AliasResult.h +++ b/include/phasar/Pointer/AliasResult.h @@ -17,7 +17,7 @@ namespace psr { enum class AliasResult { #define ALIAS_RESULT_TYPE(NAME) NAME, -#include "phasar/PhasarLLVM/Pointer/AliasResult.def" +#include "phasar/Pointer/AliasResult.def" }; std::string toString(AliasResult AR); diff --git a/include/phasar/PhasarLLVM/Pointer/AliasSetOwner.h b/include/phasar/Pointer/AliasSetOwner.h similarity index 95% rename from include/phasar/PhasarLLVM/Pointer/AliasSetOwner.h rename to include/phasar/Pointer/AliasSetOwner.h index 2c9ea0609..5d01d79ba 100644 --- a/include/phasar/PhasarLLVM/Pointer/AliasSetOwner.h +++ b/include/phasar/Pointer/AliasSetOwner.h @@ -10,8 +10,8 @@ #ifndef PHASAR_PHASARLLVM_POINTER_ALIASSETOWNER_H #define PHASAR_PHASARLLVM_POINTER_ALIASSETOWNER_H -#include "phasar/PhasarLLVM/Pointer/AliasInfoTraits.h" -#include "phasar/PhasarLLVM/Pointer/DynamicAliasSetPtr.h" +#include "phasar/Pointer/AliasInfoTraits.h" +#include "phasar/Utils/BoxedPointer.h" #include "phasar/Utils/MemoryResource.h" #include "phasar/Utils/StableVector.h" @@ -77,7 +77,7 @@ template class AliasSetOwner { OwnedPTS.clear(); } - DynamicAliasSetPtr acquire() { + BoxedPtr acquire() { auto RawMem = #if HAS_MEMORY_RESOURCE Alloc.allocate(1) diff --git a/include/phasar/PhasarLLVM/Pointer/PointsToInfo.h b/include/phasar/Pointer/PointsToInfo.h similarity index 99% rename from include/phasar/PhasarLLVM/Pointer/PointsToInfo.h rename to include/phasar/Pointer/PointsToInfo.h index d25ae8706..c5511ec2b 100644 --- a/include/phasar/PhasarLLVM/Pointer/PointsToInfo.h +++ b/include/phasar/Pointer/PointsToInfo.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_POINTER_POINTSTOINFO_H #define PHASAR_PHASARLLVM_POINTER_POINTSTOINFO_H -#include "phasar/PhasarLLVM/Pointer/PointsToInfoBase.h" +#include "phasar/Pointer/PointsToInfoBase.h" #include "phasar/Utils/ByRef.h" #include diff --git a/include/phasar/PhasarLLVM/Pointer/PointsToInfoBase.h b/include/phasar/Pointer/PointsToInfoBase.h similarity index 100% rename from include/phasar/PhasarLLVM/Pointer/PointsToInfoBase.h rename to include/phasar/Pointer/PointsToInfoBase.h diff --git a/include/phasar/PhasarLLVM/TypeHierarchy/TypeHierarchy.h b/include/phasar/TypeHierarchy/TypeHierarchy.h similarity index 97% rename from include/phasar/PhasarLLVM/TypeHierarchy/TypeHierarchy.h rename to include/phasar/TypeHierarchy/TypeHierarchy.h index 4b8c40231..db9d9c8db 100644 --- a/include/phasar/PhasarLLVM/TypeHierarchy/TypeHierarchy.h +++ b/include/phasar/TypeHierarchy/TypeHierarchy.h @@ -10,7 +10,7 @@ #ifndef PHASAR_PHASARLLVM_TYPEHIERARCHY_TYPEHIERARCHY_H_ #define PHASAR_PHASARLLVM_TYPEHIERARCHY_TYPEHIERARCHY_H_ -#include "phasar/PhasarLLVM/TypeHierarchy/VFTable.h" +#include "phasar/TypeHierarchy/VFTable.h" #include "llvm/Support/raw_ostream.h" diff --git a/include/phasar/PhasarLLVM/TypeHierarchy/VFTable.h b/include/phasar/TypeHierarchy/VFTable.h similarity index 100% rename from include/phasar/PhasarLLVM/TypeHierarchy/VFTable.h rename to include/phasar/TypeHierarchy/VFTable.h diff --git a/include/phasar/Utils/BoxedPointer.h b/include/phasar/Utils/BoxedPointer.h new file mode 100644 index 000000000..0d43ba825 --- /dev/null +++ b/include/phasar/Utils/BoxedPointer.h @@ -0,0 +1,210 @@ +/****************************************************************************** + * Copyright (c) 2022 Philipp Schubert. + * All rights reserved. This program and the accompanying materials are made + * available under the terms of LICENSE.txt. + * + * Contributors: + * Fabian Schiebel and others + *****************************************************************************/ + +#ifndef PHASAR_UTILS_BOXEDPOINTER_H +#define PHASAR_UTILS_BOXEDPOINTER_H + +#include "llvm/ADT/DenseMapInfo.h" +#include "llvm/ADT/DenseSet.h" +#include "llvm/ADT/Hashing.h" + +#include + +namespace llvm { +class Value; +} // namespace llvm + +namespace psr { + +template class BoxedConstPtr; +/// A T** that behaves like a T*. Used as AliasSetPtr in LLVMAliasSet +template class BoxedPtr { +public: + using value_type = T; + + constexpr BoxedPtr() noexcept = default; + constexpr BoxedPtr(std::nullptr_t) noexcept {} + constexpr BoxedPtr(value_type **Value) noexcept : Value(Value) { + assert(Value != nullptr); + } + constexpr BoxedPtr(const BoxedPtr &) noexcept = default; + constexpr BoxedPtr &operator=(const BoxedPtr &) noexcept = default; + ~BoxedPtr() noexcept = default; + + [[nodiscard]] constexpr value_type *get() noexcept { return *Value; } + [[nodiscard]] constexpr const value_type *get() const noexcept { + return *Value; + } + + constexpr value_type *operator->() noexcept { return get(); } + constexpr const value_type *operator->() const noexcept { return get(); } + + constexpr value_type &operator*() noexcept { return **Value; } + constexpr const value_type &operator*() const noexcept { return **Value; } + + constexpr operator bool() const noexcept { + return Value && *Value != nullptr; + } + + [[nodiscard]] constexpr value_type **value() noexcept { return Value; } + [[nodiscard]] constexpr value_type const *const *value() const noexcept { + return Value; + } + + [[nodiscard]] friend constexpr llvm::hash_code + hash_value(BoxedPtr // NOLINT(readability-identifier-naming) + Ptr) noexcept { + return llvm::hash_value(Ptr.Value); + } + + [[nodiscard]] friend constexpr bool operator==(BoxedPtr LHS, + BoxedPtr RHS) noexcept { + return LHS.Value == RHS.Value; + } + [[nodiscard]] friend constexpr bool operator!=(BoxedPtr LHS, + BoxedPtr RHS) noexcept { + return !(LHS == RHS); + } + + [[nodiscard]] friend constexpr bool operator<(BoxedPtr LHS, + BoxedPtr RHS) noexcept { + return LHS.Value < RHS.Value; + } + [[nodiscard]] friend constexpr bool operator>(BoxedPtr LHS, + BoxedPtr RHS) noexcept { + return LHS.Value > RHS.Value; + } + + [[nodiscard]] friend constexpr bool operator<=(BoxedPtr LHS, + BoxedPtr RHS) noexcept { + return LHS.Value <= RHS.Value; + } + [[nodiscard]] friend constexpr bool operator>=(BoxedPtr LHS, + BoxedPtr RHS) noexcept { + return LHS.Value >= RHS.Value; + } + +private: + friend class BoxedConstPtr; + + value_type **Value = nullptr; +}; + +/// A T const** that behaves like a const T*. +/// NOTE: This is different to const BoxedPtr which +/// propagates the const through all known layers of indirection +template class BoxedConstPtr : private BoxedPtr { +public: + using BoxedPtr::BoxedPtr; + using BoxedPtr::operator bool; + using typename BoxedPtr::value_type; + + constexpr BoxedConstPtr(BoxedPtr Other) noexcept : BoxedPtr(Other) {} + + [[nodiscard]] constexpr const value_type *get() const noexcept { + return BoxedPtr::get(); + } + + constexpr const value_type *operator->() const noexcept { return get(); } + + constexpr const value_type &operator*() const noexcept { + return *BoxedPtr::get(); + } + + [[nodiscard]] constexpr value_type const *const *value() const noexcept { + return BoxedPtr::value(); + } + + [[nodiscard]] friend constexpr llvm::hash_code + hash_value(BoxedConstPtr // NOLINT(readability-identifier-naming) + Ptr) noexcept { + return llvm::hash_value(Ptr.value()); + } + + [[nodiscard]] friend constexpr bool operator==(BoxedConstPtr LHS, + BoxedConstPtr RHS) noexcept { + return LHS.value() == RHS.value(); + } + [[nodiscard]] friend constexpr bool operator!=(BoxedConstPtr LHS, + BoxedConstPtr RHS) noexcept { + return !(LHS == RHS); + } + + [[nodiscard]] friend constexpr bool operator<(BoxedConstPtr LHS, + BoxedConstPtr RHS) noexcept { + return LHS.value() < RHS.value(); + } + [[nodiscard]] friend constexpr bool operator>(BoxedConstPtr LHS, + BoxedConstPtr RHS) noexcept { + return LHS.value() > RHS.value(); + } + + [[nodiscard]] friend constexpr bool operator<=(BoxedConstPtr LHS, + BoxedConstPtr RHS) noexcept { + return LHS.value() <= RHS.value(); + } + [[nodiscard]] friend constexpr bool operator>=(BoxedConstPtr LHS, + BoxedConstPtr RHS) noexcept { + return LHS.value() >= RHS.value(); + } +}; + +} // namespace psr + +namespace std { +template struct hash> { + constexpr size_t operator()(psr::BoxedPtr Ptr) const noexcept { + return std::hash{}(Ptr.value()); + } +}; +template struct hash> { + constexpr size_t operator()(psr::BoxedConstPtr Ptr) const noexcept { + return std::hash{}(Ptr.value()); + } +}; +} // namespace std + +namespace llvm { +template struct DenseMapInfo> { + inline static psr::BoxedPtr getEmptyKey() noexcept { + return DenseMapInfo::getEmptyKey(); + } + inline static psr::BoxedPtr getTombstoneKey() noexcept { + return DenseMapInfo::getTombstoneKey(); + } + + inline static bool isEqual(psr::BoxedPtr LHS, + psr::BoxedPtr RHS) noexcept { + return LHS == RHS; + } + + inline static unsigned getHashValue(psr::BoxedPtr Ptr) noexcept { + return hash_value(Ptr); + } +}; +template struct DenseMapInfo> { + inline static psr::BoxedConstPtr getEmptyKey() noexcept { + return DenseMapInfo::getEmptyKey(); + } + inline static psr::BoxedConstPtr getTombstoneKey() noexcept { + return DenseMapInfo::getTombstoneKey(); + } + + inline static bool isEqual(psr::BoxedConstPtr LHS, + psr::BoxedConstPtr RHS) noexcept { + return LHS == RHS; + } + + inline static unsigned getHashValue(psr::BoxedConstPtr Ptr) noexcept { + return hash_value(Ptr); + } +}; +} // namespace llvm + +#endif // PHASAR_UTILS_BOXEDPOINTER_H diff --git a/include/phasar/Utils/ByRef.h b/include/phasar/Utils/ByRef.h index 57372a4db..4cd72f550 100644 --- a/include/phasar/Utils/ByRef.h +++ b/include/phasar/Utils/ByRef.h @@ -13,6 +13,7 @@ #include namespace psr { + template static constexpr bool CanEfficientlyPassByValue = sizeof(T) <= 2 * sizeof(void *) && std::is_trivially_copyable_v; diff --git a/include/phasar/PhasarLLVM/Utils/DOTGraph.h b/include/phasar/Utils/DOTGraph.h similarity index 100% rename from include/phasar/PhasarLLVM/Utils/DOTGraph.h rename to include/phasar/Utils/DOTGraph.h diff --git a/include/phasar/Utils/EnumFlags.h b/include/phasar/Utils/EnumFlags.h index d63f5c4a2..b02c25a34 100644 --- a/include/phasar/Utils/EnumFlags.h +++ b/include/phasar/Utils/EnumFlags.h @@ -14,80 +14,74 @@ namespace psr { -template ::value, T>> -class EnumFlagAutoBool { - T Val; +template >> +struct EnumFlagAutoBool { + T Value; -public: - constexpr EnumFlagAutoBool(T Val) noexcept : Val(Val) {} - constexpr operator T() const noexcept { return Val; } + constexpr operator T() const noexcept { return Value; } constexpr explicit operator bool() const noexcept { - return static_cast>(Val) != 0; + return static_cast>(Value) != 0; } }; -template ::value, T>> +template >> constexpr EnumFlagAutoBool operator&(T Lhs, T Rhs) noexcept { - return static_cast(static_cast>(Lhs) & - static_cast>(Rhs)); + return {static_cast(static_cast>(Lhs) & + static_cast>(Rhs))}; } -template ::value, T>> +template >> constexpr void operator&=(T &Lhs, T Rhs) noexcept { - Lhs = static_cast(static_cast>(Lhs) & - static_cast>(Rhs)); + Lhs = Lhs & Rhs; } -template ::value, T>> +template >> constexpr T operator|(T Lhs, T Rhs) noexcept { - return static_cast(static_cast>(Lhs) | - static_cast>(Rhs)); + return static_cast(static_cast>(Lhs) | + static_cast>(Rhs)); } -template ::value, T>> +template >> constexpr void operator|=(T &Lhs, T Rhs) noexcept { - Lhs = static_cast(static_cast>(Lhs) | - static_cast>(Rhs)); + Lhs = Lhs | Rhs; } -template ::value, T>> +template >> constexpr T operator^(T Lhs, T Rhs) noexcept { - return static_cast(static_cast>(Lhs) ^ - static_cast>(Rhs)); + return static_cast(static_cast>(Lhs) ^ + static_cast>(Rhs)); } -template ::value, T>> +template >> constexpr void operator^=(T &Lhs, T Rhs) noexcept { - Lhs = static_cast(static_cast>(Lhs) ^ - static_cast>(Rhs)); + Lhs = Lhs ^ Rhs; } -template ::value, T>> +template >> constexpr T operator~(T Rhs) noexcept { - return static_cast(~static_cast>(Rhs)); + return static_cast(~static_cast>(Rhs)); } -template ::value, T>> -constexpr void setFlag(T &This, T Flag, bool Set = true) noexcept { +template >> +constexpr void setFlag(T &This, T Flag) noexcept { + This |= Flag; +} +template >> +constexpr void unsetFlag(T &This, T Flag) noexcept { + This &= ~Flag; +} +template >> +constexpr void setFlag(T &This, T Flag, bool Set) noexcept { if (Set) { - This |= Flag; + setFlag(This, Flag); } else { - This &= ~Flag; + unsetFlag(This, Flag); } } -template ::value, T>> + +template >> constexpr bool hasFlag(T This, T Flag) noexcept { - return static_cast(This & Flag); + return (This & Flag) == Flag; } } // namespace psr diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h b/include/phasar/Utils/JoinLattice.h similarity index 100% rename from include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/JoinLattice.h rename to include/phasar/Utils/JoinLattice.h diff --git a/include/phasar/Utils/Printer.h b/include/phasar/Utils/Printer.h new file mode 100644 index 000000000..c30e21401 --- /dev/null +++ b/include/phasar/Utils/Printer.h @@ -0,0 +1,113 @@ +/****************************************************************************** + * Copyright (c) 2017 Philipp Schubert. + * All rights reserved. This program and the accompanying materials are made + * available under the terms of LICENSE.txt. + * + * Contributors: + * Philipp Schubert and others + *****************************************************************************/ + +#ifndef PHASAR_PHASARLLVM_UTILS_PRINTER_H +#define PHASAR_PHASARLLVM_UTILS_PRINTER_H + +#include "llvm/Support/raw_ostream.h" + +#include +#include + +namespace psr { + +template +std::string toStringBuilder(void (P::*Printer)(llvm::raw_ostream &, T) const, + const P *This, const T &Arg) { + std::string Buffer; + llvm::raw_string_ostream StrS(Buffer); + std::invoke(Printer, This, std::ref(StrS), Arg); + return Buffer; +} + +template struct NodePrinterBase { + virtual ~NodePrinterBase() = default; + + virtual void printNode(llvm::raw_ostream &OS, N Stmt) const = 0; + + [[nodiscard]] std::string NtoString(N Stmt) const { // NOLINT + return toStringBuilder(&NodePrinterBase::printNode, this, Stmt); + } +}; +template +using NodePrinter = NodePrinterBase; + +template struct DataFlowFactPrinterBase { + virtual ~DataFlowFactPrinterBase() = default; + + virtual void printDataFlowFact(llvm::raw_ostream &OS, D Fact) const = 0; + + [[nodiscard]] std::string DtoString(D Fact) const { // NOLINT + return toStringBuilder(&DataFlowFactPrinterBase::printDataFlowFact, this, + Fact); + } +}; +template +using DataFlowFactPrinter = + DataFlowFactPrinterBase; + +template struct ValuePrinter { + virtual ~ValuePrinter() = default; + + virtual void printValue(llvm::raw_ostream &OS, V Val) const = 0; + + [[nodiscard]] std::string VtoString(V Val) const { // NOLINT + return toStringBuilder(&ValuePrinter::printValue, this, Val); + } +}; + +template struct TypePrinter { + virtual ~TypePrinter() = default; + + virtual void printType(llvm::raw_ostream &OS, T Ty) const = 0; + + [[nodiscard]] std::string TtoString(T Ty) const { // NOLINT + return toStringBuilder(&TypePrinter::printType, this, Ty); + } +}; + +template struct EdgeFactPrinter { + using l_t = typename AnalysisDomainTy::l_t; + + virtual ~EdgeFactPrinter() = default; + + virtual void printEdgeFact(llvm::raw_ostream &OS, l_t L) const = 0; + + [[nodiscard]] std::string LtoString(l_t L) const { // NOLINT + return toStringBuilder(&EdgeFactPrinter::printEdgeFact, this, L); + } +}; + +template struct FunctionPrinter { + using F = typename AnalysisDomainTy::f_t; + + virtual ~FunctionPrinter() = default; + + virtual void printFunction(llvm::raw_ostream &OS, F Func) const = 0; + + [[nodiscard]] std::string FtoString(F Func) const { // NOLINT + return toStringBuilder(&FunctionPrinter::printFunction, this, Func); + } +}; + +template struct ContainerPrinter { + virtual ~ContainerPrinter() = default; + + virtual void printContainer(llvm::raw_ostream &OS, + ContainerTy Container) const = 0; + + [[nodiscard]] std::string + ContainertoString(ContainerTy Container) const { // NOLINT + return toStringBuilder(&ContainerPrinter::printContainer, this, Container); + } +}; + +} // namespace psr + +#endif diff --git a/include/phasar/Utils/Table.h b/include/phasar/Utils/Table.h index 4141bf23a..6b5511f64 100644 --- a/include/phasar/Utils/Table.h +++ b/include/phasar/Utils/Table.h @@ -17,7 +17,8 @@ #ifndef PHASAR_UTILS_TABLE_H_ #define PHASAR_UTILS_TABLE_H_ -#include +#include "llvm/Support/raw_ostream.h" + #include #include #include diff --git a/include/phasar/Utils/TypeTraits.h b/include/phasar/Utils/TypeTraits.h index cc1bcd58f..1a7e52e4e 100644 --- a/include/phasar/Utils/TypeTraits.h +++ b/include/phasar/Utils/TypeTraits.h @@ -10,8 +10,6 @@ #ifndef PHASAR_UTILS_TYPETRAITS_H #define PHASAR_UTILS_TYPETRAITS_H -#include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h" - #include "llvm/Support/raw_ostream.h" #include @@ -25,12 +23,12 @@ namespace psr { namespace detail { template -struct is_iterable : public std::false_type {}; // NOLINT +struct is_iterable : std::false_type {}; // NOLINT template struct is_iterable().begin()), - decltype(std::declval().end())>> - : public std::true_type {}; + decltype(std::declval().end())>> : std::true_type { +}; template struct is_iterable_over : std::false_type {}; // NOLINT template @@ -41,20 +39,20 @@ struct is_iterable_over< std::is_convertible_v().begin()), U>>> : std::true_type {}; -template struct is_pair : public std::false_type {}; // NOLINT +template struct is_pair : std::false_type {}; // NOLINT template -struct is_pair> : public std::true_type {}; // NOLINT +struct is_pair> : std::true_type {}; // NOLINT -template struct is_tuple : public std::false_type {}; // NOLINT +template struct is_tuple : std::false_type {}; // NOLINT template -struct is_tuple> : public std::true_type {}; // NOLINT +struct is_tuple> : std::true_type {}; // NOLINT template -struct is_printable : public std::false_type {}; // NOLINT +struct is_printable : std::false_type {}; // NOLINT template struct is_printable< // NOLINT T, OS, decltype(std::declval() << std::declval())> - : public std::true_type {}; + : std::true_type {}; template using is_llvm_printable = is_printable; // NOLINT @@ -63,9 +61,9 @@ template using is_std_printable = is_printable; // NOLINT template -struct has_str : public std::false_type {}; // NOLINT +struct has_str : std::false_type {}; // NOLINT template -struct has_str().str())> : public std::true_type { +struct has_str().str())> : std::true_type { }; // NOLINT template @@ -87,13 +85,6 @@ template struct is_llvm_hashable()))> // NOLINT : std::true_type {}; -template -struct has_setIFDSIDESolverConfig : std::false_type {}; -template -struct has_setIFDSIDESolverConfig< - T, decltype(std::declval().setIFDSIDESolverConfig( - std::declval()))> : std::true_type {}; - template