Handling state dependencies is a major challenge in modern SDN programming, but existing frameworks do not provide sufficient abstractions nor tools to address this challenge. In this paper, we propose a novel, high-level programming abstraction and implement the Function Automation SysTem (FAST). With the two key features, i.e., automated state dependency tracking and efficient re-execution scheduling, we demonstrate that FAST substantially simplifies state-dependent SDN programming and boosts the performance.