Skip to content

Commit

Permalink
Merge pull request #587 from viperproject/qi_profile
Browse files Browse the repository at this point in the history
Report quantifier instantiations
  • Loading branch information
fpoli authored Jan 20, 2022
2 parents 6049460 + 7aa97f1 commit 0f24cdd
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

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 0f24cdd

Please sign in to comment.