{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
module CSMOF.ATC_CSMOF () where
import ATerm.Lib
import CSMOF.As
import CSMOF.As ()
import CSMOF.Sign
import Common.ATerm.ConvInstances
import Common.Doc
import Common.DocUtils
import Common.Id
import Common.Json.ConvInstances
import Common.Json.Instances
import Data.Aeson(ToJSON, FromJSON)
import Data.Data
import GHC.Generics(Generic)
import qualified Common.Lib.Rel as Rel
import qualified Data.Map as Map
import qualified Data.Set as Set
instance ShATermConvertible CSMOF.As.Metamodel where
toShATermAux :: ATermTable -> Metamodel -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Metamodel
xv = case Metamodel
xv of
Metamodel a :: String
a b :: [NamedElement]
b c :: [Model]
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [NamedElement] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [NamedElement]
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Model] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Model]
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 "Metamodel" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, Metamodel)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Metamodel" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
a') ->
case Int -> ATermTable -> (ATermTable, [NamedElement])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [NamedElement]
b') ->
case Int -> ATermTable -> (ATermTable, [Model])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: [Model]
c') ->
(ATermTable
att3, String -> [NamedElement] -> [Model] -> Metamodel
Metamodel String
a' [NamedElement]
b' [Model]
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Metamodel)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Metamodel" ShATerm
u
instance ShATermConvertible CSMOF.As.NamedElement where
toShATermAux :: ATermTable -> NamedElement -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: NamedElement
xv = case NamedElement
xv of
NamedElement a :: String
a b :: Metamodel
b c :: TypeOrTypedElement
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Metamodel -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Metamodel
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> TypeOrTypedElement -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 TypeOrTypedElement
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 "NamedElement" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, NamedElement)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "NamedElement" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
a') ->
case Int -> ATermTable -> (ATermTable, Metamodel)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Metamodel
b') ->
case Int -> ATermTable -> (ATermTable, TypeOrTypedElement)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: TypeOrTypedElement
c') ->
(ATermTable
att3, String -> Metamodel -> TypeOrTypedElement -> NamedElement
NamedElement String
a' Metamodel
b' TypeOrTypedElement
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, NamedElement)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.NamedElement" ShATerm
u
instance ShATermConvertible CSMOF.As.TypeOrTypedElement where
toShATermAux :: ATermTable -> TypeOrTypedElement -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypeOrTypedElement
xv = case TypeOrTypedElement
xv of
TType 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 "TType" [Int
a'] []) ATermTable
att1
TTypedElement a :: TypedElement
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TypedElement -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TypedElement
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TTypedElement" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, TypeOrTypedElement)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TType" [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 -> TypeOrTypedElement
TType Type
a') }
ShAAppl "TTypedElement" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, TypedElement)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: TypedElement
a') ->
(ATermTable
att1, TypedElement -> TypeOrTypedElement
TTypedElement TypedElement
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypeOrTypedElement)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.TypeOrTypedElement" ShATerm
u
instance ShATermConvertible CSMOF.As.Type where
toShATermAux :: ATermTable -> Type -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Type
xv = case Type
xv of
Type a :: NamedElement
a b :: DataTypeOrClass
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> NamedElement -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 NamedElement
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DataTypeOrClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DataTypeOrClass
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 "Type" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, Type)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Type" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, NamedElement)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: NamedElement
a') ->
case Int -> ATermTable -> (ATermTable, DataTypeOrClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: DataTypeOrClass
b') ->
(ATermTable
att2, NamedElement -> DataTypeOrClass -> Type
Type NamedElement
a' DataTypeOrClass
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Type)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Type" ShATerm
u
instance ShATermConvertible CSMOF.As.DataTypeOrClass where
toShATermAux :: ATermTable -> DataTypeOrClass -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DataTypeOrClass
xv = case DataTypeOrClass
xv of
DDataType a :: Datatype
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Datatype -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Datatype
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DDataType" [Int
a'] []) ATermTable
att1
DClass a :: Class
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Class -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Class
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DClass" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, DataTypeOrClass)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DDataType" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Datatype)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Datatype
a') ->
(ATermTable
att1, Datatype -> DataTypeOrClass
DDataType Datatype
a') }
ShAAppl "DClass" [a :: Int
a] _ ->
case Int -> ATermTable -> (ATermTable, Class)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Class
a') ->
(ATermTable
att1, Class -> DataTypeOrClass
DClass Class
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DataTypeOrClass)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.DataTypeOrClass" ShATerm
u
instance ShATermConvertible CSMOF.As.Datatype where
toShATermAux :: ATermTable -> Datatype -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Datatype
xv = case Datatype
xv of
Datatype 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 "Datatype" [Int
a'] []) ATermTable
att1
fromShATermAux :: Int -> ATermTable -> (ATermTable, Datatype)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Datatype" [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 -> Datatype
Datatype Type
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Datatype)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Datatype" ShATerm
u
instance ShATermConvertible CSMOF.As.Class where
toShATermAux :: ATermTable -> Class -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Class
xv = case Class
xv of
Class a :: Type
a b :: Bool
b c :: [Class]
c d :: [Property]
d -> 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 -> Bool -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Bool
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Class] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Class]
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [Property] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 [Property]
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 "Class" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, Class)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Class" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
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, Bool)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Bool
b') ->
case Int -> ATermTable -> (ATermTable, [Class])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: [Class]
c') ->
case Int -> ATermTable -> (ATermTable, [Property])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: [Property]
d') ->
(ATermTable
att4, Type -> Bool -> [Class] -> [Property] -> Class
Class Type
a' Bool
b' [Class]
c' [Property]
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Class)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Class" ShATerm
u
instance ShATermConvertible CSMOF.As.TypedElement where
toShATermAux :: ATermTable -> TypedElement -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypedElement
xv = case TypedElement
xv of
TypedElement a :: NamedElement
a b :: Type
b c :: Property
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> NamedElement -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 NamedElement
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
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Property -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Property
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 "TypedElement" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, TypedElement)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TypedElement" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, NamedElement)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: NamedElement
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') ->
case Int -> ATermTable -> (ATermTable, Property)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Property
c') ->
(ATermTable
att3, NamedElement -> Type -> Property -> TypedElement
TypedElement NamedElement
a' Type
b' Property
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypedElement)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.TypedElement" ShATerm
u
instance ShATermConvertible CSMOF.As.Property where
toShATermAux :: ATermTable -> Property -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Property
xv = case Property
xv of
Property a :: TypedElement
a b :: MultiplicityElement
b c :: Maybe Property
c d :: Class
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TypedElement -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TypedElement
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> MultiplicityElement -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 MultiplicityElement
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Maybe Property -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Maybe Property
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Class -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Class
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 "Property" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, Property)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Property" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case Int -> ATermTable -> (ATermTable, TypedElement)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: TypedElement
a') ->
case Int -> ATermTable -> (ATermTable, MultiplicityElement)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: MultiplicityElement
b') ->
case Int -> ATermTable -> (ATermTable, Maybe Property)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Maybe Property
c') ->
case Int -> ATermTable -> (ATermTable, Class)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Class
d') ->
(ATermTable
att4, TypedElement
-> MultiplicityElement -> Maybe Property -> Class -> Property
Property TypedElement
a' MultiplicityElement
b' Maybe Property
c' Class
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Property)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Property" ShATerm
u
instance ShATermConvertible CSMOF.As.MultiplicityElement where
toShATermAux :: ATermTable -> MultiplicityElement -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: MultiplicityElement
xv = case MultiplicityElement
xv of
MultiplicityElement a :: Integer
a b :: Integer
b c :: Property
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Integer -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Integer
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Integer -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Integer
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Property -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Property
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 "MultiplicityElement" [Int
a', Int
b',
Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, MultiplicityElement)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "MultiplicityElement" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, Integer)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Integer
a') ->
case Int -> ATermTable -> (ATermTable, Integer)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Integer
b') ->
case Int -> ATermTable -> (ATermTable, Property)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Property
c') ->
(ATermTable
att3, Integer -> Integer -> Property -> MultiplicityElement
MultiplicityElement Integer
a' Integer
b' Property
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, MultiplicityElement)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.MultiplicityElement" ShATerm
u
instance ShATermConvertible CSMOF.As.Model where
toShATermAux :: ATermTable -> Model -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Model
xv = case Model
xv of
Model a :: String
a b :: [Object]
b c :: [Link]
c d :: Metamodel
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Object] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [Object]
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Link] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Link]
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Metamodel -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Metamodel
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 "Model" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, Model)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Model" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
a') ->
case Int -> ATermTable -> (ATermTable, [Object])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [Object]
b') ->
case Int -> ATermTable -> (ATermTable, [Link])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: [Link]
c') ->
case Int -> ATermTable -> (ATermTable, Metamodel)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Metamodel
d') ->
(ATermTable
att4, String -> [Object] -> [Link] -> Metamodel -> Model
Model String
a' [Object]
b' [Link]
c' Metamodel
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Model)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Model" ShATerm
u
instance ShATermConvertible CSMOF.As.Object where
toShATermAux :: ATermTable -> Object -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Object
xv = case Object
xv of
Object a :: String
a b :: Type
b c :: Model
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
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
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Model -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Model
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 "Object" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, Object)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Object" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
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') ->
case Int -> ATermTable -> (ATermTable, Model)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Model
c') ->
(ATermTable
att3, String -> Type -> Model -> Object
Object String
a' Type
b' Model
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Object)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Object" ShATerm
u
instance ShATermConvertible CSMOF.As.Link where
toShATermAux :: ATermTable -> Link -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Link
xv = case Link
xv of
Link a :: Property
a b :: Object
b c :: Object
c d :: Model
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Property -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Property
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Object -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Object
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Object -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Object
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Model -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Model
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 "Link" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, Link)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Link" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case Int -> ATermTable -> (ATermTable, Property)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Property
a') ->
case Int -> ATermTable -> (ATermTable, Object)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Object
b') ->
case Int -> ATermTable -> (ATermTable, Object)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Object
c') ->
case Int -> ATermTable -> (ATermTable, Model)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Model
d') ->
(ATermTable
att4, Property -> Object -> Object -> Model -> Link
Link Property
a' Object
b' Object
c' Model
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Link)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.As.Link" ShATerm
u
deriving instance GHC.Generics.Generic CSMOF.As.Metamodel
instance Data.Aeson.ToJSON CSMOF.As.Metamodel where
instance Data.Aeson.FromJSON CSMOF.As.Metamodel where
deriving instance GHC.Generics.Generic CSMOF.As.NamedElement
instance Data.Aeson.ToJSON CSMOF.As.NamedElement where
instance Data.Aeson.FromJSON CSMOF.As.NamedElement where
deriving instance GHC.Generics.Generic CSMOF.As.TypeOrTypedElement
instance Data.Aeson.ToJSON CSMOF.As.TypeOrTypedElement where
instance Data.Aeson.FromJSON CSMOF.As.TypeOrTypedElement where
deriving instance GHC.Generics.Generic CSMOF.As.Type
instance Data.Aeson.ToJSON CSMOF.As.Type where
instance Data.Aeson.FromJSON CSMOF.As.Type where
deriving instance GHC.Generics.Generic CSMOF.As.DataTypeOrClass
instance Data.Aeson.ToJSON CSMOF.As.DataTypeOrClass where
instance Data.Aeson.FromJSON CSMOF.As.DataTypeOrClass where
deriving instance GHC.Generics.Generic CSMOF.As.Datatype
instance Data.Aeson.ToJSON CSMOF.As.Datatype where
instance Data.Aeson.FromJSON CSMOF.As.Datatype where
deriving instance GHC.Generics.Generic CSMOF.As.Class
instance Data.Aeson.ToJSON CSMOF.As.Class where
instance Data.Aeson.FromJSON CSMOF.As.Class where
deriving instance GHC.Generics.Generic CSMOF.As.TypedElement
instance Data.Aeson.ToJSON CSMOF.As.TypedElement where
instance Data.Aeson.FromJSON CSMOF.As.TypedElement where
deriving instance GHC.Generics.Generic CSMOF.As.Property
instance Data.Aeson.ToJSON CSMOF.As.Property where
instance Data.Aeson.FromJSON CSMOF.As.Property where
deriving instance GHC.Generics.Generic CSMOF.As.MultiplicityElement
instance Data.Aeson.ToJSON CSMOF.As.MultiplicityElement where
instance Data.Aeson.FromJSON CSMOF.As.MultiplicityElement where
deriving instance GHC.Generics.Generic CSMOF.As.Model
instance Data.Aeson.ToJSON CSMOF.As.Model where
instance Data.Aeson.FromJSON CSMOF.As.Model where
deriving instance GHC.Generics.Generic CSMOF.As.Object
instance Data.Aeson.ToJSON CSMOF.As.Object where
instance Data.Aeson.FromJSON CSMOF.As.Object where
deriving instance GHC.Generics.Generic CSMOF.As.Link
instance Data.Aeson.ToJSON CSMOF.As.Link where
instance Data.Aeson.FromJSON CSMOF.As.Link where
instance ShATermConvertible CSMOF.Sign.TypeKind where
toShATermAux :: ATermTable -> TypeKind -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypeKind
xv = case TypeKind
xv of
DataTypeKind -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataTypeKind" [] []) ATermTable
att0
ClassKind -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ClassKind" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, TypeKind)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "DataTypeKind" [] _ -> (ATermTable
att0, TypeKind
DataTypeKind)
ShAAppl "ClassKind" [] _ -> (ATermTable
att0, TypeKind
ClassKind)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypeKind)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.TypeKind" ShATerm
u
instance ShATermConvertible CSMOF.Sign.TypeClass where
toShATermAux :: ATermTable -> TypeClass -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypeClass
xv = case TypeClass
xv of
TypeClass a :: String
a b :: TypeKind
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TypeKind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TypeKind
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 "TypeClass" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, TypeClass)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "TypeClass" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
a') ->
case Int -> ATermTable -> (ATermTable, TypeKind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: TypeKind
b') ->
(ATermTable
att2, String -> TypeKind -> TypeClass
TypeClass String
a' TypeKind
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypeClass)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.TypeClass" ShATerm
u
instance ShATermConvertible CSMOF.Sign.PropertyT where
toShATermAux :: ATermTable -> PropertyT -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PropertyT
xv = case PropertyT
xv of
PropertyT a :: String
a b :: TypeClass
b c :: String
c d :: TypeClass
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TypeClass
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 String
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 TypeClass
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 "PropertyT" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermAux :: Int -> ATermTable -> (ATermTable, PropertyT)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "PropertyT" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
a') ->
case Int -> ATermTable -> (ATermTable, TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: TypeClass
b') ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: String
c') ->
case Int -> ATermTable -> (ATermTable, TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: TypeClass
d') ->
(ATermTable
att4, String -> TypeClass -> String -> TypeClass -> PropertyT
PropertyT String
a' TypeClass
b' String
c' TypeClass
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PropertyT)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.PropertyT" ShATerm
u
instance ShATermConvertible CSMOF.Sign.LinkT where
toShATermAux :: ATermTable -> LinkT -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: LinkT
xv = case LinkT
xv of
LinkT a :: String
a b :: String
b c :: PropertyT
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 String
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PropertyT -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PropertyT
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 "LinkT" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, LinkT)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "LinkT" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: String
a') ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: String
b') ->
case Int -> ATermTable -> (ATermTable, PropertyT)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: PropertyT
c') ->
(ATermTable
att3, String -> String -> PropertyT -> LinkT
LinkT String
a' String
b' PropertyT
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, LinkT)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.LinkT" ShATerm
u
instance ShATermConvertible CSMOF.Sign.Sign where
toShATermAux :: ATermTable -> Sign -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Sign
xv = case Sign
xv of
Sign a :: Set TypeClass
a b :: Rel TypeClass
b c :: Set TypeClass
c d :: Set String
d e :: Set PropertyT
e f :: Map String TypeClass
f g :: Set LinkT
g -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Set TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Set TypeClass
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Rel TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Rel TypeClass
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Set TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Set TypeClass
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Set String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Set String
d
(att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> Set PropertyT -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 Set PropertyT
e
(att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> Map String TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att5 Map String TypeClass
f
(att7 :: ATermTable
att7, g' :: Int
g') <- ATermTable -> Set LinkT -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att6 Set LinkT
g
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Sign" [Int
a', Int
b', Int
c', Int
d', Int
e', Int
f',
Int
g'] []) ATermTable
att7
fromShATermAux :: Int -> ATermTable -> (ATermTable, Sign)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Sign" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e, f :: Int
f, g :: Int
g] _ ->
case Int -> ATermTable -> (ATermTable, Set TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Set TypeClass
a') ->
case Int -> ATermTable -> (ATermTable, Rel TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Rel TypeClass
b') ->
case Int -> ATermTable -> (ATermTable, Set TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Set TypeClass
c') ->
case Int -> ATermTable -> (ATermTable, Set String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Set String
d') ->
case Int -> ATermTable -> (ATermTable, Set PropertyT)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
{ (att5 :: ATermTable
att5, e' :: Set PropertyT
e') ->
case Int -> ATermTable -> (ATermTable, Map String TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
f ATermTable
att5 of
{ (att6 :: ATermTable
att6, f' :: Map String TypeClass
f') ->
case Int -> ATermTable -> (ATermTable, Set LinkT)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
g ATermTable
att6 of
{ (att7 :: ATermTable
att7, g' :: Set LinkT
g') ->
(ATermTable
att7, Set TypeClass
-> Rel TypeClass
-> Set TypeClass
-> Set String
-> Set PropertyT
-> Map String TypeClass
-> Set LinkT
-> Sign
Sign Set TypeClass
a' Rel TypeClass
b' Set TypeClass
c' Set String
d' Set PropertyT
e' Map String TypeClass
f' Set LinkT
g') }}}}}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Sign)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.Sign" ShATerm
u
instance ShATermConvertible CSMOF.Sign.MultConstr where
toShATermAux :: ATermTable -> MultConstr -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: MultConstr
xv = case MultConstr
xv of
MultConstr a :: TypeClass
a b :: String
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TypeClass -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TypeClass
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 String
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 "MultConstr" [Int
a', Int
b'] []) ATermTable
att2
fromShATermAux :: Int -> ATermTable -> (ATermTable, MultConstr)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "MultConstr" [a :: Int
a, b :: Int
b] _ ->
case Int -> ATermTable -> (ATermTable, TypeClass)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: TypeClass
a') ->
case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: String
b') ->
(ATermTable
att2, TypeClass -> String -> MultConstr
MultConstr TypeClass
a' String
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, MultConstr)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.MultConstr" ShATerm
u
instance ShATermConvertible CSMOF.Sign.ConstraintType where
toShATermAux :: ATermTable -> ConstraintType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ConstraintType
xv = case ConstraintType
xv of
EQUAL -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EQUAL" [] []) ATermTable
att0
LEQ -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "LEQ" [] []) ATermTable
att0
GEQ -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GEQ" [] []) ATermTable
att0
fromShATermAux :: Int -> ATermTable -> (ATermTable, ConstraintType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "EQUAL" [] _ -> (ATermTable
att0, ConstraintType
EQUAL)
ShAAppl "LEQ" [] _ -> (ATermTable
att0, ConstraintType
LEQ)
ShAAppl "GEQ" [] _ -> (ATermTable
att0, ConstraintType
GEQ)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ConstraintType)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.ConstraintType" ShATerm
u
instance ShATermConvertible CSMOF.Sign.Sen where
toShATermAux :: ATermTable -> Sen -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Sen
xv = case Sen
xv of
Sen a :: MultConstr
a b :: Integer
b c :: ConstraintType
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> MultConstr -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 MultConstr
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Integer -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Integer
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ConstraintType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ConstraintType
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 "Sen" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermAux :: Int -> ATermTable -> (ATermTable, Sen)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Sen" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case Int -> ATermTable -> (ATermTable, MultConstr)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: MultConstr
a') ->
case Int -> ATermTable -> (ATermTable, Integer)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Integer
b') ->
case Int -> ATermTable -> (ATermTable, ConstraintType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: ConstraintType
c') ->
(ATermTable
att3, MultConstr -> Integer -> ConstraintType -> Sen
Sen MultConstr
a' Integer
b' ConstraintType
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Sen)
forall a. String -> ShATerm -> a
fromShATermError "CSMOF.Sign.Sen" ShATerm
u
deriving instance GHC.Generics.Generic CSMOF.Sign.TypeKind
instance Data.Aeson.ToJSON CSMOF.Sign.TypeKind where
instance Data.Aeson.FromJSON CSMOF.Sign.TypeKind where
deriving instance GHC.Generics.Generic CSMOF.Sign.TypeClass
instance Data.Aeson.ToJSON CSMOF.Sign.TypeClass where
instance Data.Aeson.FromJSON CSMOF.Sign.TypeClass where
deriving instance GHC.Generics.Generic CSMOF.Sign.PropertyT
instance Data.Aeson.ToJSON CSMOF.Sign.PropertyT where
instance Data.Aeson.FromJSON CSMOF.Sign.PropertyT where
deriving instance GHC.Generics.Generic CSMOF.Sign.LinkT
instance Data.Aeson.ToJSON CSMOF.Sign.LinkT where
instance Data.Aeson.FromJSON CSMOF.Sign.LinkT where
deriving instance GHC.Generics.Generic CSMOF.Sign.Sign
instance Data.Aeson.ToJSON CSMOF.Sign.Sign where
instance Data.Aeson.FromJSON CSMOF.Sign.Sign where
deriving instance GHC.Generics.Generic CSMOF.Sign.MultConstr
instance Data.Aeson.ToJSON CSMOF.Sign.MultConstr where
instance Data.Aeson.FromJSON CSMOF.Sign.MultConstr where
deriving instance GHC.Generics.Generic CSMOF.Sign.ConstraintType
instance Data.Aeson.ToJSON CSMOF.Sign.ConstraintType where
instance Data.Aeson.FromJSON CSMOF.Sign.ConstraintType where
deriving instance GHC.Generics.Generic CSMOF.Sign.Sen
instance Data.Aeson.ToJSON CSMOF.Sign.Sen where
instance Data.Aeson.FromJSON CSMOF.Sign.Sen where