Skip to content
Draft
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f4ad227
upgrade to latest versions
theron-wang Jul 11, 2025
924f0ee
Refactor without unsolved symbol generation
theron-wang Jul 15, 2025
7a4adf5
make SpeciminRunner runnable
theron-wang Jul 15, 2025
637200c
unsolved symbol generation part 1
theron-wang Jul 18, 2025
9d56bff
forgot to include changes to `Slicer`
theron-wang Jul 18, 2025
cd3e6f4
add type parameter support
theron-wang Jul 18, 2025
4d5caf0
add handling for conditionals + operator in type guessing
theron-wang Jul 21, 2025
26f11f7
some fixes + best effort output
theron-wang Jul 24, 2025
224e427
add deleted files
theron-wang Jul 24, 2025
706f4a4
make it build
theron-wang Jul 24, 2025
702e4e3
fix some bugs
theron-wang Jul 25, 2025
e5e905d
more bug fixes + test case updates
theron-wang Jul 28, 2025
c6b6da1
make requested changes + add docs
theron-wang Jul 29, 2025
14e0c4c
handle array types
theron-wang Jul 29, 2025
3518456
some more bug fixes
theron-wang Jul 30, 2025
78523a7
add ambiguity case for unsolved method calls in solvable method/const…
theron-wang Jul 30, 2025
354dd2b
make some changes
theron-wang Jul 31, 2025
d4472fa
make some more changes
theron-wang Jul 31, 2025
8ead882
make comment changes from yesterday's review
theron-wang Jul 31, 2025
ead3cd4
make some fixes
theron-wang Jul 31, 2025
4c837f6
make fixes
theron-wang Jul 31, 2025
81648d5
bug fixes + short review changes
theron-wang Aug 1, 2025
6e928e0
add support for type arguments
theron-wang Aug 4, 2025
c369d72
must implement methods and other fixes
theron-wang Aug 6, 2025
14871d9
pr review changes
theron-wang Aug 6, 2025
f26bd72
fix some bugs
theron-wang Aug 8, 2025
7a6fc1c
fix anonymous classes, override in synthetic types, pr changes, lambd…
theron-wang Aug 8, 2025
02a8153
stop crashing for cases with solvable lambda constraint types
theron-wang Aug 11, 2025
093e895
small fixes and add additional test cases based on #423
theron-wang Aug 13, 2025
e60e057
super type relationships + bug fixes
theron-wang Aug 14, 2025
07bc8ea
allow inheritance for bounded wildcards and other type arguments + ja…
theron-wang Aug 15, 2025
ece78bb
fix a few bugs
theron-wang Aug 15, 2025
ebd54b3
address pr comments and start adding method reference support
theron-wang Aug 19, 2025
379da54
method references
theron-wang Aug 22, 2025
af5fa76
bug fixes + javadoc
theron-wang Aug 22, 2025
7a50937
fix must implement methods
theron-wang Sep 1, 2025
20ee324
must implement methods should generate in unsolved class + private ou…
theron-wang Sep 23, 2025
10a36ee
Merge branch 'main' of https://github.com/njit-jerse/specimin into re…
theron-wang Nov 6, 2025
03ee823
include methods that are implemented but referenced by an abstract su…
theron-wang Nov 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 38 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.diffplug.spotless' version '6.25.0'
id 'org.checkerframework' version '0.6.49'
id("net.ltgt.errorprone") version "4.1.0"
id 'com.diffplug.spotless' version '7.1.0'
id 'org.checkerframework' version '0.6.56'
id 'net.ltgt.errorprone' version '4.3.0'
id 'com.adarshr.test-logger' version '4.0.0'
}

Expand All @@ -22,26 +22,28 @@ application {

dependencies {

implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.1'
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.27.0'

implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'

implementation "org.vineflower:vineflower:1.11.0"
implementation "org.vineflower:vineflower:1.11.1"

implementation 'commons-io:commons-io:2.18.0'
implementation 'commons-io:commons-io:2.19.0'

// Use JUnit test framework.
testImplementation 'junit:junit:4.13.2'

errorprone("com.google.errorprone:error_prone_core:2.35.1")
errorprone("com.google.errorprone:error_prone_core:2.40.0")

implementation 'com.google.googlejavaformat:google-java-format:1.28.0'
}

// Use require-javadoc. From https://github.com/plume-lib/require-javadoc.
configurations {
requireJavadoc
}
dependencies {
requireJavadoc "org.plumelib:require-javadoc:1.0.9"
requireJavadoc "org.plumelib:require-javadoc:2.0.0"
}
task requireJavadoc(type: JavaExec) {
group = 'Documentation'
Expand Down Expand Up @@ -73,14 +75,40 @@ task checkExpectedOutputCompilesFor(type: Exec) {
}
}

// needed for google-java-format: see https://github.com/google/google-java-format?tab=readme-ov-file#as-a-library
tasks.withType(JavaExec).configureEach {
jvmArgs += [
'--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
]
}

tasks.withType(Test).configureEach {
jvmArgs += [
'--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
]
}

tasks.compileJava {
// uncomment for testing
// options.errorprone.enabled = false
options.errorprone.disable(
// JavaParser's visitor design requires us to regularly violate this rule
"VoidUsed",
// Specimin should compile with Java 11, but this suggestion assumes Java 17
"PatternMatchingInstanceof")
"PatternMatchingInstanceof",
// Remove after refactor
"UnusedMethod",
"UnusedVariable")
}

tasks.compileTestJava {
Expand Down Expand Up @@ -113,7 +141,7 @@ spotless {

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces()
leadingTabsToSpaces()
endWithNewline()
}
java {
Expand Down
3 changes: 0 additions & 3 deletions check_differences/check_differences.bat
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ cd /D "%CURRENT_DIRECTORY%"
cd /D "%2" || exit /b 1
set "DIRECTORY_2=%cd%"

echo %DIRECTORY_1%
echo %DIRECTORY_2%

cd /D "%DIRECTORY_1%"
set DIR_1_STRUCTURE=
for /r %%i in (*) do (
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
*/

rootProject.name = 'specimin'
include('lib')
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.checkerframework.specimin;

import com.google.common.base.Ascii;

public enum AmbiguityResolutionPolicy {
All,
BestEffort,
InputCondition;

public static AmbiguityResolutionPolicy parse(String input) {
return switch (Ascii.toLowerCase(input)) {
case "all" -> AmbiguityResolutionPolicy.All;
case "best-effort" -> AmbiguityResolutionPolicy.BestEffort;
case "input-condition" -> AmbiguityResolutionPolicy.InputCondition;
default ->
throw new RuntimeException(
"Unsupported ambiguity resolution policy. Options are: \"all\", \"best-effort\","
+ " \"input-condition\"");
};
}
}
Loading
Loading