njit-jerse / specimin

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

Potential infinite loop when hitting a specific method #272

Closed jonathan-m-phillips closed 2 months ago

jonathan-m-phillips commented 2 months ago

Running ASHE on dryrun mode, we haven gotten hung up on the same method multiple times for hours. This makes me think there is an infinite loop when minimizing a specific method.

--outputDirectory "/my/temp/dir" --root "/my/root/checker-framework/framework/src/main/java" --targetFile "org/checkerframework/framework/util/typeinference8/types/AbstractType.java" --targetMethod "org.checkerframework.framework.util.typeinference8.types.AbstractType#getFunctionTypeParameterTypes()"

java.lang.RuntimeException: Unfound parent for this class: JavaExpression Caused by: UnsolvedSymbolException{context='mapList', name='CollectionsPlume.mapList(JavaExpression::fromNode, invocationNode.getArguments())', cause='null'}

That is the most consistent error, but there were two other times it appeared we hit an infinite loop at different methods: --outputDirectory "/my/temp/dir" --root "/my/root/checker-framework/framework/src/main/java" --targetFile "org/checkerframework/framework/util/Contract.java" --targetMethod "org.checkerframework.framework.util.Contract#viewpointAdaptDependentTypeAnnotation(GenericAnnotatedTypeFactory<?,?,?,?>, StringToJavaExpression, Tree)"

--outputDirectory "/my/temp/dir" --root "/my/root/checker-framework/dataflow/src/main/java" --targetFile "org/plumelib/util/ArrayMap.java" --targetMethod "org.plumelib.util.ArrayMap#newArrayMapOrLinkedHashMap(int)"

jonathan-m-phillips commented 2 months ago

--outputDirectory "/temp/dir" --root "/my/root/randoop/src/main/java" --targetFile "randoop/util/ClassFileConstants.java" --targetMethod "randoop.util.ClassFileConstants#main(String[])"

The above is another potential infinite loop I hit

jonathan-m-phillips commented 2 months ago

Another targeted method I found with an infinite loop: --outputDirectory "/temp/dir" --root "/my/root/randoop/src/main/java" --targetFile "randoop/output/PrimitiveAndWrappedTypeVarNameCollector.java" --targetMethod "randoop.output.PrimitiveAndWrappedTypeVarNameCollector#visit(VariableDeclarationExpr, Set<String>)"

If you would like me to create a new issue for this, please let me know.

kelloggm commented 2 months ago

If you would like me to create a new issue for this, please let me know.

Please do. This issue should have been closed when I merged #275.