Safe Haskell | None |
---|---|
Language | Haskell2010 |
- The CoALP top-level module.
- data Term a b c
- data Clause a b c where
- type Program a b c = [Clause a b c]
- type Term1 = Term Ident Constant Var
- type Clause1 = Clause Ident Constant Var
- type Program1 = Program Ident Constant Var
- gc1 :: (Eq a, Eq c) => Program a b c -> Bool
- gc2 :: (Eq a, Eq b, Eq c, Ord c, Freshable c) => Program a b c -> Clause a b c -> Bool
- gc3 :: (Freshable c, Ord c, Eq a, Eq b) => Program a b c -> Bool
Documentation
data Term a b c
A term for any type of functional symbol and any type of variable.
Term over Σ is a total function from a non-empty tree to Σ ⋃ Var
Notation:
- T(ε) is a predicate of term
- subterm(t, w) - subtree at a word w
Functor (Term a b) | |
Foldable (OrNode (Clause a b c) (Term a b c)) | |
Foldable (AndNode (Clause a b c) (Term a b c)) | |
(Eq a, Eq c) => Eq (Term a b c) | |
(Show a, Show b, Show c) => Show (Term a b c) | |
NFData (OrNode (Clause a b c) (Term a b c) (Vr d)) | |
NFData (Term a b c) => NFData (AndNode (Clause a b c) (Term a b c) (Vr d)) | |
NFData (Term a b c) |
data Clause a b c where
A clause
Notation:
- clause C over Σ is a total function from finite tree language L of depth 1 to terms (term trees)
C(ε)
is a head of clauseC(i)
is a n-th term (fori =/= ε
)
Bifunctor (OrNode (Clause a b c)) | |
Bifunctor (AndNode (Clause a b c)) | |
Functor (Clause a b) | |
Foldable (OrNode (Clause a b c) (Term a b c)) | |
Foldable (AndNode (Clause a b c) (Term a b c)) | |
(Eq a, Eq c) => Eq (Clause a b c) | |
(Show a, Show b, Show c) => Show (Clause a b c) | |
NFData (OrNode (Clause a b c) (Term a b c) (Vr d)) | |
NFData (Term a b c) => NFData (AndNode (Clause a b c) (Term a b c) (Vr d)) | |
NFData (Clause a b c) |
type Program a b c = [Clause a b c]
A program consisting of clauses
Notation:
- program P over Σ is total function
{0..n} ∈ N
to non-goal clauses P(i)
is n-th clause
type Program1 = Program Ident Constant Var
Type of clause of first-order query
type Query1 = Query Ident Constant Var
Type of program of first-order term.
gc1 :: (Eq a, Eq c) => Program a b c -> Bool
Guardendes check GC1 on clauses
Given program P check that all program clauses are guarded, i. e.
whenever C(ε)
and C(i)
have same predicate check that C(i)
is a reduct of C(ε)