Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Parser

Tutorials

  • Building Language Front-Ends
  • Inside CodeAnalysis - How CodeStructure Parses C
  • Design and Compilation Strategy
  • Implementing the LaTeX Math Parser
  • MaTeX Comparison Showcase
  • The Parser Landscape - a Survey of What Exists Today
  • The Parser Zoo - language front-ends over a shared algebra
  • Parsing BNF Grammars (and bootstrapping a TPTP parser)
  • Parsing GrammarRules Locally
  • A Markdown Inline Parser in Parser Combinators
  • ParsingOpenQASM
  • Parsing TPTP, Auto-Generated from the Published BNF
  • PrattVsPEG
  • The Wolfram Box Typesetting Reference

Guides

  • Parsing in the Wolfram Language

Symbols

  • ASTAddSource
  • ASTAlgebra
  • ASTContainer
  • ASTLeafQ
  • ASTNodeQ
  • ASTStripSource
  • BinaryNode
  • BrainfuckAST
  • BrainfuckGrammar
  • BrainfuckRun
  • BrainfuckSemantic
  • CalculatorAST
  • CalculatorEval
  • CalculatorGrammar
  • CalculatorSemantic
  • CallNode
  • ContainerNode
  • EBNFParse
  • EBNFRules
  • ErrorNode
  • ExportLaTeX
  • GroupNode
  • InfixNode
  • JSONAST
  • JSONGrammar
  • JSONImport
  • JSONSemantic
  • LambdaAST
  • LambdaEval
  • LambdaGrammar
  • LambdaSemantic
  • LaTeXMathParse
  • LaTeXMathParser
  • LaTeXMathStyle
  • LeafNode
  • LispAST
  • LispGrammar
  • LispRead
  • LispSemantic
  • LispSymbol
  • MarkdownInlineParse
  • MarkdownInlineParser
  • MarkdownParse
  • MarkdownParser
  • ParseAction
  • ParseBetween
  • ParseChainLeft
  • ParseChainRight
  • ParseCharacter
  • ParseChoiceLongest
  • ParseChoice
  • ParseFail
  • ParseLiteral
  • ParseLookahead
  • ParseMany
  • Parse
  • ParseNotFollowedBy
  • ParseOperatorTable
  • ParseOptional
  • ParsePartial
  • ParsePosition
  • ParserCombinator
  • ParserCombinatorQ
  • ParserCompile
  • ParseRecursive
  • ParseRegex
  • ParseSepBy1
  • ParseSepBy
  • ParseSequence
  • ParseSome
  • ParseSucceed
  • ParseTry
  • PostfixNode
  • PrefixNode
  • RecCell
  • RecRef
  • SetRec
  • SpannedToken
  • TernaryNode
  • ToCodeParser
  • TPTPExport
  • TPTPImport

Overviews

  • WolframParser
Wolfram`Parser`
TPTPExport
​
TPTPExport
[derivation]
renders an SZS-output derivation
Association
back to SZS-framed TPTP text — the inverse of
TPTPImport
[source,"SZS"]
.
​
Details and Options
▪
derivation is an
Association
carrying a
"Derivation"
— a list of step records — and optional
"Status"
,
"Problem"
, and
"OutputForm"
framing keys. Each step is
Association
[{"Head","Name","Role","Formula","Rule","Status","Parents",…}]
, the record
TPTPImport
returns for each clause in
"SZS"
mode.
▪
The result is a
String
of SZS-framed TPTP text, one clause per line, ending in a newline.
▪
The
%SZSstatus…
line is emitted when
"Status"
is a string; the
%SZSoutputstart…
/
%SZSoutputend…
markers when
"OutputForm"
is a string.
"Problem"
supplies the trailing problem name and defaults to
unknown
.
▪
Each step renders as
head(name,role,formula,source).
.
▪
An inference step re-renders structurally from its
"Rule"
,
"Status"
, and
"Parents"
fields as
inference(rule,[status(...)],[parents])
; a missing status leaves an empty
[]
.
▪
Any other source — a
file(...)
axiom, an
introduced(...)
clause — is reproduced verbatim from the step's retained
"RawSource"
. A step with neither an inference rule nor a
"RawSource"
renders with no source annotation.
▪
Formula bodies re-render through the inverse of the
TPTPImport
action map:
Equal
/
Unequal
to
=
/
≠
,
Not
to
~
,
And
/
Or
to
&
/
|
,
Implies
to
=>
,
Equivalent
to
≤>
,
Xor
to
<~>
,
True
/
False
to
$true
/
$false
; a String-headed compound
"f"[a,b]
to
f(a,b)
and a nullary
"c"[]
to
c
. A compound subformula of a connective is parenthesized.
▪
A clause body the SZS reader kept as raw source text (one it does not lift to a Wolfram formula) is emitted unchanged.
▪
Round-trip: for a derivation obtained from
TPTPImport
,
TPTPImport
[TPTPExport[derivation],"SZS"]
reproduces it.
​
Examples  
(12)
Basic Examples  
(2)
Import a small SZS refutation, then render it back — the framing, the clauses, and the inference records all return:
In[1]:=
szsText="% SZS status Unsatisfiable for GRP001% SZS output start Refutation for GRP001cnf(left_id, axiom, mult(e, X) = X, file('GRP001.p', left_id)).cnf(goal, plain, mult(a, b) = c, inference(superposition, [status(thm)], [left_id])).cnf(bot, plain, $false, inference(cr, [status(thm)], [goal])).% SZS output end Refutation for GRP001";​​szs=
TPTPImport
[szsText,"SZS"];​​
TPTPExport
[szs]
Out[1]=
% SZS status Unsatisfiable for GRP001% SZS output start Refutation for GRP001cnf(left_id, axiom, mult(e, X) = X, file('GRP001.p', left_id)).cnf(goal, plain, mult(a, b) = c, inference(superposition, [status(thm)], [left_id])).cnf(bot, plain, $false, inference(cr, [status(thm)], [goal])).% SZS output end Refutation for GRP001
_________________________________________________________________________________________________________________
Because the reader captures every field the writer needs, an import followed by an export and re-import round-trips exactly:
In[1]:=
TPTPImport

TPTPExport
[szs],"SZS"["Derivation"]===szs["Derivation"]
Out[1]=
True
Scope  
(7)

Properties & Relations  
(1)

Possible Issues  
(2)

SeeAlso
TPTPImport
 
▪
EBNFParse
 
▪
Parse
 
▪
ParserCombinator
RelatedGuides
▪
WolframParser
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com