SMS: Functional program testing and analysis