class TAJSConcreteSemanticsForGeneralCalls
extends java.lang.Object
TAJSConcreteSemantics
which does the conversions between an abstract call and a concrete call.Constructor and Description |
---|
TAJSConcreteSemanticsForGeneralCalls(GenericSolver.SolverInterface c) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<NativeResult<ConcreteValue>> |
convertTAJSCall(Value vThis,
java.lang.String functionName,
int maxArguments,
FunctionCalls.CallInfo call)
Converts a call from inside TAJS to a concrete call, if possible.
|
java.util.Set<Value> |
convertTAJSCall(Value vThis,
java.lang.String functionName,
int maxArguments,
FunctionCalls.CallInfo call,
java.util.function.Supplier<Value> defaultBehavior)
Utility wrapper for
convertTAJSCall(Value, String, int, dk.brics.tajs.analysis.FunctionCalls.CallInfo) , in case of non-concrete state or call-failure, the supplied default behavior produces the return value. |
java.util.Set<NativeResult<ConcreteValue>> |
convertTAJSCallExplicit(Value vThis,
java.lang.String functionName,
java.util.List<Value> arguments)
Attempts to perform a native call.
|
java.util.Set<Value> |
convertTAJSCallExplicit(Value vThis,
java.lang.String functionName,
java.util.List<Value> arguments,
java.util.function.Supplier<Value> defaultBehavior)
Utility wrapper for
convertTAJSCallExplicit(Value, String, List) , in case of non-concrete state or call-failure, the supplied default value is returned. |
(package private) void |
makeSideEffects(Value abstractBefore,
ConcreteValue concreteAfter)
Applies side effects to objects by based on how their shape when the concrete semantics have been applied.
|
(package private) void |
makeSideEffects(Value base,
java.util.List<Value> arguments,
java.util.Optional<ConcreteApplyMapping> mapped)
Applies side effects to objects by based on how their shape when the concrete semantics have been applied.
|
public TAJSConcreteSemanticsForGeneralCalls(GenericSolver.SolverInterface c)
public java.util.Set<NativeResult<ConcreteValue>> convertTAJSCall(Value vThis, java.lang.String functionName, int maxArguments, FunctionCalls.CallInfo call)
Can always be called. Will return None if something goes wrong or is non-concrete.
It is the responsibility of the caller to have *registered* reads and coercions of the arguments, but the arguments should not be mutated.
If one of the read parameters is a boxed primitive, then a coercion is done to its primitive counterpart (once more).
vThis
- as the value to use as the 'this' object. Some functions do not use the this object, a concrete (undefined) value should be passed in that case.functionName
- as the full name of the function to call, e.g. String.prototype.slicemaxArguments
- as the maximal number of arguments to read from the argumentslistcall
- as the call which is convertedpublic java.util.Set<Value> convertTAJSCall(Value vThis, java.lang.String functionName, int maxArguments, FunctionCalls.CallInfo call, java.util.function.Supplier<Value> defaultBehavior)
convertTAJSCall(Value, String, int, dk.brics.tajs.analysis.FunctionCalls.CallInfo)
, in case of non-concrete state or call-failure, the supplied default behavior produces the return value.public java.util.Set<NativeResult<ConcreteValue>> convertTAJSCallExplicit(Value vThis, java.lang.String functionName, java.util.List<Value> arguments)
vThis
- the receiver of the callfunctionName
- the fully qualified name of the native functionarguments
- the list of argumentspublic java.util.Set<Value> convertTAJSCallExplicit(Value vThis, java.lang.String functionName, java.util.List<Value> arguments, java.util.function.Supplier<Value> defaultBehavior)
convertTAJSCallExplicit(Value, String, List)
, in case of non-concrete state or call-failure, the supplied default value is returned.void makeSideEffects(Value abstractBefore, ConcreteValue concreteAfter)
void makeSideEffects(Value base, java.util.List<Value> arguments, java.util.Optional<ConcreteApplyMapping> mapped)
Copyright © 2009-2019 Aarhus University