{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
{- |
Module      :  TPTP/ATC_TPTP.der.hs
Description :  generated ShATermConvertible, Json instances
Copyright   :  (c) DFKI GmbH 2012
License     :  GPLv2 or higher, see LICENSE.txt

Maintainer  :  Christian.Maeder@dfki.de
Stability   :  provisional
Portability :  non-portable(derive Typeable instances)

Automatic derivation of instances via DrIFT-rule ShATermConvertible, Json
  for the type(s):
'TPTP.AS.BASIC_SPEC'
'TPTP.AS.TPTP'
'TPTP.AS.TPTP_input'
'TPTP.AS.Comment'
'TPTP.AS.DefinedComment'
'TPTP.AS.SystemComment'
'TPTP.AS.Annotated_formula'
'TPTP.AS.TPI_annotated'
'TPTP.AS.THF_annotated'
'TPTP.AS.TFX_annotated'
'TPTP.AS.TFF_annotated'
'TPTP.AS.TCF_annotated'
'TPTP.AS.FOF_annotated'
'TPTP.AS.CNF_annotated'
'TPTP.AS.Annotations'
'TPTP.AS.Formula_role'
'TPTP.AS.THF_formula'
'TPTP.AS.THF_logic_formula'
'TPTP.AS.THF_binary_formula'
'TPTP.AS.THF_binary_pair'
'TPTP.AS.THF_binary_tuple'
'TPTP.AS.THF_unitary_formula'
'TPTP.AS.THF_quantified_formula'
'TPTP.AS.THF_quantification'
'TPTP.AS.THF_variable'
'TPTP.AS.THF_typed_variable'
'TPTP.AS.THF_unary_formula'
'TPTP.AS.THF_atom'
'TPTP.AS.THF_function'
'TPTP.AS.THF_conn_term'
'TPTP.AS.THF_conditional'
'TPTP.AS.THF_let'
'TPTP.AS.THF_let_defns'
'TPTP.AS.THF_let_defn'
'TPTP.AS.THF_let_quantified_defn'
'TPTP.AS.THF_let_plain_defn'
'TPTP.AS.THF_let_defn_LHS'
'TPTP.AS.THF_type_formula'
'TPTP.AS.THF_typeable_formula'
'TPTP.AS.THF_subtype'
'TPTP.AS.THF_top_level_type'
'TPTP.AS.THF_unitary_type'
'TPTP.AS.THF_binary_type'
'TPTP.AS.THF_sequent'
'TPTP.AS.THF_tuple'
'TPTP.AS.TFX_formula'
'TPTP.AS.TFX_logic_formula'
'TPTP.AS.TFF_formula'
'TPTP.AS.TFF_logic_formula'
'TPTP.AS.TFF_binary_formula'
'TPTP.AS.TFF_binary_nonassoc'
'TPTP.AS.TFF_binary_assoc'
'TPTP.AS.TFF_unitary_formula'
'TPTP.AS.TFF_quantified_formula'
'TPTP.AS.TFF_variable'
'TPTP.AS.TFF_typed_variable'
'TPTP.AS.TFF_unary_formula'
'TPTP.AS.TFF_conditional'
'TPTP.AS.TFF_let'
'TPTP.AS.TFF_let_term_defns'
'TPTP.AS.TFF_let_term_defn'
'TPTP.AS.TFF_let_term_binding'
'TPTP.AS.TFF_let_formula_defns'
'TPTP.AS.TFF_let_formula_defn'
'TPTP.AS.TFF_let_formula_binding'
'TPTP.AS.TFF_sequent'
'TPTP.AS.TFF_formula_tuple'
'TPTP.AS.TFF_typed_atom'
'TPTP.AS.TFF_subtype'
'TPTP.AS.TFF_top_level_type'
'TPTP.AS.TF1_quantified_type'
'TPTP.AS.TFF_monotype'
'TPTP.AS.TFF_unitary_type'
'TPTP.AS.TFF_atomic_type'
'TPTP.AS.TFF_mapping_type'
'TPTP.AS.TFF_xprod_type'
'TPTP.AS.TCF_formula'
'TPTP.AS.TCF_logic_formula'
'TPTP.AS.TCF_quantified_formula'
'TPTP.AS.FOF_formula'
'TPTP.AS.FOF_logic_formula'
'TPTP.AS.FOF_binary_formula'
'TPTP.AS.FOF_binary_nonassoc'
'TPTP.AS.FOF_binary_assoc'
'TPTP.AS.FOF_unitary_formula'
'TPTP.AS.FOF_quantified_formula'
'TPTP.AS.FOF_unary_formula'
'TPTP.AS.FOF_infix_unary'
'TPTP.AS.FOF_atomic_formula'
'TPTP.AS.FOF_plain_atomic_formula'
'TPTP.AS.FOF_defined_atomic_formula'
'TPTP.AS.FOF_defined_plain_formula'
'TPTP.AS.FOF_defined_infix_formula'
'TPTP.AS.FOF_system_atomic_formula'
'TPTP.AS.FOF_plain_term'
'TPTP.AS.FOF_defined_term'
'TPTP.AS.FOF_defined_atomic_term'
'TPTP.AS.FOF_defined_plain_term'
'TPTP.AS.FOF_system_term'
'TPTP.AS.FOF_term'
'TPTP.AS.FOF_function_term'
'TPTP.AS.TFF_conditional_term'
'TPTP.AS.TFF_let_term'
'TPTP.AS.FOF_sequent'
'TPTP.AS.FOF_formula_tuple'
'TPTP.AS.CNF_formula'
'TPTP.AS.Disjunction'
'TPTP.AS.Literal'
'TPTP.AS.THF_quantifier'
'TPTP.AS.TH1_quantifier'
'TPTP.AS.TH0_quantifier'
'TPTP.AS.THF_pair_connective'
'TPTP.AS.THF_unary_connective'
'TPTP.AS.TH1_unary_connective'
'TPTP.AS.FOF_quantifier'
'TPTP.AS.Binary_connective'
'TPTP.AS.Assoc_connective'
'TPTP.AS.Unary_connective'
'TPTP.AS.Defined_type'
'TPTP.AS.Atom'
'TPTP.AS.Untyped_atom'
'TPTP.AS.Defined_proposition'
'TPTP.AS.Defined_predicate'
'TPTP.AS.Defined_infix_pred'
'TPTP.AS.Defined_functor'
'TPTP.AS.Defined_term'
'TPTP.AS.Source'
'TPTP.AS.DAG_source'
'TPTP.AS.Inference_record'
'TPTP.AS.Parent_info'
'TPTP.AS.Internal_source'
'TPTP.AS.Intro_type'
'TPTP.AS.External_source'
'TPTP.AS.File_source'
'TPTP.AS.Theory'
'TPTP.AS.Theory_name'
'TPTP.AS.Creator_source'
'TPTP.AS.Useful_info'
'TPTP.AS.Info_item'
'TPTP.AS.Formula_item'
'TPTP.AS.Inference_item'
'TPTP.AS.Inference_status'
'TPTP.AS.Status_value'
'TPTP.AS.Inference_info'
'TPTP.AS.New_symbol_record'
'TPTP.AS.Principal_symbol'
'TPTP.AS.Include'
'TPTP.AS.General_term'
'TPTP.AS.General_data'
'TPTP.AS.General_function'
'TPTP.AS.Formula_data'
'TPTP.AS.Name'
'TPTP.AS.Number'
'TPTP.Sign.Symbol'
'TPTP.Sign.SymbolType'
'TPTP.Sign.THFTypeable'
'TPTP.Sign.FunctorType'
'TPTP.Sign.PredicateType'
'TPTP.Sign.Type_functorType'
'TPTP.Sign.Sign'
'TPTP.Sublogic.Sublogic'
-}

{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
  dependency files:
TPTP/AS.hs
TPTP/Sign.hs
TPTP/Sublogic.hs
-}

module TPTP.ATC_TPTP () where

import ATC.AS_Annotation
import ATerm.Lib
import Common.AS_Annotation (item)
import Common.DefaultMorphism
import Common.IRI
import Common.Id
import Common.Id as Id
import Common.Json.Instances
import Data.Aeson(ToJSON, FromJSON)
import Data.Data
import GHC.Generics(Generic)
import Syntax.AS_Structured ()
import TPTP.AS
import TPTP.Morphism
import TPTP.Sign
import TPTP.Sublogic
import qualified Common.AS_Annotation as AS_Anno
import qualified Data.Map as Map
import qualified Data.Set as Set

{-! for TPTP.AS.BASIC_SPEC derive : ShATermConvertible !-}
{-! for TPTP.AS.TPTP derive : ShATermConvertible !-}
{-! for TPTP.AS.TPTP_input derive : ShATermConvertible !-}
{-! for TPTP.AS.Comment derive : ShATermConvertible !-}
{-! for TPTP.AS.DefinedComment derive : ShATermConvertible !-}
{-! for TPTP.AS.SystemComment derive : ShATermConvertible !-}
{-! for TPTP.AS.Annotated_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TPI_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.TFX_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.TCF_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.CNF_annotated derive : ShATermConvertible !-}
{-! for TPTP.AS.Annotations derive : ShATermConvertible !-}
{-! for TPTP.AS.Formula_role derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_logic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_binary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_binary_pair derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_binary_tuple derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_unitary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_quantified_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_quantification derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_variable derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_typed_variable derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_unary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_atom derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_function derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_conn_term derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_conditional derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_let derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_let_defns derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_let_defn derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_let_quantified_defn derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_let_plain_defn derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_let_defn_LHS derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_type_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_typeable_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_subtype derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_top_level_type derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_unitary_type derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_binary_type derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_sequent derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_tuple derive : ShATermConvertible !-}
{-! for TPTP.AS.TFX_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFX_logic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_logic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_binary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_binary_nonassoc derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_binary_assoc derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_unitary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_quantified_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_variable derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_typed_variable derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_unary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_conditional derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_term_defns derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_term_defn derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_term_binding derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_formula_defns derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_formula_defn derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_formula_binding derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_sequent derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_formula_tuple derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_typed_atom derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_subtype derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_top_level_type derive : ShATermConvertible !-}
{-! for TPTP.AS.TF1_quantified_type derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_monotype derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_unitary_type derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_atomic_type derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_mapping_type derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_xprod_type derive : ShATermConvertible !-}
{-! for TPTP.AS.TCF_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TCF_logic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.TCF_quantified_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_logic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_binary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_binary_nonassoc derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_binary_assoc derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_unitary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_quantified_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_unary_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_infix_unary derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_atomic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_plain_atomic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_defined_atomic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_defined_plain_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_defined_infix_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_system_atomic_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_plain_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_defined_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_defined_atomic_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_defined_plain_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_system_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_function_term derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_conditional_term derive : ShATermConvertible !-}
{-! for TPTP.AS.TFF_let_term derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_sequent derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_formula_tuple derive : ShATermConvertible !-}
{-! for TPTP.AS.CNF_formula derive : ShATermConvertible !-}
{-! for TPTP.AS.Disjunction derive : ShATermConvertible !-}
{-! for TPTP.AS.Literal derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_quantifier derive : ShATermConvertible !-}
{-! for TPTP.AS.TH1_quantifier derive : ShATermConvertible !-}
{-! for TPTP.AS.TH0_quantifier derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_pair_connective derive : ShATermConvertible !-}
{-! for TPTP.AS.THF_unary_connective derive : ShATermConvertible !-}
{-! for TPTP.AS.TH1_unary_connective derive : ShATermConvertible !-}
{-! for TPTP.AS.FOF_quantifier derive : ShATermConvertible !-}
{-! for TPTP.AS.Binary_connective derive : ShATermConvertible !-}
{-! for TPTP.AS.Assoc_connective derive : ShATermConvertible !-}
{-! for TPTP.AS.Unary_connective derive : ShATermConvertible !-}
{-! for TPTP.AS.Defined_type derive : ShATermConvertible !-}
{-! for TPTP.AS.Atom derive : ShATermConvertible !-}
{-! for TPTP.AS.Untyped_atom derive : ShATermConvertible !-}
{-! for TPTP.AS.Defined_proposition derive : ShATermConvertible !-}
{-! for TPTP.AS.Defined_predicate derive : ShATermConvertible !-}
{-! for TPTP.AS.Defined_infix_pred derive : ShATermConvertible !-}
{-! for TPTP.AS.Defined_functor derive : ShATermConvertible !-}
{-! for TPTP.AS.Defined_term derive : ShATermConvertible !-}
{-! for TPTP.AS.Source derive : ShATermConvertible !-}
{-! for TPTP.AS.DAG_source derive : ShATermConvertible !-}
{-! for TPTP.AS.Inference_record derive : ShATermConvertible !-}
{-! for TPTP.AS.Parent_info derive : ShATermConvertible !-}
{-! for TPTP.AS.Internal_source derive : ShATermConvertible !-}
{-! for TPTP.AS.Intro_type derive : ShATermConvertible !-}
{-! for TPTP.AS.External_source derive : ShATermConvertible !-}
{-! for TPTP.AS.File_source derive : ShATermConvertible !-}
{-! for TPTP.AS.Theory derive : ShATermConvertible !-}
{-! for TPTP.AS.Theory_name derive : ShATermConvertible !-}
{-! for TPTP.AS.Creator_source derive : ShATermConvertible !-}
{-! for TPTP.AS.Useful_info derive : ShATermConvertible !-}
{-! for TPTP.AS.Info_item derive : ShATermConvertible !-}
{-! for TPTP.AS.Formula_item derive : ShATermConvertible !-}
{-! for TPTP.AS.Inference_item derive : ShATermConvertible !-}
{-! for TPTP.AS.Inference_status derive : ShATermConvertible !-}
{-! for TPTP.AS.Status_value derive : ShATermConvertible !-}
{-! for TPTP.AS.Inference_info derive : ShATermConvertible !-}
{-! for TPTP.AS.New_symbol_record derive : ShATermConvertible !-}
{-! for TPTP.AS.Principal_symbol derive : ShATermConvertible !-}
{-! for TPTP.AS.Include derive : ShATermConvertible !-}
{-! for TPTP.AS.General_term derive : ShATermConvertible !-}
{-! for TPTP.AS.General_data derive : ShATermConvertible !-}
{-! for TPTP.AS.General_function derive : ShATermConvertible !-}
{-! for TPTP.AS.Formula_data derive : ShATermConvertible !-}
{-! for TPTP.AS.Name derive : ShATermConvertible !-}
{-! for TPTP.AS.Number derive : ShATermConvertible !-}
{-! for TPTP.Sign.Symbol derive : ShATermConvertible !-}
{-! for TPTP.Sign.SymbolType derive : ShATermConvertible !-}
{-! for TPTP.Sign.THFTypeable derive : ShATermConvertible !-}
{-! for TPTP.Sign.FunctorType derive : ShATermConvertible !-}
{-! for TPTP.Sign.PredicateType derive : ShATermConvertible !-}
{-! for TPTP.Sign.Type_functorType derive : ShATermConvertible !-}
{-! for TPTP.Sign.Sign derive : ShATermConvertible !-}
{-! for TPTP.Sublogic.Sublogic derive : ShATermConvertible !-}

{-! for TPTP.AS.BASIC_SPEC derive : Json !-}
{-! for TPTP.AS.TPTP derive : Json !-}
{-! for TPTP.AS.TPTP_input derive : Json !-}
{-! for TPTP.AS.Comment derive : Json !-}
{-! for TPTP.AS.DefinedComment derive : Json !-}
{-! for TPTP.AS.SystemComment derive : Json !-}
{-! for TPTP.AS.Annotated_formula derive : Json !-}
{-! for TPTP.AS.TPI_annotated derive : Json !-}
{-! for TPTP.AS.THF_annotated derive : Json !-}
{-! for TPTP.AS.TFX_annotated derive : Json !-}
{-! for TPTP.AS.TFF_annotated derive : Json !-}
{-! for TPTP.AS.TCF_annotated derive : Json !-}
{-! for TPTP.AS.FOF_annotated derive : Json !-}
{-! for TPTP.AS.CNF_annotated derive : Json !-}
{-! for TPTP.AS.Annotations derive : Json !-}
{-! for TPTP.AS.Formula_role derive : Json !-}
{-! for TPTP.AS.THF_formula derive : Json !-}
{-! for TPTP.AS.THF_logic_formula derive : Json !-}
{-! for TPTP.AS.THF_binary_formula derive : Json !-}
{-! for TPTP.AS.THF_binary_pair derive : Json !-}
{-! for TPTP.AS.THF_binary_tuple derive : Json !-}
{-! for TPTP.AS.THF_unitary_formula derive : Json !-}
{-! for TPTP.AS.THF_quantified_formula derive : Json !-}
{-! for TPTP.AS.THF_quantification derive : Json !-}
{-! for TPTP.AS.THF_variable derive : Json !-}
{-! for TPTP.AS.THF_typed_variable derive : Json !-}
{-! for TPTP.AS.THF_unary_formula derive : Json !-}
{-! for TPTP.AS.THF_atom derive : Json !-}
{-! for TPTP.AS.THF_function derive : Json !-}
{-! for TPTP.AS.THF_conn_term derive : Json !-}
{-! for TPTP.AS.THF_conditional derive : Json !-}
{-! for TPTP.AS.THF_let derive : Json !-}
{-! for TPTP.AS.THF_let_defns derive : Json !-}
{-! for TPTP.AS.THF_let_defn derive : Json !-}
{-! for TPTP.AS.THF_let_quantified_defn derive : Json !-}
{-! for TPTP.AS.THF_let_plain_defn derive : Json !-}
{-! for TPTP.AS.THF_let_defn_LHS derive : Json !-}
{-! for TPTP.AS.THF_type_formula derive : Json !-}
{-! for TPTP.AS.THF_typeable_formula derive : Json !-}
{-! for TPTP.AS.THF_subtype derive : Json !-}
{-! for TPTP.AS.THF_top_level_type derive : Json !-}
{-! for TPTP.AS.THF_unitary_type derive : Json !-}
{-! for TPTP.AS.THF_binary_type derive : Json !-}
{-! for TPTP.AS.THF_sequent derive : Json !-}
{-! for TPTP.AS.THF_tuple derive : Json !-}
{-! for TPTP.AS.TFX_formula derive : Json !-}
{-! for TPTP.AS.TFX_logic_formula derive : Json !-}
{-! for TPTP.AS.TFF_formula derive : Json !-}
{-! for TPTP.AS.TFF_logic_formula derive : Json !-}
{-! for TPTP.AS.TFF_binary_formula derive : Json !-}
{-! for TPTP.AS.TFF_binary_nonassoc derive : Json !-}
{-! for TPTP.AS.TFF_binary_assoc derive : Json !-}
{-! for TPTP.AS.TFF_unitary_formula derive : Json !-}
{-! for TPTP.AS.TFF_quantified_formula derive : Json !-}
{-! for TPTP.AS.TFF_variable derive : Json !-}
{-! for TPTP.AS.TFF_typed_variable derive : Json !-}
{-! for TPTP.AS.TFF_unary_formula derive : Json !-}
{-! for TPTP.AS.TFF_conditional derive : Json !-}
{-! for TPTP.AS.TFF_let derive : Json !-}
{-! for TPTP.AS.TFF_let_term_defns derive : Json !-}
{-! for TPTP.AS.TFF_let_term_defn derive : Json !-}
{-! for TPTP.AS.TFF_let_term_binding derive : Json !-}
{-! for TPTP.AS.TFF_let_formula_defns derive : Json !-}
{-! for TPTP.AS.TFF_let_formula_defn derive : Json !-}
{-! for TPTP.AS.TFF_let_formula_binding derive : Json !-}
{-! for TPTP.AS.TFF_sequent derive : Json !-}
{-! for TPTP.AS.TFF_formula_tuple derive : Json !-}
{-! for TPTP.AS.TFF_typed_atom derive : Json !-}
{-! for TPTP.AS.TFF_subtype derive : Json !-}
{-! for TPTP.AS.TFF_top_level_type derive : Json !-}
{-! for TPTP.AS.TF1_quantified_type derive : Json !-}
{-! for TPTP.AS.TFF_monotype derive : Json !-}
{-! for TPTP.AS.TFF_unitary_type derive : Json !-}
{-! for TPTP.AS.TFF_atomic_type derive : Json !-}
{-! for TPTP.AS.TFF_mapping_type derive : Json !-}
{-! for TPTP.AS.TFF_xprod_type derive : Json !-}
{-! for TPTP.AS.TCF_formula derive : Json !-}
{-! for TPTP.AS.TCF_logic_formula derive : Json !-}
{-! for TPTP.AS.TCF_quantified_formula derive : Json !-}
{-! for TPTP.AS.FOF_formula derive : Json !-}
{-! for TPTP.AS.FOF_logic_formula derive : Json !-}
{-! for TPTP.AS.FOF_binary_formula derive : Json !-}
{-! for TPTP.AS.FOF_binary_nonassoc derive : Json !-}
{-! for TPTP.AS.FOF_binary_assoc derive : Json !-}
{-! for TPTP.AS.FOF_unitary_formula derive : Json !-}
{-! for TPTP.AS.FOF_quantified_formula derive : Json !-}
{-! for TPTP.AS.FOF_unary_formula derive : Json !-}
{-! for TPTP.AS.FOF_infix_unary derive : Json !-}
{-! for TPTP.AS.FOF_atomic_formula derive : Json !-}
{-! for TPTP.AS.FOF_plain_atomic_formula derive : Json !-}
{-! for TPTP.AS.FOF_defined_atomic_formula derive : Json !-}
{-! for TPTP.AS.FOF_defined_plain_formula derive : Json !-}
{-! for TPTP.AS.FOF_defined_infix_formula derive : Json !-}
{-! for TPTP.AS.FOF_system_atomic_formula derive : Json !-}
{-! for TPTP.AS.FOF_plain_term derive : Json !-}
{-! for TPTP.AS.FOF_defined_term derive : Json !-}
{-! for TPTP.AS.FOF_defined_atomic_term derive : Json !-}
{-! for TPTP.AS.FOF_defined_plain_term derive : Json !-}
{-! for TPTP.AS.FOF_system_term derive : Json !-}
{-! for TPTP.AS.FOF_term derive : Json !-}
{-! for TPTP.AS.FOF_function_term derive : Json !-}
{-! for TPTP.AS.TFF_conditional_term derive : Json !-}
{-! for TPTP.AS.TFF_let_term derive : Json !-}
{-! for TPTP.AS.FOF_sequent derive : Json !-}
{-! for TPTP.AS.FOF_formula_tuple derive : Json !-}
{-! for TPTP.AS.CNF_formula derive : Json !-}
{-! for TPTP.AS.Disjunction derive : Json !-}
{-! for TPTP.AS.Literal derive : Json !-}
{-! for TPTP.AS.THF_quantifier derive : Json !-}
{-! for TPTP.AS.TH1_quantifier derive : Json !-}
{-! for TPTP.AS.TH0_quantifier derive : Json !-}
{-! for TPTP.AS.THF_pair_connective derive : Json !-}
{-! for TPTP.AS.THF_unary_connective derive : Json !-}
{-! for TPTP.AS.TH1_unary_connective derive : Json !-}
{-! for TPTP.AS.FOF_quantifier derive : Json !-}
{-! for TPTP.AS.Binary_connective derive : Json !-}
{-! for TPTP.AS.Assoc_connective derive : Json !-}
{-! for TPTP.AS.Unary_connective derive : Json !-}
{-! for TPTP.AS.Defined_type derive : Json !-}
{-! for TPTP.AS.Atom derive : Json !-}
{-! for TPTP.AS.Untyped_atom derive : Json !-}
{-! for TPTP.AS.Defined_proposition derive : Json !-}
{-! for TPTP.AS.Defined_predicate derive : Json !-}
{-! for TPTP.AS.Defined_infix_pred derive : Json !-}
{-! for TPTP.AS.Defined_functor derive : Json !-}
{-! for TPTP.AS.Defined_term derive : Json !-}
{-! for TPTP.AS.Source derive : Json !-}
{-! for TPTP.AS.DAG_source derive : Json !-}
{-! for TPTP.AS.Inference_record derive : Json !-}
{-! for TPTP.AS.Parent_info derive : Json !-}
{-! for TPTP.AS.Internal_source derive : Json !-}
{-! for TPTP.AS.Intro_type derive : Json !-}
{-! for TPTP.AS.External_source derive : Json !-}
{-! for TPTP.AS.File_source derive : Json !-}
{-! for TPTP.AS.Theory derive : Json !-}
{-! for TPTP.AS.Theory_name derive : Json !-}
{-! for TPTP.AS.Creator_source derive : Json !-}
{-! for TPTP.AS.Useful_info derive : Json !-}
{-! for TPTP.AS.Info_item derive : Json !-}
{-! for TPTP.AS.Formula_item derive : Json !-}
{-! for TPTP.AS.Inference_item derive : Json !-}
{-! for TPTP.AS.Inference_status derive : Json !-}
{-! for TPTP.AS.Status_value derive : Json !-}
{-! for TPTP.AS.Inference_info derive : Json !-}
{-! for TPTP.AS.New_symbol_record derive : Json !-}
{-! for TPTP.AS.Principal_symbol derive : Json !-}
{-! for TPTP.AS.Include derive : Json !-}
{-! for TPTP.AS.General_term derive : Json !-}
{-! for TPTP.AS.General_data derive : Json !-}
{-! for TPTP.AS.General_function derive : Json !-}
{-! for TPTP.AS.Formula_data derive : Json !-}
{-! for TPTP.AS.Name derive : Json !-}
{-! for TPTP.AS.Number derive : Json !-}
{-! for TPTP.Sign.Symbol derive : Json !-}
{-! for TPTP.Sign.SymbolType derive : Json !-}
{-! for TPTP.Sign.THFTypeable derive : Json !-}
{-! for TPTP.Sign.FunctorType derive : Json !-}
{-! for TPTP.Sign.PredicateType derive : Json !-}
{-! for TPTP.Sign.Type_functorType derive : Json !-}
{-! for TPTP.Sign.Sign derive : Json !-}
{-! for TPTP.Sublogic.Sublogic derive : Json !-}

-- Generated by DrIFT, look but don't touch!

instance ShATermConvertible TPTP.AS.BASIC_SPEC where
  toShATermAux :: ATermTable -> BASIC_SPEC -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: BASIC_SPEC
xv = case BASIC_SPEC
xv of
    Basic_spec a :: [Annoted TPTP]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted TPTP] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annoted TPTP]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Basic_spec" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, BASIC_SPEC)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Basic_spec" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [Annoted TPTP])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annoted TPTP]
