Specification Based Bug Detection for Embedded Software