Regular Expressions 101

Community Patterns

Vampire proof formulas

0

Regular Expression
Python

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 - 2 years ago