Skip to content

Commit 63c732c

Browse files
committed
Merge remote-tracking branch 'opprop/master' into unit-benchmark
2 parents ba9018f + a5fed29 commit 63c732c

20 files changed

+131
-164
lines changed

.travis-build-without-test.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
echo "Entering checker-framework-inference/.travis-build-without-test.sh in" `pwd`
3+
echo Entering "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`
44

55
# Fail the whole script if any command fails
66
set -e
@@ -19,8 +19,11 @@ export CHECKERFRAMEWORK="${CHECKERFRAMEWORK:-$(pwd -P)/../checker-framework}"
1919

2020
export PATH=$AFU/scripts:$JAVA_HOME/bin:$PATH
2121

22-
git -C /tmp/plume-scripts pull > /dev/null 2>&1 \
23-
|| git -C /tmp clone --depth 1 -q https://github.com/plume-lib/plume-scripts.git
22+
if [ -d "/tmp/plume-scripts" ] ; then
23+
git -C /tmp/plume-scripts pull -q
24+
else
25+
git -C /tmp clone --depth 1 -q https://github.com/plume-lib/plume-scripts.git
26+
fi
2427

2528
## Build Checker Framework
2629
/tmp/plume-scripts/git-clone-related opprop checker-framework ${CHECKERFRAMEWORK}
@@ -29,6 +32,6 @@ git -C /tmp/plume-scripts pull > /dev/null 2>&1 \
2932
(cd $CHECKERFRAMEWORK && checker/bin-devel/build.sh downloadjdk jdk8)
3033

3134
# Finally build checker-framework-inference
32-
./gradlew dist
35+
./gradlew dist && ./gradlew testLibJar
3336

34-
echo "Exiting checker-framework-inference/.travis-build-without-test.sh in" `pwd`
37+
echo Exiting "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`

.travis-build.sh

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
echo "Entering checker-framework-inference/.travis-build.sh in" `pwd`
3+
echo Entering "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`
44

55
# Fail the whole script if any command fails
66
set -e
@@ -57,25 +57,38 @@ if [[ "${GROUP}" == downstream* && "${SLUGOWNER}" == "opprop" ]]; then
5757
echo "... done: ($COMMAND)"
5858
}
5959

60-
# Ontology test
6160
if [[ "${GROUP}" == "downstream-ontology" ]]; then
6261
ONTOLOGY_GIT=ontology
6362
ONTOLOGY_BRANCH=master
6463
ONTOLOGY_COMMAND="./gradlew build -x test && ./test-ontology.sh"
6564

65+
./gradlew testLibJar
66+
6667
clone_downstream $ONTOLOGY_GIT $ONTOLOGY_BRANCH
6768
test_downstream $ONTOLOGY_GIT $ONTOLOGY_COMMAND
6869
fi
6970

70-
# Units test
71-
if [[ "${GROUP}" == "downstream-units" ]]; then
72-
UNITS_GIT=units-inference
73-
UNITS_BRANCH=master
74-
UNITS_COMMAND="./gradlew build -x test && ./test-units.sh"
75-
76-
clone_downstream $UNITS_GIT $UNITS_BRANCH
77-
test_downstream $UNITS_GIT $UNITS_COMMAND
71+
# Units test (Skip for now)
72+
# if [[ "${GROUP}" == "downstream-units" ]]; then
73+
# UNITS_GIT=units-inference
74+
# UNITS_BRANCH=master
75+
# UNITS_COMMAND="./gradlew build -x test && ./test-units.sh"
76+
#
77+
# clone_downstream $UNITS_GIT $UNITS_BRANCH
78+
# test_downstream $UNITS_GIT $UNITS_COMMAND
79+
# fi
80+
81+
# Security Demo test
82+
if [[ "${GROUP}" == "downstream-security-demo" ]]; then
83+
SECURITY_GIT=security-demo
84+
SECURITY_BRANCH=master
85+
SECURITY_COMMAND="./gradlew build -x test && ./test-security.sh"
86+
87+
./gradlew testLibJar
88+
89+
clone_downstream $SECURITY_GIT $SECURITY_BRANCH
90+
test_downstream $SECURITY_GIT $SECURITY_COMMAND
7891
fi
7992
fi
8093

81-
echo "Exiting checker-framework-inference/.travis-build.sh in" `pwd`
94+
echo Exiting "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ env:
2323
- GROUP=cfi-tests
2424
- GROUP=downstream-ontology
2525
- GROUP=downstream-units
26+
- GROUP=downstream-security-demo
2627

2728
# This is essential lest the script is ignored and Travis just runs gradle.
2829
install: true
2930