a') ->
      (ATermTable
att1, [Annoted TPTP] -> BASIC_SPEC
Basic_spec [Annoted TPTP]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, BASIC_SPEC)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.BASIC_SPEC" ShATerm
u

instance ShATermConvertible TPTP.AS.TPTP where
  toShATermAux :: ATermTable -> TPTP -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TPTP
xv = case TPTP
xv of
    TPTP a :: [TPTP_input]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [TPTP_input] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [TPTP_input]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TPTP)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TPTP" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [TPTP_input])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [TPTP_input]
a') ->
      (ATermTable
att1, [TPTP_input] -> TPTP
TPTP [TPTP_input]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TPTP)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TPTP" ShATerm
u

instance ShATermConvertible TPTP.AS.TPTP_input where
  toShATermAux :: ATermTable -> TPTP_input -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TPTP_input
xv = case TPTP_input
xv of
    Annotated_formula a :: Annotated_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annotated_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Annotated_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Annotated_formula" [Int
a'] []) ATermTable
att1
    TPTP_include a :: Include
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Include -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Include
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP_include" [Int
a'] []) ATermTable
att1
    TPTP_comment a :: Comment
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Comment -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Comment
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP_comment" [Int
a'] []) ATermTable
att1
    TPTP_defined_comment a :: DefinedComment
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedComment -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedComment
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP_defined_comment" [Int
a'] []) ATermTable
att1
    TPTP_system_comment a :: SystemComment
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SystemComment -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SystemComment
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP_system_comment" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TPTP_input)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Annotated_formula" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Annotated_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Annotated_formula
a') ->
      (ATermTable
att1, Annotated_formula -> TPTP_input
Annotated_formula Annotated_formula
a') }
    ShAAppl "TPTP_include" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Include)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Include
a') ->
      (ATermTable
att1, Include -> TPTP_input
TPTP_include Include
a') }
    ShAAppl "TPTP_comment" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Comment)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Comment
a') ->
      (ATermTable
att1, Comment -> TPTP_input
TPTP_comment Comment
a') }
    ShAAppl "TPTP_defined_comment" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DefinedComment)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DefinedComment
a') ->
      (ATermTable
att1, DefinedComment -> TPTP_input
TPTP_defined_comment DefinedComment
a') }
    ShAAppl "TPTP_system_comment" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, SystemComment)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: SystemComment
a') ->
      (ATermTable
att1, SystemComment -> TPTP_input
TPTP_system_comment SystemComment
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TPTP_input)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TPTP_input" ShATerm
u

instance ShATermConvertible TPTP.AS.Comment where
  toShATermAux :: ATermTable -> Comment -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Comment
xv = case Comment
xv of
    Comment_line a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Comment_line" [Int
a'] []) ATermTable
att1
    Comment_block a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Comment_block" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Comment)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Comment_line" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Comment
Comment_line Token
a') }
    ShAAppl "Comment_block" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Comment
Comment_block Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Comment)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Comment" ShATerm
u

instance ShATermConvertible TPTP.AS.DefinedComment where
  toShATermAux :: ATermTable -> DefinedComment -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedComment
xv = case DefinedComment
xv of
    Defined_comment_line a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Defined_comment_line" [Int
a'] []) ATermTable
att1
    Defined_comment_block a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Defined_comment_block" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedComment)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Defined_comment_line" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> DefinedComment
Defined_comment_line Token
a') }
    ShAAppl "Defined_comment_block" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> DefinedComment
Defined_comment_block Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedComment)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.DefinedComment" ShATerm
u

instance ShATermConvertible TPTP.AS.SystemComment where
  toShATermAux :: ATermTable -> SystemComment -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SystemComment
xv = case SystemComment
xv of
    System_comment_line a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "System_comment_line" [Int
a'] []) ATermTable
att1
    System_comment_block a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "System_comment_block" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SystemComment)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "System_comment_line" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> SystemComment
System_comment_line Token
a') }
    ShAAppl "System_comment_block" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> SystemComment
System_comment_block Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SystemComment)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.SystemComment" ShATerm
u

instance ShATermConvertible TPTP.AS.Annotated_formula where
  toShATermAux :: ATermTable -> Annotated_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annotated_formula
xv = case Annotated_formula
xv of
    AF_THF_Annotated a :: THF_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_THF_Annotated" [Int
a'] []) ATermTable
att1
    AF_TFX_Annotated a :: TFX_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFX_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFX_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_TFX_Annotated" [Int
a'] []) ATermTable
att1
    AF_TFF_Annotated a :: TFF_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_TFF_Annotated" [Int
a'] []) ATermTable
att1
    AF_TCF_Annotated a :: TCF_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TCF_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TCF_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_TCF_Annotated" [Int
a'] []) ATermTable
att1
    AF_FOF_Annotated a :: FOF_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_FOF_Annotated" [Int
a'] []) ATermTable
att1
    AF_CNF_Annotated a :: CNF_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CNF_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CNF_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_CNF_Annotated" [Int
