Introduction to logic programming