1. A method comprising: receiving a call flow for a spoken dialog service; converting, via a processor, the call flow into a higher level representation with state variable assignments and comparisons dependent on shapes in the call flow, the higher level representation having a syntax used to specify grammars of a programming language; upon converting the call flow into the higher level representation, augmenting the higher level representation to yield an augmented higher level representation by: creating classes of terminal states found in the higher level representation; associating each class in the classes with a function, to yield for each terminal state a functional class; modifying each terminal state based on the function associated with the functional class of the terminal state; and associating a meaning with a state transition in the higher level representation by attaching, to an output of the state transition, a suffix associated with the meaning; and converting the augmented higher level representation into a state-based representation.