tests1-context-latecontext3.lp
No OneTemporary

File Metadata

Created
Wed, Jul 8, 10:44 PM

tests1-context-latecontext3.lp

#include "context-latecontext3.lp".
function(a;b;r0; r1; sink; fnOut).
scope(0..5).
%CFA
cfa_parent(0, function(a)).
cfa_parent(1, function(b)).
cfa_parent(2, function(r0)).
cfa_parent(3, function(r1)).
cfa_parent(4, function(sink)).
cfa_parent(5, function(fnOut)).
cfa_function_specializations(fnOut, keys(keyA0)).
cfa_function_specializations(fnOut, keys(keyA1)).
cfa_function_specializations(fnOut, keys(keyB0)).
cfa_function_specializations(fnOut, keys(keyB1)).
cfa_call(0, r0).
cfa_call(0, r1).
cfa_call(1, r0).
cfa_call(1, r1).
cfa_call(2, sink).
cfa_call(3, sink).
cfa_call(4, fnOut).
%context rules
% r0: keyA->keyA0, keyB->keyB0
% r1: keyA->keyA1, keyB->keyB1
bind_scope(2, keys(keyA0), Info) :- bind_scope(2, keys(keyA), Info).
bind_scope(2, keys(keyB0), Info) :- bind_scope(2, keys(keyB), Info).
bind_scope(3, keys(keyA1), Info) :- bind_scope(3, keys(keyA), Info).
bind_scope(3, keys(keyB1), Info) :- bind_scope(3, keys(keyB), Info).
%initial context
keys(keyA; keyB; keyA0; keyA1; keyB0; keyB1).
bind_scope(0, keys(keyA), strong).
bind_scope(1, keys(keyB), strong).

Event Timeline