Reads the use_theories payload of an Isabelle server into SZS values.
Isabelle does not print SZS lines. Its result is a list of messages with
positions, and the verdict for a lemma is read from the messages at its position.
classify/1 treats every message as one bucket; per_lemma/3 buckets them by
the line range each lemma covers.
Verdict precedence
Within a bucket, the signals read from its messages are reconciled in this order, each step short-circuiting:
:counter_satisfiable— a Nitpick or Quickcheck counterexample disproves the goal and dominates any concurrent proof attempt.:theoremfrom a sledgehammer or metisfound a proofline.:satisfiable— a Nitpick or Quickcheck model.- A
Failed to finish prooforFailed to apply initial proof methoderror vetoes atheorem name:echo from the same bucket: Isabelle prints the goal at thebyposition whether or not the method closed it. :theoremfrom atheorem name:completion.:timeout,:memory_out, then:gave_up.
A bucket with no signal is :gave_up. Messages are read one at a time, never
across their concatenation: Nitpick found a model followed by Nitpick found no counterexample reads as a model, not as a counterexample.
Summary
Types
The verdict for one lemma, by name. The line number is not carried: it would refer to the generated theory, not to the caller's input.
One lemma of a generated theory body.
Functions
The verdict over every message of a finished use_theories task's result.
One verdict per lemma, in the order of specs.
Every message text in the payload, across all nodes, joined by newlines.
Types
@type lemma_result() :: %{name: String.t() | nil, status: Tptp.Szs.Ontology.t()}
The verdict for one lemma, by name. The line number is not carried: it would refer to the generated theory, not to the caller's input.
One lemma of a generated theory body.
name— the lemma's name as written in the body.range— the body lines the lemma covers, inclusive, from itslemmaline to the line before the next.
Functions
@spec classify(map()) :: Tptp.Szs.Ontology.t()
The verdict over every message of a finished use_theories task's result.
Reads messages, not the task's ok flag: a theory with "ok" => false still
classifies, with the proof-method veto keeping a goal echo from counting as a
proof.
@spec per_lemma(map(), [lemma_spec()], keyword()) :: [lemma_result()]
One verdict per lemma, in the order of specs.
Options
:file— keep only messages whosepos.fileends with this suffix, typically"/<theory_name>.thy", so messages from imported theories are left out.:line_offset— subtracted from each message'spos.linebefore it is compared with a range. A body wrapped in a one-line theory header passes1.
Every message text in the payload, across all nodes, joined by newlines.