Text this: Safely Embedded Software for State Machines in Automotive Applications