Distributed Ontological Reasoning: Theory, Algorithms, and Applications