{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
module ATC.AS_Library () where
import ATC.AS_Architecture
import ATC.Grothendieck
import ATC.LibName
import ATerm.Lib
import Common.AS_Annotation
import Common.IRI
import Common.Id
import Common.LibName
import Data.Maybe
import Data.Typeable
import Framework.AS
import Framework.ATC_Framework ()
import Logic.Grothendieck
import Logic.Logic
import Syntax.AS_Architecture
import Syntax.AS_Library
import Syntax.AS_Structured
instance ShATermLG Syntax.AS_Library.LIB_DEFN where
toShATermLG :: ATermTable -> LIB_DEFN -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: LIB_DEFN
xv = case LIB_DEFN
xv of
Lib_defn a :: LibName
a b :: [Annoted LIB_ITEM]
b c :: Range
c d :: [Annotation]
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> LibName -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 LibName
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Annoted LIB_ITEM] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 [Annoted LIB_ITEM]
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 Range
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att3 [Annotation]
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 "Lib_defn" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, LIB_DEFN)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Lib_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, LibName)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: LibName
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [Annoted LIB_ITEM])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [Annoted LIB_ITEM]
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: [Annotation]
d') ->
(ATermTable
att4, LibName -> [Annoted LIB_ITEM] -> Range -> [Annotation] -> LIB_DEFN
Lib_defn LibName
a' [Annoted LIB_ITEM]
b' Range
c' [Annotation]
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, LIB_DEFN)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.LIB_DEFN" ShATerm
u
instance ShATermLG Syntax.AS_Library.LIB_ITEM where
toShATermLG :: ATermTable -> LIB_ITEM -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: LIB_ITEM
xv = case LIB_ITEM
xv of
Spec_defn a :: SPEC_NAME
a b :: GENERICITY
b c :: Annoted SPEC
c d :: Range
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> GENERICITY -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 GENERICITY
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 Annoted SPEC
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Spec_defn" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
View_defn a :: SPEC_NAME
a b :: GENERICITY
b c :: VIEW_TYPE
c d :: [G_mapping]
d e :: Range
e -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> GENERICITY -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 GENERICITY
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> VIEW_TYPE -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 VIEW_TYPE
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [G_mapping] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att3 [G_mapping]
d
(att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "View_defn" [Int
a', Int
b', Int
c', Int
d',
Int
e'] []) ATermTable
att5
Entail_defn a :: SPEC_NAME
a b :: ENTAIL_TYPE
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ENTAIL_TYPE -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 ENTAIL_TYPE
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Entail_defn" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Equiv_defn a :: SPEC_NAME
a b :: EQUIV_TYPE
b c :: OmsOrNetwork
c d :: Range
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> EQUIV_TYPE -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 EQUIV_TYPE
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OmsOrNetwork -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 OmsOrNetwork
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Equiv_defn" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
Align_defn a :: SPEC_NAME
a b :: Maybe ALIGN_ARITIES
b c :: VIEW_TYPE
c d :: [CORRESPONDENCE]
d e :: AlignSem
e f :: Range
f -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe ALIGN_ARITIES -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Maybe ALIGN_ARITIES
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> VIEW_TYPE -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 VIEW_TYPE
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [CORRESPONDENCE] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att3 [CORRESPONDENCE]
d
(att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> AlignSem -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att4 AlignSem
e
(att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att5 Range
f
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Align_defn" [Int
a', Int
b', Int
c', Int
d', Int
e',
Int
f'] []) ATermTable
att6
Module_defn a :: SPEC_NAME
a b :: MODULE_TYPE
b c :: G_symb_items_list
c d :: Range
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> MODULE_TYPE -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 MODULE_TYPE
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> G_symb_items_list -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 G_symb_items_list
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Module_defn" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
Query_defn a :: SPEC_NAME
a b :: G_symb_items_list
b c :: G_basic_spec
c d :: Annoted SPEC
d e :: Maybe SPEC_NAME
e f :: Range
f -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> G_symb_items_list -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 G_symb_items_list
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> G_basic_spec -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 G_basic_spec
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att3 Annoted SPEC
d
(att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> Maybe SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att4 Maybe SPEC_NAME
e
(att6 :: ATermTable
att6, f' :: Int
f') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att5 Range
f
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Query_defn" [Int
a', Int
b', Int
c', Int
d', Int
e',
Int
f'] []) ATermTable
att6
Subst_defn a :: SPEC_NAME
a b :: VIEW_TYPE
b c :: G_symb_map_items_list
c d :: Range
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> VIEW_TYPE -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 VIEW_TYPE
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> G_symb_map_items_list -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 G_symb_map_items_list
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Subst_defn" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
Result_defn a :: SPEC_NAME
a b :: [SPEC_NAME]
b c :: SPEC_NAME
c d :: Bool
d e :: Range
e -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [SPEC_NAME] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 [SPEC_NAME]
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 SPEC_NAME
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att3 Bool
d
(att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Result_defn" [Int
a', Int
b', Int
c', Int
d',
Int
e'] []) ATermTable
att5
Arch_spec_defn a :: SPEC_NAME
a b :: Annoted ARCH_SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annoted ARCH_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Annoted ARCH_SPEC
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Arch_spec_defn" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Unit_spec_defn a :: SPEC_NAME
a b :: UNIT_SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UNIT_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 UNIT_SPEC
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Unit_spec_defn" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Ref_spec_defn a :: SPEC_NAME
a b :: REF_SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> REF_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 REF_SPEC
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Ref_spec_defn" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Network_defn a :: SPEC_NAME
a b :: Network
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Network -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Network
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Network_defn" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Download_items a :: LibName
a b :: DownloadItems
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> LibName -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 LibName
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DownloadItems -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 DownloadItems
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Download_items" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Logic_decl a :: LogicDescr
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> LogicDescr -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 LogicDescr
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Logic_decl" [Int
a', Int
b'] []) ATermTable
att2
Newlogic_defn a :: LogicDef
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> LogicDef -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 LogicDef
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Newlogic_defn" [Int
a', Int
b'] []) ATermTable
att2
Newcomorphism_defn a :: ComorphismDef
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ComorphismDef -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 ComorphismDef
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Newcomorphism_defn" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, LIB_ITEM)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Spec_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, GENERICITY)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: GENERICITY
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Annoted SPEC
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Range
d') ->
(ATermTable
att4, SPEC_NAME -> GENERICITY -> Annoted SPEC -> Range -> LIB_ITEM
Spec_defn SPEC_NAME
a' GENERICITY
b' Annoted SPEC
c' Range
d') }}}}
ShAAppl "View_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, GENERICITY)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: GENERICITY
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, VIEW_TYPE)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: VIEW_TYPE
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [G_mapping])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: [G_mapping]
d') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
e ATermTable
att4 of
{ (att5 :: ATermTable
att5, e' :: Range
e') ->
(ATermTable
att5, SPEC_NAME
-> GENERICITY -> VIEW_TYPE -> [G_mapping] -> Range -> LIB_ITEM
View_defn SPEC_NAME
a' GENERICITY
b' VIEW_TYPE
c' [G_mapping]
d' Range
e') }}}}}
ShAAppl "Entail_defn" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, ENTAIL_TYPE)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: ENTAIL_TYPE
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, SPEC_NAME -> ENTAIL_TYPE -> Range -> LIB_ITEM
Entail_defn SPEC_NAME
a' ENTAIL_TYPE
b' Range
c') }}}
ShAAppl "Equiv_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, EQUIV_TYPE)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: EQUIV_TYPE
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, OmsOrNetwork)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: OmsOrNetwork
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Range
d') ->
(ATermTable
att4, SPEC_NAME -> EQUIV_TYPE -> OmsOrNetwork -> Range -> LIB_ITEM
Equiv_defn SPEC_NAME
a' EQUIV_TYPE
b' OmsOrNetwork
c' Range
d') }}}}
ShAAppl "Align_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e, f :: Int
f] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph
-> Int -> ATermTable -> (ATermTable, Maybe ALIGN_ARITIES)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Maybe ALIGN_ARITIES
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, VIEW_TYPE)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: VIEW_TYPE
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [CORRESPONDENCE])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: [CORRESPONDENCE]
d') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, AlignSem)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
e ATermTable
att4 of
{ (att5 :: ATermTable
att5, e' :: AlignSem
e') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
f ATermTable
att5 of
{ (att6 :: ATermTable
att6, f' :: Range
f') ->
(ATermTable
att6, SPEC_NAME
-> Maybe ALIGN_ARITIES
-> VIEW_TYPE
-> [CORRESPONDENCE]
-> AlignSem
-> Range
-> LIB_ITEM
Align_defn SPEC_NAME
a' Maybe ALIGN_ARITIES
b' VIEW_TYPE
c' [CORRESPONDENCE]
d' AlignSem
e' Range
f') }}}}}}
ShAAppl "Module_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, MODULE_TYPE)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: MODULE_TYPE
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, G_symb_items_list)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: G_symb_items_list
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Range
d') ->
(ATermTable
att4, SPEC_NAME -> MODULE_TYPE -> G_symb_items_list -> Range -> LIB_ITEM
Module_defn SPEC_NAME
a' MODULE_TYPE
b' G_symb_items_list
c' Range
d') }}}}
ShAAppl "Query_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e, f :: Int
f] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, G_symb_items_list)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: G_symb_items_list
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, G_basic_spec)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: G_basic_spec
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Annoted SPEC
d') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Maybe SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
e ATermTable
att4 of
{ (att5 :: ATermTable
att5, e' :: Maybe SPEC_NAME
e') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
f ATermTable
att5 of
{ (att6 :: ATermTable
att6, f' :: Range
f') ->
(ATermTable
att6, SPEC_NAME
-> G_symb_items_list
-> G_basic_spec
-> Annoted SPEC
-> Maybe SPEC_NAME
-> Range
-> LIB_ITEM
Query_defn SPEC_NAME
a' G_symb_items_list
b' G_basic_spec
c' Annoted SPEC
d' Maybe SPEC_NAME
e' Range
f') }}}}}}
ShAAppl "Subst_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, VIEW_TYPE)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: VIEW_TYPE
b') ->
case LogicGraph
-> Int -> ATermTable -> (ATermTable, G_symb_map_items_list)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: G_symb_map_items_list
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Range
d') ->
(ATermTable
att4, SPEC_NAME
-> VIEW_TYPE -> G_symb_map_items_list -> Range -> LIB_ITEM
Subst_defn SPEC_NAME
a' VIEW_TYPE
b' G_symb_map_items_list
c' Range
d') }}}}
ShAAppl "Result_defn" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [SPEC_NAME])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [SPEC_NAME]
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: SPEC_NAME
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Bool
d') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
e ATermTable
att4 of
{ (att5 :: ATermTable
att5, e' :: Range
e') ->
(ATermTable
att5, SPEC_NAME -> [SPEC_NAME] -> SPEC_NAME -> Bool -> Range -> LIB_ITEM
Result_defn SPEC_NAME
a' [SPEC_NAME]
b' SPEC_NAME
c' Bool
d' Range
e') }}}}}
ShAAppl "Arch_spec_defn" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted ARCH_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Annoted ARCH_SPEC
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, SPEC_NAME -> Annoted ARCH_SPEC -> Range -> LIB_ITEM
Arch_spec_defn SPEC_NAME
a' Annoted ARCH_SPEC
b' Range
c') }}}
ShAAppl "Unit_spec_defn" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: UNIT_SPEC
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, SPEC_NAME -> UNIT_SPEC -> Range -> LIB_ITEM
Unit_spec_defn SPEC_NAME
a' UNIT_SPEC
b' Range
c') }}}
ShAAppl "Ref_spec_defn" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, REF_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: REF_SPEC
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, SPEC_NAME -> REF_SPEC -> Range -> LIB_ITEM
Ref_spec_defn SPEC_NAME
a' REF_SPEC
b' Range
c') }}}
ShAAppl "Network_defn" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Network)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Network
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, SPEC_NAME -> Network -> Range -> LIB_ITEM
Network_defn SPEC_NAME
a' Network
b' Range
c') }}}
ShAAppl "Download_items" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, LibName)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: LibName
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, DownloadItems)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: DownloadItems
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, LibName -> DownloadItems -> Range -> LIB_ITEM
Download_items LibName
a' DownloadItems
b' Range
c') }}}
ShAAppl "Logic_decl" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, LogicDescr)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: LogicDescr
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Range
b') ->
(ATermTable
att2, LogicDescr -> Range -> LIB_ITEM
Logic_decl LogicDescr
a' Range
b') }}
ShAAppl "Newlogic_defn" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, LogicDef)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: LogicDef
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Range
b') ->
(ATermTable
att2, LogicDef -> Range -> LIB_ITEM
Newlogic_defn LogicDef
a' Range
b') }}
ShAAppl "Newcomorphism_defn" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, ComorphismDef)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: ComorphismDef
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Range
b') ->
(ATermTable
att2, ComorphismDef -> Range -> LIB_ITEM
Newcomorphism_defn ComorphismDef
a' Range
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, LIB_ITEM)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.LIB_ITEM" ShATerm
u
instance ShATermLG Syntax.AS_Library.AlignSem where
toShATermLG :: ATermTable -> AlignSem -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: AlignSem
xv = case AlignSem
xv of
SingleDomain -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SingleDomain" [] []) ATermTable
att0
GlobalDomain -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "GlobalDomain" [] []) ATermTable
att0
ContextualizedDomain ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ContextualizedDomain" [] []) ATermTable
att0
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, AlignSem)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "SingleDomain" [] _ -> (ATermTable
att0, AlignSem
SingleDomain)
ShAAppl "GlobalDomain" [] _ -> (ATermTable
att0, AlignSem
GlobalDomain)
ShAAppl "ContextualizedDomain" [] _ -> (ATermTable
att0, AlignSem
ContextualizedDomain)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AlignSem)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.AlignSem" ShATerm
u
instance ShATermLG Syntax.AS_Library.DownloadItems where
toShATermLG :: ATermTable -> DownloadItems -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: DownloadItems
xv = case DownloadItems
xv of
ItemMaps a :: [ItemNameMap]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [ItemNameMap] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [ItemNameMap]
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ItemMaps" [Int
a'] []) ATermTable
att1
UniqueItem a :: SPEC_NAME
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_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 "UniqueItem" [Int
a'] []) ATermTable
att1
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DownloadItems)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "ItemMaps" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [ItemNameMap])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [ItemNameMap]
a') ->
(ATermTable
att1, [ItemNameMap] -> DownloadItems
ItemMaps [ItemNameMap]
a') }
ShAAppl "UniqueItem" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
(ATermTable
att1, SPEC_NAME -> DownloadItems
UniqueItem SPEC_NAME
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DownloadItems)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.DownloadItems" ShATerm
u
instance ShATermLG Syntax.AS_Library.GENERICITY where
toShATermLG :: ATermTable -> GENERICITY -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: GENERICITY
xv = case GENERICITY
xv of
Genericity a :: PARAMS
a b :: IMPORTED
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> PARAMS -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 PARAMS
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IMPORTED -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 IMPORTED
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Genericity" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, GENERICITY)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Genericity" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, PARAMS)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: PARAMS
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, IMPORTED)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: IMPORTED
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, PARAMS -> IMPORTED -> Range -> GENERICITY
Genericity PARAMS
a' IMPORTED
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, GENERICITY)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.GENERICITY" ShATerm
u
instance ShATermLG Syntax.AS_Library.PARAMS where
toShATermLG :: ATermTable -> PARAMS -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: PARAMS
xv = case PARAMS
xv of
Params a :: [Annoted SPEC]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted SPEC] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [Annoted SPEC]
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Params" [Int
a'] []) ATermTable
att1
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, PARAMS)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Params" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [Annoted SPEC])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [Annoted SPEC]
a') ->
(ATermTable
att1, [Annoted SPEC] -> PARAMS
Params [Annoted SPEC]
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PARAMS)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.PARAMS" ShATerm
u
instance ShATermLG Syntax.AS_Library.IMPORTED where
toShATermLG :: ATermTable -> IMPORTED -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: IMPORTED
xv = case IMPORTED
xv of
Imported a :: [Annoted SPEC]
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted SPEC] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [Annoted SPEC]
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Imported" [Int
a'] []) ATermTable
att1
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, IMPORTED)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Imported" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [Annoted SPEC])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [Annoted SPEC]
a') ->
(ATermTable
att1, [Annoted SPEC] -> IMPORTED
Imported [Annoted SPEC]
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, IMPORTED)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.IMPORTED" ShATerm
u
instance ShATermLG Syntax.AS_Library.VIEW_TYPE where
toShATermLG :: ATermTable -> VIEW_TYPE -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: VIEW_TYPE
xv = case VIEW_TYPE
xv of
View_type a :: Annoted SPEC
a b :: Annoted SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted SPEC
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Annoted SPEC
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "View_type" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, VIEW_TYPE)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "View_type" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted SPEC
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Annoted SPEC
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, Annoted SPEC -> Annoted SPEC -> Range -> VIEW_TYPE
View_type Annoted SPEC
a' Annoted SPEC
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, VIEW_TYPE)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.VIEW_TYPE" ShATerm
u
instance ShATermLG Syntax.AS_Library.EQUIV_TYPE where
toShATermLG :: ATermTable -> EQUIV_TYPE -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: EQUIV_TYPE
xv = case EQUIV_TYPE
xv of
Equiv_type a :: OmsOrNetwork
a b :: OmsOrNetwork
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OmsOrNetwork -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 OmsOrNetwork
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OmsOrNetwork -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 OmsOrNetwork
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Equiv_type" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, EQUIV_TYPE)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Equiv_type" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, OmsOrNetwork)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: OmsOrNetwork
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, OmsOrNetwork)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: OmsOrNetwork
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, OmsOrNetwork -> OmsOrNetwork -> Range -> EQUIV_TYPE
Equiv_type OmsOrNetwork
a' OmsOrNetwork
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, EQUIV_TYPE)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.EQUIV_TYPE" ShATerm
u
instance ShATermLG Syntax.AS_Library.MODULE_TYPE where
toShATermLG :: ATermTable -> MODULE_TYPE -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: MODULE_TYPE
xv = case MODULE_TYPE
xv of
Module_type a :: Annoted SPEC
a b :: Annoted SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted SPEC
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Annoted SPEC
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Module_type" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, MODULE_TYPE)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Module_type" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted SPEC
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Annoted SPEC
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, Annoted SPEC -> Annoted SPEC -> Range -> MODULE_TYPE
Module_type Annoted SPEC
a' Annoted SPEC
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, MODULE_TYPE)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.MODULE_TYPE" ShATerm
u
instance ShATermLG Syntax.AS_Library.ALIGN_ARITIES where
toShATermLG :: ATermTable -> ALIGN_ARITIES -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: ALIGN_ARITIES
xv = case ALIGN_ARITIES
xv of
Align_arities a :: ALIGN_ARITY
a b :: ALIGN_ARITY
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ALIGN_ARITY -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 ALIGN_ARITY
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ALIGN_ARITY -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 ALIGN_ARITY
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 "Align_arities" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ALIGN_ARITIES)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Align_arities" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, ALIGN_ARITY)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: ALIGN_ARITY
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, ALIGN_ARITY)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: ALIGN_ARITY
b') ->
(ATermTable
att2, ALIGN_ARITY -> ALIGN_ARITY -> ALIGN_ARITIES
Align_arities ALIGN_ARITY
a' ALIGN_ARITY
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ALIGN_ARITIES)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.ALIGN_ARITIES" ShATerm
u
instance ShATermLG Syntax.AS_Library.ALIGN_ARITY where
toShATermLG :: ATermTable -> ALIGN_ARITY -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: ALIGN_ARITY
xv = case ALIGN_ARITY
xv of
AA_InjectiveAndTotal ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AA_InjectiveAndTotal" [] []) ATermTable
att0
AA_Injective -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AA_Injective" [] []) ATermTable
att0
AA_Total -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AA_Total" [] []) ATermTable
att0
AA_NeitherInjectiveNorTotal ->
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AA_NeitherInjectiveNorTotal" [] []) ATermTable
att0
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ALIGN_ARITY)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "AA_InjectiveAndTotal" [] _ -> (ATermTable
att0, ALIGN_ARITY
AA_InjectiveAndTotal)
ShAAppl "AA_Injective" [] _ -> (ATermTable
att0, ALIGN_ARITY
AA_Injective)
ShAAppl "AA_Total" [] _ -> (ATermTable
att0, ALIGN_ARITY
AA_Total)
ShAAppl "AA_NeitherInjectiveNorTotal" [] _ -> (ATermTable
att0, ALIGN_ARITY
AA_NeitherInjectiveNorTotal)
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ALIGN_ARITY)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.ALIGN_ARITY" ShATerm
u
instance ShATermLG Syntax.AS_Library.OmsOrNetwork where
toShATermLG :: ATermTable -> OmsOrNetwork -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: OmsOrNetwork
xv = case OmsOrNetwork
xv of
MkOms a :: Annoted SPEC
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted SPEC
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "MkOms" [Int
a'] []) ATermTable
att1
MkNetwork a :: Network
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Network -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Network
a
(ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "MkNetwork" [Int
a'] []) ATermTable
att1
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, OmsOrNetwork)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "MkOms" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted SPEC
a') ->
(ATermTable
att1, Annoted SPEC -> OmsOrNetwork
MkOms Annoted SPEC
a') }
ShAAppl "MkNetwork" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Network)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Network
a') ->
(ATermTable
att1, Network -> OmsOrNetwork
MkNetwork Network
a') }
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OmsOrNetwork)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.OmsOrNetwork" ShATerm
u
instance ShATermLG Syntax.AS_Library.ENTAIL_TYPE where
toShATermLG :: ATermTable -> ENTAIL_TYPE -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: ENTAIL_TYPE
xv = case ENTAIL_TYPE
xv of
Entail_type a :: OmsOrNetwork
a b :: OmsOrNetwork
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OmsOrNetwork -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 OmsOrNetwork
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OmsOrNetwork -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 OmsOrNetwork
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "Entail_type" [Int
a', Int
b', Int
c'] []) ATermTable
att3
OMSInNetwork a :: SPEC_NAME
a b :: Network
b c :: SPEC
c d :: Range
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Network -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Network
b
(att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 SPEC
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Range -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' 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 "OMSInNetwork" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ENTAIL_TYPE)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Entail_type" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, OmsOrNetwork)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: OmsOrNetwork
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, OmsOrNetwork)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: OmsOrNetwork
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: Range
c') ->
(ATermTable
att3, OmsOrNetwork -> OmsOrNetwork -> Range -> ENTAIL_TYPE
Entail_type OmsOrNetwork
a' OmsOrNetwork
b' Range
c') }}}
ShAAppl "OMSInNetwork" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Network)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Network
b') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: SPEC
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Range)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: Range
d') ->
(ATermTable
att4, SPEC_NAME -> Network -> SPEC -> Range -> ENTAIL_TYPE
OMSInNetwork SPEC_NAME
a' Network
b' SPEC
c' Range
d') }}}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ENTAIL_TYPE)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.ENTAIL_TYPE" ShATerm
u
instance ShATermLG Syntax.AS_Library.ItemNameMap where
toShATermLG :: ATermTable -> ItemNameMap -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: ItemNameMap
xv = case ItemNameMap
xv of
ItemNameMap a :: SPEC_NAME
a b :: Maybe SPEC_NAME
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 SPEC_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe SPEC_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Maybe SPEC_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 "ItemNameMap" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ItemNameMap)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "ItemNameMap" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: SPEC_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Maybe SPEC_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Maybe SPEC_NAME
b') ->
(ATermTable
att2, SPEC_NAME -> Maybe SPEC_NAME -> ItemNameMap
ItemNameMap SPEC_NAME
a' Maybe SPEC_NAME
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ItemNameMap)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Library.ItemNameMap" ShATerm
u