Skip to content

Commit

Permalink
Do not convert negative steps.
Browse files Browse the repository at this point in the history
  These indicate some kind of proof failure, so they should not be scaled.
  • Loading branch information
Jellix committed Jul 19, 2020
1 parent 0b7c16f commit 4be1069
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/spat.adb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ package body SPAT is
function Scaled (Prover : in Prover_Name;
Raw_Steps : in Prover_Steps) return Prover_Steps is
begin
-- Especially with Z3, negative steps indicate a proof failure (i.e. out
-- of memory situation etc.), so if the input number is negative leave it
-- as is. At least I find it counterintuitive, that -1 would be
-- converted to +1 instead.
if Raw_Steps < 0 then
return Raw_Steps;
end if;

if
Ada.Strings.Unbounded.Index (Source => Subject_Name (Prover),
Pattern => "CVC4") = 1
Expand Down

0 comments on commit 4be1069

Please sign in to comment.