diff --git a/Auto/EvaluateAuto/TestAuto.lean b/Auto/EvaluateAuto/TestAuto.lean index 5b29b79..e8309a5 100644 --- a/Auto/EvaluateAuto/TestAuto.lean +++ b/Auto/EvaluateAuto/TestAuto.lean @@ -164,18 +164,18 @@ def readRunAutoOnConstsResult (resultFile : String) : CoreM (Array (Name × Resu where analyzeLine (fileName line : String) : CoreM (Name × Result × Nat × Nat) := do let line := (line.dropWhile (fun c => c != ' ')).drop 1 - let s := line.takeWhile (fun c => c != ' ') + let s := (line.takeWhile (fun c => c != ' ')).toString let .some res := Result.ofConcise? s | throwError s!"{decl_name%} :: In file {fileName}, {s} is not a concise representation of a `Result`" - let line := (line.dropWhile (fun c => c != ' ')).drop 1 - let s := line.takeWhile (fun c => c != ' ') + let line := ((line.dropWhile (fun c => c != ' ')).drop 1).toString + let s := (line.takeWhile (fun c => c != ' ')).toString let .some time := String.toNat? s | throwError s!"{decl_name%} :: In file {fileName}, {s} is not a string representation of a Nat" - let line := (line.dropWhile (fun c => c != ' ')).drop 1 - let s := line.takeWhile (fun c => c != ' ') + let line := ((line.dropWhile (fun c => c != ' ')).drop 1).toString + let s := (line.takeWhile (fun c => c != ' ')).toString let .some hb := String.toNat? s | throwError s!"{decl_name%} :: In file {fileName}, {s} is not a string representation of a Nat" - let line := (line.dropWhile (fun c => c != ' ')).drop 1 + let line := ((line.dropWhile (fun c => c != ' ')).drop 1).toString let name := Name.parseUniqRepr line return (name, res, time, hb) @@ -332,7 +332,7 @@ def readEATAResult (config : EvalAutoAsyncConfig) : let allFiles := (← System.FilePath.readDir resultFolder).map IO.FS.DirEntry.path let mut ret := #[] for file in allFiles do - if !(← System.FilePath.isDir file) && file.toString.takeRight 7 == ".result" then + if !(← System.FilePath.isDir file) && file.toString.takeEnd 7 == ".result" then ret := ret.append (← readRunAutoOnConstsResult file.toString) return ret diff --git a/Auto/EvaluateAuto/TestTactics.lean b/Auto/EvaluateAuto/TestTactics.lean index 9240817..73f49cb 100644 --- a/Auto/EvaluateAuto/TestTactics.lean +++ b/Auto/EvaluateAuto/TestTactics.lean @@ -335,14 +335,14 @@ def readEvalTacticsAtModuleResult (resultFile : String) : CoreM (Array (Name × where analyzeLine (fileName line : String) : CoreM (Name × Array (Result × Nat × Nat)) := do let line := (line.dropWhile (fun c => c != ' ')).drop 3 - let tr := (line.takeWhile (fun c => c != ']')).splitOn ", " - let tr : Array (Result × Nat × Nat) ← (Array.mk tr).mapM (fun s => do + let tr := ((line.takeWhile (fun c => c != ']')).split ", ").toStringArray + let tr : Array (Result × Nat × Nat) ← tr.mapM (fun s => do let [sr, st, sh] := s.splitOn " " | throwError "s!{decl_name%} :: In file {fileName}, {s} is not of the form `