Implemented a pattern matching system for negations