-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pointer analysis] added support for named list arguments (#1151)
* feat: added processor for list function call * feat: named arguments are defined as indices for target of list assignment * feat: reads edge is added to list element when accessing via '$' * test(list-access): added slicing tests * test(list-access): added dataflow tests * test-fix: fix list-access test suites * feat(list-access): all parameter indices are concatenated * feat(list-access): pass indices of replacement to markAsAssignment * feat(list-access): all existing definitions are read by access * feat-fix(list-access): correct nodeId is used for ContainerIndex * feat(list-access): merge definition properties with same name This way only the correct definition is stored. Any overwritten definition isn't stored anymore. Currently, this only works for definition that happen in each branch. * feat(list-access): add isSingleIndex property to container indices * test(list-access): extended slicing tests * feat(list-access): replacement function are not marked as maybe anymore The merge indices logic was merged to a separate method. When there are indices defined, then the function is not marked as maybe. This enables overwriting the previous indices. * feat(list-access): add whole list reference only to list call Before, an access to a list object would reference the whole object, now that's only when the list function is called. Single assignments are referenced directly by their access operator. This allows us to skip not relevant list accesses. * test-fix(list-access): list call is always in slice To ensure a executable slice, the list call has to be always in the slice. * feat(list-access): overwrite definition of indices if list is redefined When a list is redefined the former definiton is replaced, therefore storing the indices would cause keeping the previous definition in the slice. * refactor(access): extracted number and index based access to methods * test(list-access): add tests for nested list access Nested list access comes with new complications. For each list in the root index, the names must be resolved recursively, to reference the correct index. * feat(nested-list): add subindices to index if index is another list This enables nested defintion/access/assignment. * feat(nested-list): add reads edges to accessed indices and their indices This is done recursively to include all indices that had an impact on the result. * feat(nested-list): recursively resolve nested access * refactor(list-defs): renamed isSingleIndex to isContainer Also inverted semantic * feat(list-access): declared empty list is included in slice * refactor(list-access): move utility methods to separate file This way, they can be accessed by the write and read operations * feat(nested-list): add support for nested assignment * test(list-access): add supported capabilities ids to tests * refactor(pointer-analysis): basic ts cleanup * feat(pointer-analysis): support configuration * doc(pointer-analysis): wiki update * test(pointer-analysis): some new conditional tests * lint-fix: handle linter errors --------- Co-authored-by: Florian Sihler <[email protected]>
- Loading branch information
1 parent
40e1558
commit 4b73726
Showing
17 changed files
with
1,100 additions
and
122 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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
Oops, something went wrong.