simple algorithm compiler