-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
We should support querying the attributed srcSlice srcML output that is being developed.
FIND USES OF- This would grab any slice IDs from the given query, then search the code over again for anything that has aslice:useattribute with the matching ID.- Example:
FIND USES OF int $NAME[];- this would find all of the uses of all int arrays.
- Example:
FIND DEFS OF- This would grab any slice IDs from the given query, then search the code over again for anything that has aslice:defattribute with the matching ID.- Example:
FIND DEFS OF $I WITHIN //src:while/src:condition- this would find all defs of any variables used within a while's condition.
- Example:
FIND DECLS OF- This would grab any slice IDs from the given query, then search the code over again for anything that has aslice:declattribute with the matching ID.- Example:
FIND DECL OF $A.close()- this would find the declaration of anything that has a.close()function called on it.
- Example:
FIND SLICE OF- This would grab any slice IDs from the given query, then search the code over again for anything that has anyslice:*attribute with the matching ID.- Example:
FIND SLICE OF int x;- this would grab the entire slice for anyint xwithin the code.
- Example:
We also discussed the possibility of doing "forward" and "backwards" slices. However, we need better terms for this, as this would actually be slicing that is limited to statements before/after the target in document order.
Reactions are currently unavailable