Formal Specification for Fast Automatic IDS Training