<commit_before>===========
Loop free:
===========

"Single ping":
--------------
P1=seq([send(e_pid(m),e_pid(p),m), recv(m, x1)]),
P2=seq([recv(p, id), send(e_pid(p),e_var(id),p)]),
T=(par([P1,P2])),
rewrite(T, _, Delta1, Rho1).

"Send first":
-------------
P1=seq([send(e_pid(p0),e_pid(p1),p0),recv(p0,x1)]),
P2=seq([send(e_pid(p1), e_pid(p0), p1), recv(p1,x1)]),
T=(par([P1,P2])),
rewrite(T, _, Delta1, Rho1).

"Registry":
-----------
M=seq([send(e_pid(m),e_pid(p1),r),send(e_pid(m),e_pid(p2),r),recv(m,x1),send(e_pid(m),e_pid(r),m)]), R=seq([recv(r, x1),recv(r, x2),send(e_pid(r),e_pid(m),a),recv(r, x3)]),
P1=seq([recv(p1, x1),send(e_pid(p1),e_var(x1),p1)]),
P2=seq([recv(p2, x1),send(e_pid(p2),e_var(x1),p2)]),
T= par([M,R,P1,P2]),
rewrite(T, _, Delta1, Rho1).

===========
  Loops:
===========
% Simple ping
P1=seq([send(e_pid(m),e_pid(Q),m),recv(m,x)]),
P2=seq([recv(P, id),send(e_pid(P),e_pid(m),P)]),
T=(par([for(Q, s, P1), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Reverse ping
P1=seq([recv(m,id), send(e_pid(m),e_var(id),m)]),
P2=seq([send(e_pid(P),e_pid(m),P), recv(P, x)]),
T=(par([for(Q, s, P1), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Two loops
P1A=seq([send(e_pid(m),e_pid(Q),m)]),
P1B=seq([recv(m,x)]),
P2=seq([recv(P, id),send(e_pid(P),e_pid(m),P)]),
T=(par([seq([for(Q, s, P1A),for(Q, s, P1B)]), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Double ping: 
P1=seq([send(e_pid(m),e_pid(Q),m),send(e_pid(m),e_pid(Q),m),recv(m,id1),recv(m,id2)]),
P2=seq([send(e_pid(P),e_pid(m),P),send(e_pid(P),e_pid(m),P), recv(P, x1), recv(P, x2)]),
T=(par([for(Q, s, P1), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).<commit_msg>Added reverse ping for two loops.<commit_after>===========
Loop free:
===========

"Single ping":
--------------
P1=seq([send(e_pid(m),e_pid(p),m), recv(m, x1)]),
P2=seq([recv(p, id), send(e_pid(p),e_var(id),p)]),
T=(par([P1,P2])),
rewrite(T, _, Delta1, Rho1).

"Send first":
-------------
P1=seq([send(e_pid(p0),e_pid(p1),p0),recv(p0,x1)]),
P2=seq([send(e_pid(p1), e_pid(p0), p1), recv(p1,x1)]),
T=(par([P1,P2])),
rewrite(T, _, Delta1, Rho1).

"Registry":
-----------
M=seq([send(e_pid(m),e_pid(p1),r),send(e_pid(m),e_pid(p2),r),recv(m,x1),send(e_pid(m),e_pid(r),m)]), R=seq([recv(r, x1),recv(r, x2),send(e_pid(r),e_pid(m),a),recv(r, x3)]),
P1=seq([recv(p1, x1),send(e_pid(p1),e_var(x1),p1)]),
P2=seq([recv(p2, x1),send(e_pid(p2),e_var(x1),p2)]),
T= par([M,R,P1,P2]),
rewrite(T, _, Delta1, Rho1).

===========
  Loops:
===========
% Simple ping
P1=seq([send(e_pid(m),e_pid(Q),m),recv(m,x)]),
P2=seq([recv(P, id),send(e_pid(P),e_pid(m),P)]),
T=(par([for(Q, s, P1), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Reverse ping
P1=seq([recv(m,id), send(e_pid(m),e_var(id),m)]),
P2=seq([send(e_pid(P),e_pid(m),P), recv(P, x)]),
T=(par([for(Q, s, P1), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Two loops
P1A=seq([send(e_pid(m),e_pid(Q),m)]),
P1B=seq([recv(m,x)]),
P2=seq([recv(P, id),send(e_pid(P),e_pid(m),P)]),
T=(par([seq([for(Q, s, P1A),for(Q, s, P1B)]), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Reverse ping: two loops
P1A=seq([send(e_pid(m),e_pid(Q), m)]),
P1B=seq([recv(m, x)]),
P2=seq([recv(P, id), send(e_pid(P),e_var(id),P)]),
T=(par([for(Q, s, P1A), for(Q, s, P1B), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).

% Double ping: 
P1=seq([send(e_pid(m),e_pid(Q),m),send(e_pid(m),e_pid(Q),m),recv(m,id1),recv(m,id2)]),
P2=seq([send(e_pid(P),e_pid(m),P),send(e_pid(P),e_pid(m),P), recv(P, x1), recv(P, x2)]),
T=(par([for(Q, s, P1), sym(P, s, P2)])),
rewrite(T, _, Delta1, Rho1).
{'fraction_non_alphanumeric': 0.3533052039381153, 'fraction_numerical': 0.044444444444444446, 'mean_word_length': 8.164948453608247, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6926092', 'n_tokens_mistral': 1980, 'n_tokens_neox': 1943, 'n_words': 239}