{-# LANGUAGE DeriveGeneric #-}

module Sygus.Syntax where

import Data.Hashable
import GHC.Generics (Generic)

data Lit = LitNum Integer 
         | LitDec Integer Integer
         | LitBool Bool
         | Hexidecimal String
         | Binary String
         | LitStr String deriving (Lit -> Lit -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Lit -> Lit -> Bool
$c/= :: Lit -> Lit -> Bool
== :: Lit -> Lit -> Bool
$c== :: Lit -> Lit -> Bool
Eq, Int -> Lit -> ShowS
[Lit] -> ShowS
Lit -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Lit] -> ShowS
$cshowList :: [Lit] -> ShowS
show :: Lit -> Symbol
$cshow :: Lit -> Symbol
showsPrec :: Int -> Lit -> ShowS
$cshowsPrec :: Int -> Lit -> ShowS
Show, ReadPrec [Lit]
ReadPrec Lit
Int -> ReadS Lit
ReadS [Lit]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Lit]
$creadListPrec :: ReadPrec [Lit]
readPrec :: ReadPrec Lit
$creadPrec :: ReadPrec Lit
readList :: ReadS [Lit]
$creadList :: ReadS [Lit]
readsPrec :: Int -> ReadS Lit
$creadsPrec :: Int -> ReadS Lit
Read, forall x. Rep Lit x -> Lit
forall x. Lit -> Rep Lit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Lit x -> Lit
$cfrom :: forall x. Lit -> Rep Lit x
Generic)

instance Hashable Lit

type Symbol = String

data Cmd = CheckSynth
         | Constraint Term
         | DeclareVar Symbol Sort
         | InvConstraint Symbol Symbol Symbol Symbol
         | SetFeature Feature Bool
         | SynthFun Symbol [SortedVar] Sort (Maybe GrammarDef)
         | SynthInv Symbol [SortedVar] (Maybe GrammarDef)
         | SmtCmd SmtCmd
         deriving (Cmd -> Cmd -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cmd -> Cmd -> Bool
$c/= :: Cmd -> Cmd -> Bool
== :: Cmd -> Cmd -> Bool
$c== :: Cmd -> Cmd -> Bool
Eq, Int -> Cmd -> ShowS
[Cmd] -> ShowS
Cmd -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Cmd] -> ShowS
$cshowList :: [Cmd] -> ShowS
show :: Cmd -> Symbol
$cshow :: Cmd -> Symbol
showsPrec :: Int -> Cmd -> ShowS
$cshowsPrec :: Int -> Cmd -> ShowS
Show, ReadPrec [Cmd]
ReadPrec Cmd
Int -> ReadS Cmd
ReadS [Cmd]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Cmd]
$creadListPrec :: ReadPrec [Cmd]
readPrec :: ReadPrec Cmd
$creadPrec :: ReadPrec Cmd
readList :: ReadS [Cmd]
$creadList :: ReadS [Cmd]
readsPrec :: Int -> ReadS Cmd
$creadsPrec :: Int -> ReadS Cmd
Read, forall x. Rep Cmd x -> Cmd
forall x. Cmd -> Rep Cmd x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Cmd x -> Cmd
$cfrom :: forall x. Cmd -> Rep Cmd x
Generic)

instance Hashable Cmd

data Identifier = ISymb Symbol
                | Indexed Symbol [Index]
                deriving (Identifier -> Identifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Identifier -> Identifier -> Bool
$c/= :: Identifier -> Identifier -> Bool
== :: Identifier -> Identifier -> Bool
$c== :: Identifier -> Identifier -> Bool
Eq, Int -> Identifier -> ShowS
[Identifier] -> ShowS
Identifier -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Identifier] -> ShowS
$cshowList :: [Identifier] -> ShowS
show :: Identifier -> Symbol
$cshow :: Identifier -> Symbol
showsPrec :: Int -> Identifier -> ShowS
$cshowsPrec :: Int -> Identifier -> ShowS
Show, ReadPrec [Identifier]
ReadPrec Identifier
Int -> ReadS Identifier
ReadS [Identifier]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Identifier]
$creadListPrec :: ReadPrec [Identifier]
readPrec :: ReadPrec Identifier
$creadPrec :: ReadPrec Identifier
readList :: ReadS [Identifier]
$creadList :: ReadS [Identifier]
readsPrec :: Int -> ReadS Identifier
$creadsPrec :: Int -> ReadS Identifier
Read, forall x. Rep Identifier x -> Identifier
forall x. Identifier -> Rep Identifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Identifier x -> Identifier
$cfrom :: forall x. Identifier -> Rep Identifier x
Generic)

