StarExec
Would you like to react to this message? Create an account in a few clicks or log in to continue.

SMT postprocessor documentation

2 posters

Go down

SMT postprocessor documentation Empty SMT postprocessor documentation

Post by lianah Thu May 22, 2014 3:12 pm

Hi everyone,

I was using the SMT postprocessor (not the strict one) on a job running cvc4 with statistics on. The problem is I am sometimes getting unsat when the answer was sat and vice versa. I thought the postprocessor would just check the first line and ignore the rest of the output, but it seems it is doing something different. The reported status is "unsat" and the output looks something like this (from Starexec job 1404 https://www.starexec.org/starexec/secure/details/job.jsp?id=1404):

2.67/2.75 sat
2.67/2.75 expr::ExprManager::AND, 371
2.67/2.75 expr::ExprManager::APPLY, 4654
2.67/2.75 expr::ExprManager::BITVECTOR_AND, 384
....
2.67/2.76 driver::sat/unsat, sat
2.67/2.76 driver::totalTime, 2.746404727

2.67/2.76 EOF

Because the statistics output has as a sub-string sat/unsat the postprocessor is probably getting confused in some way. Would it be possible to see the source of the postprocessors or have a precise description of what they are doing?

Thank you,

Liana

lianah

Posts : 11
Join date : 2014-04-23

Back to top Go down

SMT postprocessor documentation Empty post-processors

Post by barrett42 Fri May 23, 2014 4:55 pm

Here is the code for the current post-processors.

First, for SMT2 results:

#!/bin/bash
# Aaron Stump
# A simple post processor for SMT.

if ( grep unsat $1 > /dev/null) then
echo "starexec-result=unsat";
elif ( grep sat $1 > /dev/null ) then
echo "starexec-result=sat";
elif ( grep unknown $1 > /dev/null ) then
echo "starexec-result=unknown";
else
echo "starexec-result=none";
fi





Next, for SMT2 results conserv:

#!/bin/bash

# Aaron Stump, Tjark Weber
# A simple post processor for SMT.

set -e
set -u

# if the output file ($1) does not contain the word "sat", set SAT to 0
SAT=1
grep -qsw sat "$1" || SAT=0

UNSAT=1
grep -qsw unsat "$1" || UNSAT=0
UNKNOWN=1
grep -qsw unknown "$1" || UNKNOWN=0

if [[ "$SAT" -eq 1 && "$UNSAT" -eq 0 && "$UNKNOWN" -eq 0 ]]; then
# the output contains only the word "sat"
echo "starexec-result=sat"
elif [[ "$SAT" -eq 0 && "$UNSAT" -eq 1 && "$UNKNOWN" -eq 0 ]]; then
# the output contains only the word "unsat"
echo "starexec-result=unsat"
elif [[ "$SAT" -eq 0 && "$UNSAT" -eq 0 && "$UNKNOWN" -eq 1 ]]; then
# the output contains only the word "unknown"
echo "starexec-result=unknown"
else
echo "starexec-result=none"
fi

barrett42

Posts : 19
Join date : 2014-04-30

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum