The Design and Implementation of a Query Platform and Simulation Tool for the Analysis of UML State Machines through Declarative Modeling