Supervisory control synthesis for exception handling in printers