Decidability of Querying First-Order Theories via Countermodels of Finite Width