PrintTPTP.hs revision c3f7e132e0c214b755c6c4b485f4748c4dd1595c
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariModule : $Header$
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariDescription : Pretty printing for SPASS signatures in TPTP syntax.
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariCopyright : (c) Rene Wagner, Rainer Grabbe, Uni Bremen 2005-2006
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariMaintainer : rainer25@informatik.uni-bremen.de
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariStability : provisional
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariPortability : unknown
3980fec332f0cc3d65051ce86f11c357686ed784Daniel CalegariPretty printing for SoftFOL signatures in TPTP syntax.
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari Refer to <http://www.cs.miami.edu/~tptp/TPTP/SyntaxBNF.html>
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari for the TPTP syntax documentation.
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari-- | This type class allows pretty printing in TPTP syntax of instantiated data
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegariclass PrintTPTP a where
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari printTPTP :: a -> Doc
248bb54ca63b42c56eba7c6ccb11f92e9ff04f57Daniel Calegari Helper function. Generates a separating comment line.
248bb54ca63b42c56eba7c6ccb11f92e9ff04f57Daniel Calegariseparator :: String
248bb54ca63b42c56eba7c6ccb11f92e9ff04f57Daniel Calegariseparator = '%' : replicate 75 '-'
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegariinstance PrintTPTP Sign where
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari printTPTP = printTPTP . signToSPLogicalPart
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari Creates a Doc from a SoftFOL Problem.
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegariinstance PrintTPTP SPProblem where
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari printTPTP p = text separator
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari $+$ text "% Problem" <+> colon <+> text (identifier p)
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari $+$ printTPTP (description p)
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari $+$ vcat (map printTPTP $ settings p)
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari $+$ text separator
3980fec332f0cc3d65051ce86f11c357686ed784Daniel Calegari $+$ printTPTP (logicalPart p)