{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
module THF.ATC_THF () where
import ATC.GlobalAnnotations
import ATC.Id
import ATerm.Lib
import Common.DefaultMorphism
import Common.Id
import Common.Id hiding (typeId)
import Common.Json.Instances
import Common.Result
import Data.Aeson(ToJSON, FromJSON)
import Data.Data
import GHC.Generics(Generic)
import Logic.Logic
import THF.As
import THF.Cons
import THF.Sign
import THF.Sublogic
import qualified Data.Map as Map
instance ShATermConvertible THF.As.TPTP_THF where
toShATermAux :: ATermTable -> TPTP_THF -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TPTP_THF
xv = case TPTP_THF
xv of
TPTP_THF_Annotated_Formula a :: Name
a b :: FormulaRole
b c :: THFFormula
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 -> FormulaRole -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FormulaRole
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THFFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THFFormula
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 "TPTP_THF_Annotated_Formula" [Int
a', Int
b',
Int
c', Int
d'] []) ATermTable
att4
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
TPTP_Header 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_Header" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, TPTP_THF)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TPTP_THF_Annotated_Formula" [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, FormulaRole)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: FormulaRole
b') ->
case Int -> ATermTable -> (ATermTable, THFFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: THFFormula
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 -> FormulaRole -> THFFormula -> Annotations -> TPTP_THF
TPTP_THF_Annotated_Formula Name
a' FormulaRole
b' THFFormula
c' Annotations
d') }}}}
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_THF
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_THF
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_THF
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_THF
TPTP_System_Comment SystemComment
a') }
ShAAppl "TPTP_Header" [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_THF
TPTP_Header [Comment]
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TPTP_THF)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.TPTP_THF" ShATerm
u
instance ShATermConvertible THF.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 "THF.As.Comment" ShATerm
u
instance ShATermConvertible THF.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 "THF.As.DefinedComment" ShATerm
u
instance ShATermConvertible THF.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 "THF.As.SystemComment" ShATerm
u
instance ShATermConvertible THF.As.Include where
toShATermAux :: ATermTable -> Include -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Include
xv = case Include
xv of
I_Include a :: Token
a b :: Maybe NameList
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 -> Maybe NameList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe NameList
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 "I_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 "I_Include" [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, Maybe NameList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Maybe NameList
b') ->
(ATermTable
att2, Token -> Maybe NameList -> Include
I_Include Token
a' Maybe NameList
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Include)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Include" ShATerm
u
instance ShATermConvertible THF.As.Annotations where
toShATermAux :: ATermTable -> Annotations -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annotations
xv = case Annotations
xv of
Annotations a :: Source
a b :: OptionalInfo
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 -> OptionalInfo -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OptionalInfo
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 "Annotations" [Int
a', Int
b'] []) ATermTable
att2
Null -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Null" [] []) ATermTable
att0
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, 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, OptionalInfo)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: OptionalInfo
b') ->
(ATermTable
att2, Source -> OptionalInfo -> Annotations
Annotations Source
a' OptionalInfo
b') }}
ShAAppl "Null" [] _ -> (ATermTable
att0, Annotations
Null)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annotations)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Annotations" ShATerm
u
instance ShATermConvertible THF.As.FormulaRole where
toShATermAux :: ATermTable -> FormulaRole -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FormulaRole
xv = case FormulaRole
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
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
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
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
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
fromShATermAux :: Int -> ATermTable -> (ATermTable, FormulaRole)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Axiom" [] _ -> (ATermTable
att0, FormulaRole
Axiom)
ShAAppl "Hypothesis" [] _ -> (ATermTable
att0, FormulaRole
Hypothesis)
ShAAppl "Definition" [] _ -> (ATermTable
att0, FormulaRole
Definition)
ShAAppl "Assumption" [] _ -> (ATermTable
att0, FormulaRole
Assumption)
ShAAppl "Lemma" [] _ -> (ATermTable
att0, FormulaRole
Lemma)
ShAAppl "Theorem" [] _ -> (ATermTable
att0, FormulaRole
Theorem)
ShAAppl "Conjecture" [] _ -> (ATermTable
att0, FormulaRole
Conjecture)
ShAAppl "Negated_Conjecture" [] _ -> (ATermTable
att0, FormulaRole
Negated_Conjecture)
ShAAppl "Plain" [] _ -> (ATermTable
att0, FormulaRole
Plain)
ShAAppl "Fi_Domain" [] _ -> (ATermTable
att0, FormulaRole
Fi_Domain)
ShAAppl "Fi_Functors" [] _ -> (ATermTable
att0, FormulaRole
Fi_Functors)
ShAAppl "Fi_Predicates" [] _ -> (ATermTable
att0, FormulaRole
Fi_Predicates)
ShAAppl "Type" [] _ -> (ATermTable
att0, FormulaRole
Type)
ShAAppl "Unknown" [] _ -> (ATermTable
att0, FormulaRole
Unknown)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FormulaRole)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.FormulaRole" ShATerm
u
instance ShATermConvertible THF.As.THFFormula where
toShATermAux :: ATermTable -> THFFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFFormula
xv = case THFFormula
xv of
TF_THF_Logic_Formula a :: THFLogicFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFLogicFormula
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 "TF_THF_Logic_Formula" [Int
a'] []) ATermTable
att1
TF_THF_Sequent a :: THFSequent
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFSequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFSequent
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 "TF_THF_Sequent" [Int
a'] []) ATermTable
att1
T0F_THF_Typed_Const a :: THFTypedConst
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFTypedConst -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFTypedConst
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 "T0F_THF_Typed_Const" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TF_THF_Logic_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFLogicFormula
a') ->
(ATermTable
att1, THFLogicFormula -> THFFormula
TF_THF_Logic_Formula THFLogicFormula
a') }
ShAAppl "TF_THF_Sequent" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFSequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFSequent
a') ->
(ATermTable
att1, THFSequent -> THFFormula
TF_THF_Sequent THFSequent
a') }
ShAAppl "T0F_THF_Typed_Const" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFTypedConst)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFTypedConst
a') ->
(ATermTable
att1, THFTypedConst -> THFFormula
T0F_THF_Typed_Const THFTypedConst
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFFormula" ShATerm
u
instance ShATermConvertible THF.As.THFLogicFormula where
toShATermAux :: ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFLogicFormula
xv = case THFLogicFormula
xv of
TLF_THF_Binary_Formula a :: THFBinaryFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFBinaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFBinaryFormula
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 "TLF_THF_Binary_Formula" [Int
a'] []) ATermTable
att1
TLF_THF_Unitary_Formula a :: THFUnitaryFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFUnitaryFormula
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 "TLF_THF_Unitary_Formula" [Int
a'] []) ATermTable
att1
TLF_THF_Type_Formula a :: THFTypeFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFTypeFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFTypeFormula
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 "TLF_THF_Type_Formula" [Int
a'] []) ATermTable
att1
TLF_THF_Sub_Type a :: THFSubType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFSubType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFSubType
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 "TLF_THF_Sub_Type" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFLogicFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TLF_THF_Binary_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFBinaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFBinaryFormula
a') ->
(ATermTable
att1, THFBinaryFormula -> THFLogicFormula
TLF_THF_Binary_Formula THFBinaryFormula
a') }
ShAAppl "TLF_THF_Unitary_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFUnitaryFormula
a') ->
(ATermTable
att1, THFUnitaryFormula -> THFLogicFormula
TLF_THF_Unitary_Formula THFUnitaryFormula
a') }
ShAAppl "TLF_THF_Type_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFTypeFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFTypeFormula
a') ->
(ATermTable
att1, THFTypeFormula -> THFLogicFormula
TLF_THF_Type_Formula THFTypeFormula
a') }
ShAAppl "TLF_THF_Sub_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFSubType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFSubType
a') ->
(ATermTable
att1, THFSubType -> THFLogicFormula
TLF_THF_Sub_Type THFSubType
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFLogicFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFLogicFormula" ShATerm
u
instance ShATermConvertible THF.As.THFBinaryFormula where
toShATermAux :: ATermTable -> THFBinaryFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFBinaryFormula
xv = case THFBinaryFormula
xv of
TBF_THF_Binary_Pair a :: THFUnitaryFormula
a b :: THFPairConnective
b c :: THFUnitaryFormula
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFUnitaryFormula
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFPairConnective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFPairConnective
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THFUnitaryFormula
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 "TBF_THF_Binary_Pair" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
TBF_THF_Binary_Tuple a :: THFBinaryTuple
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFBinaryTuple -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFBinaryTuple
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 "TBF_THF_Binary_Tuple" [Int
a'] []) ATermTable
att1
TBF_THF_Binary_Type a :: THFBinaryType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFBinaryType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFBinaryType
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 "TBF_THF_Binary_Type" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFBinaryFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TBF_THF_Binary_Pair" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFUnitaryFormula
a') ->
case Int -> ATermTable -> (ATermTable, THFPairConnective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFPairConnective
b') ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: THFUnitaryFormula
c') ->
(ATermTable
att3, THFUnitaryFormula
-> THFPairConnective -> THFUnitaryFormula -> THFBinaryFormula
TBF_THF_Binary_Pair THFUnitaryFormula
a' THFPairConnective
b' THFUnitaryFormula
c') }}}
ShAAppl "TBF_THF_Binary_Tuple" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFBinaryTuple)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFBinaryTuple
a') ->
(ATermTable
att1, THFBinaryTuple -> THFBinaryFormula
TBF_THF_Binary_Tuple THFBinaryTuple
a') }
ShAAppl "TBF_THF_Binary_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFBinaryType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFBinaryType
a') ->
(ATermTable
att1, THFBinaryType -> THFBinaryFormula
TBF_THF_Binary_Type THFBinaryType
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFBinaryFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFBinaryFormula" ShATerm
u
instance ShATermConvertible THF.As.THFBinaryTuple where
toShATermAux :: ATermTable -> THFBinaryTuple -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFBinaryTuple
xv = case THFBinaryTuple
xv of
TBT_THF_Or_Formula a :: [THFUnitaryFormula]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFUnitaryFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFUnitaryFormula]
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 "TBT_THF_Or_Formula" [Int
a'] []) ATermTable
att1
TBT_THF_And_Formula a :: [THFUnitaryFormula]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFUnitaryFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFUnitaryFormula]
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 "TBT_THF_And_Formula" [Int
a'] []) ATermTable
att1
TBT_THF_Apply_Formula a :: [THFUnitaryFormula]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFUnitaryFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFUnitaryFormula]
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 "TBT_THF_Apply_Formula" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFBinaryTuple)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TBT_THF_Or_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFUnitaryFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFUnitaryFormula]
a') ->
(ATermTable
att1, [THFUnitaryFormula] -> THFBinaryTuple
TBT_THF_Or_Formula [THFUnitaryFormula]
a') }
ShAAppl "TBT_THF_And_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFUnitaryFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFUnitaryFormula]
a') ->
(ATermTable
att1, [THFUnitaryFormula] -> THFBinaryTuple
TBT_THF_And_Formula [THFUnitaryFormula]
a') }
ShAAppl "TBT_THF_Apply_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFUnitaryFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFUnitaryFormula]
a') ->
(ATermTable
att1, [THFUnitaryFormula] -> THFBinaryTuple
TBT_THF_Apply_Formula [THFUnitaryFormula]
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFBinaryTuple)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFBinaryTuple" ShATerm
u
instance ShATermConvertible THF.As.THFUnitaryFormula where
toShATermAux :: ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFUnitaryFormula
xv = case THFUnitaryFormula
xv of
TUF_THF_Quantified_Formula a :: THFQuantifiedFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFQuantifiedFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFQuantifiedFormula
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 "TUF_THF_Quantified_Formula" [Int
a'] []) ATermTable
att1
TUF_THF_Unary_Formula a :: THFUnaryConnective
a b :: THFLogicFormula
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFUnaryConnective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFUnaryConnective
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFLogicFormula
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 "TUF_THF_Unary_Formula" [Int
a',
Int
b'] []) ATermTable
att2
TUF_THF_Atom a :: THFAtom
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFAtom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFAtom
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 "TUF_THF_Atom" [Int
a'] []) ATermTable
att1
TUF_THF_Tuple a :: [THFLogicFormula]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFLogicFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFLogicFormula]
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 "TUF_THF_Tuple" [Int
a'] []) ATermTable
att1
TUF_THF_Conditional a :: THFLogicFormula
a b :: THFLogicFormula
b c :: THFLogicFormula
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFLogicFormula
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFLogicFormula
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THFLogicFormula
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 "TUF_THF_Conditional" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
TUF_THF_Logic_Formula_Par a :: THFLogicFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFLogicFormula
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 "TUF_THF_Logic_Formula_Par" [Int
a'] []) ATermTable
att1
T0UF_THF_Abstraction a :: THFVariableList
a b :: THFUnitaryFormula
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFVariableList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFVariableList
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFUnitaryFormula
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 "T0UF_THF_Abstraction" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TUF_THF_Quantified_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFQuantifiedFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFQuantifiedFormula
a') ->
(ATermTable
att1, THFQuantifiedFormula -> THFUnitaryFormula
TUF_THF_Quantified_Formula THFQuantifiedFormula
a') }
ShAAppl "TUF_THF_Unary_Formula" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, THFUnaryConnective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFUnaryConnective
a') ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFLogicFormula
b') ->
(ATermTable
att2, THFUnaryConnective -> THFLogicFormula -> THFUnitaryFormula
TUF_THF_Unary_Formula THFUnaryConnective
a' THFLogicFormula
b') }}
ShAAppl "TUF_THF_Atom" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFAtom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFAtom
a') ->
(ATermTable
att1, THFAtom -> THFUnitaryFormula
TUF_THF_Atom THFAtom
a') }
ShAAppl "TUF_THF_Tuple" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFLogicFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFLogicFormula]
a') ->
(ATermTable
att1, [THFLogicFormula] -> THFUnitaryFormula
TUF_THF_Tuple [THFLogicFormula]
a') }
ShAAppl "TUF_THF_Conditional" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFLogicFormula
a') ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFLogicFormula
b') ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: THFLogicFormula
c') ->
(ATermTable
att3, THFLogicFormula
-> THFLogicFormula -> THFLogicFormula -> THFUnitaryFormula
TUF_THF_Conditional THFLogicFormula
a' THFLogicFormula
b' THFLogicFormula
c') }}}
ShAAppl "TUF_THF_Logic_Formula_Par" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFLogicFormula
a') ->
(ATermTable
att1, THFLogicFormula -> THFUnitaryFormula
TUF_THF_Logic_Formula_Par THFLogicFormula
a') }
ShAAppl "T0UF_THF_Abstraction" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, THFVariableList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFVariableList
a') ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFUnitaryFormula
b') ->
(ATermTable
att2, THFVariableList -> THFUnitaryFormula -> THFUnitaryFormula
T0UF_THF_Abstraction THFVariableList
a' THFUnitaryFormula
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFUnitaryFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFUnitaryFormula" ShATerm
u
instance ShATermConvertible THF.As.THFQuantifiedFormula where
toShATermAux :: ATermTable -> THFQuantifiedFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFQuantifiedFormula
xv = case THFQuantifiedFormula
xv of
TQF_THF_Quantified_Formula a :: THFQuantifier
a b :: THFVariableList
b c :: THFUnitaryFormula
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFQuantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFQuantifier
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFVariableList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFVariableList
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THFUnitaryFormula
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 "TQF_THF_Quantified_Formula" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
T0QF_THF_Quantified_Var a :: Quantifier
a b :: THFVariableList
b c :: THFUnitaryFormula
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Quantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Quantifier
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFVariableList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFVariableList
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 THFUnitaryFormula
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 "T0QF_THF_Quantified_Var" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
T0QF_THF_Quantified_Novar a :: THFQuantifier
a b :: THFUnitaryFormula
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFQuantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFQuantifier
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFUnitaryFormula
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 "T0QF_THF_Quantified_Novar" [Int
a',
Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFQuantifiedFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TQF_THF_Quantified_Formula" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, THFQuantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFQuantifier
a') ->
case Int -> ATermTable -> (ATermTable, THFVariableList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFVariableList
b') ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: THFUnitaryFormula
c') ->
(ATermTable
att3, THFQuantifier
-> THFVariableList -> THFUnitaryFormula -> THFQuantifiedFormula
TQF_THF_Quantified_Formula THFQuantifier
a' THFVariableList
b' THFUnitaryFormula
c') }}}
ShAAppl "T0QF_THF_Quantified_Var" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, Quantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Quantifier
a') ->
case Int -> ATermTable -> (ATermTable, THFVariableList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFVariableList
b') ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: THFUnitaryFormula
c') ->
(ATermTable
att3, Quantifier
-> THFVariableList -> THFUnitaryFormula -> THFQuantifiedFormula
T0QF_THF_Quantified_Var Quantifier
a' THFVariableList
b' THFUnitaryFormula
c') }}}
ShAAppl "T0QF_THF_Quantified_Novar" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, THFQuantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFQuantifier
a') ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFUnitaryFormula
b') ->
(ATermTable
att2, THFQuantifier -> THFUnitaryFormula -> THFQuantifiedFormula
T0QF_THF_Quantified_Novar THFQuantifier
a' THFUnitaryFormula
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFQuantifiedFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFQuantifiedFormula" ShATerm
u
instance ShATermConvertible THF.As.THFVariable where
toShATermAux :: ATermTable -> THFVariable -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFVariable
xv = case THFVariable
xv of
TV_THF_Typed_Variable a :: Token
a b :: THFTopLevelType
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 -> THFTopLevelType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFTopLevelType
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 "TV_THF_Typed_Variable" [Int
a',
Int
b'] []) ATermTable
att2
TV_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 "TV_Variable" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFVariable)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TV_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, THFTopLevelType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFTopLevelType
b') ->
(ATermTable
att2, Token -> THFTopLevelType -> THFVariable
TV_THF_Typed_Variable Token
a' THFTopLevelType
b') }}
ShAAppl "TV_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 -> THFVariable
TV_Variable Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFVariable)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFVariable" ShATerm
u
instance ShATermConvertible THF.As.THFTypedConst where
toShATermAux :: ATermTable -> THFTypedConst -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFTypedConst
xv = case THFTypedConst
xv of
T0TC_Typed_Const a :: Constant
a b :: THFTopLevelType
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFTopLevelType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFTopLevelType
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 "T0TC_Typed_Const" [Int
a', Int
b'] []) ATermTable
att2
T0TC_THF_TypedConst_Par a :: THFTypedConst
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFTypedConst -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFTypedConst
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 "T0TC_THF_TypedConst_Par" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFTypedConst)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "T0TC_Typed_Const" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, THFTopLevelType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFTopLevelType
b') ->
(ATermTable
att2, Constant -> THFTopLevelType -> THFTypedConst
T0TC_Typed_Const Constant
a' THFTopLevelType
b') }}
ShAAppl "T0TC_THF_TypedConst_Par" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFTypedConst)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFTypedConst
a') ->
(ATermTable
att1, THFTypedConst -> THFTypedConst
T0TC_THF_TypedConst_Par THFTypedConst
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFTypedConst)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFTypedConst" ShATerm
u
instance ShATermConvertible THF.As.THFTypeFormula where
toShATermAux :: ATermTable -> THFTypeFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFTypeFormula
xv = case THFTypeFormula
xv of
TTF_THF_Type_Formula a :: THFTypeableFormula
a b :: THFTopLevelType
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFTypeableFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFTypeableFormula
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFTopLevelType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFTopLevelType
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 "TTF_THF_Type_Formula" [Int
a', Int
b'] []) ATermTable
att2
TTF_THF_Typed_Const a :: Constant
a b :: THFTopLevelType
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> THFTopLevelType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 THFTopLevelType
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 "TTF_THF_Typed_Const" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFTypeFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TTF_THF_Type_Formula" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, THFTypeableFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFTypeableFormula
a') ->
case Int -> ATermTable -> (ATermTable, THFTopLevelType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFTopLevelType
b') ->
(ATermTable
att2, THFTypeableFormula -> THFTopLevelType -> THFTypeFormula
TTF_THF_Type_Formula THFTypeableFormula
a' THFTopLevelType
b') }}
ShAAppl "TTF_THF_Typed_Const" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, THFTopLevelType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: THFTopLevelType
b') ->
(ATermTable
att2, Constant -> THFTopLevelType -> THFTypeFormula
TTF_THF_Typed_Const Constant
a' THFTopLevelType
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFTypeFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFTypeFormula" ShATerm
u
instance ShATermConvertible THF.As.THFTypeableFormula where
toShATermAux :: ATermTable -> THFTypeableFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFTypeableFormula
xv = case THFTypeableFormula
xv of
TTyF_THF_Atom a :: THFAtom
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFAtom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFAtom
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 "TTyF_THF_Atom" [Int
a'] []) ATermTable
att1
TTyF_THF_Tuple a :: [THFLogicFormula]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFLogicFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFLogicFormula]
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 "TTyF_THF_Tuple" [Int
a'] []) ATermTable
att1
TTyF_THF_Logic_Formula a :: THFLogicFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFLogicFormula
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 "TTyF_THF_Logic_Formula" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFTypeableFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TTyF_THF_Atom" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFAtom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFAtom
a') ->
(ATermTable
att1, THFAtom -> THFTypeableFormula
TTyF_THF_Atom THFAtom
a') }
ShAAppl "TTyF_THF_Tuple" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFLogicFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFLogicFormula]
a') ->
(ATermTable
att1, [THFLogicFormula] -> THFTypeableFormula
TTyF_THF_Tuple [THFLogicFormula]
a') }
ShAAppl "TTyF_THF_Logic_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFLogicFormula
a') ->
(ATermTable
att1, THFLogicFormula -> THFTypeableFormula
TTyF_THF_Logic_Formula THFLogicFormula
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFTypeableFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFTypeableFormula" ShATerm
u
instance ShATermConvertible THF.As.THFSubType where
toShATermAux :: ATermTable -> THFSubType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFSubType
xv = case THFSubType
xv of
TST_THF_Sub_Type a :: Constant
a b :: Constant
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Constant
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 "TST_THF_Sub_Type" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFSubType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TST_THF_Sub_Type" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Constant
b') ->
(ATermTable
att2, Constant -> Constant -> THFSubType
TST_THF_Sub_Type Constant
a' Constant
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFSubType)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFSubType" ShATerm
u
instance ShATermConvertible THF.As.THFTopLevelType where
toShATermAux :: ATermTable -> THFTopLevelType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFTopLevelType
xv = case THFTopLevelType
xv of
TTLT_THF_Logic_Formula a :: THFLogicFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFLogicFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFLogicFormula
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 "TTLT_THF_Logic_Formula" [Int
a'] []) ATermTable
att1
T0TLT_Constant a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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 "T0TLT_Constant" [Int
a'] []) ATermTable
att1
T0TLT_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 "T0TLT_Variable" [Int
a'] []) ATermTable
att1
T0TLT_Defined_Type a :: DefinedType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedType
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 "T0TLT_Defined_Type" [Int
a'] []) ATermTable
att1
T0TLT_System_Type 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 "T0TLT_System_Type" [Int
a'] []) ATermTable
att1
T0TLT_THF_Binary_Type a :: THFBinaryType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFBinaryType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFBinaryType
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 "T0TLT_THF_Binary_Type" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFTopLevelType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TTLT_THF_Logic_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFLogicFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFLogicFormula
a') ->
(ATermTable
att1, THFLogicFormula -> THFTopLevelType
TTLT_THF_Logic_Formula THFLogicFormula
a') }
ShAAppl "T0TLT_Constant" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> THFTopLevelType
T0TLT_Constant Constant
a') }
ShAAppl "T0TLT_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 -> THFTopLevelType
T0TLT_Variable Token
a') }
ShAAppl "T0TLT_Defined_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedType
a') ->
(ATermTable
att1, DefinedType -> THFTopLevelType
T0TLT_Defined_Type DefinedType
a') }
ShAAppl "T0TLT_System_Type" [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 -> THFTopLevelType
T0TLT_System_Type Token
a') }
ShAAppl "T0TLT_THF_Binary_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFBinaryType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFBinaryType
a') ->
(ATermTable
att1, THFBinaryType -> THFTopLevelType
T0TLT_THF_Binary_Type THFBinaryType
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFTopLevelType)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFTopLevelType" ShATerm
u
instance ShATermConvertible THF.As.THFUnitaryType where
toShATermAux :: ATermTable -> THFUnitaryType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFUnitaryType
xv = case THFUnitaryType
xv of
TUT_THF_Unitary_Formula a :: THFUnitaryFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFUnitaryFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFUnitaryFormula
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 "TUT_THF_Unitary_Formula" [Int
a'] []) ATermTable
att1
T0UT_Constant a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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 "T0UT_Constant" [Int
a'] []) ATermTable
att1
T0UT_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 "T0UT_Variable" [Int
a'] []) ATermTable
att1
T0UT_Defined_Type a :: DefinedType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedType
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 "T0UT_Defined_Type" [Int
a'] []) ATermTable
att1
T0UT_System_Type 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 "T0UT_System_Type" [Int
a'] []) ATermTable
att1
T0UT_THF_Binary_Type_Par a :: THFBinaryType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFBinaryType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFBinaryType
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 "T0UT_THF_Binary_Type_Par" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFUnitaryType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TUT_THF_Unitary_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFUnitaryFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFUnitaryFormula
a') ->
(ATermTable
att1, THFUnitaryFormula -> THFUnitaryType
TUT_THF_Unitary_Formula THFUnitaryFormula
a') }
ShAAppl "T0UT_Constant" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> THFUnitaryType
T0UT_Constant Constant
a') }
ShAAppl "T0UT_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 -> THFUnitaryType
T0UT_Variable Token
a') }
ShAAppl "T0UT_Defined_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedType
a') ->
(ATermTable
att1, DefinedType -> THFUnitaryType
T0UT_Defined_Type DefinedType
a') }
ShAAppl "T0UT_System_Type" [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 -> THFUnitaryType
T0UT_System_Type Token
a') }
ShAAppl "T0UT_THF_Binary_Type_Par" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFBinaryType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFBinaryType
a') ->
(ATermTable
att1, THFBinaryType -> THFUnitaryType
T0UT_THF_Binary_Type_Par THFBinaryType
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFUnitaryType)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFUnitaryType" ShATerm
u
instance ShATermConvertible THF.As.THFBinaryType where
toShATermAux :: ATermTable -> THFBinaryType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFBinaryType
xv = case THFBinaryType
xv of
TBT_THF_Mapping_Type a :: [THFUnitaryType]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFUnitaryType] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFUnitaryType]
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 "TBT_THF_Mapping_Type" [Int
a'] []) ATermTable
att1
TBT_THF_Xprod_Type a :: [THFUnitaryType]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFUnitaryType] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFUnitaryType]
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 "TBT_THF_Xprod_Type" [Int
a'] []) ATermTable
att1
TBT_THF_Union_Type a :: [THFUnitaryType]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFUnitaryType] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFUnitaryType]
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 "TBT_THF_Union_Type" [Int
a'] []) ATermTable
att1
T0BT_THF_Binary_Type_Par a :: THFBinaryType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFBinaryType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFBinaryType
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 "T0BT_THF_Binary_Type_Par" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFBinaryType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TBT_THF_Mapping_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFUnitaryType])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFUnitaryType]
a') ->
(ATermTable
att1, [THFUnitaryType] -> THFBinaryType
TBT_THF_Mapping_Type [THFUnitaryType]
a') }
ShAAppl "TBT_THF_Xprod_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFUnitaryType])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFUnitaryType]
a') ->
(ATermTable
att1, [THFUnitaryType] -> THFBinaryType
TBT_THF_Xprod_Type [THFUnitaryType]
a') }
ShAAppl "TBT_THF_Union_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [THFUnitaryType])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFUnitaryType]
a') ->
(ATermTable
att1, [THFUnitaryType] -> THFBinaryType
TBT_THF_Union_Type [THFUnitaryType]
a') }
ShAAppl "T0BT_THF_Binary_Type_Par" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFBinaryType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFBinaryType
a') ->
(ATermTable
att1, THFBinaryType -> THFBinaryType
T0BT_THF_Binary_Type_Par THFBinaryType
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFBinaryType)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFBinaryType" ShATerm
u
instance ShATermConvertible THF.As.THFAtom where
toShATermAux :: ATermTable -> THFAtom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFAtom
xv = case THFAtom
xv of
TA_Term a :: Term
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Term -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 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 "TA_Term" [Int
a'] []) ATermTable
att1
TA_THF_Conn_Term a :: THFConnTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFConnTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFConnTerm
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 "TA_THF_Conn_Term" [Int
a'] []) ATermTable
att1
TA_Defined_Type a :: DefinedType
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedType
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 "TA_Defined_Type" [Int
a'] []) ATermTable
att1
TA_Defined_Plain_Formula a :: DefinedPlainFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedPlainFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedPlainFormula
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 "TA_Defined_Plain_Formula" [Int
a'] []) ATermTable
att1
TA_System_Type 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 "TA_System_Type" [Int
a'] []) ATermTable
att1
TA_System_Atomic_Formula a :: SystemTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SystemTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SystemTerm
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 "TA_System_Atomic_Formula" [Int
a'] []) ATermTable
att1
T0A_Constant a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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 "T0A_Constant" [Int
a'] []) ATermTable
att1
T0A_Defined_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 "T0A_Defined_Constant" [Int
a'] []) ATermTable
att1
T0A_System_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 "T0A_System_Constant" [Int
a'] []) ATermTable
att1
T0A_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 "T0A_Variable" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFAtom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TA_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Term)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Term
a') ->
(ATermTable
att1, Term -> THFAtom
TA_Term Term
a') }
ShAAppl "TA_THF_Conn_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFConnTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFConnTerm
a') ->
(ATermTable
att1, THFConnTerm -> THFAtom
TA_THF_Conn_Term THFConnTerm
a') }
ShAAppl "TA_Defined_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedType
a') ->
(ATermTable
att1, DefinedType -> THFAtom
TA_Defined_Type DefinedType
a') }
ShAAppl "TA_Defined_Plain_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedPlainFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedPlainFormula
a') ->
(ATermTable
att1, DefinedPlainFormula -> THFAtom
TA_Defined_Plain_Formula DefinedPlainFormula
a') }
ShAAppl "TA_System_Type" [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 -> THFAtom
TA_System_Type Token
a') }
ShAAppl "TA_System_Atomic_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, SystemTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SystemTerm
a') ->
(ATermTable
att1, SystemTerm -> THFAtom
TA_System_Atomic_Formula SystemTerm
a') }
ShAAppl "T0A_Constant" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> THFAtom
T0A_Constant Constant
a') }
ShAAppl "T0A_Defined_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 -> THFAtom
T0A_Defined_Constant Token
a') }
ShAAppl "T0A_System_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 -> THFAtom
T0A_System_Constant Token
a') }
ShAAppl "T0A_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 -> THFAtom
T0A_Variable Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFAtom)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFAtom" ShATerm
u
instance ShATermConvertible THF.As.THFSequent where
toShATermAux :: ATermTable -> THFSequent -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFSequent
xv = case THFSequent
xv of
TS_THF_Sequent a :: [THFLogicFormula]
a b :: [THFLogicFormula]
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [THFLogicFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [THFLogicFormula]
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [THFLogicFormula] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [THFLogicFormula]
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 "TS_THF_Sequent" [Int
a', Int
b'] []) ATermTable
att2
TS_THF_Sequent_Par a :: THFSequent
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFSequent -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFSequent
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 "TS_THF_Sequent_Par" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFSequent)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TS_THF_Sequent" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, [THFLogicFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [THFLogicFormula]
a') ->
case Int -> ATermTable -> (ATermTable, [THFLogicFormula])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [THFLogicFormula]
b') ->
(ATermTable
att2, [THFLogicFormula] -> [THFLogicFormula] -> THFSequent
TS_THF_Sequent [THFLogicFormula]
a' [THFLogicFormula]
b') }}
ShAAppl "TS_THF_Sequent_Par" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFSequent)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFSequent
a') ->
(ATermTable
att1, THFSequent -> THFSequent
TS_THF_Sequent_Par THFSequent
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFSequent)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFSequent" ShATerm
u
instance ShATermConvertible THF.As.THFConnTerm where
toShATermAux :: ATermTable -> THFConnTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFConnTerm
xv = case THFConnTerm
xv of
TCT_THF_Pair_Connective a :: THFPairConnective
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFPairConnective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFPairConnective
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 "TCT_THF_Pair_Connective" [Int
a'] []) ATermTable
att1
TCT_Assoc_Connective a :: AssocConnective
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> AssocConnective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 AssocConnective
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 "TCT_Assoc_Connective" [Int
a'] []) ATermTable
att1
TCT_THF_Unary_Connective a :: THFUnaryConnective
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFUnaryConnective -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFUnaryConnective
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 "TCT_THF_Unary_Connective" [Int
a'] []) ATermTable
att1
T0CT_THF_Quantifier a :: THFQuantifier
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFQuantifier -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFQuantifier
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 "T0CT_THF_Quantifier" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFConnTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TCT_THF_Pair_Connective" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFPairConnective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFPairConnective
a') ->
(ATermTable
att1, THFPairConnective -> THFConnTerm
TCT_THF_Pair_Connective THFPairConnective
a') }
ShAAppl "TCT_Assoc_Connective" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, AssocConnective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: AssocConnective
a') ->
(ATermTable
att1, AssocConnective -> THFConnTerm
TCT_Assoc_Connective AssocConnective
a') }
ShAAppl "TCT_THF_Unary_Connective" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFUnaryConnective)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFUnaryConnective
a') ->
(ATermTable
att1, THFUnaryConnective -> THFConnTerm
TCT_THF_Unary_Connective THFUnaryConnective
a') }
ShAAppl "T0CT_THF_Quantifier" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFQuantifier)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFQuantifier
a') ->
(ATermTable
att1, THFQuantifier -> THFConnTerm
T0CT_THF_Quantifier THFQuantifier
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFConnTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFConnTerm" ShATerm
u
instance ShATermConvertible THF.As.THFQuantifier where
toShATermAux :: ATermTable -> THFQuantifier -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFQuantifier
xv = case THFQuantifier
xv of
TQ_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 "TQ_ForAll" [] []) ATermTable
att0
TQ_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 "TQ_Exists" [] []) ATermTable
att0
TQ_Lambda_Binder ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TQ_Lambda_Binder" [] []) ATermTable
att0
TQ_Dependent_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 "TQ_Dependent_Product" [] []) ATermTable
att0
TQ_Dependent_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 "TQ_Dependent_Sum" [] []) ATermTable
att0
TQ_Indefinite_Description ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TQ_Indefinite_Description" [] []) ATermTable
att0
TQ_Definite_Description ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TQ_Definite_Description" [] []) ATermTable
att0
T0Q_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 "T0Q_PiForAll" [] []) ATermTable
att0
T0Q_SigmaExists -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "T0Q_SigmaExists" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFQuantifier)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TQ_ForAll" [] _ -> (ATermTable
att0, THFQuantifier
TQ_ForAll)
ShAAppl "TQ_Exists" [] _ -> (ATermTable
att0, THFQuantifier
TQ_Exists)
ShAAppl "TQ_Lambda_Binder" [] _ -> (ATermTable
att0, THFQuantifier
TQ_Lambda_Binder)
ShAAppl "TQ_Dependent_Product" [] _ -> (ATermTable
att0, THFQuantifier
TQ_Dependent_Product)
ShAAppl "TQ_Dependent_Sum" [] _ -> (ATermTable
att0, THFQuantifier
TQ_Dependent_Sum)
ShAAppl "TQ_Indefinite_Description" [] _ -> (ATermTable
att0, THFQuantifier
TQ_Indefinite_Description)
ShAAppl "TQ_Definite_Description" [] _ -> (ATermTable
att0, THFQuantifier
TQ_Definite_Description)
ShAAppl "T0Q_PiForAll" [] _ -> (ATermTable
att0, THFQuantifier
T0Q_PiForAll)
ShAAppl "T0Q_SigmaExists" [] _ -> (ATermTable
att0, THFQuantifier
T0Q_SigmaExists)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFQuantifier)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFQuantifier" ShATerm
u
instance ShATermConvertible THF.As.Quantifier where
toShATermAux :: ATermTable -> Quantifier -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Quantifier
xv = case Quantifier
xv of
T0Q_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 "T0Q_ForAll" [] []) ATermTable
att0
T0Q_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 "T0Q_Exists" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, Quantifier)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "T0Q_ForAll" [] _ -> (ATermTable
att0, Quantifier
T0Q_ForAll)
ShAAppl "T0Q_Exists" [] _ -> (ATermTable
att0, Quantifier
T0Q_Exists)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Quantifier)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Quantifier" ShATerm
u
instance ShATermConvertible THF.As.THFPairConnective where
toShATermAux :: ATermTable -> THFPairConnective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFPairConnective
xv = case THFPairConnective
xv of
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 "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
Equivalent -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Equivalent" [] []) 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
IF -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IF" [] []) 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, THFPairConnective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Infix_Equality" [] _ -> (ATermTable
att0, THFPairConnective
Infix_Equality)
ShAAppl "Infix_Inequality" [] _ -> (ATermTable
att0, THFPairConnective
Infix_Inequality)
ShAAppl "Equivalent" [] _ -> (ATermTable
att0, THFPairConnective
Equivalent)
ShAAppl "Implication" [] _ -> (ATermTable
att0, THFPairConnective
Implication)
ShAAppl "IF" [] _ -> (ATermTable
att0, THFPairConnective
IF)
ShAAppl "XOR" [] _ -> (ATermTable
att0, THFPairConnective
XOR)
ShAAppl "NOR" [] _ -> (ATermTable
att0, THFPairConnective
NOR)
ShAAppl "NAND" [] _ -> (ATermTable
att0, THFPairConnective
NAND)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFPairConnective)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFPairConnective" ShATerm
u
instance ShATermConvertible THF.As.THFUnaryConnective where
toShATermAux :: ATermTable -> THFUnaryConnective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFUnaryConnective
xv = case THFUnaryConnective
xv of
Negation -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Negation" [] []) ATermTable
att0
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 "PiForAll" [] []) ATermTable
att0
SigmaExists -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SigmaExists" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFUnaryConnective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Negation" [] _ -> (ATermTable
att0, THFUnaryConnective
Negation)
ShAAppl "PiForAll" [] _ -> (ATermTable
att0, THFUnaryConnective
PiForAll)
ShAAppl "SigmaExists" [] _ -> (ATermTable
att0, THFUnaryConnective
SigmaExists)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFUnaryConnective)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.THFUnaryConnective" ShATerm
u
instance ShATermConvertible THF.As.AssocConnective where
toShATermAux :: ATermTable -> AssocConnective -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AssocConnective
xv = case AssocConnective
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, AssocConnective)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "OR" [] _ -> (ATermTable
att0, AssocConnective
OR)
ShAAppl "AND" [] _ -> (ATermTable
att0, AssocConnective
AND)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AssocConnective)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.AssocConnective" ShATerm
u
instance ShATermConvertible THF.As.DefinedType where
toShATermAux :: ATermTable -> DefinedType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedType
xv = case DefinedType
xv of
DT_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 "DT_oType" [] []) ATermTable
att0
DT_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 "DT_o" [] []) ATermTable
att0
DT_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 "DT_iType" [] []) ATermTable
att0
DT_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 "DT_i" [] []) ATermTable
att0
DT_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 "DT_tType" [] []) ATermTable
att0
DT_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 "DT_real" [] []) ATermTable
att0
DT_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 "DT_rat" [] []) ATermTable
att0
DT_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 "DT_int" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DT_oType" [] _ -> (ATermTable
att0, DefinedType
DT_oType)
ShAAppl "DT_o" [] _ -> (ATermTable
att0, DefinedType
DT_o)
ShAAppl "DT_iType" [] _ -> (ATermTable
att0, DefinedType
DT_iType)
ShAAppl "DT_i" [] _ -> (ATermTable
att0, DefinedType
DT_i)
ShAAppl "DT_tType" [] _ -> (ATermTable
att0, DefinedType
DT_tType)
ShAAppl "DT_real" [] _ -> (ATermTable
att0, DefinedType
DT_real)
ShAAppl "DT_rat" [] _ -> (ATermTable
att0, DefinedType
DT_rat)
ShAAppl "DT_int" [] _ -> (ATermTable
att0, DefinedType
DT_int)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedType)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedType" ShATerm
u
instance ShATermConvertible THF.As.DefinedPlainFormula where
toShATermAux :: ATermTable -> DefinedPlainFormula -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedPlainFormula
xv = case DefinedPlainFormula
xv of
DPF_Defined_Prop a :: DefinedProp
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedProp -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedProp
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 "DPF_Defined_Prop" [Int
a'] []) ATermTable
att1
DPF_Defined_Formula a :: DefinedPred
a b :: Arguments
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedPred -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedPred
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 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 "DPF_Defined_Formula" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedPlainFormula)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DPF_Defined_Prop" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedProp)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedProp
a') ->
(ATermTable
att1, DefinedProp -> DefinedPlainFormula
DPF_Defined_Prop DefinedProp
a') }
ShAAppl "DPF_Defined_Formula" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, DefinedPred)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedPred
a') ->
case Int -> ATermTable -> (ATermTable, Arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Arguments
b') ->
(ATermTable
att2, DefinedPred -> Arguments -> DefinedPlainFormula
DPF_Defined_Formula DefinedPred
a' Arguments
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedPlainFormula)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedPlainFormula" ShATerm
u
instance ShATermConvertible THF.As.DefinedProp where
toShATermAux :: ATermTable -> DefinedProp -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedProp
xv = case DefinedProp
xv of
DP_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 "DP_True" [] []) ATermTable
att0
DP_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 "DP_False" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedProp)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DP_True" [] _ -> (ATermTable
att0, DefinedProp
DP_True)
ShAAppl "DP_False" [] _ -> (ATermTable
att0, DefinedProp
DP_False)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedProp)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedProp" ShATerm
u
instance ShATermConvertible THF.As.DefinedPred where
toShATermAux :: ATermTable -> DefinedPred -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedPred
xv = case DefinedPred
xv of
Disrinct -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Disrinct" [] []) 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
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedPred)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Disrinct" [] _ -> (ATermTable
att0, DefinedPred
Disrinct)
ShAAppl "Less" [] _ -> (ATermTable
att0, DefinedPred
Less)
ShAAppl "Lesseq" [] _ -> (ATermTable
att0, DefinedPred
Lesseq)
ShAAppl "Greater" [] _ -> (ATermTable
att0, DefinedPred
Greater)
ShAAppl "Greatereq" [] _ -> (ATermTable
att0, DefinedPred
Greatereq)
ShAAppl "Is_int" [] _ -> (ATermTable
att0, DefinedPred
Is_int)
ShAAppl "Is_rat" [] _ -> (ATermTable
att0, DefinedPred
Is_rat)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedPred)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedPred" ShATerm
u
instance ShATermConvertible THF.As.Term where
toShATermAux :: ATermTable -> Term -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Term
xv = case Term
xv of
T_Function_Term a :: FunctionTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FunctionTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FunctionTerm
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 "T_Function_Term" [Int
a'] []) ATermTable
att1
T_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 "T_Variable" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, Term)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "T_Function_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, FunctionTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: FunctionTerm
a') ->
(ATermTable
att1, FunctionTerm -> Term
T_Function_Term FunctionTerm
a') }
ShAAppl "T_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 -> Term
T_Variable Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Term)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Term" ShATerm
u
instance ShATermConvertible THF.As.FunctionTerm where
toShATermAux :: ATermTable -> FunctionTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FunctionTerm
xv = case FunctionTerm
xv of
FT_Plain_Term a :: PlainTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PlainTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PlainTerm
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 "FT_Plain_Term" [Int
a'] []) ATermTable
att1
FT_Defined_Term a :: DefinedTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedTerm
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 "FT_Defined_Term" [Int
a'] []) ATermTable
att1
FT_System_Term a :: SystemTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SystemTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SystemTerm
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 "FT_System_Term" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, FunctionTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "FT_Plain_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, PlainTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: PlainTerm
a') ->
(ATermTable
att1, PlainTerm -> FunctionTerm
FT_Plain_Term PlainTerm
a') }
ShAAppl "FT_Defined_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedTerm
a') ->
(ATermTable
att1, DefinedTerm -> FunctionTerm
FT_Defined_Term DefinedTerm
a') }
ShAAppl "FT_System_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, SystemTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SystemTerm
a') ->
(ATermTable
att1, SystemTerm -> FunctionTerm
FT_System_Term SystemTerm
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FunctionTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.FunctionTerm" ShATerm
u
instance ShATermConvertible THF.As.PlainTerm where
toShATermAux :: ATermTable -> PlainTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PlainTerm
xv = case PlainTerm
xv of
PT_Plain_Term a :: Constant
a b :: Arguments
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 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 "PT_Plain_Term" [Int
a', Int
b'] []) ATermTable
att2
PT_Constant a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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 "PT_Constant" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, PlainTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "PT_Plain_Term" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, Arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Arguments
b') ->
(ATermTable
att2, Constant -> Arguments -> PlainTerm
PT_Plain_Term Constant
a' Arguments
b') }}
ShAAppl "PT_Constant" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> PlainTerm
PT_Constant Constant
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PlainTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.PlainTerm" ShATerm
u
instance ShATermConvertible THF.As.DefinedTerm where
toShATermAux :: ATermTable -> DefinedTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedTerm
xv = case DefinedTerm
xv of
DT_Defined_Atom a :: DefinedAtom
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedAtom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedAtom
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_Defined_Atom" [Int
a'] []) ATermTable
att1
DT_Defined_Atomic_Term a :: DefinedPlainTerm
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedPlainTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedPlainTerm
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_Defined_Atomic_Term" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DT_Defined_Atom" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedAtom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedAtom
a') ->
(ATermTable
att1, DefinedAtom -> DefinedTerm
DT_Defined_Atom DefinedAtom
a') }
ShAAppl "DT_Defined_Atomic_Term" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedPlainTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedPlainTerm
a') ->
(ATermTable
att1, DefinedPlainTerm -> DefinedTerm
DT_Defined_Atomic_Term DefinedPlainTerm
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedTerm" ShATerm
u
instance ShATermConvertible THF.As.DefinedAtom where
toShATermAux :: ATermTable -> DefinedAtom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedAtom
xv = case DefinedAtom
xv of
DA_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 "DA_Number" [Int
a'] []) ATermTable
att1
DA_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 "DA_Distinct_Object" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedAtom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DA_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 -> DefinedAtom
DA_Number Number
a') }
ShAAppl "DA_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 -> DefinedAtom
DA_Distinct_Object Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedAtom)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedAtom" ShATerm
u
instance ShATermConvertible THF.As.DefinedPlainTerm where
toShATermAux :: ATermTable -> DefinedPlainTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedPlainTerm
xv = case DefinedPlainTerm
xv of
DPT_Defined_Function a :: DefinedFunctor
a b :: Arguments
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedFunctor -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedFunctor
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 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 "DPT_Defined_Function" [Int
a', Int
b'] []) ATermTable
att2
DPT_Defined_Constant a :: DefinedFunctor
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DefinedFunctor -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DefinedFunctor
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 "DPT_Defined_Constant" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedPlainTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DPT_Defined_Function" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, DefinedFunctor)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedFunctor
a') ->
case Int -> ATermTable -> (ATermTable, Arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Arguments
b') ->
(ATermTable
att2, DefinedFunctor -> Arguments -> DefinedPlainTerm
DPT_Defined_Function DefinedFunctor
a' Arguments
b') }}
ShAAppl "DPT_Defined_Constant" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DefinedFunctor)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DefinedFunctor
a') ->
(ATermTable
att1, DefinedFunctor -> DefinedPlainTerm
DPT_Defined_Constant DefinedFunctor
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedPlainTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedPlainTerm" ShATerm
u
instance ShATermConvertible THF.As.DefinedFunctor where
toShATermAux :: ATermTable -> DefinedFunctor -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DefinedFunctor
xv = case DefinedFunctor
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
fromShATermAux :: Int -> ATermTable -> (ATermTable, DefinedFunctor)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "UMinus" [] _ -> (ATermTable
att0, DefinedFunctor
UMinus)
ShAAppl "Sum" [] _ -> (ATermTable
att0, DefinedFunctor
Sum)
ShAAppl "Difference" [] _ -> (ATermTable
att0, DefinedFunctor
Difference)
ShAAppl "Product" [] _ -> (ATermTable
att0, DefinedFunctor
Product)
ShAAppl "Quotient" [] _ -> (ATermTable
att0, DefinedFunctor
Quotient)
ShAAppl "Quotient_e" [] _ -> (ATermTable
att0, DefinedFunctor
Quotient_e)
ShAAppl "Quotient_t" [] _ -> (ATermTable
att0, DefinedFunctor
Quotient_t)
ShAAppl "Quotient_f" [] _ -> (ATermTable
att0, DefinedFunctor
Quotient_f)
ShAAppl "Remainder_e" [] _ -> (ATermTable
att0, DefinedFunctor
Remainder_e)
ShAAppl "Remainder_t" [] _ -> (ATermTable
att0, DefinedFunctor
Remainder_t)
ShAAppl "Remainder_f" [] _ -> (ATermTable
att0, DefinedFunctor
Remainder_f)
ShAAppl "Floor" [] _ -> (ATermTable
att0, DefinedFunctor
Floor)
ShAAppl "Ceiling" [] _ -> (ATermTable
att0, DefinedFunctor
Ceiling)
ShAAppl "Truncate" [] _ -> (ATermTable
att0, DefinedFunctor
Truncate)
ShAAppl "Round" [] _ -> (ATermTable
att0, DefinedFunctor
Round)
ShAAppl "To_int" [] _ -> (ATermTable
att0, DefinedFunctor
To_int)
ShAAppl "To_rat" [] _ -> (ATermTable
att0, DefinedFunctor
To_rat)
ShAAppl "To_real" [] _ -> (ATermTable
att0, DefinedFunctor
To_real)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DefinedFunctor)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DefinedFunctor" ShATerm
u
instance ShATermConvertible THF.As.SystemTerm where
toShATermAux :: ATermTable -> SystemTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SystemTerm
xv = case SystemTerm
xv of
ST_System_Term a :: Token
a b :: 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 -> Arguments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 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 "ST_System_Term" [Int
a', Int
b'] []) ATermTable
att2
ST_System_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 "ST_System_Constant" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, SystemTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "ST_System_Term" [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, Arguments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Arguments
b') ->
(ATermTable
att2, Token -> Arguments -> SystemTerm
ST_System_Term Token
a' Arguments
b') }}
ShAAppl "ST_System_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 -> SystemTerm
ST_System_Constant Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SystemTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.SystemTerm" ShATerm
u
instance ShATermConvertible THF.As.PrincipalSymbol where
toShATermAux :: ATermTable -> PrincipalSymbol -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PrincipalSymbol
xv = case PrincipalSymbol
xv of
PS_Functor a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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, PrincipalSymbol)
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, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> PrincipalSymbol
PS_Functor Constant
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 -> PrincipalSymbol
PS_Variable Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PrincipalSymbol)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.PrincipalSymbol" ShATerm
u
instance ShATermConvertible THF.As.Source where
toShATermAux :: ATermTable -> Source -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Source
xv = case Source
xv of
S_Dag_Source a :: DagSource
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DagSource -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DagSource
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 "S_Dag_Source" [Int
a'] []) ATermTable
att1
S_Internal_Source a :: IntroType
a b :: OptionalInfo
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IntroType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IntroType
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OptionalInfo -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OptionalInfo
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 "S_Internal_Source" [Int
a', Int
b'] []) ATermTable
att2
S_External_Source a :: ExternalSource
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ExternalSource -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ExternalSource
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 "S_External_Source" [Int
a'] []) ATermTable
att1
S_Sources 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 "S_Sources" [Int
a'] []) ATermTable
att1
S_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 "S_Unknown" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, Source)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "S_Dag_Source" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, DagSource)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: DagSource
a') ->
(ATermTable
att1, DagSource -> Source
S_Dag_Source DagSource
a') }
ShAAppl "S_Internal_Source" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, IntroType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: IntroType
a') ->
case Int -> ATermTable -> (ATermTable, OptionalInfo)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: OptionalInfo
b') ->
(ATermTable
att2, IntroType -> OptionalInfo -> Source
S_Internal_Source IntroType
a' OptionalInfo
b') }}
ShAAppl "S_External_Source" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, ExternalSource)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: ExternalSource
a') ->
(ATermTable
att1, ExternalSource -> Source
S_External_Source ExternalSource
a') }
ShAAppl "S_Sources" [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
S_Sources [Source]
a') }
ShAAppl "S_Unknown" [] _ -> (ATermTable
att0, Source
S_Unknown)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Source)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Source" ShATerm
u
instance ShATermConvertible THF.As.DagSource where
toShATermAux :: ATermTable -> DagSource -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DagSource
xv = case DagSource
xv of
DS_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 "DS_Name" [Int
a'] []) ATermTable
att1
DS_Inference_Record a :: Constant
a b :: UsefulInfo
b c :: [ParentInfo]
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UsefulInfo -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 UsefulInfo
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [ParentInfo] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [ParentInfo]
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 "DS_Inference_Record" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, DagSource)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DS_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 -> DagSource
DS_Name Name
a') }
ShAAppl "DS_Inference_Record" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, UsefulInfo)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: UsefulInfo
b') ->
case Int -> ATermTable -> (ATermTable, [ParentInfo])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: [ParentInfo]
c') ->
(ATermTable
att3, Constant -> UsefulInfo -> [ParentInfo] -> DagSource
DS_Inference_Record Constant
a' UsefulInfo
b' [ParentInfo]
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DagSource)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.DagSource" ShATerm
u
instance ShATermConvertible THF.As.ParentInfo where
toShATermAux :: ATermTable -> ParentInfo -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ParentInfo
xv = case ParentInfo
xv of
PI_Parent_Info a :: Source
a b :: Maybe GeneralList
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 -> Maybe GeneralList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe GeneralList
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 "PI_Parent_Info" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, ParentInfo)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "PI_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, Maybe GeneralList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Maybe GeneralList
b') ->
(ATermTable
att2, Source -> Maybe GeneralList -> ParentInfo
PI_Parent_Info Source
a' Maybe GeneralList
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ParentInfo)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.ParentInfo" ShATerm
u
instance ShATermConvertible THF.As.IntroType where
toShATermAux :: ATermTable -> IntroType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: IntroType
xv = case IntroType
xv of
IT_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 "IT_definition" [] []) ATermTable
att0
IT_axiom_of_choice ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IT_axiom_of_choice" [] []) ATermTable
att0
IT_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 "IT_tautology" [] []) ATermTable
att0
IT_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 "IT_assumption" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, IntroType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "IT_definition" [] _ -> (ATermTable
att0, IntroType
IT_definition)
ShAAppl "IT_axiom_of_choice" [] _ -> (ATermTable
att0, IntroType
IT_axiom_of_choice)
ShAAppl "IT_tautology" [] _ -> (ATermTable
att0, IntroType
IT_tautology)
ShAAppl "IT_assumption" [] _ -> (ATermTable
att0, IntroType
IT_assumption)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, IntroType)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.IntroType" ShATerm
u
instance ShATermConvertible THF.As.ExternalSource where
toShATermAux :: ATermTable -> ExternalSource -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ExternalSource
xv = case ExternalSource
xv of
ES_File_Source a :: FileSource
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FileSource -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FileSource
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 "ES_File_Source" [Int
a'] []) ATermTable
att1
ES_Theory a :: TheoryName
a b :: OptionalInfo
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TheoryName -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TheoryName
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OptionalInfo -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OptionalInfo
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 "ES_Theory" [Int
a', Int
b'] []) ATermTable
att2
ES_Creator_Source a :: Constant
a b :: OptionalInfo
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OptionalInfo -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OptionalInfo
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 "ES_Creator_Source" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, ExternalSource)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "ES_File_Source" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, FileSource)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: FileSource
a') ->
(ATermTable
att1, FileSource -> ExternalSource
ES_File_Source FileSource
a') }
ShAAppl "ES_Theory" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, TheoryName)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: TheoryName
a') ->
case Int -> ATermTable -> (ATermTable, OptionalInfo)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: OptionalInfo
b') ->
(ATermTable
att2, TheoryName -> OptionalInfo -> ExternalSource
ES_Theory TheoryName
a' OptionalInfo
b') }}
ShAAppl "ES_Creator_Source" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, OptionalInfo)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: OptionalInfo
b') ->
(ATermTable
att2, Constant -> OptionalInfo -> ExternalSource
ES_Creator_Source Constant
a' OptionalInfo
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ExternalSource)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.ExternalSource" ShATerm
u
instance ShATermConvertible THF.As.FileSource where
toShATermAux :: ATermTable -> FileSource -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FileSource
xv = case FileSource
xv of
FS_File a :: Token
a b :: Maybe Name
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 -> Maybe Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe Name
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 "FS_File" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, FileSource)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "FS_File" [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, Maybe Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Maybe Name
b') ->
(ATermTable
att2, Token -> Maybe Name -> FileSource
FS_File Token
a' Maybe Name
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FileSource)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.FileSource" ShATerm
u
instance ShATermConvertible THF.As.TheoryName where
toShATermAux :: ATermTable -> TheoryName -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TheoryName
xv = case TheoryName
xv of
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 "Equality" [] []) ATermTable
att0
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 "Ac" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, TheoryName)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Equality" [] _ -> (ATermTable
att0, TheoryName
Equality)
ShAAppl "Ac" [] _ -> (ATermTable
att0, TheoryName
Ac)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TheoryName)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.TheoryName" ShATerm
u
instance ShATermConvertible THF.As.InfoItem where
toShATermAux :: ATermTable -> InfoItem -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: InfoItem
xv = case InfoItem
xv of
II_Formula_Item a :: FormulaItem
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FormulaItem -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FormulaItem
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 "II_Formula_Item" [Int
a'] []) ATermTable
att1
II_Inference_Item a :: InferenceItem
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> InferenceItem -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 InferenceItem
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 "II_Inference_Item" [Int
a'] []) ATermTable
att1
II_General_Function a :: GeneralFunction
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> GeneralFunction -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 GeneralFunction
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 "II_General_Function" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, InfoItem)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "II_Formula_Item" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, FormulaItem)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: FormulaItem
a') ->
(ATermTable
att1, FormulaItem -> InfoItem
II_Formula_Item FormulaItem
a') }
ShAAppl "II_Inference_Item" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, InferenceItem)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: InferenceItem
a') ->
(ATermTable
att1, InferenceItem -> InfoItem
II_Inference_Item InferenceItem
a') }
ShAAppl "II_General_Function" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, GeneralFunction)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: GeneralFunction
a') ->
(ATermTable
att1, GeneralFunction -> InfoItem
II_General_Function GeneralFunction
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, InfoItem)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.InfoItem" ShATerm
u
instance ShATermConvertible THF.As.FormulaItem where
toShATermAux :: ATermTable -> FormulaItem -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FormulaItem
xv = case FormulaItem
xv of
FI_Description_Item a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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_Item" [Int
a'] []) ATermTable
att1
FI_Iquote_Item a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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_Item" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, FormulaItem)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "FI_Description_Item" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> FormulaItem
FI_Description_Item Constant
a') }
ShAAppl "FI_Iquote_Item" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> FormulaItem
FI_Iquote_Item Constant
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FormulaItem)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.FormulaItem" ShATerm
u
instance ShATermConvertible THF.As.InferenceItem where
toShATermAux :: ATermTable -> InferenceItem -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: InferenceItem
xv = case InferenceItem
xv of
II_Inference_Status a :: InferenceStatus
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> InferenceStatus -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 InferenceStatus
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 "II_Inference_Status" [Int
a'] []) ATermTable
att1
II_Assumptions_Record a :: NameList
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> NameList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 NameList
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 "II_Assumptions_Record" [Int
a'] []) ATermTable
att1
II_New_Symbol_Record a :: Constant
a b :: [PrincipalSymbol]
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [PrincipalSymbol] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [PrincipalSymbol]
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 "II_New_Symbol_Record" [Int
a', Int
b'] []) ATermTable
att2
II_Refutation a :: FileSource
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FileSource -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FileSource
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 "II_Refutation" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, InferenceItem)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "II_Inference_Status" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, InferenceStatus)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: InferenceStatus
a') ->
(ATermTable
att1, InferenceStatus -> InferenceItem
II_Inference_Status InferenceStatus
a') }
ShAAppl "II_Assumptions_Record" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, NameList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: NameList
a') ->
(ATermTable
att1, NameList -> InferenceItem
II_Assumptions_Record NameList
a') }
ShAAppl "II_New_Symbol_Record" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, [PrincipalSymbol])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [PrincipalSymbol]
b') ->
(ATermTable
att2, Constant -> [PrincipalSymbol] -> InferenceItem
II_New_Symbol_Record Constant
a' [PrincipalSymbol]
b') }}
ShAAppl "II_Refutation" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, FileSource)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: FileSource
a') ->
(ATermTable
att1, FileSource -> InferenceItem
II_Refutation FileSource
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, InferenceItem)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.InferenceItem" ShATerm
u
instance ShATermConvertible THF.As.InferenceStatus where
toShATermAux :: ATermTable -> InferenceStatus -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: InferenceStatus
xv = case InferenceStatus
xv of
IS_Status a :: StatusValue
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> StatusValue -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 StatusValue
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 "IS_Status" [Int
a'] []) ATermTable
att1
IS_Inference_Info a :: Constant
a b :: Constant
b c :: GeneralList
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Constant
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> GeneralList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 GeneralList
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 "IS_Inference_Info" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, InferenceStatus)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "IS_Status" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, StatusValue)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: StatusValue
a') ->
(ATermTable
att1, StatusValue -> InferenceStatus
IS_Status StatusValue
a') }
ShAAppl "IS_Inference_Info" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Constant
b') ->
case Int -> ATermTable -> (ATermTable, GeneralList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: GeneralList
c') ->
(ATermTable
att3, Constant -> Constant -> GeneralList -> InferenceStatus
IS_Inference_Info Constant
a' Constant
b' GeneralList
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, InferenceStatus)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.InferenceStatus" ShATerm
u
instance ShATermConvertible THF.As.StatusValue where
toShATermAux :: ATermTable -> StatusValue -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: StatusValue
xv = case StatusValue
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, StatusValue)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Suc" [] _ -> (ATermTable
att0, StatusValue
Suc)
ShAAppl "Unp" [] _ -> (ATermTable
att0, StatusValue
Unp)
ShAAppl "Sap" [] _ -> (ATermTable
att0, StatusValue
Sap)
ShAAppl "Esa" [] _ -> (ATermTable
att0, StatusValue
Esa)
ShAAppl "Sat" [] _ -> (ATermTable
att0, StatusValue
Sat)
ShAAppl "Fsa" [] _ -> (ATermTable
att0, StatusValue
Fsa)
ShAAppl "Thm" [] _ -> (ATermTable
att0, StatusValue
Thm)
ShAAppl "Eqv" [] _ -> (ATermTable
att0, StatusValue
Eqv)
ShAAppl "Tac" [] _ -> (ATermTable
att0, StatusValue
Tac)
ShAAppl "Wec" [] _ -> (ATermTable
att0, StatusValue
Wec)
ShAAppl "Eth" [] _ -> (ATermTable
att0, StatusValue
Eth)
ShAAppl "Tau" [] _ -> (ATermTable
att0, StatusValue
Tau)
ShAAppl "Wtc" [] _ -> (ATermTable
att0, StatusValue
Wtc)
ShAAppl "Wth" [] _ -> (ATermTable
att0, StatusValue
Wth)
ShAAppl "Cax" [] _ -> (ATermTable
att0, StatusValue
Cax)
ShAAppl "Sca" [] _ -> (ATermTable
att0, StatusValue
Sca)
ShAAppl "Tca" [] _ -> (ATermTable
att0, StatusValue
Tca)
ShAAppl "Wca" [] _ -> (ATermTable
att0, StatusValue
Wca)
ShAAppl "Cup" [] _ -> (ATermTable
att0, StatusValue
Cup)
ShAAppl "Csp" [] _ -> (ATermTable
att0, StatusValue
Csp)
ShAAppl "Ecs" [] _ -> (ATermTable
att0, StatusValue
Ecs)
ShAAppl "Csa" [] _ -> (ATermTable
att0, StatusValue
Csa)
ShAAppl "Cth" [] _ -> (ATermTable
att0, StatusValue
Cth)
ShAAppl "Ceq" [] _ -> (ATermTable
att0, StatusValue
Ceq)
ShAAppl "Unc" [] _ -> (ATermTable
att0, StatusValue
Unc)
ShAAppl "Wcc" [] _ -> (ATermTable
att0, StatusValue
Wcc)
ShAAppl "Ect" [] _ -> (ATermTable
att0, StatusValue
Ect)
ShAAppl "Fun" [] _ -> (ATermTable
att0, StatusValue
Fun)
ShAAppl "Uns" [] _ -> (ATermTable
att0, StatusValue
Uns)
ShAAppl "Wuc" [] _ -> (ATermTable
att0, StatusValue
Wuc)
ShAAppl "Wct" [] _ -> (ATermTable
att0, StatusValue
Wct)
ShAAppl "Scc" [] _ -> (ATermTable
att0, StatusValue
Scc)
ShAAppl "Uca" [] _ -> (ATermTable
att0, StatusValue
Uca)
ShAAppl "Noc" [] _ -> (ATermTable
att0, StatusValue
Noc)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, StatusValue)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.StatusValue" ShATerm
u
instance ShATermConvertible THF.As.GeneralTerm where
toShATermAux :: ATermTable -> GeneralTerm -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: GeneralTerm
xv = case GeneralTerm
xv of
GT_General_Data a :: GeneralData
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> GeneralData -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 GeneralData
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_General_Data" [Int
a'] []) ATermTable
att1
GT_General_Data_Term a :: GeneralData
a b :: GeneralTerm
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> GeneralData -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 GeneralData
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> GeneralTerm -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 GeneralTerm
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_General_Data_Term" [Int
a', Int
b'] []) ATermTable
att2
GT_General_List a :: GeneralList
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> GeneralList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 GeneralList
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_General_List" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, GeneralTerm)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "GT_General_Data" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, GeneralData)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: GeneralData
a') ->
(ATermTable
att1, GeneralData -> GeneralTerm
GT_General_Data GeneralData
a') }
ShAAppl "GT_General_Data_Term" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, GeneralData)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: GeneralData
a') ->
case Int -> ATermTable -> (ATermTable, GeneralTerm)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: GeneralTerm
b') ->
(ATermTable
att2, GeneralData -> GeneralTerm -> GeneralTerm
GT_General_Data_Term GeneralData
a' GeneralTerm
b') }}
ShAAppl "GT_General_List" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, GeneralList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: GeneralList
a') ->
(ATermTable
att1, GeneralList -> GeneralTerm
GT_General_List GeneralList
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, GeneralTerm)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.GeneralTerm" ShATerm
u
instance ShATermConvertible THF.As.GeneralData where
toShATermAux :: ATermTable -> GeneralData -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: GeneralData
xv = case GeneralData
xv of
GD_Atomic_Word a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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_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 :: FormulaData
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FormulaData -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FormulaData
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 :: FormulaData
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 -> FormulaData -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 FormulaData
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
GD_General_Function a :: GeneralFunction
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> GeneralFunction -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 GeneralFunction
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
fromShATermAux :: Int -> ATermTable -> (ATermTable, GeneralData)
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, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> GeneralData
GD_Atomic_Word Constant
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 -> GeneralData
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 -> GeneralData
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 -> GeneralData
GD_Distinct_Object Token
a') }
ShAAppl "GD_Formula_Data" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, FormulaData)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: FormulaData
a') ->
(ATermTable
att1, FormulaData -> GeneralData
GD_Formula_Data FormulaData
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, FormulaData)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: FormulaData
b') ->
(ATermTable
att2, Token -> FormulaData -> GeneralData
GD_Bind Token
a' FormulaData
b') }}
ShAAppl "GD_General_Function" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, GeneralFunction)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: GeneralFunction
a') ->
(ATermTable
att1, GeneralFunction -> GeneralData
GD_General_Function GeneralFunction
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, GeneralData)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.GeneralData" ShATerm
u
instance ShATermConvertible THF.As.GeneralFunction where
toShATermAux :: ATermTable -> GeneralFunction -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: GeneralFunction
xv = case GeneralFunction
xv of
GF_General_Function a :: Constant
a b :: GeneralList
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> GeneralList -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 GeneralList
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 "GF_General_Function" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, GeneralFunction)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "GF_General_Function" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, GeneralList)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: GeneralList
b') ->
(ATermTable
att2, Constant -> GeneralList -> GeneralFunction
GF_General_Function Constant
a' GeneralList
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, GeneralFunction)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.GeneralFunction" ShATerm
u
instance ShATermConvertible THF.As.FormulaData where
toShATermAux :: ATermTable -> FormulaData -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FormulaData
xv = case FormulaData
xv of
THF_Formula a :: THFFormula
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFFormula -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFFormula
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_Formula" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, FormulaData)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "THF_Formula" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, THFFormula)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFFormula
a') ->
(ATermTable
att1, THFFormula -> FormulaData
THF_Formula THFFormula
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FormulaData)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.FormulaData" ShATerm
u
instance ShATermConvertible THF.As.Name where
toShATermAux :: ATermTable -> Name -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Name
xv = case Name
xv of
N_Atomic_Word a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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 "N_Atomic_Word" [Int
a'] []) ATermTable
att1
N_Integer 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 "N_Integer" [Int
a'] []) ATermTable
att1
T0N_Unsigned_Integer 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 "T0N_Unsigned_Integer" [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 "N_Atomic_Word" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> Name
N_Atomic_Word Constant
a') }
ShAAppl "N_Integer" [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
N_Integer Token
a') }
ShAAppl "T0N_Unsigned_Integer" [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
T0N_Unsigned_Integer Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Name)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Name" ShATerm
u
instance ShATermConvertible THF.As.AtomicWord where
toShATermAux :: ATermTable -> Constant -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Constant
xv = case Constant
xv of
A_Lower_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 "A_Lower_Word" [Int
a'] []) ATermTable
att1
A_Single_Quoted 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 "A_Single_Quoted" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, Constant)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "A_Lower_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 -> Constant
A_Lower_Word Token
a') }
ShAAppl "A_Single_Quoted" [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 -> Constant
A_Single_Quoted Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Constant)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.AtomicWord" ShATerm
u
instance ShATermConvertible THF.As.Number where
toShATermAux :: ATermTable -> Number -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Number
xv = case Number
xv of
Num_Integer 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 "Num_Integer" [Int
a'] []) ATermTable
att1
Num_Rational 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 "Num_Rational" [Int
a'] []) ATermTable
att1
Num_Real 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 "Num_Real" [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 "Num_Integer" [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 -> Number
Num_Integer Token
a') }
ShAAppl "Num_Rational" [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 -> Number
Num_Rational Token
a') }
ShAAppl "Num_Real" [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 -> Number
Num_Real Token
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Number)
forall a. String -> ShATerm -> a
fromShATermError "THF.As.Number" ShATerm
u
deriving instance GHC.Generics.Generic THF.As.TPTP_THF
instance Data.Aeson.ToJSON THF.As.TPTP_THF where
instance Data.Aeson.FromJSON THF.As.TPTP_THF where
deriving instance GHC.Generics.Generic THF.As.Comment
instance Data.Aeson.ToJSON THF.As.Comment where
instance Data.Aeson.FromJSON THF.As.Comment where
deriving instance GHC.Generics.Generic THF.As.DefinedComment
instance Data.Aeson.ToJSON THF.As.DefinedComment where
instance Data.Aeson.FromJSON THF.As.DefinedComment where
deriving instance GHC.Generics.Generic THF.As.SystemComment
instance Data.Aeson.ToJSON THF.As.SystemComment where
instance Data.Aeson.FromJSON THF.As.SystemComment where
deriving instance GHC.Generics.Generic THF.As.Include
instance Data.Aeson.ToJSON THF.As.Include where
instance Data.Aeson.FromJSON THF.As.Include where
deriving instance GHC.Generics.Generic THF.As.Annotations
instance Data.Aeson.ToJSON THF.As.Annotations where
instance Data.Aeson.FromJSON THF.As.Annotations where
deriving instance GHC.Generics.Generic THF.As.FormulaRole
instance Data.Aeson.ToJSON THF.As.FormulaRole where
instance Data.Aeson.FromJSON THF.As.FormulaRole where
deriving instance GHC.Generics.Generic THF.As.THFFormula
instance Data.Aeson.ToJSON THF.As.THFFormula where
instance Data.Aeson.FromJSON THF.As.THFFormula where
deriving instance GHC.Generics.Generic THF.As.THFLogicFormula
instance Data.Aeson.ToJSON THF.As.THFLogicFormula where
instance Data.Aeson.FromJSON THF.As.THFLogicFormula where
deriving instance GHC.Generics.Generic THF.As.THFBinaryFormula
instance Data.Aeson.ToJSON THF.As.THFBinaryFormula where
instance Data.Aeson.FromJSON THF.As.THFBinaryFormula where
deriving instance GHC.Generics.Generic THF.As.THFBinaryTuple
instance Data.Aeson.ToJSON THF.As.THFBinaryTuple where
instance Data.Aeson.FromJSON THF.As.THFBinaryTuple where
deriving instance GHC.Generics.Generic THF.As.THFUnitaryFormula
instance Data.Aeson.ToJSON THF.As.THFUnitaryFormula where
instance Data.Aeson.FromJSON THF.As.THFUnitaryFormula where
deriving instance GHC.Generics.Generic THF.As.THFQuantifiedFormula
instance Data.Aeson.ToJSON THF.As.THFQuantifiedFormula where
instance Data.Aeson.FromJSON THF.As.THFQuantifiedFormula where
deriving instance GHC.Generics.Generic THF.As.THFVariable
instance Data.Aeson.ToJSON THF.As.THFVariable where
instance Data.Aeson.FromJSON THF.As.THFVariable where
deriving instance GHC.Generics.Generic THF.As.THFTypedConst
instance Data.Aeson.ToJSON THF.As.THFTypedConst where
instance Data.Aeson.FromJSON THF.As.THFTypedConst where
deriving instance GHC.Generics.Generic THF.As.THFTypeFormula
instance Data.Aeson.ToJSON THF.As.THFTypeFormula where
instance Data.Aeson.FromJSON THF.As.THFTypeFormula where
deriving instance GHC.Generics.Generic THF.As.THFTypeableFormula
instance Data.Aeson.ToJSON THF.As.THFTypeableFormula where
instance Data.Aeson.FromJSON THF.As.THFTypeableFormula where
deriving instance GHC.Generics.Generic THF.As.THFSubType
instance Data.Aeson.ToJSON THF.As.THFSubType where
instance Data.Aeson.FromJSON THF.As.THFSubType where
deriving instance GHC.Generics.Generic THF.As.THFTopLevelType
instance Data.Aeson.ToJSON THF.As.THFTopLevelType where
instance Data.Aeson.FromJSON THF.As.THFTopLevelType where
deriving instance GHC.Generics.Generic THF.As.THFUnitaryType
instance Data.Aeson.ToJSON THF.As.THFUnitaryType where
instance Data.Aeson.FromJSON THF.As.THFUnitaryType where
deriving instance GHC.Generics.Generic THF.As.THFBinaryType
instance Data.Aeson.ToJSON THF.As.THFBinaryType where
instance Data.Aeson.FromJSON THF.As.THFBinaryType where
deriving instance GHC.Generics.Generic THF.As.THFAtom
instance Data.Aeson.ToJSON THF.As.THFAtom where
instance Data.Aeson.FromJSON THF.As.THFAtom where
deriving instance GHC.Generics.Generic THF.As.THFSequent
instance Data.Aeson.ToJSON THF.As.THFSequent where
instance Data.Aeson.FromJSON THF.As.THFSequent where
deriving instance GHC.Generics.Generic THF.As.THFConnTerm
instance Data.Aeson.ToJSON THF.As.THFConnTerm where
instance Data.Aeson.FromJSON THF.As.THFConnTerm where
deriving instance GHC.Generics.Generic THF.As.THFQuantifier
instance Data.Aeson.ToJSON THF.As.THFQuantifier where
instance Data.Aeson.FromJSON THF.As.THFQuantifier where
deriving instance GHC.Generics.Generic THF.As.Quantifier
instance Data.Aeson.ToJSON THF.As.Quantifier where
instance Data.Aeson.FromJSON THF.As.Quantifier where
deriving instance GHC.Generics.Generic THF.As.THFPairConnective
instance Data.Aeson.ToJSON THF.As.THFPairConnective where
instance Data.Aeson.FromJSON THF.As.THFPairConnective where
deriving instance GHC.Generics.Generic THF.As.THFUnaryConnective
instance Data.Aeson.ToJSON THF.As.THFUnaryConnective where
instance Data.Aeson.FromJSON THF.As.THFUnaryConnective where
deriving instance GHC.Generics.Generic THF.As.AssocConnective
instance Data.Aeson.ToJSON THF.As.AssocConnective where
instance Data.Aeson.FromJSON THF.As.AssocConnective where
deriving instance GHC.Generics.Generic THF.As.DefinedType
instance Data.Aeson.ToJSON THF.As.DefinedType where
instance Data.Aeson.FromJSON THF.As.DefinedType where
deriving instance GHC.Generics.Generic THF.As.DefinedPlainFormula
instance Data.Aeson.ToJSON THF.As.DefinedPlainFormula where
instance Data.Aeson.FromJSON THF.As.DefinedPlainFormula where
deriving instance GHC.Generics.Generic THF.As.DefinedProp
instance Data.Aeson.ToJSON THF.As.DefinedProp where
instance Data.Aeson.FromJSON THF.As.DefinedProp where
deriving instance GHC.Generics.Generic THF.As.DefinedPred
instance Data.Aeson.ToJSON THF.As.DefinedPred where
instance Data.Aeson.FromJSON THF.As.DefinedPred where
deriving instance GHC.Generics.Generic THF.As.Term
instance Data.Aeson.ToJSON THF.As.Term where
instance Data.Aeson.FromJSON THF.As.Term where
deriving instance GHC.Generics.Generic THF.As.FunctionTerm
instance Data.Aeson.ToJSON THF.As.FunctionTerm where
instance Data.Aeson.FromJSON THF.As.FunctionTerm where
deriving instance GHC.Generics.Generic THF.As.PlainTerm
instance Data.Aeson.ToJSON THF.As.PlainTerm where
instance Data.Aeson.FromJSON THF.As.PlainTerm where
deriving instance GHC.Generics.Generic THF.As.DefinedTerm
instance Data.Aeson.ToJSON THF.As.DefinedTerm where
instance Data.Aeson.FromJSON THF.As.DefinedTerm where
deriving instance GHC.Generics.Generic THF.As.DefinedAtom
instance Data.Aeson.ToJSON THF.As.DefinedAtom where
instance Data.Aeson.FromJSON THF.As.DefinedAtom where
deriving instance GHC.Generics.Generic THF.As.DefinedPlainTerm
instance Data.Aeson.ToJSON THF.As.DefinedPlainTerm where
instance Data.Aeson.FromJSON THF.As.DefinedPlainTerm where
deriving instance GHC.Generics.Generic THF.As.DefinedFunctor
instance Data.Aeson.ToJSON THF.As.DefinedFunctor where
instance Data.Aeson.FromJSON THF.As.DefinedFunctor where
deriving instance GHC.Generics.Generic THF.As.SystemTerm
instance Data.Aeson.ToJSON THF.As.SystemTerm where
instance Data.Aeson.FromJSON THF.As.SystemTerm where
deriving instance GHC.Generics.Generic THF.As.PrincipalSymbol
instance Data.Aeson.ToJSON THF.As.PrincipalSymbol where
instance Data.Aeson.FromJSON THF.As.PrincipalSymbol where
deriving instance GHC.Generics.Generic THF.As.Source
instance Data.Aeson.ToJSON THF.As.Source where
instance Data.Aeson.FromJSON THF.As.Source where
deriving instance GHC.Generics.Generic THF.As.DagSource
instance Data.Aeson.ToJSON THF.As.DagSource where
instance Data.Aeson.FromJSON THF.As.DagSource where
deriving instance GHC.Generics.Generic THF.As.ParentInfo
instance Data.Aeson.ToJSON THF.As.ParentInfo where
instance Data.Aeson.FromJSON THF.As.ParentInfo where
deriving instance GHC.Generics.Generic THF.As.IntroType
instance Data.Aeson.ToJSON THF.As.IntroType where
instance Data.Aeson.FromJSON THF.As.IntroType where
deriving instance GHC.Generics.Generic THF.As.ExternalSource
instance Data.Aeson.ToJSON THF.As.ExternalSource where
instance Data.Aeson.FromJSON THF.As.ExternalSource where
deriving instance GHC.Generics.Generic THF.As.FileSource
instance Data.Aeson.ToJSON THF.As.FileSource where
instance Data.Aeson.FromJSON THF.As.FileSource where
deriving instance GHC.Generics.Generic THF.As.TheoryName
instance Data.Aeson.ToJSON THF.As.TheoryName where
instance Data.Aeson.FromJSON THF.As.TheoryName where
deriving instance GHC.Generics.Generic THF.As.InfoItem
instance Data.Aeson.ToJSON THF.As.InfoItem where
instance Data.Aeson.FromJSON THF.As.InfoItem where
deriving instance GHC.Generics.Generic THF.As.FormulaItem
instance Data.Aeson.ToJSON THF.As.FormulaItem where
instance Data.Aeson.FromJSON THF.As.FormulaItem where
deriving instance GHC.Generics.Generic THF.As.InferenceItem
instance Data.Aeson.ToJSON THF.As.InferenceItem where
instance Data.Aeson.FromJSON THF.As.InferenceItem where
deriving instance GHC.Generics.Generic THF.As.InferenceStatus
instance Data.Aeson.ToJSON THF.As.InferenceStatus where
instance Data.Aeson.FromJSON THF.As.InferenceStatus where
deriving instance GHC.Generics.Generic THF.As.StatusValue
instance Data.Aeson.ToJSON THF.As.StatusValue where
instance Data.Aeson.FromJSON THF.As.StatusValue where
deriving instance GHC.Generics.Generic THF.As.GeneralTerm
instance Data.Aeson.ToJSON THF.As.GeneralTerm where
instance Data.Aeson.FromJSON THF.As.GeneralTerm where
deriving instance GHC.Generics.Generic THF.As.GeneralData
instance Data.Aeson.ToJSON THF.As.GeneralData where
instance Data.Aeson.FromJSON THF.As.GeneralData where
deriving instance GHC.Generics.Generic THF.As.GeneralFunction
instance Data.Aeson.ToJSON THF.As.GeneralFunction where
instance Data.Aeson.FromJSON THF.As.GeneralFunction where
deriving instance GHC.Generics.Generic THF.As.FormulaData
instance Data.Aeson.ToJSON THF.As.FormulaData where
instance Data.Aeson.FromJSON THF.As.FormulaData where
deriving instance GHC.Generics.Generic THF.As.Name
instance Data.Aeson.ToJSON THF.As.Name where
instance Data.Aeson.FromJSON THF.As.Name where
deriving instance GHC.Generics.Generic THF.As.AtomicWord
instance Data.Aeson.ToJSON THF.As.AtomicWord where
instance Data.Aeson.FromJSON THF.As.AtomicWord where
deriving instance GHC.Generics.Generic THF.As.Number
instance Data.Aeson.ToJSON THF.As.Number where
instance Data.Aeson.FromJSON THF.As.Number where
deriving instance GHC.Generics.Generic THF.Cons.Kind
instance Data.Aeson.ToJSON THF.Cons.Kind where
instance Data.Aeson.FromJSON THF.Cons.Kind where
deriving instance GHC.Generics.Generic THF.Cons.Type
instance Data.Aeson.ToJSON THF.Cons.Type where
instance Data.Aeson.FromJSON THF.Cons.Type where
deriving instance GHC.Generics.Generic THF.Cons.SymbolType
instance Data.Aeson.ToJSON THF.Cons.SymbolType where
instance Data.Aeson.FromJSON THF.Cons.SymbolType where
deriving instance GHC.Generics.Generic THF.Cons.SymbolTHF
instance Data.Aeson.ToJSON THF.Cons.SymbolTHF where
instance Data.Aeson.FromJSON THF.Cons.SymbolTHF where
deriving instance GHC.Generics.Generic THF.Cons.BasicSpecTHF
instance Data.Aeson.ToJSON THF.Cons.BasicSpecTHF where
instance Data.Aeson.FromJSON THF.Cons.BasicSpecTHF where
instance ShATermConvertible THF.Cons.Kind where
toShATermAux :: ATermTable -> Kind -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Kind
xv = case Kind
xv of
Kind -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Kind" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, Kind)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Kind" [] _ -> (ATermTable
att0, Kind
Kind)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Kind)
forall a. String -> ShATerm -> a
fromShATermError "THF.Cons.Kind" ShATerm
u
instance ShATermConvertible THF.Cons.Type where
toShATermAux :: ATermTable -> Type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Type
xv = case Type
xv of
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
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
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
MapType a :: Type
a b :: Type
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Type
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 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 "MapType" [Int
a', Int
b'] []) ATermTable
att2
ProdType a :: [Type]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Type] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [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 "ProdType" [Int
a'] []) ATermTable
att1
CType a :: Constant
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
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 "CType" [Int
a'] []) ATermTable
att1
SType 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 "SType" [Int
a'] []) ATermTable
att1
VType 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 "VType" [Int
a'] []) ATermTable
att1
ParType a :: Type
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 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 "ParType" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, Type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TType" [] _ -> (ATermTable
att0, Type
TType)
ShAAppl "OType" [] _ -> (ATermTable
att0, Type
OType)
ShAAppl "IType" [] _ -> (ATermTable
att0, Type
IType)
ShAAppl "MapType" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, Type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Type
a') ->
case Int -> ATermTable -> (ATermTable, Type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Type
b') ->
(ATermTable
att2, Type -> Type -> Type
MapType Type
a' Type
b') }}
ShAAppl "ProdType" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [Type])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [Type]
a') ->
(ATermTable
att1, [Type] -> Type
ProdType [Type]
a') }
ShAAppl "CType" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
(ATermTable
att1, Constant -> Type
CType Constant
a') }
ShAAppl "SType" [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 -> Type
SType Token
a') }
ShAAppl "VType" [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 -> Type
VType Token
a') }
ShAAppl "ParType" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Type
a') ->
(ATermTable
att1, Type -> Type
ParType Type
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Type)
forall a. String -> ShATerm -> a
fromShATermError "THF.Cons.Type" ShATerm
u
instance ShATermConvertible THF.Cons.SymbolType where
toShATermAux :: ATermTable -> SymbolType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SymbolType
xv = case SymbolType
xv of
ST_Const a :: Type
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 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 "ST_Const" [Int
a'] []) ATermTable
att1
ST_Type a :: Kind
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Kind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Kind
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 "ST_Type" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, SymbolType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "ST_Const" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Type
a') ->
(ATermTable
att1, Type -> SymbolType
ST_Const Type
a') }
ShAAppl "ST_Type" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Kind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Kind
a') ->
(ATermTable
att1, Kind -> SymbolType
ST_Type Kind
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SymbolType)
forall a. String -> ShATerm -> a
fromShATermError "THF.Cons.SymbolType" ShATerm
u
instance ShATermConvertible THF.Cons.SymbolTHF where
toShATermAux :: ATermTable -> SymbolTHF -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SymbolTHF
xv = case SymbolTHF
xv of
Symbol a :: Constant
a b :: Name
b c :: SymbolType
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Name
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> SymbolType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 SymbolType
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 "Symbol" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, SymbolTHF)
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, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Name
b') ->
case Int -> ATermTable -> (ATermTable, SymbolType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: SymbolType
c') ->
(ATermTable
att3, Constant -> Name -> SymbolType -> SymbolTHF
Symbol Constant
a' Name
b' SymbolType
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SymbolTHF)
forall a. String -> ShATerm -> a
fromShATermError "THF.Cons.SymbolTHF" ShATerm
u
instance ShATermConvertible THF.Cons.BasicSpecTHF where
toShATermAux :: ATermTable -> BasicSpecTHF -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: BasicSpecTHF
xv = case BasicSpecTHF
xv of
BasicSpecTHF a :: [TPTP_THF]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [TPTP_THF] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [TPTP_THF]
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 "BasicSpecTHF" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, BasicSpecTHF)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "BasicSpecTHF" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, [TPTP_THF])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [TPTP_THF]
a') ->
(ATermTable
att1, [TPTP_THF] -> BasicSpecTHF
BasicSpecTHF [TPTP_THF]
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, BasicSpecTHF)
forall a. String -> ShATerm -> a
fromShATermError "THF.Cons.BasicSpecTHF" ShATerm
u
instance ShATermConvertible THF.Sign.SignTHF where
toShATermAux :: ATermTable -> SignTHF -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SignTHF
xv = case SignTHF
xv of
Sign a :: TypeMap
a b :: ConstMap
b c :: SymbolMap
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TypeMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TypeMap
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ConstMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ConstMap
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> SymbolMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 SymbolMap
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 "Sign" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, SignTHF)
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] _ ->
case Int -> ATermTable -> (ATermTable, TypeMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: TypeMap
a') ->
case Int -> ATermTable -> (ATermTable, ConstMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: ConstMap
b') ->
case Int -> ATermTable -> (ATermTable, SymbolMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: SymbolMap
c') ->
(ATermTable
att3, TypeMap -> ConstMap -> SymbolMap -> SignTHF
Sign TypeMap
a' ConstMap
b' SymbolMap
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SignTHF)
forall a. String -> ShATerm -> a
fromShATermError "THF.Sign.SignTHF" ShATerm
u
instance ShATermConvertible THF.Sign.TypeInfo where
toShATermAux :: ATermTable -> TypeInfo -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypeInfo
xv = case TypeInfo
xv of
TypeInfo a :: Constant
a b :: Name
b c :: Kind
c d :: Annotations
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Name
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Kind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Kind
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 "TypeInfo" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, TypeInfo)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TypeInfo" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Name
b') ->
case Int -> ATermTable -> (ATermTable, Kind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Kind
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, Constant -> Name -> Kind -> Annotations -> TypeInfo
TypeInfo Constant
a' Name
b' Kind
c' Annotations
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypeInfo)
forall a. String -> ShATerm -> a
fromShATermError "THF.Sign.TypeInfo" ShATerm
u
instance ShATermConvertible THF.Sign.ConstInfo where
toShATermAux :: ATermTable -> ConstInfo -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ConstInfo
xv = case ConstInfo
xv of
ConstInfo a :: Constant
a b :: Name
b c :: Type
c d :: Annotations
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Constant -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Constant
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Name -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Name
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Type -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Type
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 "ConstInfo" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, ConstInfo)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "ConstInfo" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case Int -> ATermTable -> (ATermTable, Constant)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Constant
a') ->
case Int -> ATermTable -> (ATermTable, Name)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Name
b') ->
case Int -> ATermTable -> (ATermTable, Type)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Type
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, Constant -> Name -> Type -> Annotations -> ConstInfo
ConstInfo Constant
a' Name
b' Type
c' Annotations
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ConstInfo)
forall a. String -> ShATerm -> a
fromShATermError "THF.Sign.ConstInfo" ShATerm
u
deriving instance GHC.Generics.Generic THF.Sign.SignTHF
instance Data.Aeson.ToJSON THF.Sign.SignTHF where
instance Data.Aeson.FromJSON THF.Sign.SignTHF where
deriving instance GHC.Generics.Generic THF.Sign.TypeInfo
instance Data.Aeson.ToJSON THF.Sign.TypeInfo where
instance Data.Aeson.FromJSON THF.Sign.TypeInfo where
deriving instance GHC.Generics.Generic THF.Sign.ConstInfo
instance Data.Aeson.ToJSON THF.Sign.ConstInfo where
instance Data.Aeson.FromJSON THF.Sign.ConstInfo where
deriving instance GHC.Generics.Generic THF.Sublogic.THFSl
instance Data.Aeson.ToJSON THF.Sublogic.THFSl where
instance Data.Aeson.FromJSON THF.Sublogic.THFSl where
deriving instance GHC.Generics.Generic THF.Sublogic.THFCoreSl
instance Data.Aeson.ToJSON THF.Sublogic.THFCoreSl where
instance Data.Aeson.FromJSON THF.Sublogic.THFCoreSl where
instance ShATermConvertible THF.Sublogic.THFSl where
toShATermAux :: ATermTable -> THFSl -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFSl
xv = case THFSl
xv of
THFSl a :: THFCoreSl
a b :: Bool
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> THFCoreSl -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 THFCoreSl
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Bool
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 "THFSl" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFSl)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "THFSl" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, THFCoreSl)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: THFCoreSl
a') ->
case Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Bool
b') ->
(ATermTable
att2, THFCoreSl -> Bool -> THFSl
THFSl THFCoreSl
a' Bool
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFSl)
forall a. String -> ShATerm -> a
fromShATermError "THF.Sublogic.THFSl" ShATerm
u
instance ShATermConvertible THF.Sublogic.THFCoreSl where
toShATermAux :: ATermTable -> THFCoreSl -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: THFCoreSl
xv = case THFCoreSl
xv of
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
THFP -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THFP" [] []) ATermTable
att0
THF0 -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "THF0" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, THFCoreSl)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "THF" [] _ -> (ATermTable
att0, THFCoreSl
THF)
ShAAppl "THFP" [] _ -> (ATermTable
att0, THFCoreSl
THFP)
ShAAppl "THF0" [] _ -> (ATermTable
att0, THFCoreSl
THF0)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, THFCoreSl)
forall a. String -> ShATerm -> a
fromShATermError "THF.Sublogic.THFCoreSl" ShATerm
u