Safe Haskell | None |
---|---|
Language | Haskell2010 |
- parseProgram :: Text -> Maybe (ClingoWarning -> Text -> IO ()) -> Natural -> Clingo s [Statement (Symbol s) (Signature s)]
- fromPureAST :: (Monad (m s), MonadSymbol m) => [Statement PureSymbol PureSignature] -> m s [Statement (Symbol s) (Signature s)]
- toPureAST :: [Statement (Symbol s) (Signature s)] -> [Statement PureSymbol PureSignature]
- data Location = Location {}
- data Sign
- data Signature s
- data Symbol s
- data UnaryOperation a = UnaryOperation UnaryOperator (Term a)
- data UnaryOperator
- data BinaryOperation a = BinaryOperation BinaryOperator (Term a) (Term a)
- data BinaryOperator
- data Interval a = Interval (Term a) (Term a)
- data Function a = Function Text [Term a]
- data Pool a = Pool [Term a]
- data Term a
- = TermSymbol Location a
- | TermVariable Location Text
- | TermUOp Location (UnaryOperation a)
- | TermBOp Location (BinaryOperation a)
- | TermInterval Location (Interval a)
- | TermFunction Location (Function a)
- | TermExtFunction Location (Function a)
- | TermPool Location (Pool a)
- data CspProductTerm a = CspProductTerm Location (Term a) (Maybe (Term a))
- data CspSumTerm a = CspSumTerm Location [CspProductTerm a]
- data CspGuard a = CspGuard ComparisonOperator (CspSumTerm a)
- data ComparisonOperator
- data CspLiteral a = CspLiteral (CspSumTerm a) [CspGuard a]
- data Identifier = Identifier Location Text
- data Comparison a = Comparison ComparisonOperator (Term a) (Term a)
- data Literal a
- = LiteralBool Location Sign Bool
- | LiteralTerm Location Sign (Term a)
- | LiteralComp Location Sign (Comparison a)
- | LiteralCSPL Location Sign (CspLiteral a)
- data AggregateGuard a = AggregateGuard ComparisonOperator (Term a)
- data ConditionalLiteral a = ConditionalLiteral (Literal a) [Literal a]
- data Aggregate a = Aggregate [ConditionalLiteral a] (Maybe (AggregateGuard a)) (Maybe (AggregateGuard a))
- data BodyAggregateElement a = BodyAggregateElement [Term a] [Literal a]
- data BodyAggregate a = BodyAggregate AggregateFunction [BodyAggregateElement a] (Maybe (AggregateGuard a)) (Maybe (AggregateGuard a))
- data AggregateFunction
- data HeadAggregateElement a = HeadAggregateElement [Term a] (ConditionalLiteral a)
- data HeadAggregate a = HeadAggregate AggregateFunction [HeadAggregateElement a] (Maybe (AggregateGuard a)) (Maybe (AggregateGuard a))
- data Disjunction a = Disjunction [ConditionalLiteral a]
- data DisjointElement a = DisjointElement Location [Term a] (CspSumTerm a) [Literal a]
- data Disjoint a = Disjoint [DisjointElement a]
- data TheoryTermArray a = TheoryTermArray [TheoryTerm a]
- data TheoryFunction a = TheoryFunction Text [TheoryTerm a]
- data TheoryUnparsedTermElement a = TheoryUnparsedTermElement [Text] (TheoryTerm a)
- data TheoryUnparsedTerm a = TheoryUnparsedTerm [TheoryUnparsedTermElement a]
- data TheoryTerm a
- data TheoryAtomElement a = TheoryAtomElement [TheoryTerm a] [Literal a]
- data TheoryGuard a = TheoryGuard Text (TheoryTerm a)
- data TheoryAtom a = TheoryAtom (Term a) [TheoryAtomElement a] (TheoryGuard a)
- data HeadLiteral a
- data BodyLiteral a
- data TheoryOperatorDefinition = TheoryOperatorDefinition Location Text Natural TheoryOperatorType
- data TheoryOperatorType
- data TheoryTermDefinition = TheoryTermDefinition Location Text [TheoryOperatorDefinition]
- data TheoryGuardDefinition = TheoryGuardDefinition Text [Text]
- data TheoryAtomDefinition = TheoryAtomDefinition Location TheoryAtomDefinitionType Text Int Text TheoryGuardDefinition
- data TheoryAtomDefinitionType
- data TheoryDefinition = TheoryDefinition Text [TheoryTermDefinition] [TheoryAtomDefinition]
- data Rule a = Rule (HeadLiteral a) [BodyLiteral a]
- data Definition a = Definition Text (Term a) Bool
- data ShowSignature b = ShowSignature b Bool
- data ShowTerm a = ShowTerm (Term a) [BodyLiteral a] Bool
- data Minimize a = Minimize (Term a) (Term a) [Term a] [BodyLiteral a]
- data Script = Script ScriptType Text
- data ScriptType
- data Program = Program Text [Identifier]
- data External a = External (Term a) [BodyLiteral a]
- data Edge a = Edge (Term a) (Term a) [BodyLiteral a]
- data Heuristic a = Heuristic (Term a) [BodyLiteral a] (Term a) (Term a) (Term a)
- data Project a = Project (Term a) [BodyLiteral a]
- data Statement a b
- = StmtRule Location (Rule a)
- | StmtDefinition Location (Definition a)
- | StmtShowSignature Location (ShowSignature b)
- | StmtShowTerm Location (ShowTerm a)
- | StmtMinimize Location (Minimize a)
- | StmtScript Location Script
- | StmtProgram Location Program
- | StmtExternal Location (External a)
- | StmtEdge Location (Edge a)
- | StmtHeuristic Location (Heuristic a)
- | StmtProject Location (Project a)
- | StmtSignature Location b
- | StmtTheoryDefinition Location TheoryDefinition
Documentation
:: Text | Program |
-> Maybe (ClingoWarning -> Text -> IO ()) | Logger Callback |
-> Natural | Logger Call Limit |
-> Clingo s [Statement (Symbol s) (Signature s)] |
Parse a logic program into a list of statements.
fromPureAST :: (Monad (m s), MonadSymbol m) => [Statement PureSymbol PureSignature] -> m s [Statement (Symbol s) (Signature s)] Source #
An AST can be constructed in a pure environment using PureSymbol
and
PureSignature
and then registered with the solver when required. Creation
calls for the same symbol in multiple places will be repeated, i.e. no symbol
table is being created internally by this function!
toPureAST :: [Statement (Symbol s) (Signature s)] -> [Statement PureSymbol PureSignature] Source #
Location | |
|
data UnaryOperation a Source #
Functor UnaryOperation Source # | |
Foldable UnaryOperation Source # | |
Traversable UnaryOperation Source # | |
Eq a => Eq (UnaryOperation a) Source # | |
Ord a => Ord (UnaryOperation a) Source # | |
Show a => Show (UnaryOperation a) Source # | |
Pretty a => Pretty (UnaryOperation a) Source # | |
data UnaryOperator Source #
data BinaryOperation a Source #
BinaryOperation BinaryOperator (Term a) (Term a) |
Functor BinaryOperation Source # | |
Foldable BinaryOperation Source # | |
Traversable BinaryOperation Source # | |
Eq a => Eq (BinaryOperation a) Source # | |
Ord a => Ord (BinaryOperation a) Source # | |
Show a => Show (BinaryOperation a) Source # | |
Pretty a => Pretty (BinaryOperation a) Source # | |
data BinaryOperator Source #
data CspProductTerm a Source #
CspProductTerm Location (Term a) (Maybe (Term a)) |
Functor CspProductTerm Source # | |
Foldable CspProductTerm Source # | |
Traversable CspProductTerm Source # | |
Eq a => Eq (CspProductTerm a) Source # | |
Ord a => Ord (CspProductTerm a) Source # | |
Show a => Show (CspProductTerm a) Source # | |
data CspSumTerm a Source #
Functor CspSumTerm Source # | |
Foldable CspSumTerm Source # | |
Traversable CspSumTerm Source # | |
Eq a => Eq (CspSumTerm a) Source # | |
Ord a => Ord (CspSumTerm a) Source # | |
Show a => Show (CspSumTerm a) Source # | |
data ComparisonOperator Source #
data CspLiteral a Source #
CspLiteral (CspSumTerm a) [CspGuard a] |
Functor CspLiteral Source # | |
Foldable CspLiteral Source # | |
Traversable CspLiteral Source # | |
Eq a => Eq (CspLiteral a) Source # | |
Ord a => Ord (CspLiteral a) Source # | |
Show a => Show (CspLiteral a) Source # | |
data Identifier Source #
data Comparison a Source #
Comparison ComparisonOperator (Term a) (Term a) |
Functor Comparison Source # | |
Foldable Comparison Source # | |
Traversable Comparison Source # | |
Eq a => Eq (Comparison a) Source # | |
Ord a => Ord (Comparison a) Source # | |
Show a => Show (Comparison a) Source # | |
Pretty a => Pretty (Comparison a) Source # | |
data AggregateGuard a Source #
Functor AggregateGuard Source # | |
Foldable AggregateGuard Source # | |
Traversable AggregateGuard Source # | |
Eq a => Eq (AggregateGuard a) Source # | |
Ord a => Ord (AggregateGuard a) Source # | |
Show a => Show (AggregateGuard a) Source # | |
Pretty a => Pretty (AggregateGuard a) Source # | Instance describing left-guards. |
data ConditionalLiteral a Source #
ConditionalLiteral (Literal a) [Literal a] |
Functor ConditionalLiteral Source # | |
Foldable ConditionalLiteral Source # | |
Traversable ConditionalLiteral Source # | |
Eq a => Eq (ConditionalLiteral a) Source # | |
Ord a => Ord (ConditionalLiteral a) Source # | |
Show a => Show (ConditionalLiteral a) Source # | |
Pretty a => Pretty (ConditionalLiteral a) Source # | |
Aggregate [ConditionalLiteral a] (Maybe (AggregateGuard a)) (Maybe (AggregateGuard a)) |
data BodyAggregateElement a Source #
BodyAggregateElement [Term a] [Literal a] |
Functor BodyAggregateElement Source # | |
Foldable BodyAggregateElement Source # | |
Traversable BodyAggregateElement Source # | |
Eq a => Eq (BodyAggregateElement a) Source # | |
Ord a => Ord (BodyAggregateElement a) Source # | |
Show a => Show (BodyAggregateElement a) Source # | |
Pretty a => Pretty (BodyAggregateElement a) Source # | |
data BodyAggregate a Source #
BodyAggregate AggregateFunction [BodyAggregateElement a] (Maybe (AggregateGuard a)) (Maybe (AggregateGuard a)) |
Functor BodyAggregate Source # | |
Foldable BodyAggregate Source # | |
Traversable BodyAggregate Source # | |
Eq a => Eq (BodyAggregate a) Source # | |
Ord a => Ord (BodyAggregate a) Source # | |
Show a => Show (BodyAggregate a) Source # | |
Pretty a => Pretty (BodyAggregate a) Source # | |
data AggregateFunction Source #
data HeadAggregateElement a Source #
Functor HeadAggregateElement Source # | |
Foldable HeadAggregateElement Source # | |
Traversable HeadAggregateElement Source # | |
Eq a => Eq (HeadAggregateElement a) Source # | |
Ord a => Ord (HeadAggregateElement a) Source # | |
Show a => Show (HeadAggregateElement a) Source # | |
Pretty a => Pretty (HeadAggregateElement a) Source # | |
data HeadAggregate a Source #
HeadAggregate AggregateFunction [HeadAggregateElement a] (Maybe (AggregateGuard a)) (Maybe (AggregateGuard a)) |
Functor HeadAggregate Source # | |
Foldable HeadAggregate Source # | |
Traversable HeadAggregate Source # | |
Eq a => Eq (HeadAggregate a) Source # | |
Ord a => Ord (HeadAggregate a) Source # | |
Show a => Show (HeadAggregate a) Source # | |
Pretty a => Pretty (HeadAggregate a) Source # | |
data Disjunction a Source #
Functor Disjunction Source # | |
Foldable Disjunction Source # | |
Traversable Disjunction Source # | |
Eq a => Eq (Disjunction a) Source # | |
Ord a => Ord (Disjunction a) Source # | |
Show a => Show (Disjunction a) Source # | |
Pretty a => Pretty (Disjunction a) Source # | |
data DisjointElement a Source #
DisjointElement Location [Term a] (CspSumTerm a) [Literal a] |
Functor DisjointElement Source # | |
Foldable DisjointElement Source # | |
Traversable DisjointElement Source # | |
Eq a => Eq (DisjointElement a) Source # | |
Ord a => Ord (DisjointElement a) Source # | |
Show a => Show (DisjointElement a) Source # | |
data TheoryTermArray a Source #
Functor TheoryTermArray Source # | |
Foldable TheoryTermArray Source # | |
Traversable TheoryTermArray Source # | |
Eq a => Eq (TheoryTermArray a) Source # | |
Ord a => Ord (TheoryTermArray a) Source # | |
Show a => Show (TheoryTermArray a) Source # | |
data TheoryFunction a Source #
Functor TheoryFunction Source # | |
Foldable TheoryFunction Source # | |
Traversable TheoryFunction Source # | |
Eq a => Eq (TheoryFunction a) Source # | |
Ord a => Ord (TheoryFunction a) Source # | |
Show a => Show (TheoryFunction a) Source # | |
data TheoryUnparsedTermElement a Source #
data TheoryUnparsedTerm a Source #
Functor TheoryUnparsedTerm Source # | |
Foldable TheoryUnparsedTerm Source # | |
Traversable TheoryUnparsedTerm Source # | |
Eq a => Eq (TheoryUnparsedTerm a) Source # | |
Ord a => Ord (TheoryUnparsedTerm a) Source # | |
Show a => Show (TheoryUnparsedTerm a) Source # | |
data TheoryTerm a Source #
Functor TheoryTerm Source # | |
Foldable TheoryTerm Source # | |
Traversable TheoryTerm Source # | |
Eq a => Eq (TheoryTerm a) Source # | |
Ord a => Ord (TheoryTerm a) Source # | |
Show a => Show (TheoryTerm a) Source # | |
data TheoryAtomElement a Source #
TheoryAtomElement [TheoryTerm a] [Literal a] |
Functor TheoryAtomElement Source # | |
Foldable TheoryAtomElement Source # | |
Traversable TheoryAtomElement Source # | |
Eq a => Eq (TheoryAtomElement a) Source # | |
Ord a => Ord (TheoryAtomElement a) Source # | |
Show a => Show (TheoryAtomElement a) Source # | |
data TheoryGuard a Source #
Functor TheoryGuard Source # | |
Foldable TheoryGuard Source # | |
Traversable TheoryGuard Source # | |
Eq a => Eq (TheoryGuard a) Source # | |
Ord a => Ord (TheoryGuard a) Source # | |
Show a => Show (TheoryGuard a) Source # | |
data TheoryAtom a Source #
TheoryAtom (Term a) [TheoryAtomElement a] (TheoryGuard a) |
Functor TheoryAtom Source # | |
Foldable TheoryAtom Source # | |
Traversable TheoryAtom Source # | |
Eq a => Eq (TheoryAtom a) Source # | |
Ord a => Ord (TheoryAtom a) Source # | |
Show a => Show (TheoryAtom a) Source # | |
data HeadLiteral a Source #
HeadLiteral Location (Literal a) | |
HeadDisjunction Location (Disjunction a) | |
HeadLitAggregate Location (Aggregate a) | |
HeadHeadAggregate Location (HeadAggregate a) | |
HeadTheoryAtom Location (TheoryAtom a) |
Functor HeadLiteral Source # | |
Foldable HeadLiteral Source # | |
Traversable HeadLiteral Source # | |
Eq a => Eq (HeadLiteral a) Source # | |
Ord a => Ord (HeadLiteral a) Source # | |
Show a => Show (HeadLiteral a) Source # | |
Pretty a => Pretty (HeadLiteral a) Source # | |
data BodyLiteral a Source #
Functor BodyLiteral Source # | |
Foldable BodyLiteral Source # | |
Traversable BodyLiteral Source # | |
Eq a => Eq (BodyLiteral a) Source # | |
Ord a => Ord (BodyLiteral a) Source # | |
Show a => Show (BodyLiteral a) Source # | |
Pretty a => Pretty (BodyLiteral a) Source # | |
data TheoryOperatorType Source #
data TheoryTermDefinition Source #
data TheoryGuardDefinition Source #
data TheoryAtomDefinition Source #
data TheoryDefinition Source #
Rule (HeadLiteral a) [BodyLiteral a] |
data Definition a Source #
Definition Text (Term a) Bool |
Functor Definition Source # | |
Foldable Definition Source # | |
Traversable Definition Source # | |
Eq a => Eq (Definition a) Source # | |
Ord a => Ord (Definition a) Source # | |
Show a => Show (Definition a) Source # | |
data ShowSignature b Source #
Functor ShowSignature Source # | |
Foldable ShowSignature Source # | |
Traversable ShowSignature Source # | |
Eq b => Eq (ShowSignature b) Source # | |
Ord b => Ord (ShowSignature b) Source # | |
Show b => Show (ShowSignature b) Source # | |
ShowTerm (Term a) [BodyLiteral a] Bool |
Minimize (Term a) (Term a) [Term a] [BodyLiteral a] |
data ScriptType Source #
External (Term a) [BodyLiteral a] |
Edge (Term a) (Term a) [BodyLiteral a] |
Project (Term a) [BodyLiteral a] |
Bifunctor Statement Source # | |
Bitraversable Statement Source # | |
Bifoldable Statement Source # | |
Functor (Statement a) Source # | |
Foldable (Statement a) Source # | |
Traversable (Statement a) Source # | |
(Eq b, Eq a) => Eq (Statement a b) Source # | |
(Ord b, Ord a) => Ord (Statement a b) Source # | |
(Show b, Show a) => Show (Statement a b) Source # | |
(Pretty a, Pretty b) => Pretty (Statement a b) Source # | |