instance Hashable Identifier

data Index = IndNumeral Integer
           | IndSymb Symbol
           deriving (Index -> Index -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Index -> Index -> Bool
$c/= :: Index -> Index -> Bool
== :: Index -> Index -> Bool
$c== :: Index -> Index -> Bool
Eq, Int -> Index -> ShowS
[Index] -> ShowS
Index -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Index] -> ShowS
$cshowList :: [Index] -> ShowS
show :: Index -> Symbol
$cshow :: Index -> Symbol
showsPrec :: Int -> Index -> ShowS
$cshowsPrec :: Int -> Index -> ShowS
Show, ReadPrec [Index]
ReadPrec Index
Int -> ReadS Index
ReadS [Index]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Index]
$creadListPrec :: ReadPrec [Index]
readPrec :: ReadPrec Index
$creadPrec :: ReadPrec Index
readList :: ReadS [Index]
$creadList :: ReadS [Index]
readsPrec :: Int -> ReadS Index
$creadsPrec :: Int -> ReadS Index
Read, forall x. Rep Index x -> Index
forall x. Index -> Rep Index x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Index x -> Index
$cfrom :: forall x. Index -> Rep Index x
Generic)

instance Hashable Index

data Sort = IdentSort Identifier
          | IdentSortSort Identifier [Sort]
          deriving (Sort -> Sort -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Sort -> Sort -> Bool
$c/= :: Sort -> Sort -> Bool
== :: Sort -> Sort -> Bool
$c== :: Sort -> Sort -> Bool
Eq, Int -> Sort -> ShowS
[Sort] -> ShowS
Sort -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Sort] -> ShowS
$cshowList :: [Sort] -> ShowS
show :: Sort -> Symbol
$cshow :: Sort -> Symbol
showsPrec :: Int -> Sort -> ShowS
$cshowsPrec :: Int -> Sort -> ShowS
Show, ReadPrec [Sort]
ReadPrec Sort
Int -> ReadS Sort
ReadS [Sort]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Sort]
$creadListPrec :: ReadPrec [Sort]
readPrec :: ReadPrec Sort
$creadPrec :: ReadPrec Sort
readList :: ReadS [Sort]
$creadList :: ReadS [Sort]
readsPrec :: Int -> ReadS Sort
$creadsPrec :: Int -> ReadS Sort
Read, forall x. Rep Sort x -> Sort
forall x. Sort -> Rep Sort x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Sort x -> Sort
$cfrom :: forall x. Sort -> Rep Sort x
Generic)

instance Hashable Sort

data Term = TermIdent Identifier
          | TermLit Lit
          | TermCall Identifier [Term]
          | TermExists [SortedVar] Term
          | TermForAll [SortedVar] Term
          | TermLet [VarBinding] Term
          deriving (Term -> Term -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Term -> Term -> Bool
$c/= :: Term -> Term -> Bool
== :: Term -> Term -> Bool
$c== :: Term -> Term -> Bool
Eq, Int -> Term -> ShowS
[Term] -> ShowS
Term -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Term] -> ShowS
$cshowList :: [Term] -> ShowS
show :: Term -> Symbol
$cshow :: Term -> Symbol
showsPrec :: Int -> Term -> ShowS
$cshowsPrec :: Int -> Term -> ShowS
Show, ReadPrec [Term]
ReadPrec Term
Int -> ReadS Term
ReadS [Term]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Term]
$creadListPrec :: ReadPrec [Term]
readPrec :: ReadPrec Term
$creadPrec :: ReadPrec Term
readList :: ReadS [Term]
$creadList :: ReadS [Term]
readsPrec :: Int -> ReadS Term
$creadsPrec :: Int -> ReadS Term
Read, forall x. Rep Term x -> Term
forall x. Term -> Rep Term x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Term x -> Term
$cfrom :: forall x. Term -> Rep Term x
Generic)

instance Hashable Term

data BfTerm = BfIdentifier Identifier
            | BfLiteral Lit
            | BfIdentifierBfs Identifier [BfTerm]
            deriving (BfTerm -> BfTerm -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BfTerm -> BfTerm -> Bool
$c/= :: BfTerm -> BfTerm -> Bool
== :: BfTerm -> BfTerm -> Bool
$c== :: BfTerm -> BfTerm -> Bool
Eq, Int -> BfTerm -> ShowS
[BfTerm] -> ShowS
BfTerm -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [BfTerm] -> ShowS
$cshowList :: [BfTerm] -> ShowS
show :: BfTerm -> Symbol
$cshow :: BfTerm -> Symbol
showsPrec :: Int -> BfTerm -> ShowS
$cshowsPrec :: Int -> BfTerm -> ShowS
Show, ReadPrec [BfTerm]
ReadPrec BfTerm
Int -> ReadS BfTerm
ReadS [BfTerm]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BfTerm]
$creadListPrec :: ReadPrec [BfTerm]
readPrec :: ReadPrec BfTerm
$creadPrec :: ReadPrec BfTerm
readList :: ReadS [BfTerm]
$creadList :: ReadS [BfTerm]
readsPrec :: Int -> ReadS BfTerm
$creadsPrec :: Int -> ReadS BfTerm
Read, forall x. Rep BfTerm x -> BfTerm
forall x. BfTerm -> Rep BfTerm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BfTerm x -> BfTerm
$cfrom :: forall x. BfTerm -> Rep BfTerm x
Generic)

instance Hashable BfTerm

data SortedVar = SortedVar Symbol Sort deriving (SortedVar -> SortedVar -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SortedVar -> SortedVar -> Bool
$c/= :: SortedVar -> SortedVar -> Bool
== :: SortedVar -> SortedVar -> Bool
$c== :: SortedVar -> SortedVar -> Bool
Eq, Int -> SortedVar -> ShowS
[SortedVar] -> ShowS
SortedVar -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [SortedVar] -> ShowS
$cshowList :: [SortedVar] -> ShowS
show :: SortedVar -> Symbol
$cshow :: SortedVar -> Symbol
showsPrec :: Int -> SortedVar -> ShowS
$cshowsPrec :: Int -> SortedVar -> ShowS
Show, ReadPrec [SortedVar]
ReadPrec SortedVar
Int -> ReadS SortedVar
ReadS [SortedVar]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SortedVar]
$creadListPrec :: ReadPrec [SortedVar]
readPrec :: ReadPrec SortedVar
$creadPrec :: ReadPrec SortedVar
readList :: ReadS [SortedVar]
$creadList :: ReadS [SortedVar]
readsPrec :: Int -> ReadS SortedVar
$creadsPrec :: Int -> ReadS SortedVar
Read, forall x. Rep SortedVar x -> SortedVar
forall x. SortedVar -> Rep SortedVar x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SortedVar x -> SortedVar
$cfrom :: forall x. SortedVar -> Rep SortedVar x
Generic)

instance Hashable SortedVar

data VarBinding = VarBinding Symbol Term deriving (VarBinding -> VarBinding -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VarBinding -> VarBinding -> Bool
$c/= :: VarBinding -> VarBinding -> Bool
== :: VarBinding -> VarBinding -> Bool
$c== :: VarBinding -> VarBinding -> Bool
Eq, Int -> VarBinding -> ShowS
[VarBinding] -> ShowS
VarBinding -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [VarBinding] -> ShowS
$cshowList :: [VarBinding] -> ShowS
show :: VarBinding -> Symbol
$cshow :: VarBinding -> Symbol
showsPrec :: Int -> VarBinding -> ShowS
$cshowsPrec :: Int -> VarBinding -> ShowS
Show, ReadPrec [VarBinding]
ReadPrec VarBinding
Int -> ReadS VarBinding
ReadS [VarBinding]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VarBinding]
$creadListPrec :: ReadPrec [VarBinding]
readPrec :: ReadPrec VarBinding
$creadPrec :: ReadPrec VarBinding
readList :: ReadS [VarBinding]
$creadList :: ReadS [VarBinding]
readsPrec :: Int -> ReadS VarBinding
$creadsPrec :: Int -> ReadS VarBinding
Read, forall x. Rep VarBinding x -> VarBinding
forall x. VarBinding -> Rep VarBinding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VarBinding x -> VarBinding
$cfrom :: forall x. VarBinding -> Rep VarBinding x
Generic)

