A formalism of the data is based on the notion of the extended directed graph is developed. Operations and data structure classes are defined. Properties of data structures are studied; in particular, the definition of a data structure by means of its operations is investigated.
You can refer the following link for the better understanding:
A lattice has more constraints than what you describe, but maybe you can adopt this formalism in your application, or start from here to see if there are related works closer to your needs.
I guess you already know http://en.wikipedia.org/wiki/Ontology_%28information_science%29, which is also the starting point of a lot of resources.
Learn Data Structures with the help of this Data Structures with Python Cheat Sheet.