SMS: Programing wiht higher order-logic