Does model theory extend to partial functions? I have been reading a bit about effect algebras and d-posets recently, sets $M$ on which you have a single partial binary operation (partial here meaning partially defined, i.e. the domain of this operation is not the entirety of $M^2$) satisfying certain conditions.  It got me wondering - can these kinds of structures be formalized in a model theoretic way?
More specifically, let us allow a language/signature $\mathcal{L}$ to contain, in addition to the usual constant, function and relation symbols, a set of partial function symbols as well.  Syntactically, we treat them just like function symbols in formulas.  Semantically, we interpret them as partial functions in $\mathcal{L}$-models/$\mathcal{L}$-structures.  Can we now extend the satisfaction relation $\mathcal{M}\vDash\phi(\overline{a})$ in a reasonable way to formulas $\phi$ that also contain partial function symbols?
The main issue here would seem to be how you define things like $\mathcal{M}\vDash f(a)=g(a)$, where $a\in M$ and both $f$ and $g$ are partial functions.  If both $f^\mathcal{M}$ and $g^\mathcal{M}$ are defined at $a$ then we should surely make $\mathcal{M}\vDash f(a)=g(a)$ hold iff $f^\mathcal{M}(a)=g^\mathcal{M}(a)$.  If either or both $f^\mathcal{M}$ and $g^\mathcal{M}$ are not defined at $a$, I think the following three options are the most natural possibilities.
1) $\mathcal{M}\vDash f(a)=g(a)$ fails if $f^\mathcal{M}$ or $g^\mathcal{M}$ is not defined at $a$.
2) $\mathcal{M}\vDash f(a)=g(a)$ holds if both $f^\mathcal{M}$ and $g^\mathcal{M}$ are not defined at $a$ but fails if only one of them is not defined at $a$.
3) $\mathcal{M}\vDash f(a)=g(a)$ holds if $f^\mathcal{M}$ or $g^\mathcal{M}$ is not defined at $a$.
I would personally go with option 2), thinking of the case where neither $f^\mathcal{M}$ nor $g^\mathcal{M}$ is defined to be "vacuously true".  Also, this means $\mathcal{M}\vDash\forall x(f(x)=g(x))$ holds iff $f^\mathcal{M}=g^\mathcal{M}$ while if we go with option 1) this would only hold when $f$ and $g$ are total functions (unless we are willing to also change the way quantifiers are handled somehow), and if we go with option 3) this can hold even if the domains of $f$ and $g$ are different as they only have to agree on their common domain.
Assuming this can be done, the next question would naturally be - is this useful?  After all, we could try to deal with partial functions as relations in the usual classical model theory by replacing any $n$-ary partial function symbol with an $(n+1)$-ary relation symbol, e.g. replace unary $f$ with binary $R_f$, where $aR_fb$ is meant to signify that $f$ is defined at $a$ and $f(a)=b$.  But if you are going to do that, you might as well do it with the total functions too.  This is not the usual approach in model theory, for a number of good reasons which I think apply equally well to total and partial functions.  For one thing, axioms for simple algebraic structures become more complex e.g. the universally quantified equation expressing commutativity of a binary operation $\forall a\forall b(a+b=b+a)$ would become a Horn sentence $\forall a\forall b\forall c(R_+(a,b,c)\Rightarrow R_+(b,a,c))$.  Also, by robbing functions of their separate status, you are no longer able to apply theorems which only work for functions, rather than relations.  So I guess the real question here is whether partial functions are still special enough that they deserve having a status separate from relations at the outset?
Sorry for the long question, but if anyone has any ideas about this, or perhaps knows of a paper which already definitively answers these questions, I'd be very interested to hear about it.
 A: On the question of logic and truth-values We are here in the domain of so-called free logic [i.e. logic free from the assumption that all terms denote], and some of the options are nicely discussed (with conceptual motivations) here: http://plato.stanford.edu/entries/logic-free/
As pointed out in section 3, we can go various ways on the likes of $f(a) = f(b)$ where the function terms don't denote because the (partial) function is undefined for one or both of $a$ and $b$. One line is that all empty-termed atomic formulas (including identity statements involving non-denoting function terms) are false. Another account discerns truth-value gaps so $f(a) = f(b)$ is neither true nor false for empty terms. Yet another account still allow for some instances of $f(a) = f(b)$ to be true even when the terms are empty. 
The encyclopaedia article gives useful pointers to the extensive literature on this.
On the question of partial functions more generally We know, don't we, that the theory of computation goes really more nicely if, from the outset, we define the class of partial computable functions. We know that the partiality of partial computable function is in general essential in the sense that, if we take a partial computable function $f$ and "make it total" by defining $f'(n) = f(n)$ if $f(n)$ is defined, and $f'(n) = 0$ otherwise, then in general $f'$ will not be computable. Is this enough to  make partial functions "special enough"?  
