analyzer icon indicating copy to clipboard operation
analyzer copied to clipboard

First-Class Support for Callstring-derived Contexts

Open michael-schwarz opened this issue 1 year ago • 1 comments

After #1340 has landed, we might want to generalize our constraint system to support Callstring-like contexts in a more natural manner.

I think the only change would be to change

  val context : fundec -> D.t -> C.t

to

  val context : fundec -> fundec -> C.t -> D.t -> C.t

where the additonal fundec would be the caller fundec.

That should be sufficiently general to allow call-string style contexts without keeping the callstring in a flat lattice inside the domain.

michael-schwarz avatar Mar 02 '24 18:03 michael-schwarz

I haven't checked if this is possible, but maybe we could even add ctx to the arguments of context. That gives access to the caller node (and thus its fundec). But also queries, which maybe could also be beneficial to have access to?

sim642 avatar Mar 02 '24 19:03 sim642