An automaton determines its next state from the current state and the next input symbol. A pushdown automaton adds a stack which you can push/pop/read from. But then there are probably a lot of intermediate things to a completely generic system where each transition is based on the current transition and any information from the environment. For example, a traditional function in an imperative language like JavaScript is essentially this sort of thing, where it goes to a function, then based on the lexical and global scopes, it figures out what input to pass to the next function (essentially). What is this sort of system? How to formalize this into an automaton sort of thing?
Is this just a register machine? If so, what is the best formalization of the mathematical model (in terms of research papers or books) which is freely available? Or better yet, what is the mathematical model listed explicitly here? If not, what is it?
Wondering if there is anything that models this sort of system using states and such. Wondering what the relation is to a FSM, and how to translate one to the other if possible, or at least relate them.