3031
# The "docker run" command will pull if needed.
3132
# Running this first gives two tries in case of network lossage.
3233
before_script:
33-
- timeout 5m docker pull charleszhuochen/$OS-for-cfi-$JDKVER || true
34+
- timeout 5m docker pull xingweitian/$OS-for-cfi-$JDKVER || true
3435

3536
# The git commands are tried twice, in case of temporary network failure.
3637
# The fcntl line works around a bug where Travis truncates logs and fails.
@@ -51,7 +52,7 @@ script:
5152
- echo "TRAVIS_PULL_REQUEST_SLUG=${TRAVIS_PULL_REQUEST_SLUG}"
5253
- echo "TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG}"
5354
- >-
54-
docker run -v $HOME/.gradle:/root/.gradle -v $HOME/.m2:/root/.m2 charleszhuochen/$OS-for-cfi-$JDKVER /bin/bash -c "true &&
55+
docker run -v $HOME/.gradle:/root/.gradle -v $HOME/.m2:/root/.m2 xingweitian/$OS-for-cfi-$JDKVER /bin/bash -c "true &&
5556
if [ $TRAVIS_EVENT_TYPE = pull_request ] ; then
5657
git clone --quiet $REMOTE_ORIGIN_URL $THIS_REPO || git clone --quiet $REMOTE_ORIGIN_URL $THIS_REPO
5758
cd $THIS_REPO
@@ -78,7 +79,7 @@ script:
7879
export TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH} &&
7980
export TRAVIS_PULL_REQUEST_SLUG=${TRAVIS_PULL_REQUEST_SLUG} &&
8081
export TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG &&
81-
./.travis-build.sh"
82+
./.travis-build.sh ${GROUP}"
8283
8384
git:
8485
depth: 9

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dependencies {
5050
compile files("${checkerJar}")
5151
compile group: 'com.google.errorprone', name: 'javac', version: "$errorproneJavacVersion"
5252

53-
compile 'org.plumelib:options:1.0.3'
53+
compile 'org.plumelib:options:1.0.4'
5454
// Serialize constraints
5555
compile 'com.googlecode.json-simple:json-simple:1.1.1'
5656
// Pretty print serialized constraints
@@ -63,7 +63,7 @@ dependencies {
6363
testCompile fileTree(dir: "${checkerFrameworkPath}/framework-test/build/libs", include: "framework-test-*.jar")
6464
// Mocking library. Used in a couple tests
6565
testCompile 'org.mockito:mockito-all:2.0.2-beta'
66-
testCompile 'junit:junit:4.12'
66+
testCompile 'junit:junit:4.13'
6767
}
6868

6969
sourceSets {
@@ -261,6 +261,7 @@ task testCheckerInferenceDevScript(type: Exec, dependsOn: [dist, dependenciesJar
261261
args = ['--mode', 'INFER',
262262
'--checker', 'interning.InterningChecker',
263263
'--solver', 'checkers.inference.solver.MaxSat2TypeSolver',
264+
'--hacks=true',
264265
'testdata/interning/MapAssignment.java']
265266
}
266267

checker-framework-inference.iml

Lines changed: 0 additions & 102 deletions
This file was deleted.

gradle/wrapper/gradle-wrapper.jar

2.46 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
109125
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110126
fi
111127

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
128+
# For Cygwin or MSYS, switch paths to Windows format before running java
129+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116132
JAVACMD=`cygpath --unix "$JAVACMD"`
@@ -138,19 +154,19 @@ if $cygwin ; then
138154
else
139155
eval `echo args$i`="\"$arg\""
140156
fi
141-
i=$((i+1))
157+
i=`expr $i + 1`
142158
done
143159
case $i in
144-
(0) set -- ;;
145-
(1) set -- "$args0" ;;
146-
(2) set -- "$args0" "$args1" ;;
147-
(3) set -- "$args0" "$args1" "$args2" ;;
148-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
160+
0) set -- ;;
161+
1) set -- "$args0" ;;
162+
2) set -- "$args0" "$args1" ;;
163+
3) set -- "$args0" "$args1" "$args2" ;;
164+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154170
esac
155171
fi
156172

@@ -159,14 +175,9 @@ save () {
159175
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160176
echo " "
161177
}
162-
APP_ARGS=$(save "$@")
178+
APP_ARGS=`save "$@"`
163179

164180
# Collect all arguments for the java command, following the shell quoting and substitution rules
165181
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166182

167-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169-
cd "$(dirname "$0")"
170-
fi
171-
172183
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

src/checkers/inference/BaseInferrableChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void initChecker() {
3636
this.trees = trees;
3737

3838
this.messager = processingEnv.getMessager();
39-
this.messages = getMessages();
39+
this.messagesProperties = getMessagesProperties();
4040

4141
this.visitor = createVisitor(null, createRealTypeFactory(), false);
4242
}

0 commit comments

Comments
 (0)