zhang01

Mining Message Sequence Graphs(ICSE2011)

本文的主要思想:Mining program behavior from execution traces is difficult for concurrent/distributed programs. Specifically, the inherent partial order relationships among events occurring across processes pose a big challenge to specification mining.In this paper, we propose a framework for mining partial orders so as to understand concurrent program behavior.Our miner takes in a set of concurrent program traces, and produces a message sequence graph (MSG) to represent the concurrent program behavior.

1.Message Sequence Charts (MSCs)

 Follow figure shows a simple MSC with two processes; m1 and m2 are messages sent from p to q.

 

 

A send of message m from process p to process q is denoted as <p!q,m>. The receipt by process q of a message m sent by process p is denoted as <q?p,m>.

The total order for process p is <p!q,m1> <=<p!q,m2> where e1 <= e2 denotes that event e1 “happens-before”event e2. Similarly for process q we have <q?p,m1> <= <q?p,m2>. For the messages we have <hp!q,m1i> <= <q?p,m1> and <p!q,m2> <= <q?p,m2>.

2.Message Sequence Graphs(MSG)

Formally an MSC-graph or MSG is a directed graph (V,E, Vs, Vf , ), in which V is the set of vertices, E a set of edges, Vs a set of entry vertices, Vf a set of accepting vertices and  a labelling function that assigns an MSC to every vertex. From any path in an MSG of the form (v1, v2 . . . vn), where v1 2 Vs ^ vn 2 Vf , we
can derive one MSC by the concatenation of basic MSCs (v1) O (v2) . . . (vn).

3.Connected Dependency Graphs (MCDs)

(MCD). For a given trace set T = {t1,t2, . . . tn}, gmcd = (V,R, r) is an MCD iff
  1). There is a trace t 属于 T such that gmcd 包含于 dgraph(t).
  2). 任意g 真包含于 gmcd : freq(gmcd) = freq(g)
  3). For every distinct v1, v2 属于 V , (v1, v2) 属于 (R 并 R−1)* .
  4). There is no graph g'that satisfies conditions 1-3 such that gmcd 真包含于g'.

4.Event Tail

 For an event e 属于M, when given a trace set T 包含于M*, its tail, tail[e], is the largest dependency graph that contains a single minimal vertex (which is a vertex in the graph without any associated incident edges) labelled e and satisfies conditions 1)-3) above definition .

Combining Event Tails:

The algorithm starts with g1 = tail[e]. We know that tail e cannotbe extended at the end as it is already maximal. Hence we attempt to grow g1 by prefixing it with other graphs. For every event e0 we verify if tail[e0] can be merged into g1. Let tail[e0] be the graph g2. Without loss of generality we can express the two tails as,
g1 = g1pref o gcomm and
g2 = (g2prefo gcomm) o g2suff

where gcomm is the largest possible such graph.

具体算法详见原文,流程如下图所示。

 

posted on 2011-12-13 20:36  zhanghs  阅读(357)  评论(0编辑  收藏  举报

导航