Class FixedOrderMatchingStrategy
- java.lang.Object
-
- it.unive.lisa.program.language.resolution.FixedOrderMatchingStrategy
-
- All Implemented Interfaces:
ParameterMatchingStrategy
- Direct Known Subclasses:
JavaLikeMatchingStrategy
,RuntimeTypesMatchingStrategy
,StaticTypesMatchingStrategy
public abstract class FixedOrderMatchingStrategy extends java.lang.Object implements ParameterMatchingStrategy
A resolution strategy that does not permit by-name (e.g. Python style) parameter assignment that can shuffle parameters order.
-
-
Constructor Summary
Constructors Constructor Description FixedOrderMatchingStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
matches(Call call, int pos, Parameter formal, Expression actual, java.util.Set<Type> types)
Yieldstrue
if and only if the signature of thepos
-th parameter of a cfg is matched by the given actual parameter, according to this strategy.boolean
matches(Call call, Parameter[] formals, Expression[] actuals, java.util.Set<Type>[] types)
Yieldstrue
if and only if the parameter list of a cfg is matched by the given actual parameters, according to this strategy.
-
-
-
Method Detail
-
matches
public final boolean matches(Call call, Parameter[] formals, Expression[] actuals, java.util.Set<Type>[] types)
Description copied from interface:ParameterMatchingStrategy
Yieldstrue
if and only if the parameter list of a cfg is matched by the given actual parameters, according to this strategy.- Specified by:
matches
in interfaceParameterMatchingStrategy
- Parameters:
call
- the call where the parameters are being matchedformals
- the parameters definition of the cfgactuals
- the expression that are used as call parameterstypes
- the runtime types of the actual parameters- Returns:
true
if and only if that condition holds
-
matches
public abstract boolean matches(Call call, int pos, Parameter formal, Expression actual, java.util.Set<Type> types)
Yieldstrue
if and only if the signature of thepos
-th parameter of a cfg is matched by the given actual parameter, according to this strategy.- Parameters:
call
- the call where the parameters are being matchedpos
- the position of the parameter being evaluatedformal
- the parameter definition of the cfgactual
- the expression that is used as parametertypes
- the runtime types of the actual parameter- Returns:
true
if and only if that condition holds
-
-