SMS dit: Hypertree Decompositions and Tractable Queries