Abstract
The goal of this work was to explore synergies between Petri net theory and reverse engineering. The result is a bridge from
- clustering techniques - merging neighboured nodes which is a key feature for software engineering and the practical applications of Petri nets- to
- folding techniques - merging only transitions with transitions and places with places, preserving behaviour and allowing theoretical connections to many models of concurrency.
To Petri net theory we contribute a new treatment of clustering. We introduce a category of Petri nets with morphisms that support clustering, offering attractive properties to software engineering and integrating smoothly with invariants. A computational reasonable adjunction connects it to folding based Petri nets – to two new cocomplete and complete categories. The dichotomy of structure and behaviour of Petri nets is expressed as compatible adjunctions to behavioural categories. Finally reachability and process semantics are attached categorically and a new variant of occurrence nets is proposed as a purer image of causality and branching.
For reverse engineering we model structural and functional aspects of software through Petri nets. Universal constructions within the above categories are able to recover high level design information from a flat net representing a low level implementation. This gives an algorithm with nearly linear cost. A prototype shows its value for reverse engineering and a rich palette of variations that allows to adapt to different situations. Finally we propagate Petri nets as a design metaphor for conventional software engineering.