Implement abstract writer pattern for Context and ImplicationalSystem