#!/usr/bin/perl -w # Petri-net simulation - prototype for ASK/GHost/AMPS programming language my $hole = undef; my %machines = { random => Random->new, print => Print->new, }; my %places = { x => Place->new, } link('random', 'out', 'x'); link('print', 'in', 'x'); set('x', \$hole); package Place; sub new { my $this = undef; return bless \$this, $_[0]; }