Skip to content

Conversation

@fabianbs96
Copy link
Member

The typestate analysis is the only analysis in phasar where one printer function (LToString) depends on the concrete analysis instance. This is, because the TypestateDescription defines, how a type state should be printed.
Moving to free-printers (#652) would then require to make the type state itself a virtual type that knows how it should printed. This is not only ugly, but may also have a performance impact.

To fix this issue, this PR makes the typestate analysis a template enabling type-safe type states.

@fabianbs96 fabianbs96 requested a review from MMory as a code owner August 6, 2023 11:04
@fabianbs96 fabianbs96 self-assigned this Aug 6, 2023
Copy link
Member

@MMory MMory left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@fabianbs96 fabianbs96 merged commit 6781a2a into f-FreePrinters Aug 15, 2023
@fabianbs96 fabianbs96 deleted the f-TemplateTSA branch August 15, 2023 17:35
fabianbs96 added a commit that referenced this pull request Aug 24, 2023
* Make NToString and friends free functions

* Remove double parentheses

* Template Typestate Analysis (#654)

* Make IDETypeStateDescription a template to allow for type-safe type states

* Implement JoinLatticeTraits for CSTDFILEIOState

* Move TSA flow functions to source file again

---------

Co-authored-by: Martin Mory <mmo@mail.upb.de>
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