instance Hashable VarBinding

data Feature = Grammars
             | FwdDecls
             | Recursion
             deriving (Feature -> Feature -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Feature -> Feature -> Bool
$c/= :: Feature -> Feature -> Bool
== :: Feature -> Feature -> Bool
$c== :: Feature -> Feature -> Bool
Eq, Int -> Feature -> ShowS
[Feature] -> ShowS
Feature -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [Feature] -> ShowS
$cshowList :: [Feature] -> ShowS
show :: Feature -> Symbol
$cshow :: Feature -> Symbol
showsPrec :: Int -> Feature -> ShowS
$cshowsPrec :: Int -> Feature -> ShowS
Show, ReadPrec [Feature]
ReadPrec Feature
Int -> ReadS Feature
ReadS [Feature]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Feature]
$creadListPrec :: ReadPrec [Feature]
readPrec :: ReadPrec Feature
$creadPrec :: ReadPrec Feature
readList :: ReadS [Feature]
$creadList :: ReadS [Feature]
readsPrec :: Int -> ReadS Feature
$creadsPrec :: Int -> ReadS Feature
Read, forall x. Rep Feature x -> Feature
forall x. Feature -> Rep Feature x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Feature x -> Feature
$cfrom :: forall x. Feature -> Rep Feature x
Generic)

instance Hashable Feature

data SmtCmd = DeclareDatatype Symbol DTDec
            | DeclareDatatypes [SortDecl] [DTDec]
            | DeclareSort Symbol Integer
            | DefineFun Symbol [SortedVar] Sort Term
            | DefineSort Symbol Sort
            | SetLogic Symbol
            | SetOption Symbol Lit
            deriving (SmtCmd -> SmtCmd -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SmtCmd -> SmtCmd -> Bool
$c/= :: SmtCmd -> SmtCmd -> Bool
== :: SmtCmd -> SmtCmd -> Bool
$c== :: SmtCmd -> SmtCmd -> Bool
Eq, Int -> SmtCmd -> ShowS
[SmtCmd] -> ShowS
SmtCmd -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [SmtCmd] -> ShowS
$cshowList :: [SmtCmd] -> ShowS
show :: SmtCmd -> Symbol
$cshow :: SmtCmd -> Symbol
showsPrec :: Int -> SmtCmd -> ShowS
$cshowsPrec :: Int -> SmtCmd -> ShowS
Show, ReadPrec [SmtCmd]
ReadPrec SmtCmd
Int -> ReadS SmtCmd
ReadS [SmtCmd]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SmtCmd]
$creadListPrec :: ReadPrec [SmtCmd]
readPrec :: ReadPrec SmtCmd
$creadPrec :: ReadPrec SmtCmd
readList :: ReadS [SmtCmd]
$creadList :: ReadS [SmtCmd]
readsPrec :: Int -> ReadS SmtCmd
$creadsPrec :: Int -> ReadS SmtCmd
Read, forall x. Rep SmtCmd x -> SmtCmd
forall x. SmtCmd -> Rep SmtCmd x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SmtCmd x -> SmtCmd
$cfrom :: forall x. SmtCmd -> Rep SmtCmd x
Generic)

instance Hashable SmtCmd

data SortDecl = SortDecl Symbol Integer deriving (SortDecl -> SortDecl -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SortDecl -> SortDecl -> Bool
$c/= :: SortDecl -> SortDecl -> Bool
== :: SortDecl -> SortDecl -> Bool
$c== :: SortDecl -> SortDecl -> Bool
Eq, Int -> SortDecl -> ShowS
[SortDecl] -> ShowS
SortDecl -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [SortDecl] -> ShowS
$cshowList :: [SortDecl] -> ShowS
show :: SortDecl -> Symbol
$cshow :: SortDecl -> Symbol
showsPrec :: Int -> SortDecl -> ShowS
$cshowsPrec :: Int -> SortDecl -> ShowS
Show, ReadPrec [SortDecl]
ReadPrec SortDecl
Int -> ReadS SortDecl
ReadS [SortDecl]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SortDecl]
$creadListPrec :: ReadPrec [SortDecl]
readPrec :: ReadPrec SortDecl
$creadPrec :: ReadPrec SortDecl
readList :: ReadS [SortDecl]
$creadList :: ReadS [SortDecl]
readsPrec :: Int -> ReadS SortDecl
$creadsPrec :: Int -> ReadS SortDecl
Read, forall x. Rep SortDecl x -> SortDecl
forall x. SortDecl -> Rep SortDecl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SortDecl x -> SortDecl
$cfrom :: forall x. SortDecl -> Rep SortDecl x
Generic)

