Auto-generating a class hierarchy/inheritance tree from a data set of objects with properties
It looks like your problem can be solved by transitive reduction followed by some post-processing.

Build a directed graph, with one vertex per "object shape".  Draw an edge $u \to v$ if $u$ contains all of the fields of $v$ (possibly plus some more).  This should form a dag.  Now compute the transitive reduction of this dag.  The result should be a tree (or forest of trees).  

This almost gives you the desired solution.  The one thing it doesn't do is invent new abstract base classes that weren't already present in the input.  So, we can do some post-processing to create them.  First, if the result has more than one tree, we'll create a new root (an abstract base class) that is a parent of all of those trees.  The result is a (directed) tree.

Examine each node that has more than two children.  This is the only place where we need to create new abstract base classes.  Let $S$ denote the set of children.  Now you have some choices about how you want to form a hierarchy based for $S$; there are multiple possibilities that are all consistent with the input data, and the question doesn't specify any criteria for choosing among them.  So, I'll have you let you decide on how you want to select among them.



What's the running time?  Constructing the graph and computing the transitive reduction can be done in $O(n^3)$ time, where $n$ is the number of different object shapes present in the input.   (In fact, given the structure of the input, in this particular case it can actually be done in $O(n^2)$ time, but maybe that isn't important, since I suspect in practice $n$ might be fairly small.)  The post-processing can also be done in $O(n^3)$ time (probably less if you care).  So the overall running time is at most $O(n^3)$.

Of course, we can de-duplicate the shapes in the input before doing any processing: there is no need to keep more than one object of any particular shape.  So, the running time depends only on $n$, the number of distinct shapes in the input, not on the number of objects in the input.  It's easy to do the de-duplication in linear time using a hash table.