Apologies if this question is a bit simplistic/vague for MO:


I'm looking for an all-purpose definition in the literature of when a sufficiently generic filter "canonically codes" a generic real. Examples of what I mean come from everyone's favorite notions of forcing to add certain reals "on purpose":


In Cohen forcing, the generic real is obtained by taking the union of the generic real.


In random forcing, the generic real is obtained by taking the intersection of the generic filter.


In Mathias or Laver forcing, the generic real is obtained by taking the union of stems in the generic filter.


In Sacks forcing, the generic real is obtained by taking the intersection of (branch spaces of trees in) the generic filter... etc, etc.


What I am **not** looking for is anything having to do with the "other" reals that are added "by accident" through such forcing.


I can, of course, come up with a bespoke definition that covers the above cases, but I was hoping for something general and known.


**Edit:** To be more precise, I am looking for something that is an *injective function* from (sufficiently generic) filters to reals. A preliminary definition might be something like: "there is a definable (from the poset $\mathbb{P}$) injection from generic filters for $\mathbb{P}$ to reals". In the case of Cohen forcing, the function would be the map which just takes the union of the generic filter.



A definition of the generic real coded by a generic filter?
In the examples that you gave, the question whether you take a "union of stems" or "intersection of conditions" is really just a matter of notation. 


For example, there are several ways to define conditions in Silver forcing: as partial functions from $\omega$ to $2$ with coinfinite domains, or as sufficiently uniform Sacks trees. To get the generic real, you have to take a union of condition in the former case, a union of stems in the latter. And if you identify trees with the corresponding closed set, the generic real will be the unique element of a certain intersection. 


In general (not in full generality, but in many cases, in particular: all cases that you mentioned):


* there is a canonical way to associate to each condition $p$ a closed (or at least Borel) set $[p]$. (More precisely, a Borel code for a set.)
* In each of these cases, the intersection $\bigcap\_{p\in G} [p]$ will contain a unique element, the generic real $r\_G$. (Again, to be precise one would have to talk about Borel codes.)
* The map $G \mapsto r\_G$ is (at least in all case considered) 1-1.


