JS runtime for FOMA finite-state machines