Modeling of Discrete Event Systems using Automata With Variables