Infections as Abstract Symbolic Finite Automata: Formal Model and Applications.