New introduction to logic programming