Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F4818637
control-context-demandContext.lp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 23, 7:30 PM
Size
1 KB
Mime Type
text/plain
Expires
Tue, Aug 25, 7:30 PM (3 h, 36 m)
Engine
blob
Format
Raw Data
Handle
286597
Attached To
rXR Xreate
control-context-demandContext.lp
View Options
% context propagation
bind_scope_demand(Scope, FnCallee):- cfa_call(Scope, FnCallee), cfa_function_specializations(FnCallee, Context), not bind_scope(Scope, Context).
bind_scope_demand(Scope, Context):- bind_scope_demand(ScopeChild, Context), cfa_parent(ScopeChild, scope(Scope)).
bind_scope_demand(Scope, Context):- bind_function_demand(FnChild, Context), cfa_call(Scope, FnChild), not bind_scope(Scope, Context).
bind_function_demand(Fn, Context):- bind_scope_demand(Scope, Context), cfa_parent(Scope, function(Fn)).
bind_scope(Scope, Context) :- bind_scope(ScopeParent, Context), cfa_parent(Scope, scope(ScopeParent)).
bind_scope(Scope, Context) :- bind_scope(ScopeParent, Context): cfa_call(ScopeParent, FnCurrent); cfa_call(_, FnCurrent)
, cfa_parent(Scope, function(FnCurrent)), bind_scope(_, Context), scope(Scope).
% adhoc classes(unfinished):
%bind_func(Fn, adhoc_class(Context)) :- bind_func(Fn, adhoc(Context)), bind_scope(Scope, Context), cfa_parent(Scope, function(Fn)).
%scope_parent(Scope, ScopeParent) :- cfa_parent(Scope, scope(ScopeParent)).
%scope_parent(Scope, ScopeParent2) :- cfa_parent(Scope, scope(ScopeParent)), scope_parent(ScopeParent, ScopeParent2).
%scope_function(Scope, Fn) :- cfa_parent(Scope, function(Fn)).
%scope_function(Scope, Fn) :- cfa_parent(Scope, scope(ScopeParent)), scope_function(ScopeParent, Fn).
Event Timeline
Log In to Comment