Returns a list of all previous instructions/arguments/variables of the current point in the data flow graph.
backward_df() → List[Point]
The backward_df() function is an intra-procedural analysis function. This means that the function does not operate recursively and instead returns instruction/argument/variable within the current function instruction set.
The function returns the derived classes from Point, such as Argument, Var, Instruction.
Query Example
from glider import*defquery():#fetch an instruction instructions =Instructions().with_callee_function_name('verify').exec(1)for points in instructions[0].backward_df():print(points.source_code())# return the list of previous instructions of the current instructionreturn instructions
For the same contract, this query showcases that the return list elements are type-casted from Point:
from glider import*defquery():#fetch an instruction instructions =Instructions().with_callee_function_name('verify').exec(1)for points in instructions[0].backward_df():ifisinstance(points, Argument):print(points.name)print(points.source_code())# return the list of previous instructions of the current instructionreturn instructions