% $Id: VideoTapeTime.oz,v 1.1 2007/11/26 19:55:02 leavens Exp leavens $ % Video tape using constraints (chapter 12) declare Hours = 60 % Minutes in an hour proc {VideoTapeTime ProgramLength ?Sol} % Requires: 2*Hours =< ProgramLength && ProgramLength <= 6*Hours time(ep: MinutesEP sp: MinutesSP) = Sol in MinutesEP::0#(6*Hours) MinutesSP::0#(2*Hours) %% tape the entire program MinutesSP + MinutesEP =: ProgramLength %% and use entire tape 3*MinutesSP + MinutesEP =: 6*Hours end