Dynamic Montague grammar