Regular Expressions 101

Vampire proof formulas

Open Workspace
  • Python
  • Match
0

Regular Expression

r"
^(?P<formula_id>\d+)\. (?P<formula>.+) \[(?P<inference_rule>[\w ]*)(?: (?P<inference_parents>[\d,]+))?\](?: \{(?P<extra>[\w,:-]*)\})?$
"
mg

Description

Parses the output of the automated theorem prover Vampire . Matches the output lines that contain the proof. Run vampire --proof on to generate a compatible string.

Submitted by Filip Bártek