forward slicing(前向切片):在程序分析中,从某个起点(如某条语句或某个变量)出发,找出会受到它影响的所有后续语句与数据/控制依赖集合,用于理解影响范围、调试、测试与安全审计等。(与之相对的是 backward slicing,用于追溯“是什么影响了它”。)
We used forward slicing to see which outputs are affected by changing this variable.
我们用前向切片来查看修改这个变量会影响哪些输出。
In the security review, forward slicing from the user input helped identify all the code paths where untrusted data could propagate.
在安全审查中,从用户输入点做前向切片有助于找出不可信数据可能传播到的所有代码路径。
/ˈfɔːrwərd ˈslaɪsɪŋ/
forward 源自古英语 forweard,表示“向前、在前方”;slice 原义为“切片/切割的一片”,来自古法语 esclicer(切开)。在计算机科学里,program slicing(程序切片)把“切下一部分相关代码”作比喻:forward slicing 就是“沿着影响方向向前切出相关部分”。