njit-jerse / specimin

SPECIfication MINimizer. A different kind of slicer for Java.
MIT License
3 stars 5 forks source link

Update JavaParser #266

Closed LoiNguyenCS closed 5 months ago

LoiNguyenCS commented 5 months ago

Professor,

This is the PR to use the newest version of JavaParser.

The type variables collision test is failing. Here is the input file:

package org;

// This import isn't used.
import com.T;

public class Foo<T> {
    T useT(T t) {
        return t;
    }
}

It turns out that this new version of JavaParser confuses the T in useT to be com.T. I don't think this is a serious bug, since we will only end up with an extra file in the final output of Specimin. I am thinking of removing the type variables collision test since the new version of JavaParser can not discern those collisions properly anymore. Let me know what you think.

kelloggm commented 5 months ago

I don't think this is a serious bug, since we will only end up with an extra file in the final output of Specimin.

I agree that this is acceptable imprecision.

I am thinking of removing the type variables collision test

Rather than removing the test, I would prefer that we keep the test but change the expected output to the new behavior. We should add a comment indicating that the com.T usage isn't accurate, but that it's a limitation of JavaParser.

LoiNguyenCS commented 5 months ago

Professor,

I have added the explanations for the safety of casting ClassOrInterfaceType to ReferenceType and updated the test output for typevar-collision.

Please take a look. Thank you.