Skip to content

Commit

Permalink
Report quantifier instantiations
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli committed Jan 19, 2022
1 parent b7bb9cc commit 7a126a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 4 additions & 6 deletions silicon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

set -e

set -e

BASEDIR="$(realpath `dirname $0`)"
BASEDIR="$(realpath "$(dirname "$0")")"

CP_FILE="$BASEDIR/silicon_classpath.txt"

if [ ! -f $CP_FILE ]; then
(cd $BASEDIR; sbt "export runtime:dependencyClasspath" | tail -n1 > $CP_FILE)
if [ ! -f "$CP_FILE" ]; then
(cd "$BASEDIR"; sbt "export runtime:dependencyClasspath" | tail -n1 > "$CP_FILE")
fi

exec java -Xss30M -Dlogback.configurationFile="$BASEDIR/src/main/resources/logback.xml" -cp "`cat $CP_FILE`" viper.silicon.SiliconRunner "$@"
exec java -Xss30M -Dlogback.configurationFile="$BASEDIR/src/main/resources/logback.xml" -cp "$(cat "$CP_FILE")" viper.silicon.SiliconRunner "$@"
10 changes: 9 additions & 1 deletion src/main/scala/decider/Z3ProverStdIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,15 @@ class Z3ProverStdIO(uniqueId: String,
logger warn msg
}

repeat = warning
// When `smt.qi.profile` is `true`, Z3 periodically reports the quantifier instantiations using the format
// `[quantifier_instances] "<quantifier_id>" : <instances> : <maximum generation> : <maximum cost>`.
// See: https://github.com/Z3Prover/z3/issues/4522
val qiProfile = result.startsWith("[quantifier_instances]")
if (qiProfile) {
logger info result
}

repeat = warning || qiProfile
}

result
Expand Down

0 comments on commit 7a126a9

Please sign in to comment.