The new grammar grammar5.lfg already contains two OT-Marks. They prefer local PP-attachment and choose an OBL analysis over an ADJUNCT analysis where there is a choice. This is fine for the most part, but causes problems elsewhere.
For example, in the first two examples below, the OBL-AG reading is being ruled out. Get it back in and see if you can constrain the PP readings in some other way.
For the examples with "waited for" only the OBL readings are ruled in, but this is not right for "wait for hours". Try to fix this. One way to fix things could be differentiate between animate and inanimate nouns. You could implement a generalization stating that, if the object of the preposition is animate ([ANIM +]), then the OBL reading is licensed and, if it is inanimate ([ANIM -]), then the ADJUNCT reading is preferred.
In the end, your goal should be that all the sentences below get only one reading and only the right reading. If you cannot manage to make your grammar do that, write up a short report on why things did not work (sometimes things are just impossible to rule out within the syntax --- XLE is powerful but not almighty).
Go through your testsuite and try to regenerate each sentence. Note down what your results are. When there should be only one possibility but there are more, think about whether and how you can fix it. If you can fix it (easily), then do so.
Hand in: report on how your grammar is doing (which sentences overgenerate and why) and what parts of the overgeneration you were able to fix and how.
If you want to constrain some of the possibilities via OT, then you can make up OT-Marks and rank them on the hierarchy called GENOPTIMALITYORDER (already included in grammar5.lfg).
Please submit your exercises and your testsuite to Martin Forst by 8 pm.
XLE Documentation on Support for Optimality Theory for information on how to use OT-Marks.
XLE Documentation on the generator.
XLE Documentation on the FS-Chart Window and packed representations.