@@ -823,14 +823,15 @@ module API { |
823 | 823 | predicate isAdditionalDefRoot(Node node); |
824 | 824 |
|
825 | 825 | /** |
826 | | - * Holds if `node` is considered "in scope" for this stage, meaning that we allow outgoing labelled edges |
| 826 | + * Holds if `node` is in a file that is considered "active" in this stage, meaning that we allow outgoing labelled edges |
827 | 827 | * to be materialised from here, and continue API graph construction from the successors' edges. |
828 | 828 | * |
829 | | - * Note that the "additional roots" contributed by the stage inputs may be out of scope but can be tracked to a node in scope. |
| 829 | + * Note that the "additional roots" contributed by the stage inputs may be in an inactive file but can be tracked to a node in an |
| 830 | + * active file. |
830 | 831 | * This predicate should thus not be used to block the tracking of use/def nodes, but only block the creation of new labelled edges. |
831 | 832 | */ |
832 | 833 | bindingset[node] |
833 | | - predicate inScope(DataFlow::Node node); |
| 834 | + predicate inActiveFile(DataFlow::Node node); |
834 | 835 | } |
835 | 836 |
|
836 | 837 | private module Stage<StageInputSig S> { |
@@ -1025,11 +1026,11 @@ module API { |
1025 | 1026 | * Holds if `rhs` is the right-hand side of a definition of node `nd`. |
1026 | 1027 | */ |
1027 | 1028 | predicate rhs(TApiNode nd, DataFlow::Node rhs) { |
1028 | | - (S::inScope(rhs) or S::isAdditionalDefRoot(nd)) and |
| 1029 | + (S::inActiveFile(rhs) or S::isAdditionalDefRoot(nd)) and |
1029 | 1030 | exists(string m | nd = MkModuleExport(m) | exports(m, rhs)) |
1030 | 1031 | or |
1031 | 1032 | rhs(_, _, rhs) and |
1032 | | - S::inScope(rhs) and |
| 1033 | + S::inActiveFile(rhs) and |
1033 | 1034 | nd = MkDef(rhs) |
1034 | 1035 | or |
1035 | 1036 | S::isAdditionalDefRoot(nd) and |
@@ -1084,7 +1085,7 @@ module API { |
1084 | 1085 | exists(EntryPoint e | |
1085 | 1086 | lbl = Label::entryPoint(e) and |
1086 | 1087 | ref = e.getASource() and |
1087 | | - S::inScope(ref) |
| 1088 | + S::inActiveFile(ref) |
1088 | 1089 | ) |
1089 | 1090 | or |
1090 | 1091 | // property reads |
@@ -1286,7 +1287,7 @@ module API { |
1286 | 1287 | * Holds if `ref` is a use of node `nd`. |
1287 | 1288 | */ |
1288 | 1289 | predicate use(TApiNode nd, DataFlow::Node ref) { |
1289 | | - (S::inScope(ref) or S::isAdditionalUseRoot(nd)) and |
| 1290 | + (S::inActiveFile(ref) or S::isAdditionalUseRoot(nd)) and |
1290 | 1291 | ( |
1291 | 1292 | exists(string m, Module mod | nd = MkModuleDef(m) and mod = importableModule(m) | |
1292 | 1293 | ref = DataFlow::moduleVarNode(mod) |
@@ -1313,7 +1314,7 @@ module API { |
1313 | 1314 | ) |
1314 | 1315 | or |
1315 | 1316 | use(_, _, ref) and |
1316 | | - S::inScope(ref) and |
| 1317 | + S::inActiveFile(ref) and |
1317 | 1318 | nd = MkUse(ref) |
1318 | 1319 | or |
1319 | 1320 | S::isAdditionalUseRoot(nd) and |
@@ -1590,7 +1591,7 @@ module API { |
1590 | 1591 | private predicate isOverlay() { databaseMetadata("isOverlay", "true") } |
1591 | 1592 |
|
1592 | 1593 | bindingset[node] |
1593 | | - predicate inScope(DataFlow::Node node) { |
| 1594 | + predicate inActiveFile(DataFlow::Node node) { |
1594 | 1595 | // In the base database, compute everything in stage 1. |
1595 | 1596 | // In an overlay database, do nothing in stage 1. |
1596 | 1597 | not isOverlay() and exists(node) |
@@ -1691,7 +1692,7 @@ module API { |
1691 | 1692 | } |
1692 | 1693 |
|
1693 | 1694 | bindingset[node] |
1694 | | - predicate inScope(DataFlow::Node node) { isInOverlayChangedFile(node) } |
| 1695 | + predicate inActiveFile(DataFlow::Node node) { isInOverlayChangedFile(node) } |
1695 | 1696 | } |
1696 | 1697 |
|
1697 | 1698 | private module Stage2 = Stage<Stage2Input>; |
@@ -1754,7 +1755,7 @@ module API { |
1754 | 1755 | predicate isAdditionalDefRoot(Node node) { none() } |
1755 | 1756 |
|
1756 | 1757 | bindingset[node] |
1757 | | - predicate inScope(DataFlow::Node node) { any() } |
| 1758 | + predicate inActiveFile(DataFlow::Node node) { any() } |
1758 | 1759 | } |
1759 | 1760 |
|
1760 | 1761 | private module Full = Stage<FullInput>; |
|
Graphic For How To Read A Scholarly Journal Article Top 10 Books