-
Notifications
You must be signed in to change notification settings - Fork 151
Refactor getAsJson() #725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fabianbs96
merged 48 commits into
secure-software-engineering:development
from
fabianbs96:f-GetAsJsonRefactor
Oct 22, 2024
Merged
Refactor getAsJson() #725
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
d3b3172
unresolved ref to F/NToString
mxHuber 0912f5c
compiles
mxHuber 3be40ea
refactored CallGraph::deserialize()
mxHuber 86fc715
refactored unittests, all fail
mxHuber 3ecb12a
all unittests finally pass
mxHuber 3664d3f
code cleanup
mxHuber ef50e02
refactoring
mxHuber 36ae5b9
fixed function with no caller not being serialized
mxHuber 7af57e4
Fix Dependendency Installation (#707)
fabianbs96 a4091ca
backup DIBTH Data
mxHuber 1d9ea9b
DIBTH serialization code, untested
mxHuber 1cb3345
DIBTHData getDataFromJson Impl
mxHuber d828566
improved de-/serialization impl w/o TypeToVertex
mxHuber 751366f
fixed DIBTHData TypeToVertex not compiling
mxHuber 6e37cd3
fixed serialization bugs and unittests
mxHuber 8708a76
DITHS Test fixes, 13 pass, 11 fail
mxHuber 50d966a
DIBTH Ser Test, 1 failing Test left
mxHuber 9d81f4e
GeneralStatisticsAnalysisData impl
mxHuber 643da4b
LLVMAliasSetData impl
mxHuber 7f79712
last printAsJson Impls
mxHuber a347b7d
Final Impls, DIBTH Identifier Impl not working
mxHuber b4c8ff3
changes + fixes from meeting
mxHuber c835961
no equality of values DIBTH Test
mxHuber 7f6194e
fixed all bugs, all unittests pass
mxHuber 4fc243a
Merge branch 'development' into f-GetAsJsonRefactor
fabianbs96 16bbf2a
Fix crash in buildTypeGraph in the presence of typedefs
fabianbs96 47bf183
fixed LLVMAliasSetSerializationTest
mxHuber 767a90e
Add more aggressive composite type filter
fabianbs96 fe605e9
Refactor handling of DI type names
fabianbs96 53e222e
Implicit vertex index
fabianbs96 e4d2892
Prioritize type id over type name as the latter may be ambiguous
fabianbs96 7d3641c
Adapt DI TH test to identifiers as names
fabianbs96 f630ebe
Fix vtable + transitive di th tests
fabianbs96 d8766de
Optimizing deprecation warnings for getAsJson
fabianbs96 4d079d8
TypeTrait check current non functioning impl
mxHuber fa6bb87
fixed TypeHierarchySerialization Tests
mxHuber cb8bc83
Optimized deprecation warinings for getAsJson
mxHuber fd70a41
debug code backup
mxHuber d1078f5
Fix LLVMBasedTypeHierarchy
fabianbs96 1a2f47a
added operator<< statistics to printAsJson
mxHuber 4eb1f12
Fix GeneralStatistics printAsJson + minor
fabianbs96 987050c
Add some more deprecations
fabianbs96 4a2ac9d
Merge branch 'development' into f-GetAsJsonRefactor
fabianbs96 21b99e1
Merge branch 'development' into f-GetAsJsonRefactor
fabianbs96 a2cfbe1
Fix now failing unittests
fabianbs96 a38035f
Merge branch 'development' into f-GetAsJsonRefactor
fabianbs96 3c4b8b2
Merge branch 'development' into f-GetAsJsonRefactor
fabianbs96 c1e28fb
Changes from review
fabianbs96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /****************************************************************************** | ||
| * Copyright (c) 2024 Fabian Schiebel. | ||
| * All rights reserved. This program and the accompanying materials are made | ||
| * available under the terms of LICENSE.txt. | ||
| * | ||
| * Contributors: | ||
| * Maximilian Leo Huber and others | ||
| *****************************************************************************/ | ||
|
|
||
| #ifndef PHASAR_PHASARLLVM_CONTROLFLOW_CALLGRAPHDATA_H | ||
| #define PHASAR_PHASARLLVM_CONTROLFLOW_CALLGRAPHDATA_H | ||
|
|
||
| #include "llvm/ADT/StringRef.h" | ||
| #include "llvm/Support/raw_ostream.h" | ||
|
|
||
| #include <string> | ||
| #include <unordered_map> | ||
| #include <vector> | ||
|
|
||
| namespace psr { | ||
| struct CallGraphData { | ||
| std::unordered_map<std::string, std::vector<int>> FToFunctionVertexTy{}; | ||
|
|
||
| CallGraphData() noexcept = default; | ||
| void printAsJson(llvm::raw_ostream &OS); | ||
|
|
||
| static CallGraphData deserializeJson(const llvm::Twine &Path); | ||
| static CallGraphData loadJsonString(llvm::StringRef JsonAsString); | ||
| }; | ||
|
|
||
| } // namespace psr | ||
|
|
||
| #endif // PHASAR_PHASARLLVM_CONTROLFLOW_CALLGRAPHDATA_H | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /****************************************************************************** | ||
| * Copyright (c) 2024 Fabian Schiebel. | ||
| * All rights reserved. This program and the accompanying materials are made | ||
| * available under the terms of LICENSE.txt. | ||
| * | ||
| * Contributors: | ||
| * Maximilian Leo Huber and others | ||
| *****************************************************************************/ | ||
|
|
||
| #ifndef PHASAR_PHASARLLVM_TYPEHIERARCHY_LLVMALIASSETDATA_H | ||
| #define PHASAR_PHASARLLVM_TYPEHIERARCHY_LLVMALIASSETDATA_H | ||
|
|
||
| #include "llvm/Support/raw_ostream.h" | ||
|
|
||
| #include <string> | ||
|
|
||
| namespace psr { | ||
| struct LLVMAliasSetData { | ||
| std::vector<std::vector<std::string>> AliasSets; | ||
| std::vector<std::string> AnalyzedFunctions; | ||
|
|
||
| LLVMAliasSetData() noexcept = default; | ||
| void printAsJson(llvm::raw_ostream &OS); | ||
|
|
||
| static LLVMAliasSetData deserializeJson(const llvm::Twine &Path); | ||
| static LLVMAliasSetData loadJsonString(llvm::StringRef JsonAsString); | ||
| }; | ||
|
|
||
| } // namespace psr | ||
|
|
||
| #endif // PHASAR_PHASARLLVM_TYPEHIERARCHY_LLVMALIASSETDATA_H |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.