negotiate(agent1,[agent2,data4]).

step(rule((hasData(A, B), hasData(C, D), member(E, D), \+member(E, B), policy(A, [request, E])), request_data(A, C, E)), (hasData(agent1, [data1, data2, data3]), hasData(agent2, [data4, data5, data6]), member(data4, [data4, data5, data6]), \+member(data4, [data1, data2, data3]), policy(agent1, [request, data4])), request_data(agent1, agent2, data4)).
step(rule((hasData(A, B), hasData(C, D), member(E, D), \+member(E, B), policy(A, [request, E])), request_data(A, C, E)), (hasData(agent1, [data1, data2, data3]), hasData(agent2, [data4, data5, data6]), member(data6, [data4, data5, data6]), \+member(data6, [data1, data2, data3]), policy(agent1, [request, data6])), request_data(agent1, agent2, data6)).
step(rule((hasData(A, B), member(C, B), policy(A, [accept, C]), becomes(hasData(D, E), hasData(D, [C|E]))), accept_request(A, D, C)), (hasData(agent2, [data4, data5, data6]), member(data4, [data4, data5, data6]), policy(agent2, [accept, data4]), becomes(hasData(agent1, [data1, data2, data3]), hasData(agent1, [data4, data1, data2, data3]))), accept_request(agent2, agent1, data4)).
step(rule((hasData(A, B), member(C, B), policy(A, [accept, C]), becomes(hasData(D, E), hasData(D, [C|E]))), accept_request(A, D, C)), (hasData(agent2, [data4, data5, data6]), member(data4, [data4, data5, data6]), policy(agent2, [accept, data4]), becomes(hasData(agent2, [data4, data5, data6]), hasData(agent2, [data4, data4, data5, data6]))), accept_request(agent2, agent2, data4)).
step(rule((hasData(A, B), member(C, B), policy(A, [accept, C]), becomes(hasData(D, E), hasData(D, [C|E]))), accept_request(A, D, C)), (hasData(agent2, [data4, data5, data6]), member(data6, [data4, data5, data6]), policy(agent2, [accept, data6]), becomes(hasData(agent1, [data4, data1, data2, data3]), hasData(agent1, [data6, data4, data1, data2, data3]))), accept_request(agent2, agent1, data6)).
step(rule((hasData(A, B), member(C, B), policy(A, [accept, C]), becomes(hasData(D, E), hasData(D, [C|E]))), accept_request(A, D, C)), (hasData(agent2, [data4, data5, data6]), member(data6, [data4, data5, data6]), policy(agent2, [accept, data6]), becomes(hasData(agent2, [data4, data4, data5, data6]), hasData(agent2, [data6, data4, data4, data5, data6]))), accept_request(agent2, agent2, data6)).
step(rule((hasData(A, B), (\+member(C, B);\+policy(A, [accept, C]))), reject_request(A, _, C)), (hasData(agent1, [data6, data4, data1, data2, data3]), (\+member(some0, [data6, data4, data1, data2, data3]);\+policy(agent1, [accept, some0]))), reject_request(agent1, some1, some0)).
step(rule((hasData(A, B), (\+member(C, B);\+policy(A, [accept, C]))), reject_request(A, _, C)), (hasData(agent2, [data6, data4, data4, data5, data6]), (\+member(some2, [data6, data4, data4, data5, data6]);\+policy(agent2, [accept, some2]))), reject_request(agent2, some3, some2)).
step(rule((request_data(A, B, C), (accept_request(B, A, C);reject_request(B, A, C))), negotiate(A, [B, C])), (request_data(agent1, agent2, data4), (accept_request(agent2, agent1, data4);reject_request(agent2, agent1, data4))), negotiate(agent1, [agent2, data4])).
step(rule((request_data(A, B, C), (accept_request(B, A, C);reject_request(B, A, C))), negotiate(A, [B, C])), (request_data(agent1, agent2, data6), (accept_request(agent2, agent1, data6);reject_request(agent2, agent1, data6))), negotiate(agent1, [agent2, data6])).
step(rule(negotiate(agent1, [agent2, data4]), answer(negotiate(agent1, [agent2, data4]))), negotiate(agent1, [agent2, data4]), answer(negotiate(agent1, [agent2, data4]))).