a'] []) ATermTable
att1
    AF_TPI_Annotated a :: TPI_annotated
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TPI_annotated -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TPI_annotated
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AF_TPI_Annotated" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annotated_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AF_THF_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_annotated
a') ->
      (ATermTable
att1, THF_annotated -> Annotated_formula
AF_THF_Annotated THF_annotated
a') }
    ShAAppl "AF_TFX_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFX_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFX_annotated
a') ->
      (ATermTable
att1, TFX_annotated -> Annotated_formula
AF_TFX_Annotated TFX_annotated
a') }
    ShAAppl "AF_TFF_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_annotated
a') ->
      (ATermTable
att1, TFF_annotated -> Annotated_formula
AF_TFF_Annotated TFF_annotated
a') }
    ShAAppl "AF_TCF_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TCF_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TCF_annotated
a') ->
      (ATermTable
att1, TCF_annotated -> Annotated_formula
AF_TCF_Annotated TCF_annotated
a') }
    ShAAppl "AF_FOF_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_annotated
a') ->
      (ATermTable
att1, FOF_annotated -> Annotated_formula
AF_FOF_Annotated FOF_annotated
a') }
    ShAAppl "AF_CNF_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, CNF_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CNF_annotated
a') ->
      (ATermTable
att1, CNF_annotated -> Annotated_formula
AF_CNF_Annotated CNF_annotated
a') }
    ShAAppl "AF_TPI_Annotated" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TPI_annotated)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TPI_annotated
a') ->
      (ATermTable
att1, TPI_annotated -> Annotated_formula
AF_TPI_Annotated TPI_annotated
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annotated_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Annotated_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TPI_annotated where
  toShATermAux :: ATermTable -> TPI_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TPI_annotated
xv = case TPI_annotated
xv of
    TPI_annotated a :: Name
a b :: Formula_role
b c :: FOF_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> FOF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 FOF_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPI_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TPI_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TPI_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, FOF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: FOF_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> FOF_formula -> Annotations -> TPI_annotated
TPI_annotated Name
a' Formula_role
b' FOF_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TPI_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TPI_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_annotated where
  toShATermAux :: ATermTable -> THF_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_annotated
xv = case THF_annotated
xv of
    THF_annotated a :: Name
a b :: Formula_role
b c :: THF_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THF_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, THF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: THF_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> THF_formula -> Annotations -> THF_annotated
THF_annotated Name
a' Formula_role
b' THF_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.TFX_annotated where
  toShATermAux :: ATermTable -> TFX_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFX_annotated
xv = case TFX_annotated
xv of
    TFX_annotated a :: Name
a b :: Formula_role
b c :: TFX_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TFX_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TFX_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFX_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFX_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFX_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, TFX_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: TFX_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> TFX_formula -> Annotations -> TFX_annotated
TFX_annotated Name
a' Formula_role
b' TFX_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFX_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFX_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_annotated where
  toShATermAux :: ATermTable -> TFF_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_annotated
xv = case TFF_annotated
xv of
    TFF_annotated a :: Name
a b :: Formula_role
b c :: TFF_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TFF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TFF_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, TFF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: TFF_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> TFF_formula -> Annotations -> TFF_annotated
TFF_annotated Name
a' Formula_role
b' TFF_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.TCF_annotated where
  toShATermAux :: ATermTable -> TCF_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TCF_annotated
xv = case TCF_annotated
xv of
    TCF_annotated a :: Name
a b :: Formula_role
b c :: TCF_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TCF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TCF_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCF_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TCF_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TCF_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, TCF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: TCF_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> TCF_formula -> Annotations -> TCF_annotated
TCF_annotated Name
a' Formula_role
b' TCF_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TCF_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TCF_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_annotated where
  toShATermAux :: ATermTable -> FOF_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_annotated
xv = case FOF_annotated
xv of
    FOF_annotated a :: Name
a b :: Formula_role
b c :: FOF_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> FOF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 FOF_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, FOF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: FOF_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> FOF_formula -> Annotations -> FOF_annotated
FOF_annotated Name
a' Formula_role
b' FOF_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.CNF_annotated where
  toShATermAux :: ATermTable -> CNF_annotated -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CNF_annotated
xv = case CNF_annotated
xv of
    CNF_annotated a :: Name
a b :: Formula_role
b c :: CNF_formula
c d :: Annotations
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_role -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_role
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> CNF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 CNF_formula
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annotations -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Annotations
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CNF_annotated" [Int
a', Int
b', Int
c',
                                                  Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CNF_annotated)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CNF_annotated" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_role)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_role
b') ->
      case Int -> ATermTable -> (ATermTable, CNF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: CNF_formula
c') ->
      case Int -> ATermTable -> (ATermTable, Annotations)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Annotations
d') ->
      (ATermTable
att4, Name -> Formula_role -> CNF_formula -> Annotations -> CNF_annotated
CNF_annotated Name
a' Formula_role
b' CNF_formula
c' Annotations
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CNF_annotated)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.CNF_annotated" ShATerm
u

instance ShATermConvertible TPTP.AS.Annotations where
  toShATermAux :: ATermTable -> Annotations -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annotations
xv = case Annotations
xv of
    Annotations a :: Maybe (Source, Optional_info)
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Maybe (Source, Optional_info) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Maybe (Source, Optional_info)
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Annotations" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annotations)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Annotations" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Maybe (Source, Optional_info))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Maybe (Source, Optional_info)
a') ->
      (ATermTable
att1, Maybe (Source, Optional_info) -> Annotations
Annotations Maybe (Source, Optional_info)
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annotations)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Annotations" ShATerm
u

instance ShATermConvertible TPTP.AS.Formula_role where
  toShATermAux :: ATermTable -> Formula_role -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Formula_role
xv = case Formula_role
xv of
    Axiom -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Axiom" [] []) ATermTable
att0
    Hypothesis -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Hypothesis" [] []) ATermTable
att0
    Definition -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Definition" [] []) ATermTable
att0
    Assumption -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Assumption" [] []) ATermTable
att0
    Lemma -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Lemma" [] []) ATermTable
att0
    Theorem -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Theorem" [] []) ATermTable
att0
    Corollary -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Corollary" [] []) ATermTable
att0
    Conjecture -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Conjecture" [] []) ATermTable
att0
    Negated_conjecture ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Negated_conjecture" [] []) ATermTable
att0
    Plain -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Plain" [] []) ATermTable
att0
    Type -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Type" [] []) ATermTable
att0
    Fi_domain -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Fi_domain" [] []) ATermTable
att0
    Fi_functors -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Fi_functors" [] []) ATermTable
att0
    Fi_predicates -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Fi_predicates" [] []) ATermTable
att0
    Unknown -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Unknown" [] []) ATermTable
att0
    Other_formula_role a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Other_formula_role" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Formula_role)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Axiom" [] _ -> (ATermTable
att0, Formula_role
Axiom)
    ShAAppl "Hypothesis" [] _ -> (ATermTable
att0, Formula_role
Hypothesis)
    ShAAppl "Definition" [] _ -> (ATermTable
att0, Formula_role
Definition)
    ShAAppl "Assumption" [] _ -> (ATermTable
att0, Formula_role
Assumption)
    ShAAppl "Lemma" [] _ -> (ATermTable
att0, Formula_role
Lemma)
    ShAAppl "Theorem" [] _ -> (ATermTable
att0, Formula_role
Theorem)
    ShAAppl "Corollary" [] _ -> (ATermTable
att0, Formula_role
Corollary)
    ShAAppl "Conjecture" [] _ -> (ATermTable
att0, Formula_role
Conjecture)
    ShAAppl "Negated_conjecture" [] _ -> (ATermTable
att0, Formula_role
Negated_conjecture)
    ShAAppl "Plain" [] _ -> (ATermTable
att0, Formula_role
Plain)
    ShAAppl "Type" [] _ -> (ATermTable
att0, Formula_role
Type)
    ShAAppl "Fi_domain" [] _ -> (ATermTable
att0, Formula_role
Fi_domain)
    ShAAppl "Fi_functors" [] _ -> (ATermTable
att0, Formula_role
Fi_functors)
    ShAAppl "Fi_predicates" [] _ -> (ATermTable
att0, Formula_role
Fi_predicates)
    ShAAppl "Unknown" [] _ -> (ATermTable
att0, Formula_role
Unknown)
    ShAAppl "Other_formula_role" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Formula_role
Other_formula_role Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Formula_role)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Formula_role" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_formula where
  toShATermAux :: ATermTable -> THF_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_formula
xv = case THF_formula
xv of
    THFF_logic a :: THF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFF_logic" [Int
a'] []) ATermTable
att1
    THFF_sequent a :: THF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFF_sequent" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_logic_formula
a') ->
      (ATermTable
att1, THF_logic_formula -> THF_formula
THFF_logic THF_logic_formula
a') }
    ShAAppl "THFF_sequent" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_sequent
a') ->
      (ATermTable
att1, THF_sequent -> THF_formula
THFF_sequent THF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_logic_formula where
  toShATermAux :: ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_logic_formula
xv = case THF_logic_formula
xv of
    THFLF_binary a :: THF_binary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_binary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_binary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLF_binary" [Int
a'] []) ATermTable
att1
    THFLF_unitary a :: THF_unitary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unitary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLF_unitary" [Int
a'] []) ATermTable
att1
    THFLF_type a :: THF_type_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_type_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_type_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLF_type" [Int
a'] []) ATermTable
att1
    THFLF_subtype a :: THF_subtype
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_subtype -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_subtype
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLF_subtype" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_logic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFLF_binary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_binary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_binary_formula
a') ->
      (ATermTable
att1, THF_binary_formula -> THF_logic_formula
THFLF_binary THF_binary_formula
a') }
    ShAAppl "THFLF_unitary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unitary_formula
a') ->
      (ATermTable
att1, THF_unitary_formula -> THF_logic_formula
THFLF_unitary THF_unitary_formula
a') }
    ShAAppl "THFLF_type" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_type_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_type_formula
a') ->
      (ATermTable
att1, THF_type_formula -> THF_logic_formula
THFLF_type THF_type_formula
a') }
    ShAAppl "THFLF_subtype" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_subtype)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_subtype
a') ->
      (ATermTable
att1, THF_subtype -> THF_logic_formula
THFLF_subtype THF_subtype
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_logic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_logic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_binary_formula where
  toShATermAux :: ATermTable -> THF_binary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_binary_formula
xv = case THF_binary_formula
xv of
    THFBF_pair a :: THF_binary_pair
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_binary_pair -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_binary_pair
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBF_pair" [Int
a'] []) ATermTable
att1
    THFBF_tuple a :: THF_binary_tuple
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_binary_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_binary_tuple
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBF_tuple" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_binary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFBF_pair" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_binary_pair)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_binary_pair
a') ->
      (ATermTable
att1, THF_binary_pair -> THF_binary_formula
THFBF_pair THF_binary_pair
a') }
    ShAAppl "THFBF_tuple" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_binary_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_binary_tuple
a') ->
      (ATermTable
att1, THF_binary_tuple -> THF_binary_formula
THFBF_tuple THF_binary_tuple
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_binary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_binary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_binary_pair where
  toShATermAux :: ATermTable -> THF_binary_pair -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_binary_pair
xv = case THF_binary_pair
xv of
    THF_binary_pair a :: THF_pair_connective
a b :: THF_unitary_formula
b c :: THF_unitary_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_pair_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_pair_connective
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_unitary_formula
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THF_unitary_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_binary_pair" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_binary_pair)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_binary_pair" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, THF_pair_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_pair_connective
a') ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_unitary_formula
b') ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: THF_unitary_formula
c') ->
      (ATermTable
att3, THF_pair_connective
-> THF_unitary_formula -> THF_unitary_formula -> THF_binary_pair
THF_binary_pair THF_pair_connective
a' THF_unitary_formula
b' THF_unitary_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_binary_pair)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_binary_pair" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_binary_tuple where
  toShATermAux :: ATermTable -> THF_binary_tuple -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_binary_tuple
xv = case THF_binary_tuple
xv of
    THFBT_or a :: THF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBT_or" [Int
a'] []) ATermTable
att1
    THFBT_and a :: THF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBT_and" [Int
a'] []) ATermTable
att1
    THFBT_apply a :: THF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBT_apply" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_binary_tuple)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFBT_or" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_or_formula
a') ->
      (ATermTable
att1, THF_or_formula -> THF_binary_tuple
THFBT_or THF_or_formula
a') }
    ShAAppl "THFBT_and" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_or_formula
a') ->
      (ATermTable
att1, THF_or_formula -> THF_binary_tuple
THFBT_and THF_or_formula
a') }
    ShAAppl "THFBT_apply" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_or_formula
a') ->
      (ATermTable
att1, THF_or_formula -> THF_binary_tuple
THFBT_apply THF_or_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_binary_tuple)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_binary_tuple" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_unitary_formula where
  toShATermAux :: ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_unitary_formula
xv = case THF_unitary_formula
xv of
    THFUF_quantified a :: THF_quantified_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_quantified_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_quantified_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_quantified" [Int
a'] []) ATermTable
att1
    THFUF_unary a :: THF_unary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_unary" [Int
a'] []) ATermTable
att1
    THFUF_atom a :: THF_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_atom" [Int
a'] []) ATermTable
att1
    THFUF_conditional a :: THF_conditional
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_conditional -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_conditional
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_conditional" [Int
a'] []) ATermTable
att1
    THFUF_let a :: THF_let
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_let" [Int
a'] []) ATermTable
att1
    THFUF_tuple a :: THF_tuple
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_tuple
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_tuple" [Int
a'] []) ATermTable
att1
    THFUF_logic a :: THF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUF_logic" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_unitary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFUF_quantified" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_quantified_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_quantified_formula
a') ->
      (ATermTable
att1, THF_quantified_formula -> THF_unitary_formula
THFUF_quantified THF_quantified_formula
a') }
    ShAAppl "THFUF_unary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unary_formula
a') ->
      (ATermTable
att1, THF_unary_formula -> THF_unitary_formula
THFUF_unary THF_unary_formula
a') }
    ShAAppl "THFUF_atom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_atom
a') ->
      (ATermTable
att1, THF_atom -> THF_unitary_formula
THFUF_atom THF_atom
a') }
    ShAAppl "THFUF_conditional" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_conditional)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_conditional
a') ->
      (ATermTable
att1, THF_conditional -> THF_unitary_formula
THFUF_conditional THF_conditional
a') }
    ShAAppl "THFUF_let" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let
a') ->
      (ATermTable
att1, THF_let -> THF_unitary_formula
THFUF_let THF_let
a') }
    ShAAppl "THFUF_tuple" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_tuple
a') ->
      (ATermTable
att1, THF_tuple -> THF_unitary_formula
THFUF_tuple THF_tuple
a') }
    ShAAppl "THFUF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_logic_formula
a') ->
      (ATermTable
att1, THF_logic_formula -> THF_unitary_formula
THFUF_logic THF_logic_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_unitary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_unitary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_quantified_formula where
  toShATermAux :: ATermTable -> THF_quantified_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_quantified_formula
xv = case THF_quantified_formula
xv of
    THF_quantified_formula a :: THF_quantification
a b :: THF_unitary_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_quantification -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_quantification
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_unitary_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_quantified_formula" [Int
a',
                                                           Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_quantified_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_quantified_formula" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_quantification)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_quantification
a') ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_unitary_formula
b') ->
      (ATermTable
att2, THF_quantification -> THF_unitary_formula -> THF_quantified_formula
THF_quantified_formula THF_quantification
a' THF_unitary_formula
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_quantified_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_quantified_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_quantification where
  toShATermAux :: ATermTable -> THF_quantification -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_quantification
xv = case THF_quantification
xv of
    THF_quantification a :: THF_quantifier
a b :: THF_variable_list
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_quantifier
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_variable_list
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_quantification" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_quantification)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_quantification" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_quantifier
a') ->
      case Int -> ATermTable -> (ATermTable, THF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_variable_list
b') ->
      (ATermTable
att2, THF_quantifier -> THF_variable_list -> THF_quantification
THF_quantification THF_quantifier
a' THF_variable_list
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_quantification)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_quantification" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_variable where
  toShATermAux :: ATermTable -> THF_variable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_variable
xv = case THF_variable
xv of
    THFV_typed a :: THF_typed_variable
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_typed_variable -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_typed_variable
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFV_typed" [Int
a'] []) ATermTable
att1
    THFV_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFV_variable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_variable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFV_typed" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_typed_variable)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_typed_variable
a') ->
      (ATermTable
att1, THF_typed_variable -> THF_variable
THFV_typed THF_typed_variable
a') }
    ShAAppl "THFV_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> THF_variable
THFV_variable Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_variable)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_variable" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_typed_variable where
  toShATermAux :: ATermTable -> THF_typed_variable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_typed_variable
xv = case THF_typed_variable
xv of
    THF_typed_variable a :: Token
a b :: THF_top_level_type
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_top_level_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_top_level_type
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_typed_variable" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_typed_variable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_typed_variable" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, THF_top_level_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_top_level_type
b') ->
      (ATermTable
att2, Token -> THF_top_level_type -> THF_typed_variable
THF_typed_variable Token
a' THF_top_level_type
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_typed_variable)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_typed_variable" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_unary_formula where
  toShATermAux :: ATermTable -> THF_unary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_unary_formula
xv = case THF_unary_formula
xv of
    THF_unary_formula a :: THF_unary_connective
a b :: THF_logic_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unary_connective
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_logic_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_unary_formula" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_unary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_unary_formula" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unary_connective
a') ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_logic_formula
b') ->
      (ATermTable
att2, THF_unary_connective -> THF_logic_formula -> THF_unary_formula
THF_unary_formula THF_unary_connective
a' THF_logic_formula
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_unary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_unary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_atom where
  toShATermAux :: ATermTable -> THF_atom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_atom
xv = case THF_atom
xv of
    THF_atom_function a :: THF_function
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_function -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_function
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_atom_function" [Int
a'] []) ATermTable
att1
    THF_atom_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_atom_variable" [Int
a'] []) ATermTable
att1
    THF_atom_defined a :: Defined_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_atom_defined" [Int
a'] []) ATermTable
att1
    THF_atom_conn a :: THF_conn_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_conn_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_conn_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_atom_conn" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_atom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_atom_function" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_function)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_function
a') ->
      (ATermTable
att1, THF_function -> THF_atom
THF_atom_function THF_function
a') }
    ShAAppl "THF_atom_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> THF_atom
THF_atom_variable Token
a') }
    ShAAppl "THF_atom_defined" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_term
a') ->
      (ATermTable
att1, Defined_term -> THF_atom
THF_atom_defined Defined_term
a') }
    ShAAppl "THF_atom_conn" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_conn_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_conn_term
a') ->
      (ATermTable
att1, THF_conn_term -> THF_atom
THF_atom_conn THF_conn_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_atom)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_atom" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_function where
  toShATermAux :: ATermTable -> THF_function -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_function
xv = case THF_function
xv of
    THFF_atom a :: Atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFF_atom" [Int
a'] []) ATermTable
att1
    THFF_functor a :: Token
a b :: [THF_logic_formula]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [THF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [THF_logic_formula]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFF_functor" [Int
a', Int
b'] []) ATermTable
att2
    THFF_defined a :: Defined_functor
a b :: [THF_logic_formula]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_functor -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_functor
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [THF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [THF_logic_formula]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFF_defined" [Int
a', Int
b'] []) ATermTable
att2
    THFF_system a :: Token
a b :: [THF_logic_formula]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [THF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [THF_logic_formula]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFF_system" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_function)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFF_atom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Atom
a') ->
      (ATermTable
att1, Atom -> THF_function
THFF_atom Atom
a') }
    ShAAppl "THFF_functor" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, [THF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [THF_logic_formula]
b') ->
      (ATermTable
att2, Token -> [THF_logic_formula] -> THF_function
THFF_functor Token
a' [THF_logic_formula]
b') }}
    ShAAppl "THFF_defined" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_functor)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_functor
a') ->
      case Int -> ATermTable -> (ATermTable, [THF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [THF_logic_formula]
b') ->
      (ATermTable
att2, Defined_functor -> [THF_logic_formula] -> THF_function
THFF_defined Defined_functor
a' [THF_logic_formula]
b') }}
    ShAAppl "THFF_system" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, [THF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [THF_logic_formula]
b') ->
      (ATermTable
att2, Token -> [THF_logic_formula] -> THF_function
THFF_system Token
a' [THF_logic_formula]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_function)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_function" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_conn_term where
  toShATermAux :: ATermTable -> THF_conn_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_conn_term
xv = case THF_conn_term
xv of
    THFC_pair a :: THF_pair_connective
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_pair_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_pair_connective
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFC_pair" [Int
a'] []) ATermTable
att1
    THFC_assoc a :: Assoc_connective
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Assoc_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Assoc_connective
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFC_assoc" [Int
a'] []) ATermTable
att1
    THFC_unary a :: THF_unary_connective
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unary_connective
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFC_unary" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_conn_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFC_pair" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_pair_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_pair_connective
a') ->
      (ATermTable
att1, THF_pair_connective -> THF_conn_term
THFC_pair THF_pair_connective
a') }
    ShAAppl "THFC_assoc" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Assoc_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Assoc_connective
a') ->
      (ATermTable
att1, Assoc_connective -> THF_conn_term
THFC_assoc Assoc_connective
a') }
    ShAAppl "THFC_unary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unary_connective
a') ->
      (ATermTable
att1, THF_unary_connective -> THF_conn_term
THFC_unary THF_unary_connective
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_conn_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_conn_term" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_conditional where
  toShATermAux :: ATermTable -> THF_conditional -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_conditional
xv = case THF_conditional
xv of
    THF_conditional a :: THF_logic_formula
a b :: THF_logic_formula
b c :: THF_logic_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_logic_formula
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_logic_formula
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THF_logic_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_conditional" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_conditional)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_conditional" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_logic_formula
a') ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_logic_formula
b') ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: THF_logic_formula
c') ->
      (ATermTable
att3, THF_logic_formula
-> THF_logic_formula -> THF_logic_formula -> THF_conditional
THF_conditional THF_logic_formula
a' THF_logic_formula
b' THF_logic_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_conditional)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_conditional" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_let where
  toShATermAux :: ATermTable -> THF_let -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_let
xv = case THF_let
xv of
    THF_let a :: THF_let_defns
a b :: THF_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let_defns -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let_defns
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_let" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_let)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_let" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let_defns)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let_defns
a') ->
      case Int -> ATermTable -> (ATermTable, THF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_formula
b') ->
      (ATermTable
att2, THF_let_defns -> THF_formula -> THF_let
THF_let THF_let_defns
a' THF_formula
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_let)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_let" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_let_defns where
  toShATermAux :: ATermTable -> THF_let_defns -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_let_defns
xv = case THF_let_defns
xv of
    THFLD_single a :: THF_let_defn
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let_defn
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLD_single" [Int
a'] []) ATermTable
att1
    THFLD_many a :: THF_let_defn_list
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let_defn_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let_defn_list
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLD_many" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_let_defns)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFLD_single" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let_defn
a') ->
      (ATermTable
att1, THF_let_defn -> THF_let_defns
THFLD_single THF_let_defn
a') }
    ShAAppl "THFLD_many" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let_defn_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let_defn_list
a') ->
      (ATermTable
att1, THF_let_defn_list -> THF_let_defns
THFLD_many THF_let_defn_list
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_let_defns)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_let_defns" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_let_defn where
  toShATermAux :: ATermTable -> THF_let_defn -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_let_defn
xv = case THF_let_defn
xv of
    THFLD_quantified a :: THF_let_quantified_defn
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let_quantified_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let_quantified_defn
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLD_quantified" [Int
a'] []) ATermTable
att1
    THFLD_plain a :: THF_let_plain_defn
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let_plain_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let_plain_defn
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLD_plain" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_let_defn)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFLD_quantified" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let_quantified_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let_quantified_defn
a') ->
      (ATermTable
att1, THF_let_quantified_defn -> THF_let_defn
THFLD_quantified THF_let_quantified_defn
a') }
    ShAAppl "THFLD_plain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let_plain_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let_plain_defn
a') ->
      (ATermTable
att1, THF_let_plain_defn -> THF_let_defn
THFLD_plain THF_let_plain_defn
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_let_defn)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_let_defn" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_let_quantified_defn where
  toShATermAux :: ATermTable -> THF_let_quantified_defn -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_let_quantified_defn
xv = case THF_let_quantified_defn
xv of
    THF_let_quantified_defn a :: THF_quantification
a b :: THF_let_plain_defn
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_quantification -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_quantification
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_let_plain_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_let_plain_defn
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_let_quantified_defn" [Int
a',
                                                            Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_let_quantified_defn)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_let_quantified_defn" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_quantification)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_quantification
a') ->
      case Int -> ATermTable -> (ATermTable, THF_let_plain_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_let_plain_defn
b') ->
      (ATermTable
att2, THF_quantification -> THF_let_plain_defn -> THF_let_quantified_defn
THF_let_quantified_defn THF_quantification
a' THF_let_plain_defn
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_let_quantified_defn)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_let_quantified_defn" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_let_plain_defn where
  toShATermAux :: ATermTable -> THF_let_plain_defn -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_let_plain_defn
xv = case THF_let_plain_defn
xv of
    THF_let_plain_defn a :: THF_let_defn_LHS
a b :: THF_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_let_defn_LHS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_let_defn_LHS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_let_plain_defn" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_let_plain_defn)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_let_plain_defn" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_let_defn_LHS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_let_defn_LHS
a') ->
      case Int -> ATermTable -> (ATermTable, THF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_formula
b') ->
      (ATermTable
att2, THF_let_defn_LHS -> THF_formula -> THF_let_plain_defn
THF_let_plain_defn THF_let_defn_LHS
a' THF_formula
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_let_plain_defn)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_let_plain_defn" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_let_defn_LHS where
  toShATermAux :: ATermTable -> THF_let_defn_LHS -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_let_defn_LHS
xv = case THF_let_defn_LHS
xv of
    THFLDL_constant a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLDL_constant" [Int
a'] []) ATermTable
att1
    THFLDL_functor a :: Token
a b :: FOF_arguments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_arguments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLDL_functor" [Int
a', Int
b'] []) ATermTable
att2
    THFLDL_tuple a :: THF_tuple
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_tuple
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFLDL_tuple" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_let_defn_LHS)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFLDL_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> THF_let_defn_LHS
THFLDL_constant Token
a') }
    ShAAppl "THFLDL_functor" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_arguments
b') ->
      (ATermTable
att2, Token -> FOF_arguments -> THF_let_defn_LHS
THFLDL_functor Token
a' FOF_arguments
b') }}
    ShAAppl "THFLDL_tuple" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_tuple
a') ->
      (ATermTable
att1, THF_tuple -> THF_let_defn_LHS
THFLDL_tuple THF_tuple
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_let_defn_LHS)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_let_defn_LHS" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_type_formula where
  toShATermAux :: ATermTable -> THF_type_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_type_formula
xv = case THF_type_formula
xv of
    THFTF_typeable a :: THF_typeable_formula
a b :: THF_top_level_type
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_typeable_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_typeable_formula
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_top_level_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_top_level_type
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTF_typeable" [Int
a', Int
b'] []) ATermTable
att2
    THFTF_constant a :: Token
a b :: THF_top_level_type
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_top_level_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_top_level_type
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTF_constant" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_type_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFTF_typeable" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_typeable_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_typeable_formula
a') ->
      case Int -> ATermTable -> (ATermTable, THF_top_level_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_top_level_type
b') ->
      (ATermTable
att2, THF_typeable_formula -> THF_top_level_type -> THF_type_formula
THFTF_typeable THF_typeable_formula
a' THF_top_level_type
b') }}
    ShAAppl "THFTF_constant" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, THF_top_level_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_top_level_type
b') ->
      (ATermTable
att2, Token -> THF_top_level_type -> THF_type_formula
THFTF_constant Token
a' THF_top_level_type
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_type_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_type_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_typeable_formula where
  toShATermAux :: ATermTable -> THF_typeable_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_typeable_formula
xv = case THF_typeable_formula
xv of
    THFTF_atom a :: THF_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTF_atom" [Int
a'] []) ATermTable
att1
    THFTF_logic a :: THF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTF_logic" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_typeable_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFTF_atom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_atom
a') ->
      (ATermTable
att1, THF_atom -> THF_typeable_formula
THFTF_atom THF_atom
a') }
    ShAAppl "THFTF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_logic_formula
a') ->
      (ATermTable
att1, THF_logic_formula -> THF_typeable_formula
THFTF_logic THF_logic_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_typeable_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_typeable_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_subtype where
  toShATermAux :: ATermTable -> THF_subtype -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_subtype
xv = case THF_subtype
xv of
    THF_subtype a :: THF_atom
a b :: THF_atom
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_atom
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_atom
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_subtype" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_subtype)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_subtype" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_atom
a') ->
      case Int -> ATermTable -> (ATermTable, THF_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_atom
b') ->
      (ATermTable
att2, THF_atom -> THF_atom -> THF_subtype
THF_subtype THF_atom
a' THF_atom
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_subtype)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_subtype" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_top_level_type where
  toShATermAux :: ATermTable -> THF_top_level_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_top_level_type
xv = case THF_top_level_type
xv of
    THFTLT_unitary a :: THF_unitary_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unitary_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unitary_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTLT_unitary" [Int
a'] []) ATermTable
att1
    THFTLT_mapping a :: THF_mapping_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_mapping_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_mapping_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTLT_mapping" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_top_level_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFTLT_unitary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unitary_type
a') ->
      (ATermTable
att1, THF_unitary_type -> THF_top_level_type
THFTLT_unitary THF_unitary_type
a') }
    ShAAppl "THFTLT_mapping" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_mapping_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_mapping_type
a') ->
      (ATermTable
att1, THF_mapping_type -> THF_top_level_type
THFTLT_mapping THF_mapping_type
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_top_level_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_top_level_type" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_unitary_type where
  toShATermAux :: ATermTable -> THF_unitary_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_unitary_type
xv = case THF_unitary_type
xv of
    THFUT_unitary a :: THF_unitary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unitary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUT_unitary" [Int
a'] []) ATermTable
att1
    THFUT_binary a :: THF_binary_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_binary_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_binary_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUT_binary" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_unitary_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFUT_unitary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unitary_formula
a') ->
      (ATermTable
att1, THF_unitary_formula -> THF_unitary_type
THFUT_unitary THF_unitary_formula
a') }
    ShAAppl "THFUT_binary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_binary_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_binary_type
a') ->
      (ATermTable
att1, THF_binary_type -> THF_unitary_type
THFUT_binary THF_binary_type
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_unitary_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_unitary_type" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_binary_type where
  toShATermAux :: ATermTable -> THF_binary_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_binary_type
xv = case THF_binary_type
xv of
    THFBT_mapping a :: THF_mapping_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_mapping_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_mapping_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBT_mapping" [Int
a'] []) ATermTable
att1
    THFBT_xprod a :: THF_mapping_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_mapping_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_mapping_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBT_xprod" [Int
a'] []) ATermTable
att1
    THFBT_union a :: THF_mapping_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_mapping_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_mapping_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFBT_union" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_binary_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFBT_mapping" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_mapping_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_mapping_type
a') ->
      (ATermTable
att1, THF_mapping_type -> THF_binary_type
THFBT_mapping THF_mapping_type
a') }
    ShAAppl "THFBT_xprod" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_mapping_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_mapping_type
a') ->
      (ATermTable
att1, THF_mapping_type -> THF_binary_type
THFBT_xprod THF_mapping_type
a') }
    ShAAppl "THFBT_union" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_mapping_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_mapping_type
a') ->
      (ATermTable
att1, THF_mapping_type -> THF_binary_type
THFBT_union THF_mapping_type
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_binary_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_binary_type" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_sequent where
  toShATermAux :: ATermTable -> THF_sequent -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_sequent
xv = case THF_sequent
xv of
    THFS_plain a :: THF_tuple
a b :: THF_tuple
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_tuple
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THF_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THF_tuple
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFS_plain" [Int
a', Int
b'] []) ATermTable
att2
    THFS_parens a :: THF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFS_parens" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_sequent)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFS_plain" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, THF_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_tuple
a') ->
      case Int -> ATermTable -> (ATermTable, THF_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: THF_tuple
b') ->
      (ATermTable
att2, THF_tuple -> THF_tuple -> THF_sequent
THFS_plain THF_tuple
a' THF_tuple
b') }}
    ShAAppl "THFS_parens" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_sequent
a') ->
      (ATermTable
att1, THF_sequent -> THF_sequent
THFS_parens THF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_sequent)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_sequent" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_tuple where
  toShATermAux :: ATermTable -> THF_tuple -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_tuple
xv = case THF_tuple
xv of
    THF_tuple a :: [THF_logic_formula]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THF_logic_formula]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_tuple" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_tuple)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_tuple" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [THF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [THF_logic_formula]
a') ->
      (ATermTable
att1, [THF_logic_formula] -> THF_tuple
THF_tuple [THF_logic_formula]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_tuple)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_tuple" ShATerm
u

instance ShATermConvertible TPTP.AS.TFX_formula where
  toShATermAux :: ATermTable -> TFX_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFX_formula
xv = case TFX_formula
xv of
    TFXF_logic a :: TFX_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFX_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFX_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFXF_logic" [Int
a'] []) ATermTable
att1
    TFXF_sequent a :: THF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFXF_sequent" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFX_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFXF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFX_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFX_logic_formula
a') ->
      (ATermTable
att1, TFX_logic_formula -> TFX_formula
TFXF_logic TFX_logic_formula
a') }
    ShAAppl "TFXF_sequent" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_sequent
a') ->
      (ATermTable
att1, THF_sequent -> TFX_formula
TFXF_sequent THF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFX_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFX_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFX_logic_formula where
  toShATermAux :: ATermTable -> TFX_logic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFX_logic_formula
xv = case TFX_logic_formula
xv of
    TFXLF_binary a :: THF_binary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_binary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_binary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFXLF_binary" [Int
a'] []) ATermTable
att1
    TFXLF_unitary a :: THF_unitary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_unitary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFXLF_unitary" [Int
a'] []) ATermTable
att1
    TFXLF_typed a :: TFF_typed_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_typed_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_typed_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFXLF_typed" [Int
a'] []) ATermTable
att1
    TFXLF_subtype a :: TFF_subtype
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_subtype -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_subtype
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFXLF_subtype" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFX_logic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFXLF_binary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_binary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_binary_formula
a') ->
      (ATermTable
att1, THF_binary_formula -> TFX_logic_formula
TFXLF_binary THF_binary_formula
a') }
    ShAAppl "TFXLF_unitary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_unitary_formula
a') ->
      (ATermTable
att1, THF_unitary_formula -> TFX_logic_formula
TFXLF_unitary THF_unitary_formula
a') }
    ShAAppl "TFXLF_typed" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_typed_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_typed_atom
a') ->
      (ATermTable
att1, TFF_typed_atom -> TFX_logic_formula
TFXLF_typed TFF_typed_atom
a') }
    ShAAppl "TFXLF_subtype" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_subtype)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_subtype
a') ->
      (ATermTable
att1, TFF_subtype -> TFX_logic_formula
TFXLF_subtype TFF_subtype
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFX_logic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFX_logic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_formula where
  toShATermAux :: ATermTable -> TFF_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_formula
xv = case TFF_formula
xv of
    TFFF_logic a :: TFF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFF_logic" [Int
a'] []) ATermTable
att1
    TFFF_atom a :: TFF_typed_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_typed_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_typed_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFF_atom" [Int
a'] []) ATermTable
att1
    TFFF_sequent a :: TFF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFF_sequent" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_logic_formula
a') ->
      (ATermTable
att1, TFF_logic_formula -> TFF_formula
TFFF_logic TFF_logic_formula
a') }
    ShAAppl "TFFF_atom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_typed_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_typed_atom
a') ->
      (ATermTable
att1, TFF_typed_atom -> TFF_formula
TFFF_atom TFF_typed_atom
a') }
    ShAAppl "TFFF_sequent" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_sequent
a') ->
      (ATermTable
att1, TFF_sequent -> TFF_formula
TFFF_sequent TFF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_logic_formula where
  toShATermAux :: ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_logic_formula
xv = case TFF_logic_formula
xv of
    TFFLF_binary a :: TFF_binary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_binary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_binary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLF_binary" [Int
a'] []) ATermTable
att1
    TFFLF_unitary a :: TFF_unitary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_unitary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLF_unitary" [Int
a'] []) ATermTable
att1
    TFFLF_subtype a :: TFF_subtype
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_subtype -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_subtype
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLF_subtype" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_logic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLF_binary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_binary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_binary_formula
a') ->
      (ATermTable
att1, TFF_binary_formula -> TFF_logic_formula
TFFLF_binary TFF_binary_formula
a') }
    ShAAppl "TFFLF_unitary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_unitary_formula
a') ->
      (ATermTable
att1, TFF_unitary_formula -> TFF_logic_formula
TFFLF_unitary TFF_unitary_formula
a') }
    ShAAppl "TFFLF_subtype" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_subtype)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_subtype
a') ->
      (ATermTable
att1, TFF_subtype -> TFF_logic_formula
TFFLF_subtype TFF_subtype
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_logic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_logic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_binary_formula where
  toShATermAux :: ATermTable -> TFF_binary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_binary_formula
xv = case TFF_binary_formula
xv of
    TFFBF_nonassoc a :: TFF_binary_nonassoc
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_binary_nonassoc -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_binary_nonassoc
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFBF_nonassoc" [Int
a'] []) ATermTable
att1
    TFFBF_assoc a :: TFF_binary_assoc
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_binary_assoc -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_binary_assoc
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFBF_assoc" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_binary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFBF_nonassoc" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_binary_nonassoc)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_binary_nonassoc
a') ->
      (ATermTable
att1, TFF_binary_nonassoc -> TFF_binary_formula
TFFBF_nonassoc TFF_binary_nonassoc
a') }
    ShAAppl "TFFBF_assoc" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_binary_assoc)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_binary_assoc
a') ->
      (ATermTable
att1, TFF_binary_assoc -> TFF_binary_formula
TFFBF_assoc TFF_binary_assoc
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_binary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_binary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_binary_nonassoc where
  toShATermAux :: ATermTable -> TFF_binary_nonassoc -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_binary_nonassoc
xv = case TFF_binary_nonassoc
xv of
    TFF_binary_nonassoc a :: Binary_connective
a b :: TFF_unitary_formula
b c :: TFF_unitary_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Binary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Binary_connective
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_unitary_formula
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TFF_unitary_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_binary_nonassoc" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_binary_nonassoc)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_binary_nonassoc" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Binary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Binary_connective
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_unitary_formula
b') ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: TFF_unitary_formula
c') ->
      (ATermTable
att3, Binary_connective
-> TFF_unitary_formula
-> TFF_unitary_formula
-> TFF_binary_nonassoc
TFF_binary_nonassoc Binary_connective
a' TFF_unitary_formula
b' TFF_unitary_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_binary_nonassoc)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_binary_nonassoc" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_binary_assoc where
  toShATermAux :: ATermTable -> TFF_binary_assoc -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_binary_assoc
xv = case TFF_binary_assoc
xv of
    TFFBA_or a :: TFF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFBA_or" [Int
a'] []) ATermTable
att1
    TFFBA_and a :: TFF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFBA_and" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_binary_assoc)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFBA_or" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_or_formula
a') ->
      (ATermTable
att1, TFF_or_formula -> TFF_binary_assoc
TFFBA_or TFF_or_formula
a') }
    ShAAppl "TFFBA_and" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_or_formula
a') ->
      (ATermTable
att1, TFF_or_formula -> TFF_binary_assoc
TFFBA_and TFF_or_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_binary_assoc)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_binary_assoc" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_unitary_formula where
  toShATermAux :: ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_unitary_formula
xv = case TFF_unitary_formula
xv of
    TFFUF_quantified a :: TFF_quantified_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_quantified_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_quantified_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_quantified" [Int
a'] []) ATermTable
att1
    TFFUF_unary a :: TFF_unary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_unary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_unary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_unary" [Int
a'] []) ATermTable
att1
    TFFUF_atomic a :: FOF_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_atomic" [Int
a'] []) ATermTable
att1
    TFFUF_conditional a :: TFF_conditional
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_conditional -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_conditional
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_conditional" [Int
a'] []) ATermTable
att1
    TFFUF_let a :: TFF_let
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_let" [Int
a'] []) ATermTable
att1
    TFFUF_logic a :: TFF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_logic" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFUF_quantified" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_quantified_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_quantified_formula
a') ->
      (ATermTable
att1, TFF_quantified_formula -> TFF_unitary_formula
TFFUF_quantified TFF_quantified_formula
a') }
    ShAAppl "TFFUF_unary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_unary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_unary_formula
a') ->
      (ATermTable
att1, TFF_unary_formula -> TFF_unitary_formula
TFFUF_unary TFF_unary_formula
a') }
    ShAAppl "TFFUF_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_atomic_formula
a') ->
      (ATermTable
att1, FOF_atomic_formula -> TFF_unitary_formula
TFFUF_atomic FOF_atomic_formula
a') }
    ShAAppl "TFFUF_conditional" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_conditional)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_conditional
a') ->
      (ATermTable
att1, TFF_conditional -> TFF_unitary_formula
TFFUF_conditional TFF_conditional
a') }
    ShAAppl "TFFUF_let" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let
a') ->
      (ATermTable
att1, TFF_let -> TFF_unitary_formula
TFFUF_let TFF_let
a') }
    ShAAppl "TFFUF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_logic_formula
a') ->
      (ATermTable
att1, TFF_logic_formula -> TFF_unitary_formula
TFFUF_logic TFF_logic_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_unitary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_unitary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_quantified_formula where
  toShATermAux :: ATermTable -> TFF_quantified_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_quantified_formula
xv = case TFF_quantified_formula
xv of
    TFF_quantified_formula a :: FOF_quantifier
a b :: TFF_variable_list
b c :: TFF_unitary_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_quantifier
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_variable_list
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TFF_unitary_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_quantified_formula" [Int
a', Int
b',
                                                           Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_quantified_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_quantified_formula" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_quantifier
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_variable_list
b') ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: TFF_unitary_formula
c') ->
      (ATermTable
att3, FOF_quantifier
-> TFF_variable_list
-> TFF_unitary_formula
-> TFF_quantified_formula
TFF_quantified_formula FOF_quantifier
a' TFF_variable_list
b' TFF_unitary_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_quantified_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_quantified_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_variable where
  toShATermAux :: ATermTable -> TFF_variable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_variable
xv = case TFF_variable
xv of
    TFFV_typed a :: TFF_typed_variable
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_typed_variable -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_typed_variable
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFV_typed" [Int
a'] []) ATermTable
att1
    TFFV_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFV_variable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_variable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFV_typed" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_typed_variable)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_typed_variable
a') ->
      (ATermTable
att1, TFF_typed_variable -> TFF_variable
TFFV_typed TFF_typed_variable
a') }
    ShAAppl "TFFV_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> TFF_variable
TFFV_variable Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_variable)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_variable" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_typed_variable where
  toShATermAux :: ATermTable -> TFF_typed_variable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_typed_variable
xv = case TFF_typed_variable
xv of
    TFF_typed_variable a :: Token
a b :: TFF_atomic_type
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_atomic_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_atomic_type
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_typed_variable" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_typed_variable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_typed_variable" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_atomic_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_atomic_type
b') ->
      (ATermTable
att2, Token -> TFF_atomic_type -> TFF_typed_variable
TFF_typed_variable Token
a' TFF_atomic_type
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_typed_variable)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_typed_variable" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_unary_formula where
  toShATermAux :: ATermTable -> TFF_unary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_unary_formula
xv = case TFF_unary_formula
xv of
    TFFUF_connective a :: Unary_connective
a b :: TFF_unitary_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Unary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Unary_connective
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_unitary_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_connective" [Int
a', Int
b'] []) ATermTable
att2
    TFFUF_infix a :: FOF_infix_unary
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_infix_unary -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_infix_unary
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUF_infix" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_unary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFUF_connective" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Unary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Unary_connective
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_unitary_formula
b') ->
      (ATermTable
att2, Unary_connective -> TFF_unitary_formula -> TFF_unary_formula
TFFUF_connective Unary_connective
a' TFF_unitary_formula
b') }}
    ShAAppl "TFFUF_infix" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_infix_unary)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_infix_unary
a') ->
      (ATermTable
att1, FOF_infix_unary -> TFF_unary_formula
TFFUF_infix FOF_infix_unary
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_unary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_unary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_conditional where
  toShATermAux :: ATermTable -> TFF_conditional -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_conditional
xv = case TFF_conditional
xv of
    TFF_conditional a :: TFF_logic_formula
a b :: TFF_logic_formula
b c :: TFF_logic_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_logic_formula
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_logic_formula
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TFF_logic_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_conditional" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_conditional)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_conditional" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_logic_formula
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_logic_formula
b') ->
      case Int -> ATermTable -> (ATermTable, TFF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: TFF_logic_formula
c') ->
      (ATermTable
att3, TFF_logic_formula
-> TFF_logic_formula -> TFF_logic_formula -> TFF_conditional
TFF_conditional TFF_logic_formula
a' TFF_logic_formula
b' TFF_logic_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_conditional)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_conditional" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let where
  toShATermAux :: ATermTable -> TFF_let -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let
xv = case TFF_let
xv of
    TFF_let_term_defns a :: TFF_let_term_defns
a b :: TFF_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term_defns -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term_defns
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_let_term_defns" [Int
a', Int
b'] []) ATermTable
att2
    TFF_let_formula_defns a :: TFF_let_formula_defns
a b :: TFF_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_formula_defns -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_formula_defns
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_let_formula_defns" [Int
a',
                                                          Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_let_term_defns" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_defns)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term_defns
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_formula
b') ->
      (ATermTable
att2, TFF_let_term_defns -> TFF_formula -> TFF_let
TFF_let_term_defns TFF_let_term_defns
a' TFF_formula
b') }}
    ShAAppl "TFF_let_formula_defns" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_defns)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_formula_defns
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_formula
b') ->
      (ATermTable
att2, TFF_let_formula_defns -> TFF_formula -> TFF_let
TFF_let_formula_defns TFF_let_formula_defns
a' TFF_formula
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_term_defns where
  toShATermAux :: ATermTable -> TFF_let_term_defns -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_term_defns
xv = case TFF_let_term_defns
xv of
    TFFLTD_single a :: TFF_let_term_defn
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term_defn
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLTD_single" [Int
a'] []) ATermTable
att1
    TFFLTD_many a :: TFF_let_term_list
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term_list
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLTD_many" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_term_defns)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLTD_single" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term_defn
a') ->
      (ATermTable
att1, TFF_let_term_defn -> TFF_let_term_defns
TFFLTD_single TFF_let_term_defn
a') }
    ShAAppl "TFFLTD_many" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term_list
a') ->
      (ATermTable
att1, TFF_let_term_list -> TFF_let_term_defns
TFFLTD_many TFF_let_term_list
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_term_defns)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_term_defns" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_term_defn where
  toShATermAux :: ATermTable -> TFF_let_term_defn -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_term_defn
xv = case TFF_let_term_defn
xv of
    TFFLTD_variable a :: TFF_variable_list
a b :: TFF_let_term_defn
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_variable_list
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_let_term_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_let_term_defn
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLTD_variable" [Int
a', Int
b'] []) ATermTable
att2
    TFFLTD_binding a :: TFF_let_term_binding
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term_binding -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term_binding
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLTD_binding" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_term_defn)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLTD_variable" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_variable_list
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_let_term_defn
b') ->
      (ATermTable
att2, TFF_variable_list -> TFF_let_term_defn -> TFF_let_term_defn
TFFLTD_variable TFF_variable_list
a' TFF_let_term_defn
b') }}
    ShAAppl "TFFLTD_binding" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_binding)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term_binding
a') ->
      (ATermTable
att1, TFF_let_term_binding -> TFF_let_term_defn
TFFLTD_binding TFF_let_term_binding
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_term_defn)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_term_defn" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_term_binding where
  toShATermAux :: ATermTable -> TFF_let_term_binding -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_term_binding
xv = case TFF_let_term_binding
xv of
    TFFLTB_plain a :: FOF_plain_term
a b :: FOF_term
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_plain_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_plain_term
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_term
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLTB_plain" [Int
a', Int
b'] []) ATermTable
att2
    TFFLTB_binding a :: TFF_let_term_binding
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term_binding -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term_binding
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLTB_binding" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_term_binding)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLTB_plain" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_plain_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_plain_term
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_term
b') ->
      (ATermTable
att2, FOF_plain_term -> FOF_term -> TFF_let_term_binding
TFFLTB_plain FOF_plain_term
a' FOF_term
b') }}
    ShAAppl "TFFLTB_binding" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_binding)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term_binding
a') ->
      (ATermTable
att1, TFF_let_term_binding -> TFF_let_term_binding
TFFLTB_binding TFF_let_term_binding
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_term_binding)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_term_binding" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_formula_defns where
  toShATermAux :: ATermTable -> TFF_let_formula_defns -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_formula_defns
xv = case TFF_let_formula_defns
xv of
    TFFLFD_single a :: TFF_let_formula_defn
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_formula_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_formula_defn
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLFD_single" [Int
a'] []) ATermTable
att1
    TFFLFD_many a :: TFF_let_formula_list
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_formula_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_formula_list
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLFD_many" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_formula_defns)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLFD_single" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_formula_defn
a') ->
      (ATermTable
att1, TFF_let_formula_defn -> TFF_let_formula_defns
TFFLFD_single TFF_let_formula_defn
a') }
    ShAAppl "TFFLFD_many" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_formula_list
a') ->
      (ATermTable
att1, TFF_let_formula_list -> TFF_let_formula_defns
TFFLFD_many TFF_let_formula_list
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_formula_defns)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_formula_defns" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_formula_defn where
  toShATermAux :: ATermTable -> TFF_let_formula_defn -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_formula_defn
xv = case TFF_let_formula_defn
xv of
    TFFLFD_variable a :: TFF_variable_list
a b :: TFF_let_formula_defn
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_variable_list
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_let_formula_defn -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_let_formula_defn
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLFD_variable" [Int
a', Int
b'] []) ATermTable
att2
    TFFLFD_binding a :: TFF_let_formula_binding
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_formula_binding -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_formula_binding
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLFD_binding" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_formula_defn)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLFD_variable" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_variable_list
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_defn)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_let_formula_defn
b') ->
      (ATermTable
att2, TFF_variable_list -> TFF_let_formula_defn -> TFF_let_formula_defn
TFFLFD_variable TFF_variable_list
a' TFF_let_formula_defn
b') }}
    ShAAppl "TFFLFD_binding" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_binding)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_formula_binding
a') ->
      (ATermTable
att1, TFF_let_formula_binding -> TFF_let_formula_defn
TFFLFD_binding TFF_let_formula_binding
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_formula_defn)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_formula_defn" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_formula_binding where
  toShATermAux :: ATermTable -> TFF_let_formula_binding -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_formula_binding
xv = case TFF_let_formula_binding
xv of
    TFFLFB_plain a :: FOF_plain_atomic_formula
a b :: TFF_unitary_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_plain_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_plain_atomic_formula
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_unitary_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLFB_plain" [Int
a', Int
b'] []) ATermTable
att2
    TFFLFB_binding a :: TFF_let_formula_binding
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_formula_binding -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_formula_binding
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLFB_binding" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_formula_binding)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLFB_plain" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_plain_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_plain_atomic_formula
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_unitary_formula
b') ->
      (ATermTable
att2, FOF_plain_atomic_formula
-> TFF_unitary_formula -> TFF_let_formula_binding
TFFLFB_plain FOF_plain_atomic_formula
a' TFF_unitary_formula
b') }}
    ShAAppl "TFFLFB_binding" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_binding)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_formula_binding
a') ->
      (ATermTable
att1, TFF_let_formula_binding -> TFF_let_formula_binding
TFFLFB_binding TFF_let_formula_binding
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_formula_binding)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_formula_binding" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_sequent where
  toShATermAux :: ATermTable -> TFF_sequent -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_sequent
xv = case TFF_sequent
xv of
    TFFS_plain a :: TFF_formula_tuple
a b :: TFF_formula_tuple
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_formula_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_formula_tuple
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_formula_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_formula_tuple
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFS_plain" [Int
a', Int
b'] []) ATermTable
att2
    TFFS_parens a :: TFF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFS_parens" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_sequent)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFS_plain" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_formula_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_formula_tuple
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_formula_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_formula_tuple
b') ->
      (ATermTable
att2, TFF_formula_tuple -> TFF_formula_tuple -> TFF_sequent
TFFS_plain TFF_formula_tuple
a' TFF_formula_tuple
b') }}
    ShAAppl "TFFS_parens" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_sequent
a') ->
      (ATermTable
att1, TFF_sequent -> TFF_sequent
TFFS_parens TFF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_sequent)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_sequent" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_formula_tuple where
  toShATermAux :: ATermTable -> TFF_formula_tuple -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_formula_tuple
xv = case TFF_formula_tuple
xv of
    TFF_formula_tuple a :: [TFF_logic_formula]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [TFF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [TFF_logic_formula]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_formula_tuple" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_formula_tuple)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_formula_tuple" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [TFF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [TFF_logic_formula]
a') ->
      (ATermTable
att1, [TFF_logic_formula] -> TFF_formula_tuple
TFF_formula_tuple [TFF_logic_formula]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_formula_tuple)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_formula_tuple" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_typed_atom where
  toShATermAux :: ATermTable -> TFF_typed_atom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_typed_atom
xv = case TFF_typed_atom
xv of
    TFFTA_plain a :: Untyped_atom
a b :: TFF_top_level_type
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Untyped_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Untyped_atom
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_top_level_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_top_level_type
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFTA_plain" [Int
a', Int
b'] []) ATermTable
att2
    TFFTA_parens a :: TFF_typed_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_typed_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_typed_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFTA_parens" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_typed_atom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFTA_plain" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Untyped_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Untyped_atom
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_top_level_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_top_level_type
b') ->
      (ATermTable
att2, Untyped_atom -> TFF_top_level_type -> TFF_typed_atom
TFFTA_plain Untyped_atom
a' TFF_top_level_type
b') }}
    ShAAppl "TFFTA_parens" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_typed_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_typed_atom
a') ->
      (ATermTable
att1, TFF_typed_atom -> TFF_typed_atom
TFFTA_parens TFF_typed_atom
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_typed_atom)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_typed_atom" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_subtype where
  toShATermAux :: ATermTable -> TFF_subtype -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_subtype
xv = case TFF_subtype
xv of
    TFF_subtype a :: Untyped_atom
a b :: Atom
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Untyped_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Untyped_atom
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Atom
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_subtype" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_subtype)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_subtype" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Untyped_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Untyped_atom
a') ->
      case Int -> ATermTable -> (ATermTable, Atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Atom
b') ->
      (ATermTable
att2, Untyped_atom -> Atom -> TFF_subtype
TFF_subtype Untyped_atom
a' Atom
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_subtype)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_subtype" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_top_level_type where
  toShATermAux :: ATermTable -> TFF_top_level_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_top_level_type
xv = case TFF_top_level_type
xv of
    TFFTLT_atomic a :: TFF_atomic_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_atomic_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_atomic_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFTLT_atomic" [Int
a'] []) ATermTable
att1
    TFFTLT_mapping a :: TFF_mapping_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_mapping_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_mapping_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFTLT_mapping" [Int
a'] []) ATermTable
att1
    TFFTLT_quantified a :: TF1_quantified_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TF1_quantified_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TF1_quantified_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFTLT_quantified" [Int
a'] []) ATermTable
att1
    TFFTLT_parens a :: TFF_top_level_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_top_level_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_top_level_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFTLT_parens" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_top_level_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFTLT_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_atomic_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_atomic_type
a') ->
      (ATermTable
att1, TFF_atomic_type -> TFF_top_level_type
TFFTLT_atomic TFF_atomic_type
a') }
    ShAAppl "TFFTLT_mapping" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_mapping_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_mapping_type
a') ->
      (ATermTable
att1, TFF_mapping_type -> TFF_top_level_type
TFFTLT_mapping TFF_mapping_type
a') }
    ShAAppl "TFFTLT_quantified" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TF1_quantified_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TF1_quantified_type
a') ->
      (ATermTable
att1, TF1_quantified_type -> TFF_top_level_type
TFFTLT_quantified TF1_quantified_type
a') }
    ShAAppl "TFFTLT_parens" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_top_level_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_top_level_type
a') ->
      (ATermTable
att1, TFF_top_level_type -> TFF_top_level_type
TFFTLT_parens TFF_top_level_type
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_top_level_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_top_level_type" ShATerm
u

instance ShATermConvertible TPTP.AS.TF1_quantified_type where
  toShATermAux :: ATermTable -> TF1_quantified_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TF1_quantified_type
xv = case TF1_quantified_type
xv of
    TF1_quantified_type a :: TFF_variable_list
a b :: TFF_monotype
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_variable_list
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_monotype -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_monotype
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TF1_quantified_type" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TF1_quantified_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TF1_quantified_type" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_variable_list
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_monotype)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_monotype
b') ->
      (ATermTable
att2, TFF_variable_list -> TFF_monotype -> TF1_quantified_type
TF1_quantified_type TFF_variable_list
a' TFF_monotype
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TF1_quantified_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TF1_quantified_type" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_monotype where
  toShATermAux :: ATermTable -> TFF_monotype -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_monotype
xv = case TFF_monotype
xv of
    TFFMT_atomic a :: TFF_atomic_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_atomic_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_atomic_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFMT_atomic" [Int
a'] []) ATermTable
att1
    TFFMT_mapping a :: TFF_mapping_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_mapping_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_mapping_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFMT_mapping" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_monotype)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFMT_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_atomic_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_atomic_type
a') ->
      (ATermTable
att1, TFF_atomic_type -> TFF_monotype
TFFMT_atomic TFF_atomic_type
a') }
    ShAAppl "TFFMT_mapping" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_mapping_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_mapping_type
a') ->
      (ATermTable
att1, TFF_mapping_type -> TFF_monotype
TFFMT_mapping TFF_mapping_type
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_monotype)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_monotype" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_unitary_type where
  toShATermAux :: ATermTable -> TFF_unitary_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_unitary_type
xv = case TFF_unitary_type
xv of
    TFFUT_atomic a :: TFF_atomic_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_atomic_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_atomic_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUT_atomic" [Int
a'] []) ATermTable
att1
    TFFUT_xprod a :: TFF_xprod_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_xprod_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_xprod_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFUT_xprod" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_unitary_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFUT_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_atomic_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_atomic_type
a') ->
      (ATermTable
att1, TFF_atomic_type -> TFF_unitary_type
TFFUT_atomic TFF_atomic_type
a') }
    ShAAppl "TFFUT_xprod" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_xprod_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_xprod_type
a') ->
      (ATermTable
att1, TFF_xprod_type -> TFF_unitary_type
TFFUT_xprod TFF_xprod_type
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_unitary_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_unitary_type" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_atomic_type where
  toShATermAux :: ATermTable -> TFF_atomic_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_atomic_type
xv = case TFF_atomic_type
xv of
    TFFAT_constant a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFAT_constant" [Int
a'] []) ATermTable
att1
    TFFAT_defined a :: Defined_type
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_type
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFAT_defined" [Int
a'] []) ATermTable
att1
    TFFAT_functor a :: Token
a b :: [TFF_atomic_type]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [TFF_atomic_type] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [TFF_atomic_type]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFAT_functor" [Int
a', Int
b'] []) ATermTable
att2
    TFFAT_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFAT_variable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_atomic_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFAT_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> TFF_atomic_type
TFFAT_constant Token
a') }
    ShAAppl "TFFAT_defined" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_type
a') ->
      (ATermTable
att1, Defined_type -> TFF_atomic_type
TFFAT_defined Defined_type
a') }
    ShAAppl "TFFAT_functor" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, [TFF_atomic_type])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [TFF_atomic_type]
b') ->
      (ATermTable
att2, Token -> [TFF_atomic_type] -> TFF_atomic_type
TFFAT_functor Token
a' [TFF_atomic_type]
b') }}
    ShAAppl "TFFAT_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> TFF_atomic_type
TFFAT_variable Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_atomic_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_atomic_type" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_mapping_type where
  toShATermAux :: ATermTable -> TFF_mapping_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_mapping_type
xv = case TFF_mapping_type
xv of
    TFF_mapping_type a :: TFF_unitary_type
a b :: TFF_atomic_type
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_unitary_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_unitary_type
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TFF_atomic_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TFF_atomic_type
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_mapping_type" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_mapping_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_mapping_type" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_unitary_type
a') ->
      case Int -> ATermTable -> (ATermTable, TFF_atomic_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TFF_atomic_type
b') ->
      (ATermTable
att2, TFF_unitary_type -> TFF_atomic_type -> TFF_mapping_type
TFF_mapping_type TFF_unitary_type
a' TFF_atomic_type
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_mapping_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_mapping_type" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_xprod_type where
  toShATermAux :: ATermTable -> TFF_xprod_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_xprod_type
xv = case TFF_xprod_type
xv of
    TFF_xprod_type a :: TFF_unitary_type
a b :: [TFF_atomic_type]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_unitary_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_unitary_type
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [TFF_atomic_type] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [TFF_atomic_type]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_xprod_type" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_xprod_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_xprod_type" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_unitary_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_unitary_type
a') ->
      case Int -> ATermTable -> (ATermTable, [TFF_atomic_type])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [TFF_atomic_type]
b') ->
      (ATermTable
att2, TFF_unitary_type -> [TFF_atomic_type] -> TFF_xprod_type
TFF_xprod_type TFF_unitary_type
a' [TFF_atomic_type]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_xprod_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_xprod_type" ShATerm
u

instance ShATermConvertible TPTP.AS.TCF_formula where
  toShATermAux :: ATermTable -> TCF_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TCF_formula
xv = case TCF_formula
xv of
    TCFF_logic a :: TCF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TCF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TCF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCFF_logic" [Int
a'] []) ATermTable
att1
    TCFF_atom a :: TFF_typed_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_typed_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_typed_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCFF_atom" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TCF_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TCFF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TCF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TCF_logic_formula
a') ->
      (ATermTable
att1, TCF_logic_formula -> TCF_formula
TCFF_logic TCF_logic_formula
a') }
    ShAAppl "TCFF_atom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_typed_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_typed_atom
a') ->
      (ATermTable
att1, TFF_typed_atom -> TCF_formula
TCFF_atom TFF_typed_atom
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TCF_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TCF_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TCF_logic_formula where
  toShATermAux :: ATermTable -> TCF_logic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TCF_logic_formula
xv = case TCF_logic_formula
xv of
    TCFLF_quantified a :: TCF_quantified_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TCF_quantified_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TCF_quantified_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCFLF_quantified" [Int
a'] []) ATermTable
att1
    TCFLF_cnf a :: CNF_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CNF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CNF_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCFLF_cnf" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TCF_logic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TCFLF_quantified" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TCF_quantified_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TCF_quantified_formula
a') ->
      (ATermTable
att1, TCF_quantified_formula -> TCF_logic_formula
TCFLF_quantified TCF_quantified_formula
a') }
    ShAAppl "TCFLF_cnf" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, CNF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CNF_formula
a') ->
      (ATermTable
att1, CNF_formula -> TCF_logic_formula
TCFLF_cnf CNF_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TCF_logic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TCF_logic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.TCF_quantified_formula where
  toShATermAux :: ATermTable -> TCF_quantified_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TCF_quantified_formula
xv = case TCF_quantified_formula
xv of
    TCF_quantified a :: TFF_variable_list
a b :: CNF_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_variable_list
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> CNF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 CNF_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCF_quantified" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TCF_quantified_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TCF_quantified" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_variable_list
a') ->
      case Int -> ATermTable -> (ATermTable, CNF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: CNF_formula
b') ->
      (ATermTable
att2, TFF_variable_list -> CNF_formula -> TCF_quantified_formula
TCF_quantified TFF_variable_list
a' CNF_formula
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TCF_quantified_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TCF_quantified_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_formula where
  toShATermAux :: ATermTable -> FOF_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_formula
xv = case FOF_formula
xv of
    FOFF_logic a :: FOF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFF_logic" [Int
a'] []) ATermTable
att1
    FOFF_sequent a :: FOF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFF_sequent" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_logic_formula
a') ->
      (ATermTable
att1, FOF_logic_formula -> FOF_formula
FOFF_logic FOF_logic_formula
a') }
    ShAAppl "FOFF_sequent" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_sequent
a') ->
      (ATermTable
att1, FOF_sequent -> FOF_formula
FOFF_sequent FOF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_logic_formula where
  toShATermAux :: ATermTable -> FOF_logic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_logic_formula
xv = case FOF_logic_formula
xv of
    FOFLF_binary a :: FOF_binary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_binary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_binary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFLF_binary" [Int
a'] []) ATermTable
att1
    FOFLF_unitary a :: FOF_unitary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_unitary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFLF_unitary" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_logic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFLF_binary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_binary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_binary_formula
a') ->
      (ATermTable
att1, FOF_binary_formula -> FOF_logic_formula
FOFLF_binary FOF_binary_formula
a') }
    ShAAppl "FOFLF_unitary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_unitary_formula
a') ->
      (ATermTable
att1, FOF_unitary_formula -> FOF_logic_formula
FOFLF_unitary FOF_unitary_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_logic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_logic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_binary_formula where
  toShATermAux :: ATermTable -> FOF_binary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_binary_formula
xv = case FOF_binary_formula
xv of
    FOFBF_nonassoc a :: FOF_binary_nonassoc
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_binary_nonassoc -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_binary_nonassoc
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFBF_nonassoc" [Int
a'] []) ATermTable
att1
    FOFBF_assoc a :: FOF_binary_assoc
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_binary_assoc -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_binary_assoc
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFBF_assoc" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_binary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFBF_nonassoc" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_binary_nonassoc)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_binary_nonassoc
a') ->
      (ATermTable
att1, FOF_binary_nonassoc -> FOF_binary_formula
FOFBF_nonassoc FOF_binary_nonassoc
a') }
    ShAAppl "FOFBF_assoc" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_binary_assoc)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_binary_assoc
a') ->
      (ATermTable
att1, FOF_binary_assoc -> FOF_binary_formula
FOFBF_assoc FOF_binary_assoc
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_binary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_binary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_binary_nonassoc where
  toShATermAux :: ATermTable -> FOF_binary_nonassoc -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_binary_nonassoc
xv = case FOF_binary_nonassoc
xv of
    FOF_binary_nonassoc a :: Binary_connective
a b :: FOF_unitary_formula
b c :: FOF_unitary_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Binary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Binary_connective
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_unitary_formula
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> FOF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 FOF_unitary_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_binary_nonassoc" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_binary_nonassoc)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_binary_nonassoc" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Binary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Binary_connective
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_unitary_formula
b') ->
      case Int -> ATermTable -> (ATermTable, FOF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: FOF_unitary_formula
c') ->
      (ATermTable
att3, Binary_connective
-> FOF_unitary_formula
-> FOF_unitary_formula
-> FOF_binary_nonassoc
FOF_binary_nonassoc Binary_connective
a' FOF_unitary_formula
b' FOF_unitary_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_binary_nonassoc)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_binary_nonassoc" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_binary_assoc where
  toShATermAux :: ATermTable -> FOF_binary_assoc -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_binary_assoc
xv = case FOF_binary_assoc
xv of
    FOFBA_or a :: FOF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFBA_or" [Int
a'] []) ATermTable
att1
    FOFBA_and a :: FOF_or_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_or_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_or_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFBA_and" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_binary_assoc)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFBA_or" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_or_formula
a') ->
      (ATermTable
att1, FOF_or_formula -> FOF_binary_assoc
FOFBA_or FOF_or_formula
a') }
    ShAAppl "FOFBA_and" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_or_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_or_formula
a') ->
      (ATermTable
att1, FOF_or_formula -> FOF_binary_assoc
FOFBA_and FOF_or_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_binary_assoc)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_binary_assoc" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_unitary_formula where
  toShATermAux :: ATermTable -> FOF_unitary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_unitary_formula
xv = case FOF_unitary_formula
xv of
    FOFUF_quantified a :: FOF_quantified_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_quantified_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_quantified_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFUF_quantified" [Int
a'] []) ATermTable
att1
    FOFUF_unary a :: FOF_unary_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_unary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_unary_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFUF_unary" [Int
a'] []) ATermTable
att1
    FOFUF_atomic a :: FOF_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFUF_atomic" [Int
a'] []) ATermTable
att1
    FOFUF_logic a :: FOF_logic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_logic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFUF_logic" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_unitary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFUF_quantified" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_quantified_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_quantified_formula
a') ->
      (ATermTable
att1, FOF_quantified_formula -> FOF_unitary_formula
FOFUF_quantified FOF_quantified_formula
a') }
    ShAAppl "FOFUF_unary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_unary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_unary_formula
a') ->
      (ATermTable
att1, FOF_unary_formula -> FOF_unitary_formula
FOFUF_unary FOF_unary_formula
a') }
    ShAAppl "FOFUF_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_atomic_formula
a') ->
      (ATermTable
att1, FOF_atomic_formula -> FOF_unitary_formula
FOFUF_atomic FOF_atomic_formula
a') }
    ShAAppl "FOFUF_logic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_logic_formula
a') ->
      (ATermTable
att1, FOF_logic_formula -> FOF_unitary_formula
FOFUF_logic FOF_logic_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_unitary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_unitary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_quantified_formula where
  toShATermAux :: ATermTable -> FOF_quantified_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_quantified_formula
xv = case FOF_quantified_formula
xv of
    FOF_quantified_formula a :: FOF_quantifier
a b :: FOF_variable_list
b c :: FOF_unitary_formula
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_quantifier
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_variable_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_variable_list
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> FOF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 FOF_unitary_formula
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_quantified_formula" [Int
a', Int
b',
                                                           Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_quantified_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_quantified_formula" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_quantifier
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_variable_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_variable_list
b') ->
      case Int -> ATermTable -> (ATermTable, FOF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: FOF_unitary_formula
c') ->
      (ATermTable
att3, FOF_quantifier
-> FOF_variable_list
-> FOF_unitary_formula
-> FOF_quantified_formula
FOF_quantified_formula FOF_quantifier
a' FOF_variable_list
b' FOF_unitary_formula
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_quantified_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_quantified_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_unary_formula where
  toShATermAux :: ATermTable -> FOF_unary_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_unary_formula
xv = case FOF_unary_formula
xv of
    FOFUF_connective a :: Unary_connective
a b :: FOF_unitary_formula
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Unary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Unary_connective
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_unitary_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_unitary_formula
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFUF_connective" [Int
a', Int
b'] []) ATermTable
att2
    FOFUF_infix a :: FOF_infix_unary
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_infix_unary -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_infix_unary
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFUF_infix" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_unary_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFUF_connective" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Unary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Unary_connective
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_unitary_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_unitary_formula
b') ->
      (ATermTable
att2, Unary_connective -> FOF_unitary_formula -> FOF_unary_formula
FOFUF_connective Unary_connective
a' FOF_unitary_formula
b') }}
    ShAAppl "FOFUF_infix" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_infix_unary)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_infix_unary
a') ->
      (ATermTable
att1, FOF_infix_unary -> FOF_unary_formula
FOFUF_infix FOF_infix_unary
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_unary_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_unary_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_infix_unary where
  toShATermAux :: ATermTable -> FOF_infix_unary -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_infix_unary
xv = case FOF_infix_unary
xv of
    FOF_infix_unary a :: FOF_term
a b :: FOF_term
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_term
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_term
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_infix_unary" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_infix_unary)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_infix_unary" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_term
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_term
b') ->
      (ATermTable
att2, FOF_term -> FOF_term -> FOF_infix_unary
FOF_infix_unary FOF_term
a' FOF_term
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_infix_unary)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_infix_unary" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_atomic_formula where
  toShATermAux :: ATermTable -> FOF_atomic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_atomic_formula
xv = case FOF_atomic_formula
xv of
    FOFAT_plain a :: FOF_plain_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_plain_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_plain_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFAT_plain" [Int
a'] []) ATermTable
att1
    FOFAT_defined a :: FOF_defined_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_defined_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_defined_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFAT_defined" [Int
a'] []) ATermTable
att1
    FOFAT_system a :: FOF_system_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_system_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_system_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFAT_system" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_atomic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFAT_plain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_plain_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_plain_atomic_formula
a') ->
      (ATermTable
att1, FOF_plain_atomic_formula -> FOF_atomic_formula
FOFAT_plain FOF_plain_atomic_formula
a') }
    ShAAppl "FOFAT_defined" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_defined_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_defined_atomic_formula
a') ->
      (ATermTable
att1, FOF_defined_atomic_formula -> FOF_atomic_formula
FOFAT_defined FOF_defined_atomic_formula
a') }
    ShAAppl "FOFAT_system" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_system_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_system_atomic_formula
a') ->
      (ATermTable
att1, FOF_system_atomic_formula -> FOF_atomic_formula
FOFAT_system FOF_system_atomic_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_atomic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_atomic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_plain_atomic_formula where
  toShATermAux :: ATermTable -> FOF_plain_atomic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_plain_atomic_formula
xv = case FOF_plain_atomic_formula
xv of
    FOFPAF_proposition a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFPAF_proposition" [Int
a'] []) ATermTable
att1
    FOFPAF_predicate a :: Token
a b :: FOF_arguments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_arguments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFPAF_predicate" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_plain_atomic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFPAF_proposition" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> FOF_plain_atomic_formula
FOFPAF_proposition Token
a') }
    ShAAppl "FOFPAF_predicate" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_arguments
b') ->
      (ATermTable
att2, Token -> FOF_arguments -> FOF_plain_atomic_formula
FOFPAF_predicate Token
a' FOF_arguments
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_plain_atomic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_plain_atomic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_defined_atomic_formula where
  toShATermAux :: ATermTable -> FOF_defined_atomic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_defined_atomic_formula
xv = case FOF_defined_atomic_formula
xv of
    FOFDAF_plain a :: FOF_defined_plain_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_defined_plain_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_defined_plain_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDAF_plain" [Int
a'] []) ATermTable
att1
    FOFDAF_infix a :: FOF_defined_infix_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_defined_infix_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_defined_infix_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDAF_infix" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_defined_atomic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFDAF_plain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_defined_plain_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_defined_plain_formula
a') ->
      (ATermTable
att1, FOF_defined_plain_formula -> FOF_defined_atomic_formula
FOFDAF_plain FOF_defined_plain_formula
a') }
    ShAAppl "FOFDAF_infix" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_defined_infix_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_defined_infix_formula
a') ->
      (ATermTable
att1, FOF_defined_infix_formula -> FOF_defined_atomic_formula
FOFDAF_infix FOF_defined_infix_formula
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_defined_atomic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_defined_atomic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_defined_plain_formula where
  toShATermAux :: ATermTable -> FOF_defined_plain_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_defined_plain_formula
xv = case FOF_defined_plain_formula
xv of
    FOFDPF_proposition a :: Defined_proposition
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_proposition -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_proposition
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDPF_proposition" [Int
a'] []) ATermTable
att1
    FOFDPF_predicate a :: Defined_predicate
a b :: FOF_arguments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_predicate -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_predicate
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_arguments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDPF_predicate" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_defined_plain_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFDPF_proposition" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_proposition)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_proposition
a') ->
      (ATermTable
att1, Defined_proposition -> FOF_defined_plain_formula
FOFDPF_proposition Defined_proposition
a') }
    ShAAppl "FOFDPF_predicate" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_predicate)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_predicate
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_arguments
b') ->
      (ATermTable
att2, Defined_predicate -> FOF_arguments -> FOF_defined_plain_formula
FOFDPF_predicate Defined_predicate
a' FOF_arguments
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_defined_plain_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_defined_plain_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_defined_infix_formula where
  toShATermAux :: ATermTable -> FOF_defined_infix_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_defined_infix_formula
xv = case FOF_defined_infix_formula
xv of
    FOF_defined_infix_formula a :: Defined_infix_pred
a b :: FOF_term
b c :: FOF_term
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_infix_pred -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_infix_pred
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_term
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 FOF_term
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_defined_infix_formula" [Int
a', Int
b',
                                                              Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_defined_infix_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_defined_infix_formula" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_infix_pred)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_infix_pred
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_term
b') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: FOF_term
c') ->
      (ATermTable
att3, Defined_infix_pred
-> FOF_term -> FOF_term -> FOF_defined_infix_formula
FOF_defined_infix_formula Defined_infix_pred
a' FOF_term
b' FOF_term
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_defined_infix_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_defined_infix_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_system_atomic_formula where
  toShATermAux :: ATermTable -> FOF_system_atomic_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_system_atomic_formula
xv = case FOF_system_atomic_formula
xv of
    FOF_system_atomic_formula a :: FOF_system_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_system_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_system_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_system_atomic_formula" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_system_atomic_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_system_atomic_formula" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_system_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_system_term
a') ->
      (ATermTable
att1, FOF_system_term -> FOF_system_atomic_formula
FOF_system_atomic_formula FOF_system_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_system_atomic_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_system_atomic_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_plain_term where
  toShATermAux :: ATermTable -> FOF_plain_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_plain_term
xv = case FOF_plain_term
xv of
    FOFPT_constant a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFPT_constant" [Int
a'] []) ATermTable
att1
    FOFPT_functor a :: Token
a b :: FOF_arguments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_arguments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFPT_functor" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_plain_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFPT_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> FOF_plain_term
FOFPT_constant Token
a') }
    ShAAppl "FOFPT_functor" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_arguments
b') ->
      (ATermTable
att2, Token -> FOF_arguments -> FOF_plain_term
FOFPT_functor Token
a' FOF_arguments
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_plain_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_plain_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_defined_term where
  toShATermAux :: ATermTable -> FOF_defined_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_defined_term
xv = case FOF_defined_term
xv of
    FOFDT_term a :: Defined_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDT_term" [Int
a'] []) ATermTable
att1
    FOFDT_atomic a :: FOF_defined_atomic_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_defined_atomic_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_defined_atomic_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDT_atomic" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_defined_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFDT_term" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_term
a') ->
      (ATermTable
att1, Defined_term -> FOF_defined_term
FOFDT_term Defined_term
a') }
    ShAAppl "FOFDT_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_defined_atomic_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_defined_atomic_term
a') ->
      (ATermTable
att1, FOF_defined_atomic_term -> FOF_defined_term
FOFDT_atomic FOF_defined_atomic_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_defined_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_defined_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_defined_atomic_term where
  toShATermAux :: ATermTable -> FOF_defined_atomic_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_defined_atomic_term
xv = case FOF_defined_atomic_term
xv of
    FOFDAT_plain a :: FOF_defined_plain_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_defined_plain_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_defined_plain_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDAT_plain" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_defined_atomic_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFDAT_plain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_defined_plain_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_defined_plain_term
a') ->
      (ATermTable
att1, FOF_defined_plain_term -> FOF_defined_atomic_term
FOFDAT_plain FOF_defined_plain_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_defined_atomic_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_defined_atomic_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_defined_plain_term where
  toShATermAux :: ATermTable -> FOF_defined_plain_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_defined_plain_term
xv = case FOF_defined_plain_term
xv of
    FOFDPT_constant a :: Defined_functor
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_functor -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_functor
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDPT_constant" [Int
a'] []) ATermTable
att1
    FOFDPT_functor a :: Defined_functor
a b :: FOF_arguments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_functor -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_functor
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_arguments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFDPT_functor" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_defined_plain_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFDPT_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_functor)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_functor
a') ->
      (ATermTable
att1, Defined_functor -> FOF_defined_plain_term
FOFDPT_constant Defined_functor
a') }
    ShAAppl "FOFDPT_functor" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_functor)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_functor
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_arguments
b') ->
      (ATermTable
att2, Defined_functor -> FOF_arguments -> FOF_defined_plain_term
FOFDPT_functor Defined_functor
a' FOF_arguments
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_defined_plain_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_defined_plain_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_system_term where
  toShATermAux :: ATermTable -> FOF_system_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_system_term
xv = case FOF_system_term
xv of
    FOFST_constant a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFST_constant" [Int
a'] []) ATermTable
att1
    FOFST_functor a :: Token
a b :: FOF_arguments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_arguments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFST_functor" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_system_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFST_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> FOF_system_term
FOFST_constant Token
a') }
    ShAAppl "FOFST_functor" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_arguments
b') ->
      (ATermTable
att2, Token -> FOF_arguments -> FOF_system_term
FOFST_functor Token
a' FOF_arguments
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_system_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_system_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_term where
  toShATermAux :: ATermTable -> FOF_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_term
xv = case FOF_term
xv of
    FOFT_function a :: FOF_function_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_function_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_function_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFT_function" [Int
a'] []) ATermTable
att1
    FOFT_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFT_variable" [Int
a'] []) ATermTable
att1
    FOFT_conditional a :: TFF_conditional_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_conditional_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_conditional_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFT_conditional" [Int
a'] []) ATermTable
att1
    FOFT_let a :: TFF_let_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFT_let" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFT_function" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_function_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_function_term
a') ->
      (ATermTable
att1, FOF_function_term -> FOF_term
FOFT_function FOF_function_term
a') }
    ShAAppl "FOFT_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> FOF_term
FOFT_variable Token
a') }
    ShAAppl "FOFT_conditional" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_conditional_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_conditional_term
a') ->
      (ATermTable
att1, TFF_conditional_term -> FOF_term
FOFT_conditional TFF_conditional_term
a') }
    ShAAppl "FOFT_let" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term
a') ->
      (ATermTable
att1, TFF_let_term -> FOF_term
FOFT_let TFF_let_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_function_term where
  toShATermAux :: ATermTable -> FOF_function_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_function_term
xv = case FOF_function_term
xv of
    FOFFT_plain a :: FOF_plain_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_plain_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_plain_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFFT_plain" [Int
a'] []) ATermTable
att1
    FOFFT_defined a :: FOF_defined_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_defined_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_defined_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFFT_defined" [Int
a'] []) ATermTable
att1
    FOFFT_system a :: FOF_system_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_system_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_system_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFFT_system" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_function_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFFT_plain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_plain_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_plain_term
a') ->
      (ATermTable
att1, FOF_plain_term -> FOF_function_term
FOFFT_plain FOF_plain_term
a') }
    ShAAppl "FOFFT_defined" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_defined_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_defined_term
a') ->
      (ATermTable
att1, FOF_defined_term -> FOF_function_term
FOFFT_defined FOF_defined_term
a') }
    ShAAppl "FOFFT_system" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_system_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_system_term
a') ->
      (ATermTable
att1, FOF_system_term -> FOF_function_term
FOFFT_system FOF_system_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_function_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_function_term" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_conditional_term where
  toShATermAux :: ATermTable -> TFF_conditional_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_conditional_term
xv = case TFF_conditional_term
xv of
    TFF_conditional_term a :: TFF_logic_formula
a b :: FOF_term
b c :: FOF_term
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_logic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_logic_formula
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_term
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 FOF_term
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF_conditional_term" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_conditional_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFF_conditional_term" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_logic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_logic_formula
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_term
b') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: FOF_term
c') ->
      (ATermTable
att3, TFF_logic_formula -> FOF_term -> FOF_term -> TFF_conditional_term
TFF_conditional_term TFF_logic_formula
a' FOF_term
b' FOF_term
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_conditional_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_conditional_term" ShATerm
u

instance ShATermConvertible TPTP.AS.TFF_let_term where
  toShATermAux :: ATermTable -> TFF_let_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TFF_let_term
xv = case TFF_let_term
xv of
    TFFLT_formula a :: TFF_let_formula_defns
a b :: FOF_term
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_formula_defns -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_formula_defns
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_term
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLT_formula" [Int
a', Int
b'] []) ATermTable
att2
    TFFLT_term a :: TFF_let_term_defns
a b :: FOF_term
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_let_term_defns -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_let_term_defns
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_term
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFFLT_term" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TFF_let_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TFFLT_formula" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_formula_defns)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_formula_defns
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_term
b') ->
      (ATermTable
att2, TFF_let_formula_defns -> FOF_term -> TFF_let_term
TFFLT_formula TFF_let_formula_defns
a' FOF_term
b') }}
    ShAAppl "TFFLT_term" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_let_term_defns)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_let_term_defns
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_term
b') ->
      (ATermTable
att2, TFF_let_term_defns -> FOF_term -> TFF_let_term
TFFLT_term TFF_let_term_defns
a' FOF_term
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TFF_let_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TFF_let_term" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_sequent where
  toShATermAux :: ATermTable -> FOF_sequent -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_sequent
xv = case FOF_sequent
xv of
    FOFS_plain a :: FOF_formula_tuple
a b :: FOF_formula_tuple
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_formula_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_formula_tuple
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> FOF_formula_tuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FOF_formula_tuple
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFS_plain" [Int
a', Int
b'] []) ATermTable
att2
    FOFS_parens a :: FOF_sequent
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_sequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_sequent
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOFS_parens" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_sequent)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOFS_plain" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_formula_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_formula_tuple
a') ->
      case Int -> ATermTable -> (ATermTable, FOF_formula_tuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: FOF_formula_tuple
b') ->
      (ATermTable
att2, FOF_formula_tuple -> FOF_formula_tuple -> FOF_sequent
FOFS_plain FOF_formula_tuple
a' FOF_formula_tuple
b') }}
    ShAAppl "FOFS_parens" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_sequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_sequent
a') ->
      (ATermTable
att1, FOF_sequent -> FOF_sequent
FOFS_parens FOF_sequent
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_sequent)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_sequent" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_formula_tuple where
  toShATermAux :: ATermTable -> FOF_formula_tuple -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_formula_tuple
xv = case FOF_formula_tuple
xv of
    FOF_formula_tuple a :: [FOF_logic_formula]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [FOF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [FOF_logic_formula]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF_formula_tuple" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_formula_tuple)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FOF_formula_tuple" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [FOF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [FOF_logic_formula]
a') ->
      (ATermTable
att1, [FOF_logic_formula] -> FOF_formula_tuple
FOF_formula_tuple [FOF_logic_formula]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_formula_tuple)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_formula_tuple" ShATerm
u

instance ShATermConvertible TPTP.AS.CNF_formula where
  toShATermAux :: ATermTable -> CNF_formula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CNF_formula
xv = case CNF_formula
xv of
    CNFF_plain a :: Disjunction
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Disjunction -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Disjunction
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CNFF_plain" [Int
a'] []) ATermTable
att1
    CNFF_parens a :: Disjunction
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Disjunction -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Disjunction
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CNFF_parens" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CNF_formula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CNFF_plain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Disjunction)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Disjunction
a') ->
      (ATermTable
att1, Disjunction -> CNF_formula
CNFF_plain Disjunction
a') }
    ShAAppl "CNFF_parens" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Disjunction)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Disjunction
a') ->
      (ATermTable
att1, Disjunction -> CNF_formula
CNFF_parens Disjunction
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CNF_formula)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.CNF_formula" ShATerm
u

instance ShATermConvertible TPTP.AS.Disjunction where
  toShATermAux :: ATermTable -> Disjunction -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Disjunction
xv = case Disjunction
xv of
    Disjunction a :: [Literal]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Literal] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Literal]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Disjunction" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Disjunction)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Disjunction" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [Literal])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Literal]
a') ->
      (ATermTable
att1, [Literal] -> Disjunction
Disjunction [Literal]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Disjunction)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Disjunction" ShATerm
u

instance ShATermConvertible TPTP.AS.Literal where
  toShATermAux :: ATermTable -> Literal -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Literal
xv = case Literal
xv of
    Lit_atomic a :: FOF_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Lit_atomic" [Int
a'] []) ATermTable
att1
    Lit_negative a :: FOF_atomic_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_atomic_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_atomic_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Lit_negative" [Int
a'] []) ATermTable
att1
    Lit_fof_infix a :: FOF_infix_unary
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_infix_unary -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_infix_unary
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Lit_fof_infix" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Literal)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Lit_atomic" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_atomic_formula
a') ->
      (ATermTable
att1, FOF_atomic_formula -> Literal
Lit_atomic FOF_atomic_formula
a') }
    ShAAppl "Lit_negative" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_atomic_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_atomic_formula
a') ->
      (ATermTable
att1, FOF_atomic_formula -> Literal
Lit_negative FOF_atomic_formula
a') }
    ShAAppl "Lit_fof_infix" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_infix_unary)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_infix_unary
a') ->
      (ATermTable
att1, FOF_infix_unary -> Literal
Lit_fof_infix FOF_infix_unary
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Literal)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Literal" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_quantifier where
  toShATermAux :: ATermTable -> THF_quantifier -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_quantifier
xv = case THF_quantifier
xv of
    THFQ_fof a :: FOF_quantifier
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_quantifier
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFQ_fof" [Int
a'] []) ATermTable
att1
    THFQ_th0 a :: TH0_quantifier
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TH0_quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TH0_quantifier
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFQ_th0" [Int
a'] []) ATermTable
att1
    THFQ_th1 a :: TH1_quantifier
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TH1_quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TH1_quantifier
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFQ_th1" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_quantifier)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFQ_fof" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_quantifier
a') ->
      (ATermTable
att1, FOF_quantifier -> THF_quantifier
THFQ_fof FOF_quantifier
a') }
    ShAAppl "THFQ_th0" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TH0_quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TH0_quantifier
a') ->
      (ATermTable
att1, TH0_quantifier -> THF_quantifier
THFQ_th0 TH0_quantifier
a') }
    ShAAppl "THFQ_th1" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TH1_quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TH1_quantifier
a') ->
      (ATermTable
att1, TH1_quantifier -> THF_quantifier
THFQ_th1 TH1_quantifier
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_quantifier)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_quantifier" ShATerm
u

instance ShATermConvertible TPTP.AS.TH1_quantifier where
  toShATermAux :: ATermTable -> TH1_quantifier -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TH1_quantifier
xv = case TH1_quantifier
xv of
    TH1_DependentProduct ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_DependentProduct" [] []) ATermTable
att0
    TH1_DependentSum ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_DependentSum" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TH1_quantifier)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TH1_DependentProduct" [] _ -> (ATermTable
att0, TH1_quantifier
TH1_DependentProduct)
    ShAAppl "TH1_DependentSum" [] _ -> (ATermTable
att0, TH1_quantifier
TH1_DependentSum)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TH1_quantifier)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TH1_quantifier" ShATerm
u

instance ShATermConvertible TPTP.AS.TH0_quantifier where
  toShATermAux :: ATermTable -> TH0_quantifier -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TH0_quantifier
xv = case TH0_quantifier
xv of
    TH0_LambdaBinder ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH0_LambdaBinder" [] []) ATermTable
att0
    TH0_IndefiniteDescription ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH0_IndefiniteDescription" [] []) ATermTable
att0
    TH0_DefiniteDescription ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH0_DefiniteDescription" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TH0_quantifier)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TH0_LambdaBinder" [] _ -> (ATermTable
att0, TH0_quantifier
TH0_LambdaBinder)
    ShAAppl "TH0_IndefiniteDescription" [] _ -> (ATermTable
att0, TH0_quantifier
TH0_IndefiniteDescription)
    ShAAppl "TH0_DefiniteDescription" [] _ -> (ATermTable
att0, TH0_quantifier
TH0_DefiniteDescription)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TH0_quantifier)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TH0_quantifier" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_pair_connective where
  toShATermAux :: ATermTable -> THF_pair_connective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_pair_connective
xv = case THF_pair_connective
xv of
    THF_infix_equality ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_infix_equality" [] []) ATermTable
att0
    Infix_inequality ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Infix_inequality" [] []) ATermTable
att0
    THFPC_binary a :: Binary_connective
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Binary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Binary_connective
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFPC_binary" [Int
a'] []) ATermTable
att1
    THF_assignment -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF_assignment" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_pair_connective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THF_infix_equality" [] _ -> (ATermTable
att0, THF_pair_connective
THF_infix_equality)
    ShAAppl "Infix_inequality" [] _ -> (ATermTable
att0, THF_pair_connective
Infix_inequality)
    ShAAppl "THFPC_binary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Binary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Binary_connective
a') ->
      (ATermTable
att1, Binary_connective -> THF_pair_connective
THFPC_binary Binary_connective
a') }
    ShAAppl "THF_assignment" [] _ -> (ATermTable
att0, THF_pair_connective
THF_assignment)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_pair_connective)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_pair_connective" ShATerm
u

instance ShATermConvertible TPTP.AS.THF_unary_connective where
  toShATermAux :: ATermTable -> THF_unary_connective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THF_unary_connective
xv = case THF_unary_connective
xv of
    THFUC_unary a :: Unary_connective
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Unary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Unary_connective
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUC_unary" [Int
a'] []) ATermTable
att1
    THFUC_th1 a :: TH1_unary_connective
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TH1_unary_connective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TH1_unary_connective
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFUC_th1" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THF_unary_connective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFUC_unary" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Unary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Unary_connective
a') ->
      (ATermTable
att1, Unary_connective -> THF_unary_connective
THFUC_unary Unary_connective
a') }
    ShAAppl "THFUC_th1" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TH1_unary_connective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TH1_unary_connective
a') ->
      (ATermTable
att1, TH1_unary_connective -> THF_unary_connective
THFUC_th1 TH1_unary_connective
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THF_unary_connective)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.THF_unary_connective" ShATerm
u

instance ShATermConvertible TPTP.AS.TH1_unary_connective where
  toShATermAux :: ATermTable -> TH1_unary_connective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TH1_unary_connective
xv = case TH1_unary_connective
xv of
    TH1_PiForAll -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_PiForAll" [] []) ATermTable
att0
    TH1_PiSigmaExists ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_PiSigmaExists" [] []) ATermTable
att0
    TH1_PiIndefiniteDescription ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_PiIndefiniteDescription" [] []) ATermTable
att0
    TH1_PiDefiniteDescription ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_PiDefiniteDescription" [] []) ATermTable
att0
    TH1_PiEquality -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TH1_PiEquality" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TH1_unary_connective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TH1_PiForAll" [] _ -> (ATermTable
att0, TH1_unary_connective
TH1_PiForAll)
    ShAAppl "TH1_PiSigmaExists" [] _ -> (ATermTable
att0, TH1_unary_connective
TH1_PiSigmaExists)
    ShAAppl "TH1_PiIndefiniteDescription" [] _ -> (ATermTable
att0, TH1_unary_connective
TH1_PiIndefiniteDescription)
    ShAAppl "TH1_PiDefiniteDescription" [] _ -> (ATermTable
att0, TH1_unary_connective
TH1_PiDefiniteDescription)
    ShAAppl "TH1_PiEquality" [] _ -> (ATermTable
att0, TH1_unary_connective
TH1_PiEquality)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TH1_unary_connective)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.TH1_unary_connective" ShATerm
u

instance ShATermConvertible TPTP.AS.FOF_quantifier where
  toShATermAux :: ATermTable -> FOF_quantifier -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FOF_quantifier
xv = case FOF_quantifier
xv of
    ForAll -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ForAll" [] []) ATermTable
att0
    Exists -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Exists" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FOF_quantifier)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ForAll" [] _ -> (ATermTable
att0, FOF_quantifier
ForAll)
    ShAAppl "Exists" [] _ -> (ATermTable
att0, FOF_quantifier
Exists)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FOF_quantifier)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.FOF_quantifier" ShATerm
u

instance ShATermConvertible TPTP.AS.Binary_connective where
  toShATermAux :: ATermTable -> Binary_connective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Binary_connective
xv = case Binary_connective
xv of
    Equivalence -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Equivalence" [] []) ATermTable
att0
    Implication -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Implication" [] []) ATermTable
att0
    ReverseImplication ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ReverseImplication" [] []) ATermTable
att0
    XOR -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "XOR" [] []) ATermTable
att0
    NOR -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NOR" [] []) ATermTable
att0
    NAND -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NAND" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Binary_connective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Equivalence" [] _ -> (ATermTable
att0, Binary_connective
Equivalence)
    ShAAppl "Implication" [] _ -> (ATermTable
att0, Binary_connective
Implication)
    ShAAppl "ReverseImplication" [] _ -> (ATermTable
att0, Binary_connective
ReverseImplication)
    ShAAppl "XOR" [] _ -> (ATermTable
att0, Binary_connective
XOR)
    ShAAppl "NOR" [] _ -> (ATermTable
att0, Binary_connective
NOR)
    ShAAppl "NAND" [] _ -> (ATermTable
att0, Binary_connective
NAND)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Binary_connective)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Binary_connective" ShATerm
u

instance ShATermConvertible TPTP.AS.Assoc_connective where
  toShATermAux :: ATermTable -> Assoc_connective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Assoc_connective
xv = case Assoc_connective
xv of
    OR -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OR" [] []) ATermTable
att0
    AND -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AND" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Assoc_connective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OR" [] _ -> (ATermTable
att0, Assoc_connective
OR)
    ShAAppl "AND" [] _ -> (ATermTable
att0, Assoc_connective
AND)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Assoc_connective)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Assoc_connective" ShATerm
u

instance ShATermConvertible TPTP.AS.Unary_connective where
  toShATermAux :: ATermTable -> Unary_connective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Unary_connective
xv = case Unary_connective
xv of
    NOT -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NOT" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Unary_connective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "NOT" [] _ -> (ATermTable
att0, Unary_connective
NOT)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Unary_connective)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Unary_connective" ShATerm
u

instance ShATermConvertible TPTP.AS.Defined_type where
  toShATermAux :: ATermTable -> Defined_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Defined_type
xv = case Defined_type
xv of
    OType -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OType" [] []) ATermTable
att0
    O -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "O" [] []) ATermTable
att0
    IType -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IType" [] []) ATermTable
att0
    I -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "I" [] []) ATermTable
att0
    TType -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TType" [] []) ATermTable
att0
    Real -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Real" [] []) ATermTable
att0
    Rat -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Rat" [] []) ATermTable
att0
    Int -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Int" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Defined_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OType" [] _ -> (ATermTable
att0, Defined_type
OType)
    ShAAppl "O" [] _ -> (ATermTable
att0, Defined_type
O)
    ShAAppl "IType" [] _ -> (ATermTable
att0, Defined_type
IType)
    ShAAppl "I" [] _ -> (ATermTable
att0, Defined_type
I)
    ShAAppl "TType" [] _ -> (ATermTable
att0, Defined_type
TType)
    ShAAppl "Real" [] _ -> (ATermTable
att0, Defined_type
Real)
    ShAAppl "Rat" [] _ -> (ATermTable
att0, Defined_type
Rat)
    ShAAppl "Int" [] _ -> (ATermTable
att0, Defined_type
Int)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Defined_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Defined_type" ShATerm
u

instance ShATermConvertible TPTP.AS.Atom where
  toShATermAux :: ATermTable -> Atom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Atom
xv = case Atom
xv of
    Atom_untyped a :: Untyped_atom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Untyped_atom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Untyped_atom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Atom_untyped" [Int
a'] []) ATermTable
att1
    Atom_constant a :: Defined_functor
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Defined_functor -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Defined_functor
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Atom_constant" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Atom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Atom_untyped" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Untyped_atom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Untyped_atom
a') ->
      (ATermTable
att1, Untyped_atom -> Atom
Atom_untyped Untyped_atom
a') }
    ShAAppl "Atom_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Defined_functor)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Defined_functor
a') ->
      (ATermTable
att1, Defined_functor -> Atom
Atom_constant Defined_functor
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Atom)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Atom" ShATerm
u

instance ShATermConvertible TPTP.AS.Untyped_atom where
  toShATermAux :: ATermTable -> Untyped_atom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Untyped_atom
xv = case Untyped_atom
xv of
    UA_constant a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UA_constant" [Int
a'] []) ATermTable
att1
    UA_system a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UA_system" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Untyped_atom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "UA_constant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Untyped_atom
UA_constant Token
a') }
    ShAAppl "UA_system" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Untyped_atom
UA_system Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Untyped_atom)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Untyped_atom" ShATerm
u

instance ShATermConvertible TPTP.AS.Defined_proposition where
  toShATermAux :: ATermTable -> Defined_proposition -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Defined_proposition
xv = case Defined_proposition
xv of
    TPTP_true -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP_true" [] []) ATermTable
att0
    TPTP_false -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TPTP_false" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Defined_proposition)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TPTP_true" [] _ -> (ATermTable
att0, Defined_proposition
TPTP_true)
    ShAAppl "TPTP_false" [] _ -> (ATermTable
att0, Defined_proposition
TPTP_false)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Defined_proposition)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Defined_proposition" ShATerm
u

instance ShATermConvertible TPTP.AS.Defined_predicate where
  toShATermAux :: ATermTable -> Defined_predicate -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Defined_predicate
xv = case Defined_predicate
xv of
    Distinct -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Distinct" [] []) ATermTable
att0
    Less -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Less" [] []) ATermTable
att0
    Lesseq -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Lesseq" [] []) ATermTable
att0
    Greater -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Greater" [] []) ATermTable
att0
    Greatereq -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Greatereq" [] []) ATermTable
att0
    Is_int -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Is_int" [] []) ATermTable
att0
    Is_rat -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Is_rat" [] []) ATermTable
att0
    Box_P -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Box_P" [] []) ATermTable
att0
    Box_i -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Box_i" [] []) ATermTable
att0
    Box_int -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Box_int" [] []) ATermTable
att0
    Box -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Box" [] []) ATermTable
att0
    Dia_P -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Dia_P" [] []) ATermTable
att0
    Dia_i -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Dia_i" [] []) ATermTable
att0
    Dia_int -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Dia_int" [] []) ATermTable
att0
    Dia -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Dia" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Defined_predicate)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Distinct" [] _ -> (ATermTable
att0, Defined_predicate
Distinct)
    ShAAppl "Less" [] _ -> (ATermTable
att0, Defined_predicate
Less)
    ShAAppl "Lesseq" [] _ -> (ATermTable
att0, Defined_predicate
Lesseq)
    ShAAppl "Greater" [] _ -> (ATermTable
att0, Defined_predicate
Greater)
    ShAAppl "Greatereq" [] _ -> (ATermTable
att0, Defined_predicate
Greatereq)
    ShAAppl "Is_int" [] _ -> (ATermTable
att0, Defined_predicate
Is_int)
    ShAAppl "Is_rat" [] _ -> (ATermTable
att0, Defined_predicate
Is_rat)
    ShAAppl "Box_P" [] _ -> (ATermTable
att0, Defined_predicate
Box_P)
    ShAAppl "Box_i" [] _ -> (ATermTable
att0, Defined_predicate
Box_i)
    ShAAppl "Box_int" [] _ -> (ATermTable
att0, Defined_predicate
Box_int)
    ShAAppl "Box" [] _ -> (ATermTable
att0, Defined_predicate
Box)
    ShAAppl "Dia_P" [] _ -> (ATermTable
att0, Defined_predicate
Dia_P)
    ShAAppl "Dia_i" [] _ -> (ATermTable
att0, Defined_predicate
Dia_i)
    ShAAppl "Dia_int" [] _ -> (ATermTable
att0, Defined_predicate
Dia_int)
    ShAAppl "Dia" [] _ -> (ATermTable
att0, Defined_predicate
Dia)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Defined_predicate)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Defined_predicate" ShATerm
u

instance ShATermConvertible TPTP.AS.Defined_infix_pred where
  toShATermAux :: ATermTable -> Defined_infix_pred -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Defined_infix_pred
xv = case Defined_infix_pred
xv of
    Defined_infix_equality ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Defined_infix_equality" [] []) ATermTable
att0
    Defined_assignment ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Defined_assignment" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Defined_infix_pred)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Defined_infix_equality" [] _ -> (ATermTable
att0, Defined_infix_pred
Defined_infix_equality)
    ShAAppl "Defined_assignment" [] _ -> (ATermTable
att0, Defined_infix_pred
Defined_assignment)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Defined_infix_pred)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Defined_infix_pred" ShATerm
u

instance ShATermConvertible TPTP.AS.Defined_functor where
  toShATermAux :: ATermTable -> Defined_functor -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Defined_functor
xv = case Defined_functor
xv of
    Uminus -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Uminus" [] []) ATermTable
att0
    Sum -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Sum" [] []) ATermTable
att0
    Difference -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Difference" [] []) ATermTable
att0
    Product -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Product" [] []) ATermTable
att0
    Quotient -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Quotient" [] []) ATermTable
att0
    Quotient_e -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Quotient_e" [] []) ATermTable
att0
    Quotient_t -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Quotient_t" [] []) ATermTable
att0
    Quotient_f -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Quotient_f" [] []) ATermTable
att0
    Remainder_e -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Remainder_e" [] []) ATermTable
att0
    Remainder_t -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Remainder_t" [] []) ATermTable
att0
    Remainder_f -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Remainder_f" [] []) ATermTable
att0
    Floor -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Floor" [] []) ATermTable
att0
    Ceiling -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Ceiling" [] []) ATermTable
att0
    Truncate -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Truncate" [] []) ATermTable
att0
    Round -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Round" [] []) ATermTable
att0
    To_int -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "To_int" [] []) ATermTable
att0
    To_rat -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "To_rat" [] []) ATermTable
att0
    To_real -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "To_real" [] []) ATermTable
att0
    DF_atomic_defined_word a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DF_atomic_defined_word" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Defined_functor)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Uminus" [] _ -> (ATermTable
att0, Defined_functor
Uminus)
    ShAAppl "Sum" [] _ -> (ATermTable
att0, Defined_functor
Sum)
    ShAAppl "Difference" [] _ -> (ATermTable
att0, Defined_functor
Difference)
    ShAAppl "Product" [] _ -> (ATermTable
att0, Defined_functor
Product)
    ShAAppl "Quotient" [] _ -> (ATermTable
att0, Defined_functor
Quotient)
    ShAAppl "Quotient_e" [] _ -> (ATermTable
att0, Defined_functor
Quotient_e)
    ShAAppl "Quotient_t" [] _ -> (ATermTable
att0, Defined_functor
Quotient_t)
    ShAAppl "Quotient_f" [] _ -> (ATermTable
att0, Defined_functor
Quotient_f)
    ShAAppl "Remainder_e" [] _ -> (ATermTable
att0, Defined_functor
Remainder_e)
    ShAAppl "Remainder_t" [] _ -> (ATermTable
att0, Defined_functor
Remainder_t)
    ShAAppl "Remainder_f" [] _ -> (ATermTable
att0, Defined_functor
Remainder_f)
    ShAAppl "Floor" [] _ -> (ATermTable
att0, Defined_functor
Floor)
    ShAAppl "Ceiling" [] _ -> (ATermTable
att0, Defined_functor
Ceiling)
    ShAAppl "Truncate" [] _ -> (ATermTable
att0, Defined_functor
Truncate)
    ShAAppl "Round" [] _ -> (ATermTable
att0, Defined_functor
Round)
    ShAAppl "To_int" [] _ -> (ATermTable
att0, Defined_functor
To_int)
    ShAAppl "To_rat" [] _ -> (ATermTable
att0, Defined_functor
To_rat)
    ShAAppl "To_real" [] _ -> (ATermTable
att0, Defined_functor
To_real)
    ShAAppl "DF_atomic_defined_word" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Defined_functor
DF_atomic_defined_word Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Defined_functor)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Defined_functor" ShATerm
u

instance ShATermConvertible TPTP.AS.Defined_term where
  toShATermAux :: ATermTable -> Defined_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Defined_term
xv = case Defined_term
xv of
    DT_number a :: Number
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Number -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Number
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DT_number" [Int
a'] []) ATermTable
att1
    DT_object a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DT_object" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Defined_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DT_number" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Number)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Number
a') ->
      (ATermTable
att1, Number -> Defined_term
DT_number Number
a') }
    ShAAppl "DT_object" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Defined_term
DT_object Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Defined_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Defined_term" ShATerm
u

instance ShATermConvertible TPTP.AS.Source where
  toShATermAux :: ATermTable -> Source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Source
xv = case Source
xv of
    Source_DAG a :: DAG_source
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DAG_source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DAG_source
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Source_DAG" [Int
a'] []) ATermTable
att1
    Source_internal a :: Internal_source
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Internal_source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Internal_source
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Source_internal" [Int
a'] []) ATermTable
att1
    Source_external a :: External_source
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> External_source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 External_source
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Source_external" [Int
a'] []) ATermTable
att1
    Unknown_source -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Unknown_source" [] []) ATermTable
att0
    Source_many a :: [Source]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Source] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Source]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Source_many" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Source_DAG" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DAG_source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DAG_source
a') ->
      (ATermTable
att1, DAG_source -> Source
Source_DAG DAG_source
a') }
    ShAAppl "Source_internal" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Internal_source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Internal_source
a') ->
      (ATermTable
att1, Internal_source -> Source
Source_internal Internal_source
a') }
    ShAAppl "Source_external" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, External_source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: External_source
a') ->
      (ATermTable
att1, External_source -> Source
Source_external External_source
a') }
    ShAAppl "Unknown_source" [] _ -> (ATermTable
att0, Source
Unknown_source)
    ShAAppl "Source_many" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [Source])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Source]
a') ->
      (ATermTable
att1, [Source] -> Source
Source_many [Source]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Source)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Source" ShATerm
u

instance ShATermConvertible TPTP.AS.DAG_source where
  toShATermAux :: ATermTable -> DAG_source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DAG_source
xv = case DAG_source
xv of
    DAGS_name a :: Name
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Name
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DAGS_name" [Int
a'] []) ATermTable
att1
    DAGS_record a :: Inference_record
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Inference_record -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Inference_record
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DAGS_record" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DAG_source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DAGS_name" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Name
a') ->
      (ATermTable
att1, Name -> DAG_source
DAGS_name Name
a') }
    ShAAppl "DAGS_record" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Inference_record)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Inference_record
a') ->
      (ATermTable
att1, Inference_record -> DAG_source
DAGS_record Inference_record
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DAG_source)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.DAG_source" ShATerm
u

instance ShATermConvertible TPTP.AS.Inference_record where
  toShATermAux :: ATermTable -> Inference_record -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Inference_record
xv = case Inference_record
xv of
    Inference_record a :: Token
a b :: Useful_info
b c :: Inference_parents
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Useful_info -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Useful_info
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Inference_parents -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Inference_parents
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inference_record" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Inference_record)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Inference_record" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, Useful_info)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Useful_info
b') ->
      case Int -> ATermTable -> (ATermTable, Inference_parents)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Inference_parents
c') ->
      (ATermTable
att3, Token -> Useful_info -> Inference_parents -> Inference_record
Inference_record Token
a' Useful_info
b' Inference_parents
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Inference_record)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Inference_record" ShATerm
u

instance ShATermConvertible TPTP.AS.Parent_info where
  toShATermAux :: ATermTable -> Parent_info -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Parent_info
xv = case Parent_info
xv of
    Parent_info a :: Source
a b :: Parent_details
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Source
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Parent_details -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Parent_details
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Parent_info" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Parent_info)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Parent_info" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Source
a') ->
      case Int -> ATermTable -> (ATermTable, Parent_details)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Parent_details
b') ->
      (ATermTable
att2, Source -> Parent_details -> Parent_info
Parent_info Source
a' Parent_details
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Parent_info)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Parent_info" ShATerm
u

instance ShATermConvertible TPTP.AS.Internal_source where
  toShATermAux :: ATermTable -> Internal_source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Internal_source
xv = case Internal_source
xv of
    Internal_source a :: Intro_type
a b :: Optional_info
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Intro_type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Intro_type
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Optional_info -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Optional_info
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Internal_source" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Internal_source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Internal_source" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Intro_type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Intro_type
a') ->
      case Int -> ATermTable -> (ATermTable, Optional_info)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Optional_info
b') ->
      (ATermTable
att2, Intro_type -> Optional_info -> Internal_source
Internal_source Intro_type
a' Optional_info
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Internal_source)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Internal_source" ShATerm
u

instance ShATermConvertible TPTP.AS.Intro_type where
  toShATermAux :: ATermTable -> Intro_type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Intro_type
xv = case Intro_type
xv of
    IntroTypeDefinition ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IntroTypeDefinition" [] []) ATermTable
att0
    AxiomOfChoice -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AxiomOfChoice" [] []) ATermTable
att0
    Tautology -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Tautology" [] []) ATermTable
att0
    IntroTypeAssumption ->
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IntroTypeAssumption" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Intro_type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IntroTypeDefinition" [] _ -> (ATermTable
att0, Intro_type
IntroTypeDefinition)
    ShAAppl "AxiomOfChoice" [] _ -> (ATermTable
att0, Intro_type
AxiomOfChoice)
    ShAAppl "Tautology" [] _ -> (ATermTable
att0, Intro_type
Tautology)
    ShAAppl "IntroTypeAssumption" [] _ -> (ATermTable
att0, Intro_type
IntroTypeAssumption)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Intro_type)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Intro_type" ShATerm
u

instance ShATermConvertible TPTP.AS.External_source where
  toShATermAux :: ATermTable -> External_source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: External_source
xv = case External_source
xv of
    ExtSrc_file a :: File_source
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> File_source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 File_source
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ExtSrc_file" [Int
a'] []) ATermTable
att1
    ExtSrc_theory a :: Theory
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Theory -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Theory
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ExtSrc_theory" [Int
a'] []) ATermTable
att1
    ExtSrc_creator a :: Creator_source
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Creator_source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Creator_source
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ExtSrc_creator" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, External_source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ExtSrc_file" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, File_source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: File_source
a') ->
      (ATermTable
att1, File_source -> External_source
ExtSrc_file File_source
a') }
    ShAAppl "ExtSrc_theory" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Theory)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Theory
a') ->
      (ATermTable
att1, Theory -> External_source
ExtSrc_theory Theory
a') }
    ShAAppl "ExtSrc_creator" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Creator_source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Creator_source
a') ->
      (ATermTable
att1, Creator_source -> External_source
ExtSrc_creator Creator_source
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, External_source)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.External_source" ShATerm
u

instance ShATermConvertible TPTP.AS.File_source where
  toShATermAux :: ATermTable -> File_source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: File_source
xv = case File_source
xv of
    File_source a :: File_name
a b :: File_info
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> File_name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 File_name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> File_info -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 File_info
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "File_source" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, File_source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "File_source" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, File_name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: File_name
a') ->
      case Int -> ATermTable -> (ATermTable, File_info)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: File_info
b') ->
      (ATermTable
att2, File_name -> File_info -> File_source
File_source File_name
a' File_info
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, File_source)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.File_source" ShATerm
u

instance ShATermConvertible TPTP.AS.Theory where
  toShATermAux :: ATermTable -> Theory -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Theory
xv = case Theory
xv of
    Theory a :: Theory_name
a b :: Optional_info
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Theory_name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Theory_name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Optional_info -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Optional_info
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Theory" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Theory)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Theory" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Theory_name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Theory_name
a') ->
      case Int -> ATermTable -> (ATermTable, Optional_info)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Optional_info
b') ->
      (ATermTable
att2, Theory_name -> Optional_info -> Theory
Theory Theory_name
a' Optional_info
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Theory)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Theory" ShATerm
u

instance ShATermConvertible TPTP.AS.Theory_name where
  toShATermAux :: ATermTable -> Theory_name -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Theory_name
xv = case Theory_name
xv of
    TN_equality -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TN_equality" [] []) ATermTable
att0
    TN_ac -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TN_ac" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Theory_name)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TN_equality" [] _ -> (ATermTable
att0, Theory_name
TN_equality)
    ShAAppl "TN_ac" [] _ -> (ATermTable
att0, Theory_name
TN_ac)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Theory_name)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Theory_name" ShATerm
u

instance ShATermConvertible TPTP.AS.Creator_source where
  toShATermAux :: ATermTable -> Creator_source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Creator_source
xv = case Creator_source
xv of
    Creator_source a :: Token
a b :: Optional_info
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Optional_info -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Optional_info
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Creator_source" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Creator_source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Creator_source" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, Optional_info)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Optional_info
b') ->
      (ATermTable
att2, Token -> Optional_info -> Creator_source
Creator_source Token
a' Optional_info
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Creator_source)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Creator_source" ShATerm
u

instance ShATermConvertible TPTP.AS.Useful_info where
  toShATermAux :: ATermTable -> Useful_info -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Useful_info
xv = case Useful_info
xv of
    UI_items a :: Info_items
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Info_items -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Info_items
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UI_items" [Int
a'] []) ATermTable
att1
    UI_general_list a :: General_list
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> General_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 General_list
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UI_general_list" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Useful_info)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "UI_items" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Info_items)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Info_items
a') ->
      (ATermTable
att1, Info_items -> Useful_info
UI_items Info_items
a') }
    ShAAppl "UI_general_list" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, General_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: General_list
a') ->
      (ATermTable
att1, General_list -> Useful_info
UI_general_list General_list
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Useful_info)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Useful_info" ShATerm
u

instance ShATermConvertible TPTP.AS.Info_item where
  toShATermAux :: ATermTable -> Info_item -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Info_item
xv = case Info_item
xv of
    Info_formula a :: Formula_item
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Formula_item -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Formula_item
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Info_formula" [Int
a'] []) ATermTable
att1
    Info_inference a :: Inference_item
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Inference_item -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Inference_item
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Info_inference" [Int
a'] []) ATermTable
att1
    Info_general a :: General_function
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> General_function -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 General_function
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Info_general" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Info_item)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Info_formula" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Formula_item)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Formula_item
a') ->
      (ATermTable
att1, Formula_item -> Info_item
Info_formula Formula_item
a') }
    ShAAppl "Info_inference" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Inference_item)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Inference_item
a') ->
      (ATermTable
att1, Inference_item -> Info_item
Info_inference Inference_item
a') }
    ShAAppl "Info_general" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, General_function)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: General_function
a') ->
      (ATermTable
att1, General_function -> Info_item
Info_general General_function
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Info_item)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Info_item" ShATerm
u

instance ShATermConvertible TPTP.AS.Formula_item where
  toShATermAux :: ATermTable -> Formula_item -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Formula_item
xv = case Formula_item
xv of
    FI_description a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FI_description" [Int
a'] []) ATermTable
att1
    FI_iquote a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FI_iquote" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Formula_item)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FI_description" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Formula_item
FI_description Token
a') }
    ShAAppl "FI_iquote" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Formula_item
FI_iquote Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Formula_item)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Formula_item" ShATerm
u

instance ShATermConvertible TPTP.AS.Inference_item where
  toShATermAux :: ATermTable -> Inference_item -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Inference_item
xv = case Inference_item
xv of
    Inf_status a :: Inference_status
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Inference_status -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Inference_status
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inf_status" [Int
a'] []) ATermTable
att1
    Inf_assumption a :: Assumptions_record
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Assumptions_record -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Assumptions_record
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inf_assumption" [Int
a'] []) ATermTable
att1
    Inf_symbol a :: New_symbol_record
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> New_symbol_record -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 New_symbol_record
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inf_symbol" [Int
a'] []) ATermTable
att1
    Inf_refutation a :: File_source
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> File_source -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 File_source
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inf_refutation" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Inference_item)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Inf_status" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Inference_status)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Inference_status
a') ->
      (ATermTable
att1, Inference_status -> Inference_item
Inf_status Inference_status
a') }
    ShAAppl "Inf_assumption" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Assumptions_record)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Assumptions_record
a') ->
      (ATermTable
att1, Assumptions_record -> Inference_item
Inf_assumption Assumptions_record
a') }
    ShAAppl "Inf_symbol" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, New_symbol_record)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: New_symbol_record
a') ->
      (ATermTable
att1, New_symbol_record -> Inference_item
Inf_symbol New_symbol_record
a') }
    ShAAppl "Inf_refutation" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, File_source)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: File_source
a') ->
      (ATermTable
att1, File_source -> Inference_item
Inf_refutation File_source
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Inference_item)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Inference_item" ShATerm
u

instance ShATermConvertible TPTP.AS.Inference_status where
  toShATermAux :: ATermTable -> Inference_status -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Inference_status
xv = case Inference_status
xv of
    Inf_value a :: Status_value
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Status_value -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Status_value
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inf_value" [Int
a'] []) ATermTable
att1
    Inf_info a :: Inference_info
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Inference_info -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Inference_info
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inf_info" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Inference_status)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Inf_value" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Status_value)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Status_value
a') ->
      (ATermTable
att1, Status_value -> Inference_status
Inf_value Status_value
a') }
    ShAAppl "Inf_info" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Inference_info)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Inference_info
a') ->
      (ATermTable
att1, Inference_info -> Inference_status
Inf_info Inference_info
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Inference_status)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Inference_status" ShATerm
u

instance ShATermConvertible TPTP.AS.Status_value where
  toShATermAux :: ATermTable -> Status_value -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Status_value
xv = case Status_value
xv of
    SUC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SUC" [] []) ATermTable
att0
    UNP -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UNP" [] []) ATermTable
att0
    SAP -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SAP" [] []) ATermTable
att0
    ESA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ESA" [] []) ATermTable
att0
    SAT -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SAT" [] []) ATermTable
att0
    FSA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FSA" [] []) ATermTable
att0
    THM -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THM" [] []) ATermTable
att0
    EQV -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EQV" [] []) ATermTable
att0
    TAC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TAC" [] []) ATermTable
att0
    WEC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WEC" [] []) ATermTable
att0
    ETH -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ETH" [] []) ATermTable
att0
    TAU -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TAU" [] []) ATermTable
att0
    WTC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WTC" [] []) ATermTable
att0
    WTH -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WTH" [] []) ATermTable
att0
    CAX -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CAX" [] []) ATermTable
att0
    SCA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SCA" [] []) ATermTable
att0
    TCA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TCA" [] []) ATermTable
att0
    WCA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WCA" [] []) ATermTable
att0
    CUP -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CUP" [] []) ATermTable
att0
    CSP -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CSP" [] []) ATermTable
att0
    ECS -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ECS" [] []) ATermTable
att0
    CSA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CSA" [] []) ATermTable
att0
    CTH -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CTH" [] []) ATermTable
att0
    CEQ -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CEQ" [] []) ATermTable
att0
    UNC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UNC" [] []) ATermTable
att0
    WCC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WCC" [] []) ATermTable
att0
    ECT -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ECT" [] []) ATermTable
att0
    FUN -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FUN" [] []) ATermTable
att0
    UNS -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UNS" [] []) ATermTable
att0
    WUC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WUC" [] []) ATermTable
att0
    WCT -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "WCT" [] []) ATermTable
att0
    SCC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SCC" [] []) ATermTable
att0
    UCA -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UCA" [] []) ATermTable
att0
    NOC -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NOC" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Status_value)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SUC" [] _ -> (ATermTable
att0, Status_value
SUC)
    ShAAppl "UNP" [] _ -> (ATermTable
att0, Status_value
UNP)
    ShAAppl "SAP" [] _ -> (ATermTable
att0, Status_value
SAP)
    ShAAppl "ESA" [] _ -> (ATermTable
att0, Status_value
ESA)
    ShAAppl "SAT" [] _ -> (ATermTable
att0, Status_value
SAT)
    ShAAppl "FSA" [] _ -> (ATermTable
att0, Status_value
FSA)
    ShAAppl "THM" [] _ -> (ATermTable
att0, Status_value
THM)
    ShAAppl "EQV" [] _ -> (ATermTable
att0, Status_value
EQV)
    ShAAppl "TAC" [] _ -> (ATermTable
att0, Status_value
TAC)
    ShAAppl "WEC" [] _ -> (ATermTable
att0, Status_value
WEC)
    ShAAppl "ETH" [] _ -> (ATermTable
att0, Status_value
ETH)
    ShAAppl "TAU" [] _ -> (ATermTable
att0, Status_value
TAU)
    ShAAppl "WTC" [] _ -> (ATermTable
att0, Status_value
WTC)
    ShAAppl "WTH" [] _ -> (ATermTable
att0, Status_value
WTH)
    ShAAppl "CAX" [] _ -> (ATermTable
att0, Status_value
CAX)
    ShAAppl "SCA" [] _ -> (ATermTable
att0, Status_value
SCA)
    ShAAppl "TCA" [] _ -> (ATermTable
att0, Status_value
TCA)
    ShAAppl "WCA" [] _ -> (ATermTable
att0, Status_value
WCA)
    ShAAppl "CUP" [] _ -> (ATermTable
att0, Status_value
CUP)
    ShAAppl "CSP" [] _ -> (ATermTable
att0, Status_value
CSP)
    ShAAppl "ECS" [] _ -> (ATermTable
att0, Status_value
ECS)
    ShAAppl "CSA" [] _ -> (ATermTable
att0, Status_value
CSA)
    ShAAppl "CTH" [] _ -> (ATermTable
att0, Status_value
CTH)
    ShAAppl "CEQ" [] _ -> (ATermTable
att0, Status_value
CEQ)
    ShAAppl "UNC" [] _ -> (ATermTable
att0, Status_value
UNC)
    ShAAppl "WCC" [] _ -> (ATermTable
att0, Status_value
WCC)
    ShAAppl "ECT" [] _ -> (ATermTable
att0, Status_value
ECT)
    ShAAppl "FUN" [] _ -> (ATermTable
att0, Status_value
FUN)
    ShAAppl "UNS" [] _ -> (ATermTable
att0, Status_value
UNS)
    ShAAppl "WUC" [] _ -> (ATermTable
att0, Status_value
WUC)
    ShAAppl "WCT" [] _ -> (ATermTable
att0, Status_value
WCT)
    ShAAppl "SCC" [] _ -> (ATermTable
att0, Status_value
SCC)
    ShAAppl "UCA" [] _ -> (ATermTable
att0, Status_value
UCA)
    ShAAppl "NOC" [] _ -> (ATermTable
att0, Status_value
NOC)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Status_value)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Status_value" ShATerm
u

instance ShATermConvertible TPTP.AS.Inference_info where
  toShATermAux :: ATermTable -> Inference_info -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Inference_info
xv = case Inference_info
xv of
    Inference_info a :: Token
a b :: Token
b c :: General_list
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Token
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> General_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 General_list
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Inference_info" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Inference_info)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Inference_info" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Token
b') ->
      case Int -> ATermTable -> (ATermTable, General_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: General_list
c') ->
      (ATermTable
att3, Token -> Token -> General_list -> Inference_info
Inference_info Token
a' Token
b' General_list
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Inference_info)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Inference_info" ShATerm
u

instance ShATermConvertible TPTP.AS.New_symbol_record where
  toShATermAux :: ATermTable -> New_symbol_record -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: New_symbol_record
xv = case New_symbol_record
xv of
    New_symbol_record a :: Token
a b :: New_symbol_list
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> New_symbol_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 New_symbol_list
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "New_symbol_record" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, New_symbol_record)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "New_symbol_record" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, New_symbol_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: New_symbol_list
b') ->
      (ATermTable
att2, Token -> New_symbol_list -> New_symbol_record
New_symbol_record Token
a' New_symbol_list
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, New_symbol_record)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.New_symbol_record" ShATerm
u

instance ShATermConvertible TPTP.AS.Principal_symbol where
  toShATermAux :: ATermTable -> Principal_symbol -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Principal_symbol
xv = case Principal_symbol
xv of
    PS_functor a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "PS_functor" [Int
a'] []) ATermTable
att1
    PS_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "PS_variable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Principal_symbol)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "PS_functor" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Principal_symbol
PS_functor Token
a') }
    ShAAppl "PS_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Principal_symbol
PS_variable Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Principal_symbol)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Principal_symbol" ShATerm
u

instance ShATermConvertible TPTP.AS.Include where
  toShATermAux :: ATermTable -> Include -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Include
xv = case Include
xv of
    Include a :: File_name
a b :: Formula_selection
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> File_name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 File_name
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_selection -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_selection
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Include" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Include)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Include" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, File_name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: File_name
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_selection)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_selection
b') ->
      (ATermTable
att2, File_name -> Formula_selection -> Include
Include File_name
a' Formula_selection
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Include)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Include" ShATerm
u

instance ShATermConvertible TPTP.AS.General_term where
  toShATermAux :: ATermTable -> General_term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: General_term
xv = case General_term
xv of
    GT_data a :: General_data
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> General_data -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 General_data
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GT_data" [Int
a'] []) ATermTable
att1
    GT_DataTerm a :: General_data
a b :: General_term
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> General_data -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 General_data
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> General_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 General_term
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GT_DataTerm" [Int
a', Int
b'] []) ATermTable
att2
    GT_list a :: General_list
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> General_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 General_list
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GT_list" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, General_term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "GT_data" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, General_data)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: General_data
a') ->
      (ATermTable
att1, General_data -> General_term
GT_data General_data
a') }
    ShAAppl "GT_DataTerm" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, General_data)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: General_data
a') ->
      case Int -> ATermTable -> (ATermTable, General_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: General_term
b') ->
      (ATermTable
att2, General_data -> General_term -> General_term
GT_DataTerm General_data
a' General_term
b') }}
    ShAAppl "GT_list" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, General_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: General_list
a') ->
      (ATermTable
att1, General_list -> General_term
GT_list General_list
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, General_term)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.General_term" ShATerm
u

instance ShATermConvertible TPTP.AS.General_data where
  toShATermAux :: ATermTable -> General_data -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: General_data
xv = case General_data
xv of
    GD_atomic_word a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_atomic_word" [Int
a'] []) ATermTable
att1
    GD_general_function a :: General_function
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> General_function -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 General_function
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_general_function" [Int
a'] []) ATermTable
att1
    GD_variable a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_variable" [Int
a'] []) ATermTable
att1
    GD_number a :: Number
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Number -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Number
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_number" [Int
a'] []) ATermTable
att1
    GD_distinct_object a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_distinct_object" [Int
a'] []) ATermTable
att1
    GD_formula_data a :: Formula_data
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Formula_data -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Formula_data
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_formula_data" [Int
a'] []) ATermTable
att1
    GD_bind a :: Token
a b :: Formula_data
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Formula_data -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Formula_data
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GD_bind" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, General_data)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "GD_atomic_word" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> General_data
GD_atomic_word Token
a') }
    ShAAppl "GD_general_function" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, General_function)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: General_function
a') ->
      (ATermTable
att1, General_function -> General_data
GD_general_function General_function
a') }
    ShAAppl "GD_variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> General_data
GD_variable Token
a') }
    ShAAppl "GD_number" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Number)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Number
a') ->
      (ATermTable
att1, Number -> General_data
GD_number Number
a') }
    ShAAppl "GD_distinct_object" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> General_data
GD_distinct_object Token
a') }
    ShAAppl "GD_formula_data" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Formula_data)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Formula_data
a') ->
      (ATermTable
att1, Formula_data -> General_data
GD_formula_data Formula_data
a') }
    ShAAppl "GD_bind" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, Formula_data)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Formula_data
b') ->
      (ATermTable
att2, Token -> Formula_data -> General_data
GD_bind Token
a' Formula_data
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, General_data)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.General_data" ShATerm
u

instance ShATermConvertible TPTP.AS.General_function where
  toShATermAux :: ATermTable -> General_function -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: General_function
xv = case General_function
xv of
    General_function a :: Token
a b :: General_list
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> General_list -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 General_list
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "General_function" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, General_function)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "General_function" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, General_list)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: General_list
b') ->
      (ATermTable
att2, Token -> General_list -> General_function
General_function Token
a' General_list
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, General_function)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.General_function" ShATerm
u

instance ShATermConvertible TPTP.AS.Formula_data where
  toShATermAux :: ATermTable -> Formula_data -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Formula_data
xv = case Formula_data
xv of
    FD_THF a :: THF_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FD_THF" [Int
a'] []) ATermTable
att1
    FD_TFF a :: TFF_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TFF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TFF_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FD_TFF" [Int
a'] []) ATermTable
att1
    FD_FOF a :: FOF_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FD_FOF" [Int
a'] []) ATermTable
att1
    FD_CNF a :: CNF_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CNF_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CNF_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FD_CNF" [Int
a'] []) ATermTable
att1
    FD_FOT a :: FOF_term
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_term
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FD_FOT" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Formula_data)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FD_THF" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_formula
a') ->
      (ATermTable
att1, THF_formula -> Formula_data
FD_THF THF_formula
a') }
    ShAAppl "FD_TFF" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TFF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TFF_formula
a') ->
      (ATermTable
att1, TFF_formula -> Formula_data
FD_TFF TFF_formula
a') }
    ShAAppl "FD_FOF" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_formula
a') ->
      (ATermTable
att1, FOF_formula -> Formula_data
FD_FOF FOF_formula
a') }
    ShAAppl "FD_CNF" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, CNF_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CNF_formula
a') ->
      (ATermTable
att1, CNF_formula -> Formula_data
FD_CNF CNF_formula
a') }
    ShAAppl "FD_FOT" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_term
a') ->
      (ATermTable
att1, FOF_term -> Formula_data
FD_FOT FOF_term
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Formula_data)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Formula_data" ShATerm
u

instance ShATermConvertible TPTP.AS.Name where
  toShATermAux :: ATermTable -> Name -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Name
xv = case Name
xv of
    NameString a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NameString" [Int
a'] []) ATermTable
att1
    NameInteger a :: Integer
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Integer -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Integer
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NameInteger" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Name)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "NameString" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> Name
NameString Token
a') }
    ShAAppl "NameInteger" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Integer)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Integer
a') ->
      (ATermTable
att1, Integer -> Name
NameInteger Integer
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Name)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Name" ShATerm
u

instance ShATermConvertible TPTP.AS.Number where
  toShATermAux :: ATermTable -> Number -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Number
xv = case Number
xv of
    NumInteger a :: Integer
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Integer -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Integer
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NumInteger" [Int
a'] []) ATermTable
att1
    NumRational a :: Rational
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Rational -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Rational
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NumRational" [Int
a'] []) ATermTable
att1
    NumReal a :: Double
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Double -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Double
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NumReal" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Number)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "NumInteger" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Integer)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Integer
a') ->
      (ATermTable
att1, Integer -> Number
NumInteger Integer
a') }
    ShAAppl "NumRational" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Rational)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Rational
a') ->
      (ATermTable
att1, Rational -> Number
NumRational Rational
a') }
    ShAAppl "NumReal" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Double)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Double
a') ->
      (ATermTable
att1, Double -> Number
NumReal Double
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Number)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.AS.Number" ShATerm
u

deriving instance GHC.Generics.Generic TPTP.AS.BASIC_SPEC
instance Data.Aeson.ToJSON TPTP.AS.BASIC_SPEC where
instance Data.Aeson.FromJSON TPTP.AS.BASIC_SPEC where

deriving instance GHC.Generics.Generic TPTP.AS.TPTP
instance Data.Aeson.ToJSON TPTP.AS.TPTP where
instance Data.Aeson.FromJSON TPTP.AS.TPTP where

deriving instance GHC.Generics.Generic TPTP.AS.TPTP_input
instance Data.Aeson.ToJSON TPTP.AS.TPTP_input where
instance Data.Aeson.FromJSON TPTP.AS.TPTP_input where

deriving instance GHC.Generics.Generic TPTP.AS.Comment
instance Data.Aeson.ToJSON TPTP.AS.Comment where
instance Data.Aeson.FromJSON TPTP.AS.Comment where

deriving instance GHC.Generics.Generic TPTP.AS.DefinedComment
instance Data.Aeson.ToJSON TPTP.AS.DefinedComment where
instance Data.Aeson.FromJSON TPTP.AS.DefinedComment where

deriving instance GHC.Generics.Generic TPTP.AS.SystemComment
instance Data.Aeson.ToJSON TPTP.AS.SystemComment where
instance Data.Aeson.FromJSON TPTP.AS.SystemComment where

deriving instance GHC.Generics.Generic TPTP.AS.Annotated_formula
instance Data.Aeson.ToJSON TPTP.AS.Annotated_formula where
instance Data.Aeson.FromJSON TPTP.AS.Annotated_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TPI_annotated
instance Data.Aeson.ToJSON TPTP.AS.TPI_annotated where
instance Data.Aeson.FromJSON TPTP.AS.TPI_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.THF_annotated
instance Data.Aeson.ToJSON TPTP.AS.THF_annotated where
instance Data.Aeson.FromJSON TPTP.AS.THF_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.TFX_annotated
instance Data.Aeson.ToJSON TPTP.AS.TFX_annotated where
instance Data.Aeson.FromJSON TPTP.AS.TFX_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_annotated
instance Data.Aeson.ToJSON TPTP.AS.TFF_annotated where
instance Data.Aeson.FromJSON TPTP.AS.TFF_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.TCF_annotated
instance Data.Aeson.ToJSON TPTP.AS.TCF_annotated where
instance Data.Aeson.FromJSON TPTP.AS.TCF_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_annotated
instance Data.Aeson.ToJSON TPTP.AS.FOF_annotated where
instance Data.Aeson.FromJSON TPTP.AS.FOF_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.CNF_annotated
instance Data.Aeson.ToJSON TPTP.AS.CNF_annotated where
instance Data.Aeson.FromJSON TPTP.AS.CNF_annotated where

deriving instance GHC.Generics.Generic TPTP.AS.Annotations
instance Data.Aeson.ToJSON TPTP.AS.Annotations where
instance Data.Aeson.FromJSON TPTP.AS.Annotations where

deriving instance GHC.Generics.Generic TPTP.AS.Formula_role
instance Data.Aeson.ToJSON TPTP.AS.Formula_role where
instance Data.Aeson.FromJSON TPTP.AS.Formula_role where

deriving instance GHC.Generics.Generic TPTP.AS.THF_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_logic_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_logic_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_logic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_binary_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_binary_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_binary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_binary_pair
instance Data.Aeson.ToJSON TPTP.AS.THF_binary_pair where
instance Data.Aeson.FromJSON TPTP.AS.THF_binary_pair where

deriving instance GHC.Generics.Generic TPTP.AS.THF_binary_tuple
instance Data.Aeson.ToJSON TPTP.AS.THF_binary_tuple where
instance Data.Aeson.FromJSON TPTP.AS.THF_binary_tuple where

deriving instance GHC.Generics.Generic TPTP.AS.THF_unitary_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_unitary_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_unitary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_quantified_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_quantified_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_quantified_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_quantification
instance Data.Aeson.ToJSON TPTP.AS.THF_quantification where
instance Data.Aeson.FromJSON TPTP.AS.THF_quantification where

deriving instance GHC.Generics.Generic TPTP.AS.THF_variable
instance Data.Aeson.ToJSON TPTP.AS.THF_variable where
instance Data.Aeson.FromJSON TPTP.AS.THF_variable where

deriving instance GHC.Generics.Generic TPTP.AS.THF_typed_variable
instance Data.Aeson.ToJSON TPTP.AS.THF_typed_variable where
instance Data.Aeson.FromJSON TPTP.AS.THF_typed_variable where

deriving instance GHC.Generics.Generic TPTP.AS.THF_unary_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_unary_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_unary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_atom
instance Data.Aeson.ToJSON TPTP.AS.THF_atom where
instance Data.Aeson.FromJSON TPTP.AS.THF_atom where

deriving instance GHC.Generics.Generic TPTP.AS.THF_function
instance Data.Aeson.ToJSON TPTP.AS.THF_function where
instance Data.Aeson.FromJSON TPTP.AS.THF_function where

deriving instance GHC.Generics.Generic TPTP.AS.THF_conn_term
instance Data.Aeson.ToJSON TPTP.AS.THF_conn_term where
instance Data.Aeson.FromJSON TPTP.AS.THF_conn_term where

deriving instance GHC.Generics.Generic TPTP.AS.THF_conditional
instance Data.Aeson.ToJSON TPTP.AS.THF_conditional where
instance Data.Aeson.FromJSON TPTP.AS.THF_conditional where

deriving instance GHC.Generics.Generic TPTP.AS.THF_let
instance Data.Aeson.ToJSON TPTP.AS.THF_let where
instance Data.Aeson.FromJSON TPTP.AS.THF_let where

deriving instance GHC.Generics.Generic TPTP.AS.THF_let_defns
instance Data.Aeson.ToJSON TPTP.AS.THF_let_defns where
instance Data.Aeson.FromJSON TPTP.AS.THF_let_defns where

deriving instance GHC.Generics.Generic TPTP.AS.THF_let_defn
instance Data.Aeson.ToJSON TPTP.AS.THF_let_defn where
instance Data.Aeson.FromJSON TPTP.AS.THF_let_defn where

deriving instance GHC.Generics.Generic TPTP.AS.THF_let_quantified_defn
instance Data.Aeson.ToJSON TPTP.AS.THF_let_quantified_defn where
instance Data.Aeson.FromJSON TPTP.AS.THF_let_quantified_defn where

deriving instance GHC.Generics.Generic TPTP.AS.THF_let_plain_defn
instance Data.Aeson.ToJSON TPTP.AS.THF_let_plain_defn where
instance Data.Aeson.FromJSON TPTP.AS.THF_let_plain_defn where

deriving instance GHC.Generics.Generic TPTP.AS.THF_let_defn_LHS
instance Data.Aeson.ToJSON TPTP.AS.THF_let_defn_LHS where
instance Data.Aeson.FromJSON TPTP.AS.THF_let_defn_LHS where

deriving instance GHC.Generics.Generic TPTP.AS.THF_type_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_type_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_type_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_typeable_formula
instance Data.Aeson.ToJSON TPTP.AS.THF_typeable_formula where
instance Data.Aeson.FromJSON TPTP.AS.THF_typeable_formula where

deriving instance GHC.Generics.Generic TPTP.AS.THF_subtype
instance Data.Aeson.ToJSON TPTP.AS.THF_subtype where
instance Data.Aeson.FromJSON TPTP.AS.THF_subtype where

deriving instance GHC.Generics.Generic TPTP.AS.THF_top_level_type
instance Data.Aeson.ToJSON TPTP.AS.THF_top_level_type where
instance Data.Aeson.FromJSON TPTP.AS.THF_top_level_type where

deriving instance GHC.Generics.Generic TPTP.AS.THF_unitary_type
instance Data.Aeson.ToJSON TPTP.AS.THF_unitary_type where
instance Data.Aeson.FromJSON TPTP.AS.THF_unitary_type where

deriving instance GHC.Generics.Generic TPTP.AS.THF_binary_type
instance Data.Aeson.ToJSON TPTP.AS.THF_binary_type where
instance Data.Aeson.FromJSON TPTP.AS.THF_binary_type where

deriving instance GHC.Generics.Generic TPTP.AS.THF_sequent
instance Data.Aeson.ToJSON TPTP.AS.THF_sequent where
instance Data.Aeson.FromJSON TPTP.AS.THF_sequent where

deriving instance GHC.Generics.Generic TPTP.AS.THF_tuple
instance Data.Aeson.ToJSON TPTP.AS.THF_tuple where
instance Data.Aeson.FromJSON TPTP.AS.THF_tuple where

deriving instance GHC.Generics.Generic TPTP.AS.TFX_formula
instance Data.Aeson.ToJSON TPTP.AS.TFX_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFX_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFX_logic_formula
instance Data.Aeson.ToJSON TPTP.AS.TFX_logic_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFX_logic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_formula
instance Data.Aeson.ToJSON TPTP.AS.TFF_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFF_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_logic_formula
instance Data.Aeson.ToJSON TPTP.AS.TFF_logic_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFF_logic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_binary_formula
instance Data.Aeson.ToJSON TPTP.AS.TFF_binary_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFF_binary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_binary_nonassoc
instance Data.Aeson.ToJSON TPTP.AS.TFF_binary_nonassoc where
instance Data.Aeson.FromJSON TPTP.AS.TFF_binary_nonassoc where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_binary_assoc
instance Data.Aeson.ToJSON TPTP.AS.TFF_binary_assoc where
instance Data.Aeson.FromJSON TPTP.AS.TFF_binary_assoc where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_unitary_formula
instance Data.Aeson.ToJSON TPTP.AS.TFF_unitary_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFF_unitary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_quantified_formula
instance Data.Aeson.ToJSON TPTP.AS.TFF_quantified_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFF_quantified_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_variable
instance Data.Aeson.ToJSON TPTP.AS.TFF_variable where
instance Data.Aeson.FromJSON TPTP.AS.TFF_variable where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_typed_variable
instance Data.Aeson.ToJSON TPTP.AS.TFF_typed_variable where
instance Data.Aeson.FromJSON TPTP.AS.TFF_typed_variable where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_unary_formula
instance Data.Aeson.ToJSON TPTP.AS.TFF_unary_formula where
instance Data.Aeson.FromJSON TPTP.AS.TFF_unary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_conditional
instance Data.Aeson.ToJSON TPTP.AS.TFF_conditional where
instance Data.Aeson.FromJSON TPTP.AS.TFF_conditional where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let
instance Data.Aeson.ToJSON TPTP.AS.TFF_let where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_term_defns
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_term_defns where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_term_defns where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_term_defn
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_term_defn where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_term_defn where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_term_binding
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_term_binding where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_term_binding where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_formula_defns
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_formula_defns where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_formula_defns where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_formula_defn
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_formula_defn where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_formula_defn where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_formula_binding
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_formula_binding where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_formula_binding where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_sequent
instance Data.Aeson.ToJSON TPTP.AS.TFF_sequent where
instance Data.Aeson.FromJSON TPTP.AS.TFF_sequent where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_formula_tuple
instance Data.Aeson.ToJSON TPTP.AS.TFF_formula_tuple where
instance Data.Aeson.FromJSON TPTP.AS.TFF_formula_tuple where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_typed_atom
instance Data.Aeson.ToJSON TPTP.AS.TFF_typed_atom where
instance Data.Aeson.FromJSON TPTP.AS.TFF_typed_atom where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_subtype
instance Data.Aeson.ToJSON TPTP.AS.TFF_subtype where
instance Data.Aeson.FromJSON TPTP.AS.TFF_subtype where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_top_level_type
instance Data.Aeson.ToJSON TPTP.AS.TFF_top_level_type where
instance Data.Aeson.FromJSON TPTP.AS.TFF_top_level_type where

deriving instance GHC.Generics.Generic TPTP.AS.TF1_quantified_type
instance Data.Aeson.ToJSON TPTP.AS.TF1_quantified_type where
instance Data.Aeson.FromJSON TPTP.AS.TF1_quantified_type where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_monotype
instance Data.Aeson.ToJSON TPTP.AS.TFF_monotype where
instance Data.Aeson.FromJSON TPTP.AS.TFF_monotype where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_unitary_type
instance Data.Aeson.ToJSON TPTP.AS.TFF_unitary_type where
instance Data.Aeson.FromJSON TPTP.AS.TFF_unitary_type where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_atomic_type
instance Data.Aeson.ToJSON TPTP.AS.TFF_atomic_type where
instance Data.Aeson.FromJSON TPTP.AS.TFF_atomic_type where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_mapping_type
instance Data.Aeson.ToJSON TPTP.AS.TFF_mapping_type where
instance Data.Aeson.FromJSON TPTP.AS.TFF_mapping_type where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_xprod_type
instance Data.Aeson.ToJSON TPTP.AS.TFF_xprod_type where
instance Data.Aeson.FromJSON TPTP.AS.TFF_xprod_type where

deriving instance GHC.Generics.Generic TPTP.AS.TCF_formula
instance Data.Aeson.ToJSON TPTP.AS.TCF_formula where
instance Data.Aeson.FromJSON TPTP.AS.TCF_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TCF_logic_formula
instance Data.Aeson.ToJSON TPTP.AS.TCF_logic_formula where
instance Data.Aeson.FromJSON TPTP.AS.TCF_logic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.TCF_quantified_formula
instance Data.Aeson.ToJSON TPTP.AS.TCF_quantified_formula where
instance Data.Aeson.FromJSON TPTP.AS.TCF_quantified_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_logic_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_logic_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_logic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_binary_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_binary_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_binary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_binary_nonassoc
instance Data.Aeson.ToJSON TPTP.AS.FOF_binary_nonassoc where
instance Data.Aeson.FromJSON TPTP.AS.FOF_binary_nonassoc where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_binary_assoc
instance Data.Aeson.ToJSON TPTP.AS.FOF_binary_assoc where
instance Data.Aeson.FromJSON TPTP.AS.FOF_binary_assoc where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_unitary_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_unitary_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_unitary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_quantified_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_quantified_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_quantified_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_unary_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_unary_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_unary_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_infix_unary
instance Data.Aeson.ToJSON TPTP.AS.FOF_infix_unary where
instance Data.Aeson.FromJSON TPTP.AS.FOF_infix_unary where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_atomic_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_atomic_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_atomic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_plain_atomic_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_plain_atomic_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_plain_atomic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_defined_atomic_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_defined_atomic_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_defined_atomic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_defined_plain_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_defined_plain_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_defined_plain_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_defined_infix_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_defined_infix_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_defined_infix_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_system_atomic_formula
instance Data.Aeson.ToJSON TPTP.AS.FOF_system_atomic_formula where
instance Data.Aeson.FromJSON TPTP.AS.FOF_system_atomic_formula where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_plain_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_plain_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_plain_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_defined_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_defined_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_defined_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_defined_atomic_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_defined_atomic_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_defined_atomic_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_defined_plain_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_defined_plain_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_defined_plain_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_system_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_system_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_system_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_function_term
instance Data.Aeson.ToJSON TPTP.AS.FOF_function_term where
instance Data.Aeson.FromJSON TPTP.AS.FOF_function_term where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_conditional_term
instance Data.Aeson.ToJSON TPTP.AS.TFF_conditional_term where
instance Data.Aeson.FromJSON TPTP.AS.TFF_conditional_term where

deriving instance GHC.Generics.Generic TPTP.AS.TFF_let_term
instance Data.Aeson.ToJSON TPTP.AS.TFF_let_term where
instance Data.Aeson.FromJSON TPTP.AS.TFF_let_term where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_sequent
instance Data.Aeson.ToJSON TPTP.AS.FOF_sequent where
instance Data.Aeson.FromJSON TPTP.AS.FOF_sequent where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_formula_tuple
instance Data.Aeson.ToJSON TPTP.AS.FOF_formula_tuple where
instance Data.Aeson.FromJSON TPTP.AS.FOF_formula_tuple where

deriving instance GHC.Generics.Generic TPTP.AS.CNF_formula
instance Data.Aeson.ToJSON TPTP.AS.CNF_formula where
instance Data.Aeson.FromJSON TPTP.AS.CNF_formula where

deriving instance GHC.Generics.Generic TPTP.AS.Disjunction
instance Data.Aeson.ToJSON TPTP.AS.Disjunction where
instance Data.Aeson.FromJSON TPTP.AS.Disjunction where

deriving instance GHC.Generics.Generic TPTP.AS.Literal
instance Data.Aeson.ToJSON TPTP.AS.Literal where
instance Data.Aeson.FromJSON TPTP.AS.Literal where

deriving instance GHC.Generics.Generic TPTP.AS.THF_quantifier
instance Data.Aeson.ToJSON TPTP.AS.THF_quantifier where
instance Data.Aeson.FromJSON TPTP.AS.THF_quantifier where

deriving instance GHC.Generics.Generic TPTP.AS.TH1_quantifier
instance Data.Aeson.ToJSON TPTP.AS.TH1_quantifier where
instance Data.Aeson.FromJSON TPTP.AS.TH1_quantifier where

deriving instance GHC.Generics.Generic TPTP.AS.TH0_quantifier
instance Data.Aeson.ToJSON TPTP.AS.TH0_quantifier where
instance Data.Aeson.FromJSON TPTP.AS.TH0_quantifier where

deriving instance GHC.Generics.Generic TPTP.AS.THF_pair_connective
instance Data.Aeson.ToJSON TPTP.AS.THF_pair_connective where
instance Data.Aeson.FromJSON TPTP.AS.THF_pair_connective where

deriving instance GHC.Generics.Generic TPTP.AS.THF_unary_connective
instance Data.Aeson.ToJSON TPTP.AS.THF_unary_connective where
instance Data.Aeson.FromJSON TPTP.AS.THF_unary_connective where

deriving instance GHC.Generics.Generic TPTP.AS.TH1_unary_connective
instance Data.Aeson.ToJSON TPTP.AS.TH1_unary_connective where
instance Data.Aeson.FromJSON TPTP.AS.TH1_unary_connective where

deriving instance GHC.Generics.Generic TPTP.AS.FOF_quantifier
instance Data.Aeson.ToJSON TPTP.AS.FOF_quantifier where
instance Data.Aeson.FromJSON TPTP.AS.FOF_quantifier where

deriving instance GHC.Generics.Generic TPTP.AS.Binary_connective
instance Data.Aeson.ToJSON TPTP.AS.Binary_connective where
instance Data.Aeson.FromJSON TPTP.AS.Binary_connective where

deriving instance GHC.Generics.Generic TPTP.AS.Assoc_connective
instance Data.Aeson.ToJSON TPTP.AS.Assoc_connective where
instance Data.Aeson.FromJSON TPTP.AS.Assoc_connective where

deriving instance GHC.Generics.Generic TPTP.AS.Unary_connective
instance Data.Aeson.ToJSON TPTP.AS.Unary_connective where
instance Data.Aeson.FromJSON TPTP.AS.Unary_connective where

deriving instance GHC.Generics.Generic TPTP.AS.Defined_type
instance Data.Aeson.ToJSON TPTP.AS.Defined_type where
instance Data.Aeson.FromJSON TPTP.AS.Defined_type where

deriving instance GHC.Generics.Generic TPTP.AS.Atom
instance Data.Aeson.ToJSON TPTP.AS.Atom where
instance Data.Aeson.FromJSON TPTP.AS.Atom where

deriving instance GHC.Generics.Generic TPTP.AS.Untyped_atom
instance Data.Aeson.ToJSON TPTP.AS.Untyped_atom where
instance Data.Aeson.FromJSON TPTP.AS.Untyped_atom where

deriving instance GHC.Generics.Generic TPTP.AS.Defined_proposition
instance Data.Aeson.ToJSON TPTP.AS.Defined_proposition where
instance Data.Aeson.FromJSON TPTP.AS.Defined_proposition where

deriving instance GHC.Generics.Generic TPTP.AS.Defined_predicate
instance Data.Aeson.ToJSON TPTP.AS.Defined_predicate where
instance Data.Aeson.FromJSON TPTP.AS.Defined_predicate where

deriving instance GHC.Generics.Generic TPTP.AS.Defined_infix_pred
instance Data.Aeson.ToJSON TPTP.AS.Defined_infix_pred where
instance Data.Aeson.FromJSON TPTP.AS.Defined_infix_pred where

deriving instance GHC.Generics.Generic TPTP.AS.Defined_functor
instance Data.Aeson.ToJSON TPTP.AS.Defined_functor where
instance Data.Aeson.FromJSON TPTP.AS.Defined_functor where

deriving instance GHC.Generics.Generic TPTP.AS.Defined_term
instance Data.Aeson.ToJSON TPTP.AS.Defined_term where
instance Data.Aeson.FromJSON TPTP.AS.Defined_term where

deriving instance GHC.Generics.Generic TPTP.AS.Source
instance Data.Aeson.ToJSON TPTP.AS.Source where
instance Data.Aeson.FromJSON TPTP.AS.Source where

deriving instance GHC.Generics.Generic TPTP.AS.DAG_source
instance Data.Aeson.ToJSON TPTP.AS.DAG_source where
instance Data.Aeson.FromJSON TPTP.AS.DAG_source where

deriving instance GHC.Generics.Generic TPTP.AS.Inference_record
instance Data.Aeson.ToJSON TPTP.AS.Inference_record where
instance Data.Aeson.FromJSON TPTP.AS.Inference_record where

deriving instance GHC.Generics.Generic TPTP.AS.Parent_info
instance Data.Aeson.ToJSON TPTP.AS.Parent_info where
instance Data.Aeson.FromJSON TPTP.AS.Parent_info where

deriving instance GHC.Generics.Generic TPTP.AS.Internal_source
instance Data.Aeson.ToJSON TPTP.AS.Internal_source where
instance Data.Aeson.FromJSON TPTP.AS.Internal_source where

deriving instance GHC.Generics.Generic TPTP.AS.Intro_type
instance Data.Aeson.ToJSON TPTP.AS.Intro_type where
instance Data.Aeson.FromJSON TPTP.AS.Intro_type where

deriving instance GHC.Generics.Generic TPTP.AS.External_source
instance Data.Aeson.ToJSON TPTP.AS.External_source where
instance Data.Aeson.FromJSON TPTP.AS.External_source where

deriving instance GHC.Generics.Generic TPTP.AS.File_source
instance Data.Aeson.ToJSON TPTP.AS.File_source where
instance Data.Aeson.FromJSON TPTP.AS.File_source where

deriving instance GHC.Generics.Generic TPTP.AS.Theory
instance Data.Aeson.ToJSON TPTP.AS.Theory where
instance Data.Aeson.FromJSON TPTP.AS.Theory where

deriving instance GHC.Generics.Generic TPTP.AS.Theory_name
instance Data.Aeson.ToJSON TPTP.AS.Theory_name where
instance Data.Aeson.FromJSON TPTP.AS.Theory_name where

deriving instance GHC.Generics.Generic TPTP.AS.Creator_source
instance Data.Aeson.ToJSON TPTP.AS.Creator_source where
instance Data.Aeson.FromJSON TPTP.AS.Creator_source where

deriving instance GHC.Generics.Generic TPTP.AS.Useful_info
instance Data.Aeson.ToJSON TPTP.AS.Useful_info where
instance Data.Aeson.FromJSON TPTP.AS.Useful_info where

deriving instance GHC.Generics.Generic TPTP.AS.Info_item
instance Data.Aeson.ToJSON TPTP.AS.Info_item where
instance Data.Aeson.FromJSON TPTP.AS.Info_item where

deriving instance GHC.Generics.Generic TPTP.AS.Formula_item
instance Data.Aeson.ToJSON TPTP.AS.Formula_item where
instance Data.Aeson.FromJSON TPTP.AS.Formula_item where

deriving instance GHC.Generics.Generic TPTP.AS.Inference_item
instance Data.Aeson.ToJSON TPTP.AS.Inference_item where
instance Data.Aeson.FromJSON TPTP.AS.Inference_item where

deriving instance GHC.Generics.Generic TPTP.AS.Inference_status
instance Data.Aeson.ToJSON TPTP.AS.Inference_status where
instance Data.Aeson.FromJSON TPTP.AS.Inference_status where

deriving instance GHC.Generics.Generic TPTP.AS.Status_value
instance Data.Aeson.ToJSON TPTP.AS.Status_value where
instance Data.Aeson.FromJSON TPTP.AS.Status_value where

deriving instance GHC.Generics.Generic TPTP.AS.Inference_info
instance Data.Aeson.ToJSON TPTP.AS.Inference_info where
instance Data.Aeson.FromJSON TPTP.AS.Inference_info where

deriving instance GHC.Generics.Generic TPTP.AS.New_symbol_record
instance Data.Aeson.ToJSON TPTP.AS.New_symbol_record where
instance Data.Aeson.FromJSON TPTP.AS.New_symbol_record where

deriving instance GHC.Generics.Generic TPTP.AS.Principal_symbol
instance Data.Aeson.ToJSON TPTP.AS.Principal_symbol where
instance Data.Aeson.FromJSON TPTP.AS.Principal_symbol where

deriving instance GHC.Generics.Generic TPTP.AS.Include
instance Data.Aeson.ToJSON TPTP.AS.Include where
instance Data.Aeson.FromJSON TPTP.AS.Include where

deriving instance GHC.Generics.Generic TPTP.AS.General_term
instance Data.Aeson.ToJSON TPTP.AS.General_term where
instance Data.Aeson.FromJSON TPTP.AS.General_term where

deriving instance GHC.Generics.Generic TPTP.AS.General_data
instance Data.Aeson.ToJSON TPTP.AS.General_data where
instance Data.Aeson.FromJSON TPTP.AS.General_data where

deriving instance GHC.Generics.Generic TPTP.AS.General_function
instance Data.Aeson.ToJSON TPTP.AS.General_function where
instance Data.Aeson.FromJSON TPTP.AS.General_function where

deriving instance GHC.Generics.Generic TPTP.AS.Formula_data
instance Data.Aeson.ToJSON TPTP.AS.Formula_data where
instance Data.Aeson.FromJSON TPTP.AS.Formula_data where

deriving instance GHC.Generics.Generic TPTP.AS.Name
instance Data.Aeson.ToJSON TPTP.AS.Name where
instance Data.Aeson.FromJSON TPTP.AS.Name where

deriving instance GHC.Generics.Generic TPTP.AS.Number
instance Data.Aeson.ToJSON TPTP.AS.Number where
instance Data.Aeson.FromJSON TPTP.AS.Number where

instance ShATermConvertible TPTP.Sign.Symbol where
  toShATermAux :: ATermTable -> Symbol -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Symbol
xv = case Symbol
xv of
    Symbol a :: Token
a b :: SymbolType
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> SymbolType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 SymbolType
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Symbol" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Symbol)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Symbol" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      case Int -> ATermTable -> (ATermTable, SymbolType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: SymbolType
b') ->
      (ATermTable
att2, Token -> SymbolType -> Symbol
Symbol Token
a' SymbolType
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Symbol)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.Symbol" ShATerm
u

instance ShATermConvertible TPTP.Sign.SymbolType where
  toShATermAux :: ATermTable -> SymbolType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SymbolType
xv = case SymbolType
xv of
    Constant -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Constant" [] []) ATermTable
att0
    Number -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Number" [] []) ATermTable
att0
    Predicate -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Predicate" [] []) ATermTable
att0
    Proposition -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Proposition" [] []) ATermTable
att0
    Function -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Function" [] []) ATermTable
att0
    TypeConstant -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TypeConstant" [] []) ATermTable
att0
    TypeFunctor -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TypeFunctor" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SymbolType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Constant" [] _ -> (ATermTable
att0, SymbolType
Constant)
    ShAAppl "Number" [] _ -> (ATermTable
att0, SymbolType
Number)
    ShAAppl "Predicate" [] _ -> (ATermTable
att0, SymbolType
Predicate)
    ShAAppl "Proposition" [] _ -> (ATermTable
att0, SymbolType
Proposition)
    ShAAppl "Function" [] _ -> (ATermTable
att0, SymbolType
Function)
    ShAAppl "TypeConstant" [] _ -> (ATermTable
att0, SymbolType
TypeConstant)
    ShAAppl "TypeFunctor" [] _ -> (ATermTable
att0, SymbolType
TypeFunctor)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SymbolType)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.SymbolType" ShATerm
u

instance ShATermConvertible TPTP.Sign.THFTypeable where
  toShATermAux :: ATermTable -> THFTypeable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFTypeable
xv = case THFTypeable
xv of
    THFTypeFormula a :: THF_typeable_formula
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THF_typeable_formula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THF_typeable_formula
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTypeFormula" [Int
a'] []) ATermTable
att1
    THFTypeConstant a :: Token
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Token -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Token
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFTypeConstant" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, THFTypeable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "THFTypeFormula" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, THF_typeable_formula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: THF_typeable_formula
a') ->
      (ATermTable
att1, THF_typeable_formula -> THFTypeable
THFTypeFormula THF_typeable_formula
a') }
    ShAAppl "THFTypeConstant" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Token)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Token
a') ->
      (ATermTable
att1, Token -> THFTypeable
THFTypeConstant Token
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFTypeable)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.THFTypeable" ShATerm
u

instance ShATermConvertible TPTP.Sign.FunctorType where
  toShATermAux :: ATermTable -> FunctorType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FunctorType
xv = case FunctorType
xv of
    FunctorTHF a :: [THF_logic_formula]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THF_logic_formula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THF_logic_formula]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FunctorTHF" [Int
a'] []) ATermTable
att1
    FunctorFOF a :: FOF_arguments
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_arguments
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FunctorFOF" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FunctorType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "FunctorTHF" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [THF_logic_formula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [THF_logic_formula]
a') ->
      (ATermTable
att1, [THF_logic_formula] -> FunctorType
FunctorTHF [THF_logic_formula]
a') }
    ShAAppl "FunctorFOF" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_arguments
a') ->
      (ATermTable
att1, FOF_arguments -> FunctorType
FunctorFOF FOF_arguments
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FunctorType)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.FunctorType" ShATerm
u

instance ShATermConvertible TPTP.Sign.PredicateType where
  toShATermAux :: ATermTable -> PredicateType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PredicateType
xv = case PredicateType
xv of
    PredicateType a :: FOF_arguments
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FOF_arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FOF_arguments
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "PredicateType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PredicateType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "PredicateType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, FOF_arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FOF_arguments
a') ->
      (ATermTable
att1, FOF_arguments -> PredicateType
PredicateType FOF_arguments
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PredicateType)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.PredicateType" ShATerm
u

instance ShATermConvertible TPTP.Sign.Type_functorType where
  toShATermAux :: ATermTable -> Type_functorType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Type_functorType
xv = case Type_functorType
xv of
    Type_functorType a :: [TFF_atomic_type]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [TFF_atomic_type] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [TFF_atomic_type]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Type_functorType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Type_functorType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Type_functorType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [TFF_atomic_type])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [TFF_atomic_type]
a') ->
      (ATermTable
att1, [TFF_atomic_type] -> Type_functorType
Type_functorType [TFF_atomic_type]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Type_functorType)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.Type_functorType" ShATerm
u

instance ShATermConvertible TPTP.Sign.Sign where
  toShATermAux :: ATermTable -> Sign -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Sign
xv = case Sign
xv of
    Sign a :: ConstantSet
a b :: NumberSet
b c :: ConstantSet
c d :: THFSubTypeMap
d e :: TFFSubTypeMap
e f :: THFPredicateMap
f g :: TFFPredicateMap
g h :: FOFPredicateMap
h i :: FOFPredicateMap
i j :: THFPredicateMap
j k :: TFFPredicateMap
k l :: THFPredicateMap
l m :: TFFPredicateMap
m n :: THFPredicateMap
n o :: TFFPredicateMap
o -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ConstantSet -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ConstantSet
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> NumberSet -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 NumberSet
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ConstantSet -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ConstantSet
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> THFSubTypeMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 THFSubTypeMap
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> TFFSubTypeMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 TFFSubTypeMap
e
      (att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> THFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att5 THFPredicateMap
f
      (att7 :: ATermTable
att7, g' :: Int
g') <- ATermTable -> TFFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att6 TFFPredicateMap
g
      (att8 :: ATermTable
att8, h' :: Int
h') <- ATermTable -> FOFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att7 FOFPredicateMap
h
      (att9 :: ATermTable
att9, i' :: Int
i') <- ATermTable -> FOFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att8 FOFPredicateMap
i
      (att10 :: ATermTable
att10, j' :: Int
j') <- ATermTable -> THFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att9 THFPredicateMap
j
      (att11 :: ATermTable
att11, k' :: Int
k') <- ATermTable -> TFFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att10 TFFPredicateMap
k
      (att12 :: ATermTable
att12, l' :: Int
l') <- ATermTable -> THFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att11 THFPredicateMap
l
      (att13 :: ATermTable
att13, m' :: Int
m') <- ATermTable -> TFFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att12 TFFPredicateMap
m
      (att14 :: ATermTable
att14, n' :: Int
n') <- ATermTable -> THFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att13 THFPredicateMap
n
      (att15 :: ATermTable
att15, o' :: Int
o') <- ATermTable -> TFFPredicateMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att14 TFFPredicateMap
o
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Sign" [Int
a', Int
b', Int
c', Int
d', Int
e', Int
f', Int
g', Int
h',
                                         Int
i', Int
j', Int
k', Int
l', Int
m', Int
n', Int
o'] []) ATermTable
att15
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Sign)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Sign" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e, f :: Int
f, g :: Int
g, h :: Int
h, i :: Int
i, j :: Int
j, k :: Int
k, l :: Int
l, m :: Int
m, n :: Int
n, o :: Int
o] _ ->
      case Int -> ATermTable -> (ATermTable, ConstantSet)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ConstantSet
a') ->
      case Int -> ATermTable -> (ATermTable, NumberSet)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: NumberSet
b') ->
      case Int -> ATermTable -> (ATermTable, ConstantSet)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ConstantSet
c') ->
      case Int -> ATermTable -> (ATermTable, THFSubTypeMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: THFSubTypeMap
d') ->
      case Int -> ATermTable -> (ATermTable, TFFSubTypeMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: TFFSubTypeMap
e') ->
      case Int -> ATermTable -> (ATermTable, THFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
f ATermTable
att5 of
      { (att6 :: ATermTable
att6, f' :: THFPredicateMap
f') ->
      case Int -> ATermTable -> (ATermTable, TFFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
g ATermTable
att6 of
      { (att7 :: ATermTable
att7, g' :: TFFPredicateMap
g') ->
      case Int -> ATermTable -> (ATermTable, FOFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
h ATermTable
att7 of
      { (att8 :: ATermTable
att8, h' :: FOFPredicateMap
h') ->
      case Int -> ATermTable -> (ATermTable, FOFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
i ATermTable
att8 of
      { (att9 :: ATermTable
att9, i' :: FOFPredicateMap
i') ->
      case Int -> ATermTable -> (ATermTable, THFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
j ATermTable
att9 of
      { (att10 :: ATermTable
att10, j' :: THFPredicateMap
j') ->
      case Int -> ATermTable -> (ATermTable, TFFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
k ATermTable
att10 of
      { (att11 :: ATermTable
att11, k' :: TFFPredicateMap
k') ->
      case Int -> ATermTable -> (ATermTable, THFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
l ATermTable
att11 of
      { (att12 :: ATermTable
att12, l' :: THFPredicateMap
l') ->
      case Int -> ATermTable -> (ATermTable, TFFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
m ATermTable
att12 of
      { (att13 :: ATermTable
att13, m' :: TFFPredicateMap
m') ->
      case Int -> ATermTable -> (ATermTable, THFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
n ATermTable
att13 of
      { (att14 :: ATermTable
att14, n' :: THFPredicateMap
n') ->
      case Int -> ATermTable -> (ATermTable, TFFPredicateMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
o ATermTable
att14 of
      { (att15 :: ATermTable
att15, o' :: TFFPredicateMap
o') ->
      (ATermTable
att15, ConstantSet
-> NumberSet
-> ConstantSet
-> THFSubTypeMap
-> TFFSubTypeMap
-> THFPredicateMap
-> TFFPredicateMap
-> FOFPredicateMap
-> FOFPredicateMap
-> THFPredicateMap
-> TFFPredicateMap
-> THFPredicateMap
-> TFFPredicateMap
-> THFPredicateMap
-> TFFPredicateMap
-> Sign
Sign ConstantSet
a' NumberSet
b' ConstantSet
c' THFSubTypeMap
d' TFFSubTypeMap
e' THFPredicateMap
f' TFFPredicateMap
g' FOFPredicateMap
h' FOFPredicateMap
i' THFPredicateMap
j' TFFPredicateMap
k' THFPredicateMap
l' TFFPredicateMap
m' THFPredicateMap
n'
              TFFPredicateMap
o') }}}}}}}}}}}}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Sign)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sign.Sign" ShATerm
u

deriving instance GHC.Generics.Generic TPTP.Sign.Symbol
instance Data.Aeson.ToJSON TPTP.Sign.Symbol where
instance Data.Aeson.FromJSON TPTP.Sign.Symbol where

deriving instance GHC.Generics.Generic TPTP.Sign.SymbolType
instance Data.Aeson.ToJSON TPTP.Sign.SymbolType where
instance Data.Aeson.FromJSON TPTP.Sign.SymbolType where

deriving instance GHC.Generics.Generic TPTP.Sign.THFTypeable
instance Data.Aeson.ToJSON TPTP.Sign.THFTypeable where
instance Data.Aeson.FromJSON TPTP.Sign.THFTypeable where

deriving instance GHC.Generics.Generic TPTP.Sign.FunctorType
instance Data.Aeson.ToJSON TPTP.Sign.FunctorType where
instance Data.Aeson.FromJSON TPTP.Sign.FunctorType where

deriving instance GHC.Generics.Generic TPTP.Sign.PredicateType
instance Data.Aeson.ToJSON TPTP.Sign.PredicateType where
instance Data.Aeson.FromJSON TPTP.Sign.PredicateType where

deriving instance GHC.Generics.Generic TPTP.Sign.Type_functorType
instance Data.Aeson.ToJSON TPTP.Sign.Type_functorType where
instance Data.Aeson.FromJSON TPTP.Sign.Type_functorType where

deriving instance GHC.Generics.Generic TPTP.Sign.Sign
instance Data.Aeson.ToJSON TPTP.Sign.Sign where
instance Data.Aeson.FromJSON TPTP.Sign.Sign where

deriving instance GHC.Generics.Generic TPTP.Sublogic.Sublogic
instance Data.Aeson.ToJSON TPTP.Sublogic.Sublogic where
instance Data.Aeson.FromJSON TPTP.Sublogic.Sublogic where

instance ShATermConvertible TPTP.Sublogic.Sublogic where
  toShATermAux :: ATermTable -> Sublogic -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Sublogic
xv = case Sublogic
xv of
    CNF -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CNF" [] []) ATermTable
att0
    FOF -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FOF" [] []) ATermTable
att0
    TFF -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TFF" [] []) ATermTable
att0
    THF -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Sublogic)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CNF" [] _ -> (ATermTable
att0, Sublogic
CNF)
    ShAAppl "FOF" [] _ -> (ATermTable
att0, Sublogic
FOF)
    ShAAppl "TFF" [] _ -> (ATermTable
att0, Sublogic
TFF)
    ShAAppl "THF" [] _ -> (ATermTable
att0, Sublogic
THF)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Sublogic)
forall a. String -> ShATerm -> a
fromShATermError "TPTP.Sublogic.Sublogic" ShATerm
u