Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Generate random working perl code?

by rurban (Scribe)
on Aug 29, 2010 at 21:50 UTC ( [id://857942]=perlquestion: print w/replies, xml ) Need Help??

rurban has asked for the wisdom of the Perl Monks concerning the following question:

Saw this python generator http://bitbucket.org/ebo/pyfuzz/

Anyone heard about a perl generator?

It would need it to test the compiler and Jit. PPI and core would also be interested, I guess. Looks like an interesting project.

Replies are listed 'Best First'.
Re: Generate random working perl code?
by JavaFan (Canon) on Aug 30, 2010 at 09:32 UTC
    About 12 years ago or so, there was some interest on p5p to randomly generate Perl, or Perl-like code (both syntactically valid and invalid code) in order to stress test the compiler (IIRC, the main purpose was to locate cases where the compiler would crash). Generators based on Markov chains were written. (This was before PPI or any of the B:: modules). After some successes and time, interest waned.

    Potential danger that needs to be addressed: you don't want to compile randomly generated code that may execute any of it. So, you don't want any BEGIN/CHECK/UNITCHECK block, and no use statements.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://857942]
Approved by ww
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2026-04-13 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.