Description
When we find a call to an unknown runtime value with a FunctionType, we conservatively record effects (i.e. Effect.ANY):
|
if isinstance(func_ty, FunctionType): |
|
args, subst, inst = check_call(func_ty, node.args, ty, node, self.ctx, None) |
|
register_effects(self.ctx, [Effect.ANY]) # worst-case safe approximation |
|
if isinstance(ty, FunctionType): |
|
args, return_ty, inst = synthesize_call(ty, node.args, node, self.ctx, None) |
|
register_effects(self.ctx, [Effect.ANY]) # worst-case safe approximation |
...but we should also (or instead) record that such a call exists in the callgraph itself, so that any other analysis using the callgraph knows that the results of analysing that function may be unsound.
At first this can just be a bool flag "makes indirect calls", but we might refine this with more information later.
(We could make effects analysis use this flag too, avoiding the need to record the effects of the indirect call separately.)
2 * function-tensor calls similarly.
Motivation
No response
Scope
No response
Component
No response
Priority
None
Additional Context
No response
Description
When we find a call to an unknown runtime value with a FunctionType, we conservatively record effects (i.e.
Effect.ANY):guppylang/guppylang-internals/src/guppylang_internals/checker/expr_checker.py
Lines 405 to 407 in d217e9b
guppylang/guppylang-internals/src/guppylang_internals/checker/expr_checker.py
Lines 1145 to 1147 in d217e9b
...but we should also (or instead) record that such a call exists in the callgraph itself, so that any other analysis using the callgraph knows that the results of analysing that function may be unsound.
At first this can just be a bool flag "makes indirect calls", but we might refine this with more information later.
(We could make effects analysis use this flag too, avoiding the need to record the effects of the indirect call separately.)
2 * function-tensor calls similarly.
Motivation
No response
Scope
No response
Component
No response
Priority
None
Additional Context
No response