FSMs with finite memory Consider an FSM and a finite set of variables. The FSM has the special property that each state contains a set of commands, with each command taking the form of "variable = expr(variable, ...)" e.g., x = y + z + 2. The commands are "activated" whenever the FSM transitions into the containing state.

My question is what class of problems are computable in this model? Perhaps more specifically, say M(k) is one of these state machines with k variables.

Perhaps the only claim that seems obvious to me about this construction is that all computable problems for M(k+1) is strictly larger than for M(k).

Please pardon me if my question is not well formed, or if I'm misusing some terminology. Thanks in advance.

Edit: Suppose also we add the additional constraint that each 'variable' has some range [-r, r].

Edit2: Thanks Martin Schwartz. I don't have the "street cred" yet to upvote or respond to your answer. Thanks!
Let your original state machine $M(k)$ have $n$ states and transition relation $t(s,s&#39;)$, where each transition $t(s,s&#39;)$ updates the global variables $x_1,...,x_k$ by applying function 
$(x&#39;_1,...,x&#39;_k) = f_{t(s,s&#39;)} (x_1,...,x_k)$. 
Then $M(k)$ is equivalent to a standard FSM with $n(2r+1)^k$ states, where each state encodes a tuple $(s,x_1,...,x_k)$ with each $x_i$ encoding one fixed value in $[-r,r]$, and new transition relation $t&#39;$

$t&#39;( (s,x_1,...,x_k), (s&#39;,x&#39;_1,...,x&#39;_k)) \Leftrightarrow t(s,s&#39;) \wedge [(x&#39;_1,...,x&#39;_k) = f_{t(s,s&#39;)} (x_1,...,x_k)]$.