{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
module ATC.AS_Architecture () where
import ATC.AS_Structured
import ATC.Grothendieck
import ATerm.Lib
import Common.AS_Annotation
import Common.IRI
import Common.Id
import Data.Typeable
import Syntax.AS_Architecture
import Syntax.AS_Structured
instance ShATermLG Syntax.AS_Architecture.FIT_ARG_UNIT where
toShATermLG :: ATermTable -> FIT_ARG_UNIT -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: FIT_ARG_UNIT
xv = case FIT_ARG_UNIT
xv of
Fit_arg_unit a :: Annoted UNIT_TERM
a b :: [G_mapping]
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted UNIT_TERM -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted UNIT_TERM
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [G_mapping] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 [G_mapping]
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 "Fit_arg_unit" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, FIT_ARG_UNIT)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Fit_arg_unit" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted UNIT_TERM)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted UNIT_TERM
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [G_mapping])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [G_mapping]
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 UNIT_TERM -> [G_mapping] -> Range -> FIT_ARG_UNIT
Fit_arg_unit Annoted UNIT_TERM
a' [G_mapping]
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, FIT_ARG_UNIT)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.FIT_ARG_UNIT" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.UNIT_TERM where
toShATermLG :: ATermTable -> UNIT_TERM -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: UNIT_TERM
xv = case UNIT_TERM
xv of
Unit_reduction a :: Annoted UNIT_TERM
a b :: RESTRICTION
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted UNIT_TERM -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted UNIT_TERM
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> RESTRICTION -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 RESTRICTION
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 "Unit_reduction" [Int
a', Int
b'] []) ATermTable
att2
Unit_translation a :: Annoted UNIT_TERM
a b :: RENAMING
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted UNIT_TERM -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted UNIT_TERM
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> RENAMING -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 RENAMING
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 "Unit_translation" [Int
a', Int
b'] []) ATermTable
att2
Amalgamation a :: [Annoted UNIT_TERM]
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted UNIT_TERM] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [Annoted UNIT_TERM]
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 "Amalgamation" [Int
a', Int
b'] []) ATermTable
att2
Local_unit a :: [Annoted UNIT_DECL_DEFN]
a b :: Annoted UNIT_TERM
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted UNIT_DECL_DEFN] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [Annoted UNIT_DECL_DEFN]
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annoted UNIT_TERM -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Annoted UNIT_TERM
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 "Local_unit" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Unit_appl a :: UNIT_NAME
a b :: [FIT_ARG_UNIT]
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [FIT_ARG_UNIT] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 [FIT_ARG_UNIT]
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_appl" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Group_unit_term a :: Annoted UNIT_TERM
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted UNIT_TERM -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted UNIT_TERM
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 "Group_unit_term" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_TERM)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_reduction" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted UNIT_TERM)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted UNIT_TERM
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, RESTRICTION)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: RESTRICTION
b') ->
(ATermTable
att2, Annoted UNIT_TERM -> RESTRICTION -> UNIT_TERM
Unit_reduction Annoted UNIT_TERM
a' RESTRICTION
b') }}
ShAAppl "Unit_translation" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted UNIT_TERM)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted UNIT_TERM
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, RENAMING)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: RENAMING
b') ->
(ATermTable
att2, Annoted UNIT_TERM -> RENAMING -> UNIT_TERM
Unit_translation Annoted UNIT_TERM
a' RENAMING
b') }}
ShAAppl "Amalgamation" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph
-> Int -> ATermTable -> (ATermTable, [Annoted UNIT_TERM])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [Annoted UNIT_TERM]
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, [Annoted UNIT_TERM] -> Range -> UNIT_TERM
Amalgamation [Annoted UNIT_TERM]
a' Range
b') }}
ShAAppl "Local_unit" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph
-> Int -> ATermTable -> (ATermTable, [Annoted UNIT_DECL_DEFN])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [Annoted UNIT_DECL_DEFN]
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted UNIT_TERM)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Annoted UNIT_TERM
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 UNIT_DECL_DEFN] -> Annoted UNIT_TERM -> Range -> UNIT_TERM
Local_unit [Annoted UNIT_DECL_DEFN]
a' Annoted UNIT_TERM
b' Range
c') }}}
ShAAppl "Unit_appl" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [FIT_ARG_UNIT])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: [FIT_ARG_UNIT]
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, UNIT_NAME -> [FIT_ARG_UNIT] -> Range -> UNIT_TERM
Unit_appl UNIT_NAME
a' [FIT_ARG_UNIT]
b' Range
c') }}}
ShAAppl "Group_unit_term" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted UNIT_TERM)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted UNIT_TERM
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, Annoted UNIT_TERM -> Range -> UNIT_TERM
Group_unit_term Annoted UNIT_TERM
a' Range
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UNIT_TERM)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.UNIT_TERM" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.UNIT_BINDING where
toShATermLG :: ATermTable -> UNIT_BINDING -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: UNIT_BINDING
xv = case UNIT_BINDING
xv of
Unit_binding a :: UNIT_NAME
a b :: UNIT_SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_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_binding" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_BINDING)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_binding" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_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, UNIT_NAME -> UNIT_SPEC -> Range -> UNIT_BINDING
Unit_binding UNIT_NAME
a' UNIT_SPEC
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UNIT_BINDING)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.UNIT_BINDING" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.UNIT_EXPRESSION where
toShATermLG :: ATermTable -> UNIT_EXPRESSION -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: UNIT_EXPRESSION
xv = case UNIT_EXPRESSION
xv of
Unit_expression a :: [UNIT_BINDING]
a b :: Annoted UNIT_TERM
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [UNIT_BINDING] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [UNIT_BINDING]
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annoted UNIT_TERM -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Annoted UNIT_TERM
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_expression" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_EXPRESSION)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_expression" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [UNIT_BINDING])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [UNIT_BINDING]
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted UNIT_TERM)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Annoted UNIT_TERM
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, [UNIT_BINDING] -> Annoted UNIT_TERM -> Range -> UNIT_EXPRESSION
Unit_expression [UNIT_BINDING]
a' Annoted UNIT_TERM
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UNIT_EXPRESSION)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.UNIT_EXPRESSION" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.UNIT_REF where
toShATermLG :: ATermTable -> UNIT_REF -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: UNIT_REF
xv = case UNIT_REF
xv of
Unit_ref a :: UNIT_NAME
a b :: REF_SPEC
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_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 "Unit_ref" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_REF)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_ref" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_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, UNIT_NAME -> REF_SPEC -> Range -> UNIT_REF
Unit_ref UNIT_NAME
a' REF_SPEC
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UNIT_REF)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.UNIT_REF" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.REF_SPEC where
toShATermLG :: ATermTable -> REF_SPEC -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: REF_SPEC
xv = case REF_SPEC
xv of
Unit_spec a :: UNIT_SPEC
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_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 "Unit_spec" [Int
a'] []) ATermTable
att1
Refinement a :: Bool
a b :: UNIT_SPEC
b c :: [G_mapping]
c d :: REF_SPEC
d e :: Range
e -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Bool -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Bool
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 -> [G_mapping] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 [G_mapping]
c
(att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> REF_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att3 REF_SPEC
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 "Refinement" [Int
a', Int
b', Int
c', Int
d',
Int
e'] []) ATermTable
att5
Arch_unit_spec a :: Annoted ARCH_SPEC
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted ARCH_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted ARCH_SPEC
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 "Arch_unit_spec" [Int
a', Int
b'] []) ATermTable
att2
Compose_ref a :: [REF_SPEC]
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [REF_SPEC] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [REF_SPEC]
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 "Compose_ref" [Int
a', Int
b'] []) ATermTable
att2
Component_ref a :: [UNIT_REF]
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [UNIT_REF] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [UNIT_REF]
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 "Component_ref" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, REF_SPEC)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_spec" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_SPEC
a') ->
(ATermTable
att1, UNIT_SPEC -> REF_SPEC
Unit_spec UNIT_SPEC
a') }
ShAAppl "Refinement" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Bool)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Bool
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, [G_mapping])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: [G_mapping]
c') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, REF_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
d ATermTable
att3 of
{ (att4 :: ATermTable
att4, d' :: REF_SPEC
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, Bool -> UNIT_SPEC -> [G_mapping] -> REF_SPEC -> Range -> REF_SPEC
Refinement Bool
a' UNIT_SPEC
b' [G_mapping]
c' REF_SPEC
d' Range
e') }}}}}
ShAAppl "Arch_unit_spec" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted ARCH_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted ARCH_SPEC
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, Annoted ARCH_SPEC -> Range -> REF_SPEC
Arch_unit_spec Annoted ARCH_SPEC
a' Range
b') }}
ShAAppl "Compose_ref" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [REF_SPEC])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [REF_SPEC]
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, [REF_SPEC] -> Range -> REF_SPEC
Compose_ref [REF_SPEC]
a' Range
b') }}
ShAAppl "Component_ref" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, [UNIT_REF])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [UNIT_REF]
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, [UNIT_REF] -> Range -> REF_SPEC
Component_ref [UNIT_REF]
a' Range
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, REF_SPEC)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.REF_SPEC" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.UNIT_SPEC where
toShATermLG :: ATermTable -> UNIT_SPEC -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: UNIT_SPEC
xv = case UNIT_SPEC
xv of
Unit_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 "Unit_type" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Spec_name a :: UNIT_NAME
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_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 "Spec_name" [Int
a'] []) ATermTable
att1
Closed_unit_spec a :: UNIT_SPEC
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_SPEC
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 "Closed_unit_spec" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_SPEC)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_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 -> UNIT_SPEC
Unit_type [Annoted SPEC]
a' Annoted SPEC
b' Range
c') }}}
ShAAppl "Spec_name" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_NAME
a') ->
(ATermTable
att1, UNIT_NAME -> UNIT_SPEC
Spec_name UNIT_NAME
a') }
ShAAppl "Closed_unit_spec" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_SPEC
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, UNIT_SPEC -> Range -> UNIT_SPEC
Closed_unit_spec UNIT_SPEC
a' Range
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UNIT_SPEC)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.UNIT_SPEC" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.UNIT_DECL_DEFN where
toShATermLG :: ATermTable -> UNIT_DECL_DEFN -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: UNIT_DECL_DEFN
xv = case UNIT_DECL_DEFN
xv of
Unit_decl a :: UNIT_NAME
a b :: REF_SPEC
b c :: [Annoted UNIT_TERM]
c d :: Range
d -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_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 -> [Annoted UNIT_TERM] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att2 [Annoted UNIT_TERM]
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 "Unit_decl" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
Unit_defn a :: UNIT_NAME
a b :: UNIT_EXPRESSION
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_NAME
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UNIT_EXPRESSION -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 UNIT_EXPRESSION
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_defn" [Int
a', Int
b', Int
c'] []) ATermTable
att3
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_DECL_DEFN)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Unit_decl" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_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, [Annoted UNIT_TERM])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
c ATermTable
att2 of
{ (att3 :: ATermTable
att3, c' :: [Annoted UNIT_TERM]
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, UNIT_NAME
-> REF_SPEC -> [Annoted UNIT_TERM] -> Range -> UNIT_DECL_DEFN
Unit_decl UNIT_NAME
a' REF_SPEC
b' [Annoted UNIT_TERM]
c' Range
d') }}}}
ShAAppl "Unit_defn" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_NAME
a') ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_EXPRESSION)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: UNIT_EXPRESSION
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, UNIT_NAME -> UNIT_EXPRESSION -> Range -> UNIT_DECL_DEFN
Unit_defn UNIT_NAME
a' UNIT_EXPRESSION
b' Range
c') }}}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UNIT_DECL_DEFN)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.UNIT_DECL_DEFN" ShATerm
u
instance ShATermLG Syntax.AS_Architecture.ARCH_SPEC where
toShATermLG :: ATermTable -> ARCH_SPEC -> IO (ATermTable, Int)
toShATermLG att0 :: ATermTable
att0 xv :: ARCH_SPEC
xv = case ARCH_SPEC
xv of
Basic_arch_spec a :: [Annoted UNIT_DECL_DEFN]
a b :: Annoted UNIT_EXPRESSION
b c :: Range
c -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annoted UNIT_DECL_DEFN] -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 [Annoted UNIT_DECL_DEFN]
a
(att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Annoted UNIT_EXPRESSION -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att1 Annoted UNIT_EXPRESSION
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 "Basic_arch_spec" [Int
a', Int
b', Int
c'] []) ATermTable
att3
Arch_spec_name a :: UNIT_NAME
a -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> UNIT_NAME -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 UNIT_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 "Arch_spec_name" [Int
a'] []) ATermTable
att1
Group_arch_spec a :: Annoted ARCH_SPEC
a b :: Range
b -> do
(att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Annoted ARCH_SPEC -> IO (ATermTable, Int)
forall t. ShATermLG t => ATermTable -> t -> IO (ATermTable, Int)
toShATermLG' ATermTable
att0 Annoted ARCH_SPEC
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 "Group_arch_spec" [Int
a', Int
b'] []) ATermTable
att2
fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ARCH_SPEC)
fromShATermLG lg :: LogicGraph
lg ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
ShAAppl "Basic_arch_spec" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
case LogicGraph
-> Int -> ATermTable -> (ATermTable, [Annoted UNIT_DECL_DEFN])
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: [Annoted UNIT_DECL_DEFN]
a') ->
case LogicGraph
-> Int -> ATermTable -> (ATermTable, Annoted UNIT_EXPRESSION)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
b ATermTable
att1 of
{ (att2 :: ATermTable
att2, b' :: Annoted UNIT_EXPRESSION
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 UNIT_DECL_DEFN]
-> Annoted UNIT_EXPRESSION -> Range -> ARCH_SPEC
Basic_arch_spec [Annoted UNIT_DECL_DEFN]
a' Annoted UNIT_EXPRESSION
b' Range
c') }}}
ShAAppl "Arch_spec_name" [a :: Int
a] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, UNIT_NAME)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: UNIT_NAME
a') ->
(ATermTable
att1, UNIT_NAME -> ARCH_SPEC
Arch_spec_name UNIT_NAME
a') }
ShAAppl "Group_arch_spec" [a :: Int
a, b :: Int
b] _ ->
case LogicGraph -> Int -> ATermTable -> (ATermTable, Annoted ARCH_SPEC)
forall t.
ShATermLG t =>
LogicGraph -> Int -> ATermTable -> (ATermTable, t)
fromShATermLG' LogicGraph
lg Int
a ATermTable
att0 of
{ (att1 :: ATermTable
att1, a' :: Annoted ARCH_SPEC
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, Annoted ARCH_SPEC -> Range -> ARCH_SPEC
Group_arch_spec Annoted ARCH_SPEC
a' Range
b') }}
u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ARCH_SPEC)
forall a. String -> ShATerm -> a
fromShATermError "Syntax.AS_Architecture.ARCH_SPEC" ShATerm
u