Introduces trait State as an interface for state types and refactors LanguageContext and Patterns accordingly.