Skip to content

what is the role of ParamProvider in EntryPoint and what are the principles for building a suitable ParamProvider? #141

Open
@galaxyzen

Description

@galaxyzen

📝 Overall Description

I want to specify some custom entry methods in the PTA analysis (I have to do this, because there is no main-class in my java project).
Fortunately, the issue#9 has explained how to add a custom entry method.

I think the key point is: solver.addEntryPoint(new EntryPoint(jmethod, paramProvider). But, what is the role of paramProvider in EntryPoint and what are the principles for building a suitable ParamProvider?

With the two above questions in mind, I read the source code:

/**
 * @param method    the entry method.
 * @param heapModel the model for generating mock objects.
 * @param k         level of field/array accesses. If this is not 0,
 *                  the provider generates objects recursively along
 *                  k field/array accesses.
 */
public DeclaredParamProvider(JMethod method, HeapModel heapModel, int k) {
    generateObjs(method, heapModel, k);
}
public static EmptyParamProvider get() {
    return INSTANCE;
}
// SpecifiedParamProvider.Builder
public Builder(JMethod method) {
    this.delegate = EmptyParamProvider.get();
    this.method = method;
    this.paramObjs = (Set<Obj>[]) new Set[method.getParamCount()];
    this.fieldObjs = Maps.newTwoKeyMultiMap();
    this.arrayObjs = Maps.newMultiMap();
}

There are 3 ParamProvider in the Tai-e, how should I choose which provider to use and how to construct the provider instance appropriately?

🎯 Expected Behavior

specify some custom entry methods with a suitable ParamProvider

🐛 Current Behavior

I am new to Tai-e, so I may need your help.

🔄 Reproducible Example

No response

⚙️ Tai-e Arguments

🔍 Click here to see Tai-e Options
{{The content of 'output/options.yml' file}}
🔍 Click here to see Tai-e Analysis Plan
{{The content of 'output/tai-e-plan.yml' file}}

📜 Tai-e Log

🔍 Click here to see Tai-e Log
{{The content of 'output/tai-e.log' file}}

ℹ️ Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions