Αποστολή με SMS: Automata-theoretic and datalog-based solutions of monadic second-order logic evaluation problems over structures of bounded-treewidth