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

[memory][scs][parser] Don't generate arcs from sc-element classes #434

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

NikitaZotov
Copy link
Member

@NikitaZotov NikitaZotov commented Nov 11, 2024

Now, sc-arcs between sc-element types and sc-elements are not generated in sc-memory. This allows for:

  • fixing cases where these sc-arcs belong to sc-structures (in particular, sc-templates) and hinder the processing of these sc-templates (searching by sc-template);
  • improving visualization of the semantic neighborhoods of certain types of sc-elements.

@NikitaZotov NikitaZotov self-assigned this Nov 11, 2024
@NikitaZotov NikitaZotov force-pushed the feat/skip_generating_type_arcs branch 3 times, most recently from 98d16df to 6ac65a8 Compare November 11, 2024 21:41
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 97.99107% with 9 lines in your changes missing coverage. Please review.

Project coverage is 95.54%. Comparing base (53fbce9) to head (2ddb74d).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #434      +/-   ##
==========================================
+ Coverage   95.49%   95.54%   +0.05%     
==========================================
  Files         236      236              
  Lines       26037    26419     +382     
  Branches     1827     1837      +10     
==========================================
+ Hits        24863    25241     +378     
- Misses       1174     1178       +4     

docs/changelog.md Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/sc_scs_helper.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/sc_scs_helper.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
@NikitaZotov NikitaZotov force-pushed the feat/skip_generating_type_arcs branch 2 times, most recently from c053422 to b1904dc Compare November 14, 2024 22:40
sc-memory/sc-memory/include/sc-memory/scs/scs_parser.hpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/tests/scs/units/test_scs_common.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/tests/scs/units/test_scs_common.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/sc_template_scs.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/sc_scs_helper.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/sc_scs_helper.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/include/sc-memory/scs/scs_parser.hpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
@NikitaZotov NikitaZotov added this to the 0.10.0 milestone Nov 26, 2024
Copy link
Member

@kilativ-dotcom kilativ-dotcom left a comment

Choose a reason for hiding this comment

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

left comment in a thread

Copy link
Member

@kilativ-dotcom kilativ-dotcom left a comment

Choose a reason for hiding this comment

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

left comment in a thread

@NikitaZotov NikitaZotov force-pushed the feat/skip_generating_type_arcs branch from e1bf70b to d617099 Compare December 5, 2024 23:32
@NikitaZotov NikitaZotov force-pushed the feat/skip_generating_type_arcs branch from ce172e5 to 2786023 Compare December 17, 2024 07:57
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
Comment on lines 504 to 505
ScType const & sourceTypeWithConstancySubtype = sourceType.BitAnd(ScType::Const | ScType::Var);
ScType const & targetTypeWithConstancySubtype = targetType.BitAnd(ScType::Const | ScType::Var);
Copy link
Member

Choose a reason for hiding this comment

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

I've spent a lot of time to understand that they are constancy subtype of type provided by source keynode and constancy subtype of target
maybe rename these variables?

Copy link
Member Author

Choose a reason for hiding this comment

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

What about sourceTypeWithoutConstancySubtype and sourceTypeWithoutConstancySubtype?

Copy link
Member

Choose a reason for hiding this comment

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

maybe constancySubtypeProvidedBySourceKeynode and constancyTargetSubtype?
looks like we interpret these variables in different ways

ScType const & sourceTypeWithConstancySubtype = sourceType.BitAnd(ScType::Const | ScType::Var);
ScType const & targetTypeWithConstancySubtype = targetType.BitAnd(ScType::Const | ScType::Var);
bool doSourceAndTargetHaveCompatibleConstancySubtypes =
sourceTypeWithConstancySubtype.CanExtendTo(targetTypeWithConstancySubtype)
Copy link
Member

Choose a reason for hiding this comment

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

some lines like this one have space at the end
will this be fixed with clang?

sc-memory/sc-memory/src/scs/scs_parser.cpp Outdated Show resolved Hide resolved
Copy link
Member

@kilativ-dotcom kilativ-dotcom left a comment

Choose a reason for hiding this comment

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

need to decide on constancy subtypes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants