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

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

Automatic derivation of instances via DrIFT-rule ShATermConvertible, Json
  for the type(s):
'CspCASL.AS_CspCASL.CspBasicExt'
'CspCASL.AS_CspCASL.CHANNEL_DECL'
'CspCASL.AS_CspCASL.PROC_ITEM'
'CspCASL.AS_CspCASL.PARM_PROCNAME'
'CspCASL.AS_CspCASL_Process.EVENT'
'CspCASL.AS_CspCASL_Process.EVENT_SET'
'CspCASL.AS_CspCASL_Process.RenameKind'
'CspCASL.AS_CspCASL_Process.Rename'
'CspCASL.AS_CspCASL_Process.RENAMING'
'CspCASL.AS_CspCASL_Process.PROC_ALPHABET'
'CspCASL.AS_CspCASL_Process.ProcProfile'
'CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME'
'CspCASL.AS_CspCASL_Process.TypedChanName'
'CspCASL.AS_CspCASL_Process.CommType'
'CspCASL.AS_CspCASL_Process.PROCESS'
'CspCASL.SignCSP.CspSign'
'CspCASL.SignCSP.CspSen'
'CspCASL.SymbItems.CspSymbItems'
'CspCASL.SymbItems.CspSymbMapItems'
'CspCASL.SymbItems.CspSymbKind'
'CspCASL.SymbItems.CspSymb'
'CspCASL.SymbItems.CspType'
'CspCASL.SymbItems.CspSymbMap'
'CspCASL.Symbol.CspSymbType'
'CspCASL.Symbol.CspSymbol'
'CspCASL.Symbol.CspRawSymbol'
'CspCASL.Morphism.CspAddMorphism'
-}

{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
  dependency files:
CspCASL/AS_CspCASL.hs
CspCASL/AS_CspCASL_Process.hs
CspCASL/SignCSP.hs
CspCASL/SymbItems.hs
CspCASL/Symbol.hs
CspCASL/Morphism.hs
-}

module CspCASL.ATC_CspCASL () where

import ATerm.Lib
import CASL.AS_Basic_CASL
import CASL.AS_Basic_CASL (FORMULA, SORT, TERM (..), VAR)
import CASL.AS_Basic_CASL (FORMULA, TERM, SORT, SORT_ITEM (..), OpKind (..))
import CASL.AS_Basic_CASL (SORT, VAR, VAR_DECL)
import CASL.ATC_CASL
import CASL.Morphism
import CASL.Morphism as CASL_Morphism
import CASL.Overload
import CASL.Sign
import CASL.Sign as CASL_Sign
import CASL.SymbolParser
import CASL.ToDoc
import Common.AS_Annotation (Annoted)
import Common.AnnoState
import Common.Doc
import Common.Doc hiding (braces)
import Common.DocUtils
import Common.Id
import Common.Json.Instances
import Common.Keywords
import Common.Lexer
import Common.Lib.Rel (Rel, predecessors, member)
import Common.Parsec
import Common.Result
import Common.Token
import Common.Utils (composeMap)
import Common.Utils (keepMins)
import Control.Monad
import CspCASL.AS_CspCASL
import CspCASL.AS_CspCASL ()
import CspCASL.AS_CspCASL_Process
import CspCASL.CspCASL_Keywords
import CspCASL.Morphism
import CspCASL.Parse_CspCASL_Process
import CspCASL.Print_CspCASL
import CspCASL.Print_CspCASL ()
import CspCASL.SignCSP
import CspCASL.SymbItems
import CspCASL.Symbol
import Data.Aeson(ToJSON, FromJSON)
import Data.Data
import Data.List
import Data.Ord
import GHC.Generics(Generic)
import Text.ParserCombinators.Parsec
import qualified CASL.MapSentence as CASL_MapSen
import qualified Common.Lib.MapSet as MapSet
import qualified Common.Lib.Rel as Rel
import qualified Control.Monad.Fail as Fail
import qualified CspCASL.LocalTop as LT
import qualified CspCASL.LocalTop as LocalTop
import qualified Data.Map as Map
import qualified Data.Set as Set

{-! for CspCASL.AS_CspCASL.CspBasicExt derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL.CHANNEL_DECL derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL.PROC_ITEM derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL.PARM_PROCNAME derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.EVENT derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.EVENT_SET derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.RenameKind derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.Rename derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.RENAMING derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.PROC_ALPHABET derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.ProcProfile derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.TypedChanName derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.CommType derive : ShATermConvertible !-}
{-! for CspCASL.AS_CspCASL_Process.PROCESS derive : ShATermConvertible !-}
{-! for CspCASL.SignCSP.CspSign derive : ShATermConvertible !-}
{-! for CspCASL.SignCSP.CspSen derive : ShATermConvertible !-}
{-! for CspCASL.SymbItems.CspSymbItems derive : ShATermConvertible !-}
{-! for CspCASL.SymbItems.CspSymbMapItems derive : ShATermConvertible !-}
{-! for CspCASL.SymbItems.CspSymbKind derive : ShATermConvertible !-}
{-! for CspCASL.SymbItems.CspSymb derive : ShATermConvertible !-}
{-! for CspCASL.SymbItems.CspType derive : ShATermConvertible !-}
{-! for CspCASL.SymbItems.CspSymbMap derive : ShATermConvertible !-}
{-! for CspCASL.Symbol.CspSymbType derive : ShATermConvertible !-}
{-! for CspCASL.Symbol.CspSymbol derive : ShATermConvertible !-}
{-! for CspCASL.Symbol.CspRawSymbol derive : ShATermConvertible !-}
{-! for CspCASL.Morphism.CspAddMorphism derive : ShATermConvertible !-}

{-! for CspCASL.AS_CspCASL.CspBasicExt derive : Json !-}
{-! for CspCASL.AS_CspCASL.CHANNEL_DECL derive : Json !-}
{-! for CspCASL.AS_CspCASL.PROC_ITEM derive : Json !-}
{-! for CspCASL.AS_CspCASL.PARM_PROCNAME derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.EVENT derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.EVENT_SET derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.RenameKind derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.Rename derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.RENAMING derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.PROC_ALPHABET derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.ProcProfile derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.TypedChanName derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.CommType derive : Json !-}
{-! for CspCASL.AS_CspCASL_Process.PROCESS derive : Json !-}
{-! for CspCASL.SignCSP.CspSign derive : Json !-}
{-! for CspCASL.SignCSP.CspSen derive : Json !-}
{-! for CspCASL.SymbItems.CspSymbItems derive : Json !-}
{-! for CspCASL.SymbItems.CspSymbMapItems derive : Json !-}
{-! for CspCASL.SymbItems.CspSymbKind derive : Json !-}
{-! for CspCASL.SymbItems.CspSymb derive : Json !-}
{-! for CspCASL.SymbItems.CspType derive : Json !-}
{-! for CspCASL.SymbItems.CspSymbMap derive : Json !-}
{-! for CspCASL.Symbol.CspSymbType derive : Json !-}
{-! for CspCASL.Symbol.CspSymbol derive : Json !-}
{-! for CspCASL.Symbol.CspRawSymbol derive : Json !-}
{-! for CspCASL.Morphism.CspAddMorphism derive : Json !-}

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

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL.PARM_PROCNAME
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL.PARM_PROCNAME where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL.PARM_PROCNAME where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL.PROC_ITEM
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL.PROC_ITEM where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL.PROC_ITEM where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL.CHANNEL_DECL
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL.CHANNEL_DECL where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL.CHANNEL_DECL where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL.CspBasicExt
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL.CspBasicExt where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL.CspBasicExt where

instance ShATermConvertible CspCASL.AS_CspCASL.PARM_PROCNAME where
  toShATermAux :: ATermTable -> PARM_PROCNAME -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PARM_PROCNAME
xv = case PARM_PROCNAME
xv of
    ParmProcname a :: FQ_PROCESS_NAME
a b :: [VAR]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FQ_PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FQ_PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [VAR] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [VAR]
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 "ParmProcname" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PARM_PROCNAME)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ParmProcname" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, FQ_PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FQ_PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, [VAR])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [VAR]
b') ->
      (ATermTable
att2, FQ_PROCESS_NAME -> [VAR] -> PARM_PROCNAME
ParmProcname FQ_PROCESS_NAME
a' [VAR]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PARM_PROCNAME)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL.PARM_PROCNAME" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL.PROC_ITEM where
  toShATermAux :: ATermTable -> PROC_ITEM -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PROC_ITEM
xv = case PROC_ITEM
xv of
    Proc_Decl a :: PROCESS_NAME
a b :: PROC_ARGS
b c :: PROC_ALPHABET
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROC_ARGS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROC_ARGS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PROC_ALPHABET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PROC_ALPHABET
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 "Proc_Decl" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Proc_Defn a :: PROCESS_NAME
a b :: [VAR_DECL]
b c :: PROC_ALPHABET
c d :: PROCESS
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [VAR_DECL] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [VAR_DECL]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PROC_ALPHABET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PROC_ALPHABET
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 PROCESS
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 "Proc_Defn" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    Proc_Eq a :: PARM_PROCNAME
a b :: PROCESS
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PARM_PROCNAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PARM_PROCNAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
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 "Proc_Eq" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PROC_ITEM)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Proc_Decl" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, PROC_ARGS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROC_ARGS
b') ->
      case Int -> ATermTable -> (ATermTable, PROC_ALPHABET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: PROC_ALPHABET
c') ->
      (ATermTable
att3, PROCESS_NAME -> PROC_ARGS -> PROC_ALPHABET -> PROC_ITEM
Proc_Decl PROCESS_NAME
a' PROC_ARGS
b' PROC_ALPHABET
c') }}}
    ShAAppl "Proc_Defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, [VAR_DECL])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [VAR_DECL]
b') ->
      case Int -> ATermTable -> (ATermTable, PROC_ALPHABET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: PROC_ALPHABET
c') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: PROCESS
d') ->
      (ATermTable
att4, PROCESS_NAME -> [VAR_DECL] -> PROC_ALPHABET -> PROCESS -> PROC_ITEM
Proc_Defn PROCESS_NAME
a' [VAR_DECL]
b' PROC_ALPHABET
c' PROCESS
d') }}}}
    ShAAppl "Proc_Eq" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PARM_PROCNAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PARM_PROCNAME
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      (ATermTable
att2, PARM_PROCNAME -> PROCESS -> PROC_ITEM
Proc_Eq PARM_PROCNAME
a' PROCESS
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PROC_ITEM)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL.PROC_ITEM" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL.CHANNEL_DECL where
  toShATermAux :: ATermTable -> CHANNEL_DECL -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CHANNEL_DECL
xv = case CHANNEL_DECL
xv of
    ChannelDecl a :: PROC_ARGS
a b :: PROCESS_NAME
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROC_ARGS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROC_ARGS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS_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 "ChannelDecl" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CHANNEL_DECL)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ChannelDecl" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROC_ARGS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROC_ARGS
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS_NAME
b') ->
      (ATermTable
att2, PROC_ARGS -> PROCESS_NAME -> CHANNEL_DECL
ChannelDecl PROC_ARGS
a' PROCESS_NAME
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CHANNEL_DECL)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL.CHANNEL_DECL" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL.CspBasicExt where
  toShATermAux :: ATermTable -> CspBasicExt -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspBasicExt
xv = case CspBasicExt
xv of
    Channels a :: [Annoted CHANNEL_DECL]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted CHANNEL_DECL] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annoted CHANNEL_DECL]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "Channels" [Int
a', Int
b'] []) ATermTable
att2
    ProcItems a :: [Annoted PROC_ITEM]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted PROC_ITEM] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annoted PROC_ITEM]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "ProcItems" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspBasicExt)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Channels" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annoted CHANNEL_DECL])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annoted CHANNEL_DECL]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [Annoted CHANNEL_DECL] -> Range -> CspBasicExt
Channels [Annoted CHANNEL_DECL]
a' Range
b') }}
    ShAAppl "ProcItems" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annoted PROC_ITEM])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annoted PROC_ITEM]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [Annoted PROC_ITEM] -> Range -> CspBasicExt
ProcItems [Annoted PROC_ITEM]
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspBasicExt)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL.CspBasicExt" ShATerm
u

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.PROCESS
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.PROCESS where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.PROCESS where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.CommType
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.CommType where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.CommType where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.TypedChanName
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.TypedChanName where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.TypedChanName where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.ProcProfile
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.ProcProfile where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.ProcProfile where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.PROC_ALPHABET
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.PROC_ALPHABET where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.PROC_ALPHABET where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.RENAMING
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.RENAMING where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.RENAMING where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.Rename
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.Rename where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.Rename where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.RenameKind
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.RenameKind where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.RenameKind where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.EVENT_SET
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.EVENT_SET where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.EVENT_SET where

deriving instance GHC.Generics.Generic CspCASL.AS_CspCASL_Process.EVENT
instance Data.Aeson.ToJSON CspCASL.AS_CspCASL_Process.EVENT where
instance Data.Aeson.FromJSON CspCASL.AS_CspCASL_Process.EVENT where

instance ShATermConvertible CspCASL.AS_CspCASL_Process.PROCESS where
  toShATermAux :: ATermTable -> PROCESS -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PROCESS
xv = case PROCESS
xv of
    Skip a :: Range
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Range
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Skip" [Int
a'] []) ATermTable
att1
    Stop a :: Range
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Range
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Stop" [Int
a'] []) ATermTable
att1
    Div a :: Range
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Range
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Div" [Int
a'] []) ATermTable
att1
    Run a :: EVENT_SET
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EVENT_SET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EVENT_SET
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "Run" [Int
a', Int
b'] []) ATermTable
att2
    Chaos a :: EVENT_SET
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EVENT_SET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EVENT_SET
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "Chaos" [Int
a', Int
b'] []) ATermTable
att2
    PrefixProcess a :: EVENT
a b :: PROCESS
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> EVENT -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 EVENT
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "PrefixProcess" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Sequential a :: PROCESS
a b :: PROCESS
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "Sequential" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ExternalChoice a :: PROCESS
a b :: PROCESS
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "ExternalChoice" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    InternalChoice a :: PROCESS
a b :: PROCESS
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "InternalChoice" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    Interleaving a :: PROCESS
a b :: PROCESS
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "Interleaving" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    SynchronousParallel a :: PROCESS
a b :: PROCESS
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "SynchronousParallel" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
    GeneralisedParallel a :: PROCESS
a b :: EVENT_SET
b c :: PROCESS
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EVENT_SET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EVENT_SET
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PROCESS
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
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 "GeneralisedParallel" [Int
a', Int
b', Int
c',
                                                        Int
d'] []) ATermTable
att4
    AlphabetisedParallel a :: PROCESS
a b :: EVENT_SET
b c :: EVENT_SET
c d :: PROCESS
d e :: Range
e -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EVENT_SET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EVENT_SET
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> EVENT_SET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 EVENT_SET
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 PROCESS
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 Range
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 "AlphabetisedParallel" [Int
a', Int
b', Int
c', Int
d',
                                                         Int
e'] []) ATermTable
att5
    Hiding a :: PROCESS
a b :: EVENT_SET
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EVENT_SET -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 EVENT_SET
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "Hiding" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    RenamingProcess a :: PROCESS
a b :: RENAMING
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> RENAMING -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 RENAMING
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "RenamingProcess" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ConditionalProcess a :: FORMULA ()
a b :: PROCESS
b c :: PROCESS
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FORMULA () -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FORMULA ()
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PROCESS
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
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 "ConditionalProcess" [Int
a', Int
b', Int
c',
                                                       Int
d'] []) ATermTable
att4
    NamedProcess a :: FQ_PROCESS_NAME
a b :: [TERM ()]
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FQ_PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FQ_PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [TERM ()] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [TERM ()]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "NamedProcess" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    FQProcess a :: PROCESS
a b :: CommAlpha
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> CommAlpha -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 CommAlpha
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "FQProcess" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PROCESS)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Skip" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Range
a') ->
      (ATermTable
att1, Range -> PROCESS
Skip Range
a') }
    ShAAppl "Stop" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Range
a') ->
      (ATermTable
att1, Range -> PROCESS
Stop Range
a') }
    ShAAppl "Div" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Range
a') ->
      (ATermTable
att1, Range -> PROCESS
Div Range
a') }
    ShAAppl "Run" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, EVENT_SET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EVENT_SET
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, EVENT_SET -> Range -> PROCESS
Run EVENT_SET
a' Range
b') }}
    ShAAppl "Chaos" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, EVENT_SET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EVENT_SET
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, EVENT_SET -> Range -> PROCESS
Chaos EVENT_SET
a' Range
b') }}
    ShAAppl "PrefixProcess" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, EVENT)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: EVENT
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, EVENT -> PROCESS -> Range -> PROCESS
PrefixProcess EVENT
a' PROCESS
b' Range
c') }}}
    ShAAppl "Sequential" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> PROCESS -> Range -> PROCESS
Sequential PROCESS
a' PROCESS
b' Range
c') }}}
    ShAAppl "ExternalChoice" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> PROCESS -> Range -> PROCESS
ExternalChoice PROCESS
a' PROCESS
b' Range
c') }}}
    ShAAppl "InternalChoice" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> PROCESS -> Range -> PROCESS
InternalChoice PROCESS
a' PROCESS
b' Range
c') }}}
    ShAAppl "Interleaving" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> PROCESS -> Range -> PROCESS
Interleaving PROCESS
a' PROCESS
b' Range
c') }}}
    ShAAppl "SynchronousParallel" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> PROCESS -> Range -> PROCESS
SynchronousParallel PROCESS
a' PROCESS
b' Range
c') }}}
    ShAAppl "GeneralisedParallel" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, EVENT_SET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EVENT_SET
b') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: PROCESS
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, PROCESS -> EVENT_SET -> PROCESS -> Range -> PROCESS
GeneralisedParallel PROCESS
a' EVENT_SET
b' PROCESS
c' Range
d') }}}}
    ShAAppl "AlphabetisedParallel" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, EVENT_SET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EVENT_SET
b') ->
      case Int -> ATermTable -> (ATermTable, EVENT_SET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: EVENT_SET
c') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: PROCESS
d') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: Range
e') ->
      (ATermTable
att5, PROCESS -> EVENT_SET -> EVENT_SET -> PROCESS -> Range -> PROCESS
AlphabetisedParallel PROCESS
a' EVENT_SET
b' EVENT_SET
c' PROCESS
d' Range
e') }}}}}
    ShAAppl "Hiding" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, EVENT_SET)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: EVENT_SET
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> EVENT_SET -> Range -> PROCESS
Hiding PROCESS
a' EVENT_SET
b' Range
c') }}}
    ShAAppl "RenamingProcess" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, RENAMING)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: RENAMING
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> RENAMING -> Range -> PROCESS
RenamingProcess PROCESS
a' RENAMING
b' Range
c') }}}
    ShAAppl "ConditionalProcess" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, FORMULA ())
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FORMULA ()
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS
b') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: PROCESS
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, FORMULA () -> PROCESS -> PROCESS -> Range -> PROCESS
ConditionalProcess FORMULA ()
a' PROCESS
b' PROCESS
c' Range
d') }}}}
    ShAAppl "NamedProcess" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, FQ_PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FQ_PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, [TERM ()])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [TERM ()]
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, FQ_PROCESS_NAME -> [TERM ()] -> Range -> PROCESS
NamedProcess FQ_PROCESS_NAME
a' [TERM ()]
b' Range
c') }}}
    ShAAppl "FQProcess" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS
a') ->
      case Int -> ATermTable -> (ATermTable, CommAlpha)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: CommAlpha
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS -> CommAlpha -> Range -> PROCESS
FQProcess PROCESS
a' CommAlpha
b' Range
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PROCESS)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.PROCESS" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL_Process.CommType where
  toShATermAux :: ATermTable -> CommType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CommType
xv = case CommType
xv of
    CommTypeSort a :: PROCESS_NAME
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_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 "CommTypeSort" [Int
a'] []) ATermTable
att1
    CommTypeChan a :: TypedChanName
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> TypedChanName -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 TypedChanName
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CommTypeChan" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CommType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CommTypeSort" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      (ATermTable
att1, PROCESS_NAME -> CommType
CommTypeSort PROCESS_NAME
a') }
    ShAAppl "CommTypeChan" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, TypedChanName)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: TypedChanName
a') ->
      (ATermTable
att1, TypedChanName -> CommType
CommTypeChan TypedChanName
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CommType)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.CommType" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL_Process.TypedChanName where
  toShATermAux :: ATermTable -> TypedChanName -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: TypedChanName
xv = case TypedChanName
xv of
    TypedChanName a :: PROCESS_NAME
a b :: PROCESS_NAME
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS_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 "TypedChanName" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, TypedChanName)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TypedChanName" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS_NAME
b') ->
      (ATermTable
att2, PROCESS_NAME -> PROCESS_NAME -> TypedChanName
TypedChanName PROCESS_NAME
a' PROCESS_NAME
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, TypedChanName)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.TypedChanName" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME where
  toShATermAux :: ATermTable -> FQ_PROCESS_NAME -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: FQ_PROCESS_NAME
xv = case FQ_PROCESS_NAME
xv of
    PROCESS_NAME a :: PROCESS_NAME
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_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 "PROCESS_NAME" [Int
a'] []) ATermTable
att1
    FQ_PROCESS_NAME a :: PROCESS_NAME
a b :: ProcProfile
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ProcProfile -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ProcProfile
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 "FQ_PROCESS_NAME" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, FQ_PROCESS_NAME)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "PROCESS_NAME" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      (ATermTable
att1, PROCESS_NAME -> FQ_PROCESS_NAME
PROCESS_NAME PROCESS_NAME
a') }
    ShAAppl "FQ_PROCESS_NAME" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, ProcProfile)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ProcProfile
b') ->
      (ATermTable
att2, PROCESS_NAME -> ProcProfile -> FQ_PROCESS_NAME
FQ_PROCESS_NAME PROCESS_NAME
a' ProcProfile
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FQ_PROCESS_NAME)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.FQ_PROCESS_NAME" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL_Process.ProcProfile where
  toShATermAux :: ATermTable -> ProcProfile -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ProcProfile
xv = case ProcProfile
xv of
    ProcProfile a :: PROC_ARGS
a b :: CommAlpha
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROC_ARGS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROC_ARGS
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> CommAlpha -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 CommAlpha
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 "ProcProfile" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ProcProfile)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ProcProfile" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROC_ARGS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROC_ARGS
a') ->
      case Int -> ATermTable -> (ATermTable, CommAlpha)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: CommAlpha
b') ->
      (ATermTable
att2, PROC_ARGS -> CommAlpha -> ProcProfile
ProcProfile PROC_ARGS
a' CommAlpha
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ProcProfile)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.ProcProfile" ShATerm
u

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

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

instance ShATermConvertible CspCASL.AS_CspCASL_Process.Rename where
  toShATermAux :: ATermTable -> Rename -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Rename
xv = case Rename
xv of
    Rename a :: PROCESS_NAME
a b :: Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_NAME))
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable
-> Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_NAME))
-> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_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 "Rename" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Rename)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Rename" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int
-> ATermTable
-> (ATermTable,
    Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_NAME)))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_NAME))
b') ->
      (ATermTable
att2, PROCESS_NAME
-> Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_NAME)) -> Rename
Rename PROCESS_NAME
a' Maybe (RenameKind, Maybe (PROCESS_NAME, PROCESS_NAME))
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Rename)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.Rename" ShATerm
u

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

instance ShATermConvertible CspCASL.AS_CspCASL_Process.EVENT_SET where
  toShATermAux :: ATermTable -> EVENT_SET -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EVENT_SET
xv = case EVENT_SET
xv of
    EventSet a :: [CommType]
a b :: Range
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [CommType] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [CommType]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "EventSet" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EVENT_SET)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "EventSet" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [CommType])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [CommType]
a') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, [CommType] -> Range -> EVENT_SET
EventSet [CommType]
a' Range
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EVENT_SET)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.EVENT_SET" ShATerm
u

instance ShATermConvertible CspCASL.AS_CspCASL_Process.EVENT where
  toShATermAux :: ATermTable -> EVENT -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: EVENT
xv = case EVENT
xv of
    TermEvent a :: TERM ()
a b :: Range
b -> 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
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "TermEvent" [Int
a', Int
b'] []) ATermTable
att2
    ExternalPrefixChoice a :: VAR
a b :: PROCESS_NAME
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> VAR -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 VAR
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS_NAME
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "ExternalPrefixChoice" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
    InternalPrefixChoice a :: VAR
a b :: PROCESS_NAME
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> VAR -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 VAR
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS_NAME
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "InternalPrefixChoice" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
    ChanSend a :: PROCESS_NAME
a b :: TERM ()
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TERM () -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TERM ()
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "ChanSend" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ChanNonDetSend a :: PROCESS_NAME
a b :: VAR
b c :: PROCESS_NAME
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> VAR -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 VAR
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PROCESS_NAME
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
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 "ChanNonDetSend" [Int
a', Int
b', Int
c',
                                                   Int
d'] []) ATermTable
att4
    ChanRecv a :: PROCESS_NAME
a b :: VAR
b c :: PROCESS_NAME
c d :: Range
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> VAR -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 VAR
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 PROCESS_NAME
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Range
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 "ChanRecv" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    FQTermEvent a :: TERM ()
a b :: Range
b -> 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
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "FQTermEvent" [Int
a', Int
b'] []) ATermTable
att2
    FQExternalPrefixChoice a :: TERM ()
a b :: Range
b -> 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
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "FQExternalPrefixChoice" [Int
a',
                                                           Int
b'] []) ATermTable
att2
    FQInternalPrefixChoice a :: TERM ()
a b :: Range
b -> 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
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Range
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 "FQInternalPrefixChoice" [Int
a',
                                                           Int
b'] []) ATermTable
att2
    FQChanSend a :: (PROCESS_NAME, PROCESS_NAME)
a b :: TERM ()
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> (PROCESS_NAME, PROCESS_NAME) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 (PROCESS_NAME, PROCESS_NAME)
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TERM () -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TERM ()
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "FQChanSend" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    FQChanNonDetSend a :: (PROCESS_NAME, PROCESS_NAME)
a b :: TERM ()
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> (PROCESS_NAME, PROCESS_NAME) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 (PROCESS_NAME, PROCESS_NAME)
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TERM () -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TERM ()
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "FQChanNonDetSend" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    FQChanRecv a :: (PROCESS_NAME, PROCESS_NAME)
a b :: TERM ()
b c :: Range
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> (PROCESS_NAME, PROCESS_NAME) -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 (PROCESS_NAME, PROCESS_NAME)
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> TERM () -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 TERM ()
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Range
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 "FQChanRecv" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, EVENT)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "TermEvent" [a :: Int
a, b :: Int
b] _ ->
      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') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, TERM () -> Range -> EVENT
TermEvent TERM ()
a' Range
b') }}
    ShAAppl "ExternalPrefixChoice" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, VAR)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: VAR
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS_NAME
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, VAR -> PROCESS_NAME -> Range -> EVENT
ExternalPrefixChoice VAR
a' PROCESS_NAME
b' Range
c') }}}
    ShAAppl "InternalPrefixChoice" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, VAR)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: VAR
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS_NAME
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, VAR -> PROCESS_NAME -> Range -> EVENT
InternalPrefixChoice VAR
a' PROCESS_NAME
b' Range
c') }}}
    ShAAppl "ChanSend" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, TERM ())
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TERM ()
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, PROCESS_NAME -> TERM () -> Range -> EVENT
ChanSend PROCESS_NAME
a' TERM ()
b' Range
c') }}}
    ShAAppl "ChanNonDetSend" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, VAR)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: VAR
b') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: PROCESS_NAME
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, PROCESS_NAME -> VAR -> PROCESS_NAME -> Range -> EVENT
ChanNonDetSend PROCESS_NAME
a' VAR
b' PROCESS_NAME
c' Range
d') }}}}
    ShAAppl "ChanRecv" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, VAR)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: VAR
b') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: PROCESS_NAME
c') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Range
d') ->
      (ATermTable
att4, PROCESS_NAME -> VAR -> PROCESS_NAME -> Range -> EVENT
ChanRecv PROCESS_NAME
a' VAR
b' PROCESS_NAME
c' Range
d') }}}}
    ShAAppl "FQTermEvent" [a :: Int
a, b :: Int
b] _ ->
      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') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, TERM () -> Range -> EVENT
FQTermEvent TERM ()
a' Range
b') }}
    ShAAppl "FQExternalPrefixChoice" [a :: Int
a, b :: Int
b] _ ->
      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') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, TERM () -> Range -> EVENT
FQExternalPrefixChoice TERM ()
a' Range
b') }}
    ShAAppl "FQInternalPrefixChoice" [a :: Int
a, b :: Int
b] _ ->
      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') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Range
b') ->
      (ATermTable
att2, TERM () -> Range -> EVENT
FQInternalPrefixChoice TERM ()
a' Range
b') }}
    ShAAppl "FQChanSend" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, (PROCESS_NAME, PROCESS_NAME))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: (PROCESS_NAME, PROCESS_NAME)
a') ->
      case Int -> ATermTable -> (ATermTable, TERM ())
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TERM ()
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, (PROCESS_NAME, PROCESS_NAME) -> TERM () -> Range -> EVENT
FQChanSend (PROCESS_NAME, PROCESS_NAME)
a' TERM ()
b' Range
c') }}}
    ShAAppl "FQChanNonDetSend" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, (PROCESS_NAME, PROCESS_NAME))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: (PROCESS_NAME, PROCESS_NAME)
a') ->
      case Int -> ATermTable -> (ATermTable, TERM ())
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TERM ()
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, (PROCESS_NAME, PROCESS_NAME) -> TERM () -> Range -> EVENT
FQChanNonDetSend (PROCESS_NAME, PROCESS_NAME)
a' TERM ()
b' Range
c') }}}
    ShAAppl "FQChanRecv" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, (PROCESS_NAME, PROCESS_NAME))
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: (PROCESS_NAME, PROCESS_NAME)
a') ->
      case Int -> ATermTable -> (ATermTable, TERM ())
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: TERM ()
b') ->
      case Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Range
c') ->
      (ATermTable
att3, (PROCESS_NAME, PROCESS_NAME) -> TERM () -> Range -> EVENT
FQChanRecv (PROCESS_NAME, PROCESS_NAME)
a' TERM ()
b' Range
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EVENT)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.AS_CspCASL_Process.EVENT" ShATerm
u

deriving instance GHC.Generics.Generic CspCASL.Morphism.CspAddMorphism
instance Data.Aeson.ToJSON CspCASL.Morphism.CspAddMorphism where
instance Data.Aeson.FromJSON CspCASL.Morphism.CspAddMorphism where

instance ShATermConvertible CspCASL.Morphism.CspAddMorphism where
  toShATermAux :: ATermTable -> CspAddMorphism -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspAddMorphism
xv = case CspAddMorphism
xv of
    CspAddMorphism a :: ChanMap
a b :: ProcessMap
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ChanMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ChanMap
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ProcessMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ProcessMap
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 "CspAddMorphism" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspAddMorphism)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspAddMorphism" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ChanMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ChanMap
a') ->
      case Int -> ATermTable -> (ATermTable, ProcessMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ProcessMap
b') ->
      (ATermTable
att2, ChanMap -> ProcessMap -> CspAddMorphism
CspAddMorphism ChanMap
a' ProcessMap
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspAddMorphism)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.Morphism.CspAddMorphism" ShATerm
u

deriving instance GHC.Generics.Generic CspCASL.SignCSP.CspSen
instance Data.Aeson.ToJSON CspCASL.SignCSP.CspSen where
instance Data.Aeson.FromJSON CspCASL.SignCSP.CspSen where

deriving instance GHC.Generics.Generic CspCASL.SignCSP.CspSign
instance Data.Aeson.ToJSON CspCASL.SignCSP.CspSign where
instance Data.Aeson.FromJSON CspCASL.SignCSP.CspSign where

instance ShATermConvertible CspCASL.SignCSP.CspSen where
  toShATermAux :: ATermTable -> CspSen -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSen
xv = case CspSen
xv of
    ProcessEq a :: FQ_PROCESS_NAME
a b :: [TERM ()]
b c :: CommAlpha
c d :: PROCESS
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> FQ_PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 FQ_PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [TERM ()] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [TERM ()]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> CommAlpha -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 CommAlpha
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> PROCESS -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 PROCESS
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 "ProcessEq" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSen)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ProcessEq" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, FQ_PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: FQ_PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, [TERM ()])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [TERM ()]
b') ->
      case Int -> ATermTable -> (ATermTable, CommAlpha)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: CommAlpha
c') ->
      case Int -> ATermTable -> (ATermTable, PROCESS)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: PROCESS
d') ->
      (ATermTable
att4, FQ_PROCESS_NAME -> [TERM ()] -> CommAlpha -> PROCESS -> CspSen
ProcessEq FQ_PROCESS_NAME
a' [TERM ()]
b' CommAlpha
c' PROCESS
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSen)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SignCSP.CspSen" ShATerm
u

instance ShATermConvertible CspCASL.SignCSP.CspSign where
  toShATermAux :: ATermTable -> CspSign -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSign
xv = case CspSign
xv of
    CspSign a :: ChanNameMap
a b :: ProcNameMap
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ChanNameMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ChanNameMap
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ProcNameMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ProcNameMap
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 "CspSign" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSign)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspSign" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ChanNameMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ChanNameMap
a') ->
      case Int -> ATermTable -> (ATermTable, ProcNameMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ProcNameMap
b') ->
      (ATermTable
att2, ChanNameMap -> ProcNameMap -> CspSign
CspSign ChanNameMap
a' ProcNameMap
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSign)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SignCSP.CspSign" ShATerm
u

instance ShATermConvertible CspCASL.SymbItems.CspSymbItems where
  toShATermAux :: ATermTable -> CspSymbItems -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymbItems
xv = case CspSymbItems
xv of
    CspSymbItems a :: CspSymbKind
a b :: [CspSymb]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CspSymbKind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CspSymbKind
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [CspSymb] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [CspSymb]
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 "CspSymbItems" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymbItems)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspSymbItems" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, CspSymbKind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CspSymbKind
a') ->
      case Int -> ATermTable -> (ATermTable, [CspSymb])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [CspSymb]
b') ->
      (ATermTable
att2, CspSymbKind -> [CspSymb] -> CspSymbItems
CspSymbItems CspSymbKind
a' [CspSymb]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymbItems)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SymbItems.CspSymbItems" ShATerm
u

instance ShATermConvertible CspCASL.SymbItems.CspSymbMapItems where
  toShATermAux :: ATermTable -> CspSymbMapItems -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymbMapItems
xv = case CspSymbMapItems
xv of
    CspSymbMapItems a :: CspSymbKind
a b :: [CspSymbMap]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CspSymbKind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CspSymbKind
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [CspSymbMap] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [CspSymbMap]
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 "CspSymbMapItems" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymbMapItems)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspSymbMapItems" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, CspSymbKind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CspSymbKind
a') ->
      case Int -> ATermTable -> (ATermTable, [CspSymbMap])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [CspSymbMap]
b') ->
      (ATermTable
att2, CspSymbKind -> [CspSymbMap] -> CspSymbMapItems
CspSymbMapItems CspSymbKind
a' [CspSymbMap]
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymbMapItems)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SymbItems.CspSymbMapItems" ShATerm
u

instance ShATermConvertible CspCASL.SymbItems.CspSymbKind where
  toShATermAux :: ATermTable -> CspSymbKind -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymbKind
xv = case CspSymbKind
xv of
    CaslKind a :: SYMB_KIND
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SYMB_KIND -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SYMB_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 "CaslKind" [Int
a'] []) ATermTable
att1
    ProcessKind -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ProcessKind" [] []) ATermTable
att0
    ChannelKind -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ChannelKind" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymbKind)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CaslKind" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, SYMB_KIND)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: SYMB_KIND
a') ->
      (ATermTable
att1, SYMB_KIND -> CspSymbKind
CaslKind SYMB_KIND
a') }
    ShAAppl "ProcessKind" [] _ -> (ATermTable
att0, CspSymbKind
ProcessKind)
    ShAAppl "ChannelKind" [] _ -> (ATermTable
att0, CspSymbKind
ChannelKind)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymbKind)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SymbItems.CspSymbKind" ShATerm
u

instance ShATermConvertible CspCASL.SymbItems.CspSymb where
  toShATermAux :: ATermTable -> CspSymb -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymb
xv = case CspSymb
xv of
    CspSymb a :: PROCESS_NAME
a b :: Maybe CspType
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe CspType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe CspType
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 "CspSymb" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymb)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspSymb" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, Maybe CspType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe CspType
b') ->
      (ATermTable
att2, PROCESS_NAME -> Maybe CspType -> CspSymb
CspSymb PROCESS_NAME
a' Maybe CspType
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymb)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SymbItems.CspSymb" ShATerm
u

instance ShATermConvertible CspCASL.SymbItems.CspType where
  toShATermAux :: ATermTable -> CspType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspType
xv = case CspType
xv of
    CaslType 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 "CaslType" [Int
a'] []) ATermTable
att1
    ProcType a :: ProcProfile
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ProcProfile -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ProcProfile
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ProcType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CaslType" [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 -> CspType
CaslType TYPE
a') }
    ShAAppl "ProcType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ProcProfile)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ProcProfile
a') ->
      (ATermTable
att1, ProcProfile -> CspType
ProcType ProcProfile
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspType)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SymbItems.CspType" ShATerm
u

instance ShATermConvertible CspCASL.SymbItems.CspSymbMap where
  toShATermAux :: ATermTable -> CspSymbMap -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymbMap
xv = case CspSymbMap
xv of
    CspSymbMap a :: CspSymb
a b :: Maybe CspSymb
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CspSymb -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CspSymb
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe CspSymb -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe CspSymb
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 "CspSymbMap" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymbMap)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspSymbMap" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, CspSymb)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CspSymb
a') ->
      case Int -> ATermTable -> (ATermTable, Maybe CspSymb)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe CspSymb
b') ->
      (ATermTable
att2, CspSymb -> Maybe CspSymb -> CspSymbMap
CspSymbMap CspSymb
a' Maybe CspSymb
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymbMap)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.SymbItems.CspSymbMap" ShATerm
u

deriving instance GHC.Generics.Generic CspCASL.SymbItems.CspSymbItems
instance Data.Aeson.ToJSON CspCASL.SymbItems.CspSymbItems where
instance Data.Aeson.FromJSON CspCASL.SymbItems.CspSymbItems where

deriving instance GHC.Generics.Generic CspCASL.SymbItems.CspSymbMapItems
instance Data.Aeson.ToJSON CspCASL.SymbItems.CspSymbMapItems where
instance Data.Aeson.FromJSON CspCASL.SymbItems.CspSymbMapItems where

deriving instance GHC.Generics.Generic CspCASL.SymbItems.CspSymbKind
instance Data.Aeson.ToJSON CspCASL.SymbItems.CspSymbKind where
instance Data.Aeson.FromJSON CspCASL.SymbItems.CspSymbKind where

deriving instance GHC.Generics.Generic CspCASL.SymbItems.CspSymb
instance Data.Aeson.ToJSON CspCASL.SymbItems.CspSymb where
instance Data.Aeson.FromJSON CspCASL.SymbItems.CspSymb where

deriving instance GHC.Generics.Generic CspCASL.SymbItems.CspType
instance Data.Aeson.ToJSON CspCASL.SymbItems.CspType where
instance Data.Aeson.FromJSON CspCASL.SymbItems.CspType where

deriving instance GHC.Generics.Generic CspCASL.SymbItems.CspSymbMap
instance Data.Aeson.ToJSON CspCASL.SymbItems.CspSymbMap where
instance Data.Aeson.FromJSON CspCASL.SymbItems.CspSymbMap where

deriving instance GHC.Generics.Generic CspCASL.Symbol.CspRawSymbol
instance Data.Aeson.ToJSON CspCASL.Symbol.CspRawSymbol where
instance Data.Aeson.FromJSON CspCASL.Symbol.CspRawSymbol where

deriving instance GHC.Generics.Generic CspCASL.Symbol.CspSymbol
instance Data.Aeson.ToJSON CspCASL.Symbol.CspSymbol where
instance Data.Aeson.FromJSON CspCASL.Symbol.CspSymbol where

deriving instance GHC.Generics.Generic CspCASL.Symbol.CspSymbType
instance Data.Aeson.ToJSON CspCASL.Symbol.CspSymbType where
instance Data.Aeson.FromJSON CspCASL.Symbol.CspSymbType where

instance ShATermConvertible CspCASL.Symbol.CspRawSymbol where
  toShATermAux :: ATermTable -> CspRawSymbol -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspRawSymbol
xv = case CspRawSymbol
xv of
    ACspSymbol a :: CspSymbol
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CspSymbol -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CspSymbol
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ACspSymbol" [Int
a'] []) ATermTable
att1
    CspKindedSymb a :: CspSymbKind
a b :: PROCESS_NAME
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> CspSymbKind -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 CspSymbKind
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PROCESS_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 "CspKindedSymb" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspRawSymbol)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ACspSymbol" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, CspSymbol)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CspSymbol
a') ->
      (ATermTable
att1, CspSymbol -> CspRawSymbol
ACspSymbol CspSymbol
a') }
    ShAAppl "CspKindedSymb" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, CspSymbKind)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: CspSymbKind
a') ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PROCESS_NAME
b') ->
      (ATermTable
att2, CspSymbKind -> PROCESS_NAME -> CspRawSymbol
CspKindedSymb CspSymbKind
a' PROCESS_NAME
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspRawSymbol)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.Symbol.CspRawSymbol" ShATerm
u

instance ShATermConvertible CspCASL.Symbol.CspSymbol where
  toShATermAux :: ATermTable -> CspSymbol -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymbol
xv = case CspSymbol
xv of
    CspSymbol a :: PROCESS_NAME
a b :: CspSymbType
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_NAME
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> CspSymbType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 CspSymbType
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 "CspSymbol" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymbol)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CspSymbol" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      case Int -> ATermTable -> (ATermTable, CspSymbType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: CspSymbType
b') ->
      (ATermTable
att2, PROCESS_NAME -> CspSymbType -> CspSymbol
CspSymbol PROCESS_NAME
a' CspSymbType
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymbol)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.Symbol.CspSymbol" ShATerm
u

instance ShATermConvertible CspCASL.Symbol.CspSymbType where
  toShATermAux :: ATermTable -> CspSymbType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: CspSymbType
xv = case CspSymbType
xv of
    CaslSymbType a :: SymbType
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SymbType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 SymbType
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "CaslSymbType" [Int
a'] []) ATermTable
att1
    ProcAsItemType a :: ProcProfile
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ProcProfile -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ProcProfile
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ProcAsItemType" [Int
a'] []) ATermTable
att1
    ChanAsItemType a :: PROCESS_NAME
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PROCESS_NAME -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 PROCESS_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 "ChanAsItemType" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, CspSymbType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "CaslSymbType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, SymbType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: SymbType
a') ->
      (ATermTable
att1, SymbType -> CspSymbType
CaslSymbType SymbType
a') }
    ShAAppl "ProcAsItemType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ProcProfile)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ProcProfile
a') ->
      (ATermTable
att1, ProcProfile -> CspSymbType
ProcAsItemType ProcProfile
a') }
    ShAAppl "ChanAsItemType" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, PROCESS_NAME)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: PROCESS_NAME
a') ->
      (ATermTable
att1, PROCESS_NAME -> CspSymbType
ChanAsItemType PROCESS_NAME
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, CspSymbType)
forall a. String -> ShATerm -> a
fromShATermError "CspCASL.Symbol.CspSymbType" ShATerm
u