Minker+(vgk+példa)

A minimumkeresés algml leírása, kiegészítve az előfordításból kapott virtuális gépi kóddal. A belépési pontokat az érthetőség kedvéért nem szinkronizáltuk.

Tapasztalatok: Teendők: code format="xml" 
 * A típusosságot lehetne enyhíteni, mert kellemetlen és nem természetes (az algoritmus szempontjából a kezelt elemek természete lényegtelen).
 * Bele kellene vonni az elemszámozást a címzési eljárásba.
 * Kijavítani a paraméterezés hibáit

 Do not work on empty array.              </op> <do n='16'> <for n='17' index='i' each='elem' precode='reg -e-17-condv bool; reg -e-17-ind $index; goto -e-17-init; entry -e-17-loopstart; goto -e-17-cond; entry -e-17-cond-ret; gotou -e-17-condv -e-17-loopend' postcode='entfs -f-48; goto -e-17-loopstart; entry -e-17-loopend; del -e-17-condv; del -e-17-ind' <range n='18' precode='entry -e-17-cond' postcode='goto -e-17-cond-ret' > <var n='19' postcode='goto -e-17-noinit; entry -e-17-init; set -e-17-ind -out; entry -e-17-noinit; gt -e-17-condv -e-17-ind -out' > <call n='20' func='next' postcode='entsf -f-44'> <call n='22' func='first' postcode='entsf -f-45; reg -out $type; set -out -p-1'> <var n='23' name='arr' postcode='reg -p-1 $array; set -p-1 arr'/> <var n='24' postcode='mul -e-17-condv -p-1' > <call n='25' func='last' postcode='entsf -f-46'> <var n='25.5' name='arr' postcode='reg -p-1 $type; set -p-1 $name' /> <do n='26'> <if n='27' precode='reg -e-27-cond bool; entfs -e-27-cond; gotou -e-27-condv -e-27-else; goto -e-27-then;' postcode='entry -e-27-exit; del -e-27-cond'> <cond n='28' precode='goto -e-27-skipcond; entry -e-27-cond' postcode='set -e-27-condv -p-1; gtfp; entry -e-27-skipcond' ><op n='29' func='greater' postcode='gtfp -f-47' > <var n='30' name='min' precode='reg -p-1 $elem; set -p-1 min' /> <var n='31' name='elem' precode='reg -p-2 $elem; set -p-2 elem' /> </op> <then n='32' precode='entry -e-27-then' postcode='goto -e-27-exit'><do n='33'> <comment n='34'>ha a jelenlegi kisebb, mint az eddigi legkisebb. <set n='35' precode='reg -e-35-val access' postcode='del -e-35-val'> <var n='36' name='elem' precode='set -e-35-val elem' /> <var n='36.5' name='min' precode='set min -e-35-val' /> <set n='37' precode='reg -e-37-val access' postcode='del -e-37-val'> <var n='38' name='i' precode='set -e-37-val i' /> <var n='39' name='mini' precode='set mini -e-37-val'/> </do> <else n='40' precode='entry -e-27-else' postcode='goto -e-27-exit'><do n='41'/> </if> </do> </do>

<func n='42' name='firstIndex' precode='goto -e-42-end; entry -f-42; .... gtfp; entry -e-42-end;' /> <func n='43' name='indexing' precode='goto -e-43-end; entry -f-43; .... gtfp; entry -e-43-end;' /> <func n='44' name='next' precode='goto -e-44-end; entry -f-44; .... gtfp; entry -e-44-end;' /> <func n='45' name='first' precode='goto -e-45-end; entry -f-45; .... gtfp; entry -e-45-end;' /> <func n='46' name='last' precode='goto -e-46-end; entry -f-46; .... gtfp; entry -e-46-end;' />

<func n='47' name='greater' precode='goto -e-47-end; entry -f-47; gt -out -p-01 -p-02; gtfp; entry -e-47-end;' />

<func n='48' name='increase' precode='goto -e-48-end; entry -f-48; .... gtfp; entry -e-48-end;' />

code