Skip to content

Commit 7a126a9

Browse files
committed
Report quantifier instantiations
1 parent b7bb9cc commit 7a126a9

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

silicon.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
set -e
66

7-
set -e
8-
9-
BASEDIR="$(realpath `dirname $0`)"
7+
BASEDIR="$(realpath "$(dirname "$0")")"
108

119
CP_FILE="$BASEDIR/silicon_classpath.txt"
1210

13-
if [ ! -f $CP_FILE ]; then
14-
(cd $BASEDIR; sbt "export runtime:dependencyClasspath" | tail -n1 > $CP_FILE)
11+
if [ ! -f "$CP_FILE" ]; then
12+
(cd "$BASEDIR"; sbt "export runtime:dependencyClasspath" | tail -n1 > "$CP_FILE")
1513
fi
1614

17-
exec java -Xss30M -Dlogback.configurationFile="$BASEDIR/src/main/resources/logback.xml" -cp "`cat $CP_FILE`" viper.silicon.SiliconRunner "$@"
15+
exec java -Xss30M -Dlogback.configurationFile="$BASEDIR/src/main/resources/logback.xml" -cp "$(cat "$CP_FILE")" viper.silicon.SiliconRunner "$@"

src/main/scala/decider/Z3ProverStdIO.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,15 @@ class Z3ProverStdIO(uniqueId: String,
425425
logger warn msg
426426
}
427427

428-
repeat = warning
428+
// When `smt.qi.profile` is `true`, Z3 periodically reports the quantifier instantiations using the format
429+
// `[quantifier_instances] "<quantifier_id>" : <instances> : <maximum generation> : <maximum cost>`.
430+
// See: https://github.com/Z3Prover/z3/issues/4522
431+
val qiProfile = result.startsWith("[quantifier_instances]")
432+
if (qiProfile) {
433+
logger info result
434+
}
435+
436+
repeat = warning || qiProfile
429437
}
430438

431439
result

0 commit comments

Comments
 (0)