Abstract
Program Dependence Net (PDNet) based on Coloured Petri Net (CPN) is a kind of multi-threaded program model describing and distinguishing program dependences. This paper presents an automatic modeling method to construct a PDNet which is consistent with the behavior of multi-threaded C programs (PThread programs) from source code. A big challenge for modeling multi-threaded programs is shared function in different threads. To handle it, we set independent places to represent variables, and simulate address space and thread stack through different fields in colour set. Another challenge is to describe complicated data structures including array, pointer and struct when programs operate on them. Native arc expressions for PDNet can't describe pointer reference or array operator. We design a recursive function to translate program expressions into native arc expressions automatically, which solve the problem of calculating complicated program expressions. On the basis of our method, we also implement our tool and prove the usefulness, high efficiency and scalability of our method through experiments in our benchmarks including a subset benchmarks of SV-COMP [17] which is a famous competition on software verification.

This publication has 9 references indexed in Scilit: