Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

refactor: data structure #223

Merged
merged 365 commits into from
Feb 29, 2024
Merged

refactor: data structure #223

merged 365 commits into from
Feb 29, 2024

Conversation

lukarade
Copy link
Contributor

@lukarade lukarade commented Feb 16, 2024

Summary of Changes

In this fix, the data structure is reworked to fit the model discussed in the requirements.

Also, the analysis is changed regarding the resolving of references.
FunctionScope class now holds target, value and call nodes for the function, so we can iterate over these for each function.
It should now be more efficient and easier to understand since the changes to the data structures below were used.

Added the class Reference to represent a node that references a Symbol. The ReferenceNode class was extended with two subclasses TargetReference - representing a Symbol referencing another Symbol, and ValueReference - representing a Reference referencing a Symbol. Both classes store the referenced symbols in a list.
Reworked the Reasons class so it now holds the Symbols for the variables written to/ read from.
This blocks the merge of #211!

lukarade and others added 30 commits August 4, 2023 13:25
# Conflicts:
#	src/library_analyzer/processing/api/__init__.py
# Conflicts:
#	src/library_analyzer/processing/api/__init__.py
@lukarade
Copy link
Contributor Author

The code coverage percentage for _module_data.py and _get_module_data.py is higher than calculated. This is due to the test cases for running the analysis on a complete package are disabled (for now).

@lukarade lukarade marked this pull request as ready for review February 27, 2024 12:39
@lukarade lukarade requested a review from a team as a code owner February 27, 2024 12:39
Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

For the files in processing/api/purity_analysis I've only done some spot checks. I currently don't have the time to review them completely.

Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

Nice work!

@lars-reimann lars-reimann merged commit 726ba5b into main Feb 29, 2024
6 of 8 checks passed
@lars-reimann lars-reimann deleted the data-structure-refactor branch February 29, 2024 16:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
purity Inferring the purity of functions
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

3 participants