The ST [10] compiler (and therefore also KRoC [11]) has implemented the following:
1. name is not used
2. Parameter name not used
3. Routine name not used
4. Name name descopes previous declaration
PC lint actually helps us enforce 1-4 above, since SPoC checks none of them. It should.
Suggestion for more occam rules:
5. Name name assigned, but not subsequently used
6. Array name index index not used
Compiling the program below goes fine with SPoC, but PC-lint warns:
o: PROC Wish () INT a, b, c: b := a : p: Warning 530: a_3824 not initialized Warning 550: b_3825 not accessed Warning 529: c_3826 not subsequently referenced
How about this:
INT time: TIMER clock: SEQ clock ? time TIMER clock: -- Meaningless clock ? time
Errata: The paper says 1-3, this is wrong. It should be 1-4.