Important news! We have successfully simulated a mechanical pig! This breakthrough has been accomplished by the ingenious combination of the PIG INTERFACE LANGUAGE and the PIG CONTROL LANGUAGE.

Sample program:

PIG DIVISION
  GRUNT
  OINK
  GOTO MUD
  PIGNAP
MUD DIVISION
  ROLL
  ROLL
  ROLL
  GOTO TRUFFLES
  PIGNAP
TRUFFLES DIVISION
  EAT
  EAT
  EAT
  GOTO PIG
  PIGNAP

Sample run:

irb(main):001:0> require 'pig'
=> true
irb(main):002:0> PIG1 = MechanicalPig.new 'pig1.PIG'
00000 **MECHANICAL PIG** PIG BRAIN INITIALISED
00001 **MECHANICAL PIG** PIG ENTERS DIVISION PIG
00002 **MECHANICAL PIG** PIG READY FOR LAUNCH
=> MECHANICAL PIG version 0.14c (Starter Edition)
WARNING!! MECHANICAL PIG ARE PROTECTED BY INTERNATIONAL COPYONWRITE AND MUNITIONS EXPORT LAWS! NO WARRANTY. MALFUNCTIONING OF PIG MAY BE HAZARDOUS TO ONE'S HEALTH. YAHYAHYAHYAHYAH!
irb(main):003:0> PIG1.on
00003 **MECHANICAL PIG** DOES GRUNT 
00004 **MECHANICAL PIG** DOES OINK 
00005 **MECHANICAL PIG** DOES GOTO MUD
00006 **MECHANICAL PIG** PIG ENTERS DIVISION MUD
00007 **MECHANICAL PIG** DOES ROLL 
00008 **MECHANICAL PIG** DOES ROLL 
00009 **MECHANICAL PIG** DOES ROLL 
00010 **MECHANICAL PIG** DOES GOTO TRUFFLES
00011 **MECHANICAL PIG** PIG ENTERS DIVISION TRUFFLES
00012 **MECHANICAL PIG** DOES EAT 
00013 **MECHANICAL PIG** DOES EAT 
00014 **MECHANICAL PIG** DOES EAT 
00015 **MECHANICAL PIG** DOES GOTO PIG
00016 **MECHANICAL PIG** PIG ENTERS DIVISION PIG
00017 **MECHANICAL PIG** DOES GRUNT 
...
01272 **MECHANICAL PIG** DOES EAT 
01273 **MECHANICAL PIG** DOES EAT 
01274 **MECHANICAL PIG** DOES EAT 
01275 **MECHANICAL PIG** PIG IS TIRED
01276 **MECHANICAL PIG** DOES SLEEP

Alas extensive simulations demonstrate that many mechanical pigs may meet an unfortunate end:

00004 **MECHANICAL PIG** DOES OINK 
00005 **MECHANICAL PIG** DOES GOTO MUD
00006 **MECHANICAL PIG** PIG ENTERS DIVISION MUD
00007 **MECHANICAL PIG** DOES ROLL 
00008 **MECHANICAL PIG** DOES ROLL 
00009 **MECHANICAL PIG** DOES ROLL 
00010 **MECHANICAL PIG** DOES GOTO BUTCHER
00011 **MECHANICAL PIG** ABORTED (BACON CORE DUMPED)

Further details available from blodgett.