Computation of instance substitutions and generalizations.
Author: Björn Peemöller
Version: April 2015
instanceOf
:: Expr -> Expr -> Bool
Is the first expression an instance of the second expression? |
instanceWith
:: Expr -> Expr -> Maybe Subst
instanceWith e1 e2
tries to compute a substitution sigma
such that $e1 = \sigma(e2)$.
|
msg
:: Expr -> Expr -> (Expr,Subst,Subst)
msg e e' = (g, sigma, theta)
returns the most specific generalization
g
of e
and e'
and the substitutions sigma
and theta ,
such that $e = \sigma(g)$, and $e' = \theta(g)$.
|
Is the first expression an instance of the second expression? |
Note that |
|