File tree Expand file tree Collapse file tree 1 file changed +14
-20
lines changed Expand file tree Collapse file tree 1 file changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -45,29 +45,23 @@ pub enum ProveResult<'ctx> {
4545 Unknown ( ReasonUnknown ) ,
4646}
4747
48- /// Execute swine-z3 on the file located at file_path
48+ /// Execute swine on the file located at file_path
4949fn execute_swine ( file_path : & Path ) -> Result < SatResult , CommandError > {
50- match env:: var ( "SWINE" ) {
51- // Use "export SWINE=<path_for_swine>" to set the path for swine in the SWINE variable.
52- Ok ( swine) => {
53- let output = Command :: new ( swine) . arg ( file_path) . output ( ) ;
54-
55- match output {
56- Ok ( output) => {
57- let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
58-
59- if stdout. contains ( "unsat" ) {
60- Ok ( SatResult :: Unsat )
61- } else if stdout. contains ( "sat" ) {
62- Ok ( SatResult :: Sat )
63- } else {
64- Ok ( SatResult :: Unknown )
65- }
66- }
67- Err ( e) => Err ( CommandError :: ProcessError ( e) ) ,
50+ let output = Command :: new ( "swine" ) . arg ( file_path) . output ( ) ;
51+
52+ match output {
53+ Ok ( output) => {
54+ let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
55+
56+ if stdout. contains ( "unsat" ) {
57+ Ok ( SatResult :: Unsat )
58+ } else if stdout. contains ( "sat" ) {
59+ Ok ( SatResult :: Sat )
60+ } else {
61+ Ok ( SatResult :: Unknown )
6862 }
6963 }
70- Err ( e) => Err ( CommandError :: EnvVarError ( e) ) ,
64+ Err ( e) => Err ( CommandError :: ProcessError ( e) ) ,
7165 }
7266}
7367
You can’t perform that action at this time.
0 commit comments