Formalization of Smten language and implementation in coq