public class StaticDeterminacyContextSensitivityStrategy extends java.lang.Object implements IContextSensitivityStrategy
Constructor and Description |
---|
StaticDeterminacyContextSensitivityStrategy(SyntacticQueries syntacticInformation) |
public StaticDeterminacyContextSensitivityStrategy(SyntacticQueries syntacticInformation)
public HeapContext makeActivationAndArgumentsHeapContext(State state, ObjectLabel function, Value thisval, FunctionCalls.CallInfo callInfo, GenericSolver.SolverInterface c)
When a call or construct instruction creates a new activation object and a new arguments object, the abstract addresses of these objects obtain their context sensitivity valuation directly from the newly created callee context.
makeActivationAndArgumentsHeapContext
in interface IContextSensitivityStrategy
public HeapContext makeConstructorHeapContext(State state, ObjectLabel function, FunctionCalls.CallInfo callInfo, GenericSolver.SolverInterface c)
IContextSensitivityStrategy
makeConstructorHeapContext
in interface IContextSensitivityStrategy
public Context makeForInEntryContext(Context currentContext, BeginForInNode n, Value v)
IContextSensitivityStrategy
makeForInEntryContext
in interface IContextSensitivityStrategy
public Context makeFunctionEntryContext(State state, ObjectLabel function, FunctionCalls.CallInfo callInfo, Value thisval, GenericSolver.SolverInterface c)
When a transfer function creates a new context (t, a) at some call site, we select those parameters for inclusion in a whose abstract value is a concrete string (i.e., a known string in the String lattice) or a single object address (i.e., exactly one object allocation site).
makeFunctionEntryContext
in interface IContextSensitivityStrategy
public HeapContext makeFunctionHeapContext(Function function, GenericSolver.SolverInterface c)
When a declare-function instruction with source location n in some context (t, a, b, d) \in C creates a new function object, its abstract address is selected as (n, a, b, d) \in L; that is, the context sensitivity valuations a, b, and d are taken directly from the current context.
Reminder: `a` is parameters, `b` is the loop unrolling variables, `d` is the for-in unrolling registers
Major simplification (due to upcoming special-var removal): the function is allocated wrt. the current values of closure-variables. The closure variables must be "determinate" (string / single allocation site) or a valid loop variable.
NB; The capture of closure variables at allocation time might seem silly, since JavaScript semantics does not capture these values at allocation time. But it turns out that the values caught in this way keeps functions separate regardless.
makeFunctionHeapContext
in interface IContextSensitivityStrategy
public HeapContext makeHeapContext(AbstractNode location, ContextArguments arguments)
public Context makeInitialContext()
IContextSensitivityStrategy
makeInitialContext
in interface IContextSensitivityStrategy
public Context makeLoopExitContext(Context currentContext, EndLoopNode node)
IContextSensitivityStrategy
makeLoopExitContext
in interface IContextSensitivityStrategy
public Context makeNextLoopUnrollingContext(Context currentContext, BeginLoopNode node)
IContextSensitivityStrategy
makeNextLoopUnrollingContext
in interface IContextSensitivityStrategy
public HeapContext makeObjectLiteralHeapContext(AbstractNode node, State state)
For every object literal {p:v, ...} that is in a for-in loop or syntactically contains a function parameter that is present in the parameter sensitivity component of the current context, the abstract address of the object will be context sensitive in the same way as wrapper objects.
makeObjectLiteralHeapContext
in interface IContextSensitivityStrategy
public void requestContextSensitiveParameter(Function function, java.lang.String parameter)
IContextSensitivityStrategy
requestContextSensitiveParameter
in interface IContextSensitivityStrategy
Copyright © 2009-2019 Aarhus University