atp-haskell-1.7: Translation from Ocaml to Haskell of John Harrison's ATP code

Safe HaskellNone
LanguageHaskell98

Data.Logic.ATP.Unif

Description

Unification for first order terms.

Copyright (c) 2003-2007, John Harrison. (See "LICENSE.txt" for details.)

Synopsis

Documentation

class Unify a v term where Source

Main unification procedure.

Methods

unify :: a -> a -> StateT (Map v term) Failing () Source

Unify the two elements of a pair, collecting variable assignments in the state.

Instances

Unify SkAtom V SkTerm Source 
Unify a v term => Unify [a] v term Source 
Unify a v term => Unify (Seq a) v term Source 

unify_terms :: (IsTerm term, v ~ TVarOf term) => [(term, term)] -> StateT (Map v term) Failing () Source

unify_literals :: (IsLiteral lit, HasApply atom, Unify atom v term, atom ~ AtomOf lit, term ~ TermOf atom, v ~ TVarOf term) => lit -> lit -> StateT (Map v term) Failing () Source

Unify literals

unify_atoms :: (JustApply atom, term ~ TermOf atom, v ~ TVarOf term) => (atom, atom) -> StateT (Map v term) Failing () Source

unify_atoms_eq :: (HasEquate atom, term ~ TermOf atom, v ~ TVarOf term) => atom -> atom -> StateT (Map v term) Failing () Source

solve :: (IsTerm term, v ~ TVarOf term, f ~ FunOf term) => Map v term -> Map v term Source

Solve to obtain a single instantiation.

fullunify :: (IsTerm term, v ~ TVarOf term, f ~ FunOf term) => [(term, term)] -> Failing (Map v term) Source

Unification reaching a final solved form (often this isn't needed).

unify_and_apply :: (IsTerm term, v ~ TVarOf term, f ~ FunOf term) => [(term, term)] -> Failing [(term, term)] Source

Examples.