Text this: Many - sorted logic and its applications