instance Hashable SortDecl

data DTDec = DTDec [DTConsDec] deriving (DTDec -> DTDec -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DTDec -> DTDec -> Bool
$c/= :: DTDec -> DTDec -> Bool
== :: DTDec -> DTDec -> Bool
$c== :: DTDec -> DTDec -> Bool
Eq, Int -> DTDec -> ShowS
[DTDec] -> ShowS
DTDec -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [DTDec] -> ShowS
$cshowList :: [DTDec] -> ShowS
show :: DTDec -> Symbol
$cshow :: DTDec -> Symbol
showsPrec :: Int -> DTDec -> ShowS
$cshowsPrec :: Int -> DTDec -> ShowS
Show, ReadPrec [DTDec]
ReadPrec DTDec
Int -> ReadS DTDec
ReadS [DTDec]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DTDec]
$creadListPrec :: ReadPrec [DTDec]
readPrec :: ReadPrec DTDec
$creadPrec :: ReadPrec DTDec
readList :: ReadS [DTDec]
$creadList :: ReadS [DTDec]
readsPrec :: Int -> ReadS DTDec
$creadsPrec :: Int -> ReadS DTDec
Read, forall x. Rep DTDec x -> DTDec
forall x. DTDec -> Rep DTDec x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DTDec x -> DTDec
$cfrom :: forall x. DTDec -> Rep DTDec x
Generic)

instance Hashable DTDec

data DTConsDec = DTConsDec Symbol [SortedVar] deriving (DTConsDec -> DTConsDec -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DTConsDec -> DTConsDec -> Bool
$c/= :: DTConsDec -> DTConsDec -> Bool
== :: DTConsDec -> DTConsDec -> Bool
$c== :: DTConsDec -> DTConsDec -> Bool
Eq, Int -> DTConsDec -> ShowS
[DTConsDec] -> ShowS
DTConsDec -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [DTConsDec] -> ShowS
$cshowList :: [DTConsDec] -> ShowS
show :: DTConsDec -> Symbol
$cshow :: DTConsDec -> Symbol
showsPrec :: Int -> DTConsDec -> ShowS
$cshowsPrec :: Int -> DTConsDec -> ShowS
Show, ReadPrec [DTConsDec]
ReadPrec DTConsDec
Int -> ReadS DTConsDec
ReadS [DTConsDec]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DTConsDec]
$creadListPrec :: ReadPrec [DTConsDec]
readPrec :: ReadPrec DTConsDec
$creadPrec :: ReadPrec DTConsDec
readList :: ReadS [DTConsDec]
$creadList :: ReadS [DTConsDec]
readsPrec :: Int -> ReadS DTConsDec
$creadsPrec :: Int -> ReadS DTConsDec
Read, forall x. Rep DTConsDec x -> DTConsDec
forall x. DTConsDec -> Rep DTConsDec x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DTConsDec x -> DTConsDec
$cfrom :: forall x. DTConsDec -> Rep DTConsDec x
Generic)

instance Hashable DTConsDec

