Generate a random program in your favorite language We all heard of testing compilers using randomly generated inputs. Your task is to write a program to generate a valid program (including no undefined behavior) in your favorite language. The generating program language doesn't have to be the same as the generated program language.

Your program will receive an integer as the argument which you can use as seed for your random number generator. The generated programs should be structurally different (given different seeds) not just different variable names or constants.

Examples:

$ ./generate 1
int main() { return 0; }

$ ./generate 2
#include &lt;math.h&gt;
int main() { return (int) pow(4, 3); }


Please include a couple of outputs in your answers. 

The shortest solution wins. I will give a small bonus based on the number of votes, so please vote the most creative solutions.
Python → Brainf*ck (185 223 233 255 285 287 303 characters)

Code

import random as r,sys
r.seed(int(sys.argv[1]))
c=list('&lt;&gt;.,+-')+['']
n=9/r.random()
def b():
 global n
 s=''
 while n&gt;0:n-=1;o=r.choice(c);s+=o if o else'[%s]'%b()
 return s
print b()



303 → 287 Characters: Removed math.ceil (it's not really necessary).
287 → 285 Characters: Switched to an empty string to denote the branch operator.
285 → 255 Characters: Condensed the if statement in the while loop.
255 → 233 Characters: Implemented JBernardo's suggestions from the comments.
233 → 223 Characters: Implemented tjko's suggestion from the comments.
223 → 185 Characters: Implemented some whitespace reduction suggestions from the comments.


Examples

$ python generate.py 1
--&gt;,,+-&lt;&lt;-,-&lt;,-&gt;[[&lt;&lt;,[.&gt;.&lt;&gt;,,&gt;&gt;&gt;,.&lt;-,+&gt;[[&lt;.-+[.-+.+[-,+&lt;&gt;-.&gt;,++.,,-,.,&lt;&lt;+[+]]]]]]]]
$ python generate.py 2
[&lt;&lt;--+.+++&gt;]
$ python generate.py 3
,.++&lt;&lt;-&gt;&gt;[,-,+&gt;+[,-+&lt;-+.&lt;[,-[+[.-,[[&lt;&lt;&gt;[,+.]]]]]]]]


Actually figuring out what the resulting BF programs do is left as an exercise to the reader.