Skip to content
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

Analysis Printer #17

Merged
merged 33 commits into from
Oct 17, 2023
Merged

Analysis Printer #17

merged 33 commits into from
Oct 17, 2023

Conversation

fabianbs96
Copy link
Owner

No description provided.

@fabianbs96
Copy link
Owner Author

See Coding Conventions

@sritejakv sritejakv marked this pull request as ready for review October 4, 2023 12:11
sritejakv
sritejakv previously approved these changes Oct 17, 2023
Copy link
Collaborator

@sritejakv sritejakv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Comment on lines +42 to +47
llvm::DenseMap<int, std::set<std::string>> FoundLeak;
int SinkId = stoi(getMetaDataID(War.Instr));
std::set<std::string> LeakedValueIds;
LeakedValueIds.insert(getMetaDataID((War.Fact)->base()));
FoundLeak.try_emplace(SinkId, LeakedValueIds);
findAndRemove(FoundLeak, GroundTruth);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks overly complicated and should be improved in the upcoming ticket

GroundTruthCollector GroundTruthPrinter = {GroundTruth};
doAnalysisTest("xtaint01_cpp.ll", GroundTruthPrinter, std::monostate{});
}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not just test this on only two test cases. There should be more. To be added in the upcoming ticket!

@fabianbs96 fabianbs96 merged commit 9179cf0 into development Oct 17, 2023
4 checks passed
@fabianbs96 fabianbs96 deleted the f-AnalysisPrinter branch October 17, 2023 16:00
fabianbs96 added a commit that referenced this pull request Nov 25, 2023
* Analysis Printer (#17)

* Initial Commit

* AnalysisPrinter Second commit

* Initial Commit

* Integrate Printer with client Analysis and test

* Addressing Review comments

* Integrate AnalysisPrinter with all analyses and template class modified

* vector emplace_back instead of push_back

* Testcase for AnalysisPrinter

* GroundTruth derived class initial commit

* AnalysisPrinter Test complete and Test

* fixing myphasartool file

* Test pre-commit fix

* Adding Test cases and fixing PR failure

* 1.template params to N,D,L  2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* 1.template params to N,D,L 2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* Null AnalysisPrinter singleton

* Adding AnalysisPrinter to IDETabulation Problem

* making free (N,D,L)ToString functions

* disable copy and move for analysis-printer

* Default NullAnalysisPrinter and explicit print methods

* removing SetAnalysisPrinter from client analyses and modified Testcase for AnalysisPrinter

* Adding superclass for AnalysisPrinter

* Addressing review comments and fixing PR build failure

* fix: minors

* fix: minor (clang-tidy)

* fix: review feedback

* misc: minor refactoring

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>

* fix: review feedback

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>
fabianbs96 added a commit that referenced this pull request Feb 25, 2024
* Analysis Printer (#17)

* Initial Commit

* AnalysisPrinter Second commit

* Initial Commit

* Integrate Printer with client Analysis and test

* Addressing Review comments

* Integrate AnalysisPrinter with all analyses and template class modified

* vector emplace_back instead of push_back

* Testcase for AnalysisPrinter

* GroundTruth derived class initial commit

* AnalysisPrinter Test complete and Test

* fixing myphasartool file

* Test pre-commit fix

* Adding Test cases and fixing PR failure

* 1.template params to N,D,L  2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* 1.template params to N,D,L 2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* Null AnalysisPrinter singleton

* Adding AnalysisPrinter to IDETabulation Problem

* making free (N,D,L)ToString functions

* disable copy and move for analysis-printer

* Default NullAnalysisPrinter and explicit print methods

* removing SetAnalysisPrinter from client analyses and modified Testcase for AnalysisPrinter

* Adding superclass for AnalysisPrinter

* Addressing review comments and fixing PR build failure

* fix: minors

* fix: minor (clang-tidy)

* fix: review feedback

* misc: minor refactoring

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>

* OnTheFlyReporting Initial Commit

* fix: review feedback

* onTheFlyAnalysis makeUniquePtr

* OnTheFlyReporting Initial Commit

* onTheFlyAnalysis makeUniquePtr

* addressing minor error in prev commit

* Refactoring Warn Variable and Refactoring lambda flow for AnalysisPrinter

* Integrating sourceMgr to AnalysisPrinter

* Testcase for OnTheFlyAnalysisPrinting

* Testcase for SourceMgrPrinter

* MaybeUniquePtr for SourceMgrPrinter

* Minor review comments

* refactoring the printers

* adding TODOs

* more TODOs

* Refactor AnalysisPrinter part1

* Refactor AnalysisPrinter part2

* dev: update AnalysisPrinterBase, integrate and fix tests

* adding warning kind

* fix ci

* update codeowners for analysis-printer

* Refactor SourceManagerPrinter

* Minor in OTF Printer Test

* fixing review feedback

* fix l_t printing

* Mandating analysisType to tyestate descriptions

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Fabian Schiebel <[email protected]>
fabianbs96 added a commit that referenced this pull request Mar 12, 2024
* small backup safe

* backup save, still needs metadata extraction

* refactoring + some basic functions implemented

* basic structure of constructHierarchy()

* DIBasedTypeHierarchy structure

* basic impl of constructor and hasVFTable

* impl edges of graph, isSubType, getSubType and print

* untested version of transitive closure

* added transitive closure and changed print

* fixed transitive closure + refactoring

* bug fixes + tests

* debugging Debug info extraction

* Fixed type extraction, untested transitive hull

* fixed includes + more debug info

* bug fixes and non recursive transitive hull

* working direct edge detection

* BitVector, cleanup, start of vtable impl

* vtables and dotgraph

* review changes + vtable fix, 50% finished

* impl review suggestions

* removed old type_hierarchy unittests

* impl .set_bits() loop

* fixed vtables

* fixes and code cleanup

* added llvm::interleaveComma

* fixed wrong assertion

* public LLVMVFTable constructor

* small refactor

* important bugfixes

* unittests for multiple base classes

* unittests not finished, backup

* more unittests, all pass

* reworked unittests

* review changes

* review changes

* myphasartools.cpp revert

* current final version

* Bump submodules

* backup of fixes + unittests

* more unittests

* new unittest

* Pin swift version

* basicRecoTH backup

* backup of structure

* Analysis Printer (#17)

* Initial Commit

* AnalysisPrinter Second commit

* Initial Commit

* Integrate Printer with client Analysis and test

* Addressing Review comments

* Integrate AnalysisPrinter with all analyses and template class modified

* vector emplace_back instead of push_back

* Testcase for AnalysisPrinter

* GroundTruth derived class initial commit

* AnalysisPrinter Test complete and Test

* fixing myphasartool file

* Test pre-commit fix

* Adding Test cases and fixing PR failure

* 1.template params to N,D,L  2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* 1.template params to N,D,L 2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* Null AnalysisPrinter singleton

* Adding AnalysisPrinter to IDETabulation Problem

* making free (N,D,L)ToString functions

* disable copy and move for analysis-printer

* Default NullAnalysisPrinter and explicit print methods

* removing SetAnalysisPrinter from client analyses and modified Testcase for AnalysisPrinter

* Adding superclass for AnalysisPrinter

* Addressing review comments and fixing PR build failure

* fix: minors

* fix: minor (clang-tidy)

* fix: review feedback

* misc: minor refactoring

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>

* new unittests, some fail

* unittests fixed, all pass

* Add LLVM-RTTI-style type-hierarchy layout

* fix: review feedback

* Fix logging macro invocation

* Split giant DIBasedTypeHierarchy ctor into multiple functions

---------

Co-authored-by: mxHuber <[email protected]>
Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>
Co-authored-by: Martin Mory <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants