/*********************************************************************** * * File : sort.lsl * Author : David B. Boardman * Date : Aug 1994 * * For the bubble, insertion, and selection sort, this * specification auralizes the begin and end of a * program, the number of comparisons, and the * element swapped. * ************************************************************************/ begin auralspec specmodule temp begin temp syncto mmabs q = 60; notify rule = prog_begin using begin_snd; notify rule = prog_end using end_snd; notify rule = while_body_begin using sticks_snd in func = "insert_sort"; notify rule = while_statement_exit using sticks_snd in func = "insert_sort"; notify rule = for_body_begin using sticks_snd in func = "bubble_sort" and func = "selection_sort"; dtrack temp when rule = function_entry:"exchange" until rule = function_return:"exchange" using flute2_snd; end temp; end auralspec.