6464import picocli .CommandLine .Command ;
6565import picocli .CommandLine .Option ;
6666
67+
68+ import static pascal .taie .language .type .BooleanType .BOOLEAN ;
69+ import static pascal .taie .language .type .ByteType .BYTE ;
70+ import static pascal .taie .language .type .CharType .CHAR ;
71+ import static pascal .taie .language .type .DoubleType .DOUBLE ;
72+ import static pascal .taie .language .type .FloatType .FLOAT ;
73+ import static pascal .taie .language .type .IntType .INT ;
74+ import static pascal .taie .language .type .LongType .LONG ;
75+ import static pascal .taie .language .type .ShortType .SHORT ;
76+ import static pascal .taie .language .type .VoidType .VOID ;
77+
6778/**
6879 * Option class for Tai-e.
6980 * We name this class in the plural to avoid name collision with {@link Option}.
@@ -701,6 +712,10 @@ private void addReflectionLogClasses() {
701712 List <String > inputClasses = new ArrayList <>(this .inputClasses );
702713 String path = analyses .get (PointerAnalysis .ID ).getString ("reflection-log" );
703714 if (path != null ) {
715+ Set <String > primitiveTypeNames = Set .of (
716+ BOOLEAN .getName (), BYTE .getName (), CHAR .getName (), SHORT .getName (),
717+ INT .getName (), LONG .getName (), FLOAT .getName (), DOUBLE .getName (),
718+ VOID .getName ());
704719 LogItem .load (path ).forEach (item -> {
705720 // add target class
706721 String target = item .target ;
@@ -711,9 +726,11 @@ private void addReflectionLogClasses() {
711726 targetClass = target ;
712727 }
713728 if (StringReps .isArrayType (targetClass )) {
714- targetClass = StringReps .getBaseTypeNameOf (target );
729+ targetClass = StringReps .getBaseTypeNameOf (targetClass );
730+ }
731+ if (!primitiveTypeNames .contains (targetClass )) {
732+ inputClasses .add (targetClass );
715733 }
716- inputClasses .add (targetClass );
717734 });
718735 }
719736 this .inputClasses = List .copyOf (inputClasses );
0 commit comments