# Irv's petri net program
# this program found a remarkable number of bugs, especially in networking code
#
# Unfortunately, it still fails occasionally due to Unix bugs involving
# zeroing of data from multiple processes writing to one file.
# The bug has been seen under 4.3BSD (Mt Xinu) and SunOS 3.4 & 4.0
#
# This test has a large system impact so we normally run only one data set.
#
# gmt Oct88

0 sr -c Globals.sr Condv.sr Applic.sr Table.sr Machine.sr Digt.sr
0 cp applic.hh applic.h
0 cp petri.cc petri.c
0 cc -c petri.c
0 yacc -d gram.y
0 cc -c y.tab.c
0 lex -t scan.l | sed -e "/={stdin}/s///" >lex.yy.c
0 cc -c lex.yy.c
0 srl -P 500 -Q 100 -R 200  Condv Table Machine Digt y.tab.o petri.o lex.yy.o -ll

0 a.out in.net.0 <in.mark.0 >raw.0
0 sort <raw.0 >sorted.0
0 cmp sorted.0 std.0

# 0 a.out in.net.1 <in.mark.1 >raw.1
# 0 sort <raw.1 >sorted.1
# 0 cmp sorted.1 std.1

# 0 a.out in.net.2 <in.mark.2 >raw.2
# 0 sort <raw.2 >sorted.2
# 0 cmp sorted.2 std.2

0 rm -rf Interfaces *.out *.[chso]  y.tab.? lex.yy.? core  *.[chos]
0 rm -rf raw.? sorted.?
