GSoC/GCI Archive
Google Code-in 2010 Parrot Foundation and The Perl Foundation

Write the Man-Boy test in Winxed

completed by: Matt Rajca

mentors: whiteknight

Task Description: the "Man or Boy Test" is a software test to see if a programming language implements some advanced features correctly. This test was created in 1964 by Donald Knuth to test ALGOL. The test has since been ported to several other programming languages to verify that they implement the necessary features. The test doesn't correspond to any existing calculation or phenomena, it is a made-up exercise to try and stress a programming language. It serves no other purpose.

Winxed is a programming language for the Parrot virtual machine with a syntax inspired by JavaScript. We think Winxed should pass the Man or Boy test.

The student should implement the Man or Boy Test in Winxed to see if it can be done and if it produces the correct results.

Steps to Complete:

  1. Download and install Parrot and Winxed. Verify that they work on your machine
  2. Implement the Man or Boy test in Winxed, following existing examples, if necessary
  3. If your solution works at all, use it to test a variety of input "k" values. Notice that large k values take a very long time to calculate, so you probably don't want to test higher than k=15
  4. Post your code and your results

Links: http://en.wikipedia.org/wiki/Man_or_boy_test, http://code.google.com/p/winxed/