kdrag.utils.pathmap

kdrag.utils.pathmap(function: Callable[[ExprRef], ExprRef], e: ExprRef, path: list[int] | None) ExprRef

Apply function at position in term >>> x,y,z = smt.Ints(ā€œx y zā€) >>> pathmap(lambda t: t + 1, x + y * z, [1,0]) x + (y + 1)*z

Parameters:
  • function (Callable[[ExprRef], ExprRef])

  • e (ExprRef)

  • path (list[int] | None)

Return type:

ExprRef