Text this: The logic of chemical synthesis