data GrammarDef = GrammarDef [SortedVar] [GroupedRuleList] deriving (GrammarDef -> GrammarDef -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GrammarDef -> GrammarDef -> Bool
$c/= :: GrammarDef -> GrammarDef -> Bool
== :: GrammarDef -> GrammarDef -> Bool
$c== :: GrammarDef -> GrammarDef -> Bool
Eq, Int -> GrammarDef -> ShowS
[GrammarDef] -> ShowS
GrammarDef -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [GrammarDef] -> ShowS
$cshowList :: [GrammarDef] -> ShowS
show :: GrammarDef -> Symbol
$cshow :: GrammarDef -> Symbol
showsPrec :: Int -> GrammarDef -> ShowS
$cshowsPrec :: Int -> GrammarDef -> ShowS
Show, ReadPrec [GrammarDef]
ReadPrec GrammarDef
Int -> ReadS GrammarDef
ReadS [GrammarDef]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GrammarDef]
$creadListPrec :: ReadPrec [GrammarDef]
readPrec :: ReadPrec GrammarDef
$creadPrec :: ReadPrec GrammarDef
readList :: ReadS [GrammarDef]
$creadList :: ReadS [GrammarDef]
readsPrec :: Int -> ReadS GrammarDef
$creadsPrec :: Int -> ReadS GrammarDef
Read, forall x. Rep GrammarDef x -> GrammarDef
forall x. GrammarDef -> Rep GrammarDef x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GrammarDef x -> GrammarDef
$cfrom :: forall x. GrammarDef -> Rep GrammarDef x
Generic)

instance Hashable GrammarDef

data GroupedRuleList = GroupedRuleList Symbol Sort [GTerm] deriving (GroupedRuleList -> GroupedRuleList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroupedRuleList -> GroupedRuleList -> Bool
$c/= :: GroupedRuleList -> GroupedRuleList -> Bool
== :: GroupedRuleList -> GroupedRuleList -> Bool
$c== :: GroupedRuleList -> GroupedRuleList -> Bool
Eq, Int -> GroupedRuleList -> ShowS
[GroupedRuleList] -> ShowS
GroupedRuleList -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [GroupedRuleList] -> ShowS
$cshowList :: [GroupedRuleList] -> ShowS
show :: GroupedRuleList -> Symbol
$cshow :: GroupedRuleList -> Symbol
showsPrec :: Int -> GroupedRuleList -> ShowS
$cshowsPrec :: Int -> GroupedRuleList -> ShowS
Show, ReadPrec [GroupedRuleList]
ReadPrec GroupedRuleList
Int -> ReadS GroupedRuleList
ReadS [GroupedRuleList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GroupedRuleList]
$creadListPrec :: ReadPrec [GroupedRuleList]
readPrec :: ReadPrec GroupedRuleList
$creadPrec :: ReadPrec GroupedRuleList
readList :: ReadS [GroupedRuleList]
$creadList :: ReadS [GroupedRuleList]
readsPrec :: Int -> ReadS GroupedRuleList
$creadsPrec :: Int -> ReadS GroupedRuleList
Read, forall x. Rep GroupedRuleList x -> GroupedRuleList
forall x. GroupedRuleList -> Rep GroupedRuleList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GroupedRuleList x -> GroupedRuleList
$cfrom :: forall x. GroupedRuleList -> Rep GroupedRuleList x
Generic)

instance Hashable GroupedRuleList

data GTerm = GConstant Sort
           | GVariable Sort
           | GBfTerm BfTerm
           deriving (GTerm -> GTerm -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GTerm -> GTerm -> Bool
$c/= :: GTerm -> GTerm -> Bool
== :: GTerm -> GTerm -> Bool
$c== :: GTerm -> GTerm -> Bool
Eq, Int -> GTerm -> ShowS
[GTerm] -> ShowS
GTerm -> Symbol
forall a.
(Int -> a -> ShowS) -> (a -> Symbol) -> ([a] -> ShowS) -> Show a
showList :: [GTerm] -> ShowS
$cshowList :: [GTerm] -> ShowS
show :: GTerm -> Symbol
$cshow :: GTerm -> Symbol
showsPrec :: Int -> GTerm -> ShowS
$cshowsPrec :: Int -> GTerm -> ShowS
Show, ReadPrec [GTerm]
ReadPrec GTerm
Int -> ReadS GTerm
ReadS [GTerm]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GTerm]
$creadListPrec :: ReadPrec [GTerm]
readPrec :: ReadPrec GTerm
$creadPrec :: ReadPrec GTerm
readList :: ReadS [GTerm]
$creadList :: ReadS [GTerm]
readsPrec :: Int -> ReadS GTerm
$creadsPrec :: Int -> ReadS GTerm
Read, forall x. Rep GTerm x -> GTerm
forall x. GTerm -> Rep GTerm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GTerm x -> GTerm
$cfrom :: forall x. GTerm -> Rep GTerm x
Generic)

instance Hashable GTerm