Previous Page  15 / 23 Next Page
Information
Show Menu
Previous Page 15 / 23 Next Page
Page Background

ISSN 0236-3933. Вестник МГТУ им. Н.Э. Баумана. Сер. «Приборостроение». 2016. № 3

79

receive(p1l(M2L12), p2l(M2L22))), S2L12),

sequentRp1p(XP112, S1P12, rp1p(p1receive(lp11(M1L12)),

p1put(p1l1(M2L12))), S2P12),

sequentRp2p(XP222, S1P22, rp2p(p2receive(lp22(M1L22)),

p2put(p2l2(M2L22))), S2P22),

nl, nl,

write("=============================================="), nl,

write("sequentRlp(XL11, S1L11, rlp(receive(p1l(M1L11),

p2l(M1L21)), put(lp1(M2L11), lp2(M2L21))), S2L11)"), nl,

write("XL11 = ", XL11), write(", S1L11 = ", S1L11), write(",

M1L11 = ", M1L11), write(", M1L21 = ", M1L21),

write(", M2L11 = ", M2L11), write(", M2L21 = ", M2L21),

write(", S2L11 = ", S2L11), nl, nl,

write("sequentPp1r(XP111, S1P11, pp1r(p1put(p1l1(M1L11)),

p1receive(lp11(M2L11))), S2P11)"), nl,

write("XP111 = ", XP111), write(", S1P11 = ", S1P11),

write(", M1L11 = ", M1L11), write(", M2L11 = ", M2L11),

write(", S2P11 = ", S2P11), nl, nl,

write("sequentPp2r(XP221, S1P21, pp2r(p2put(p2l2(M1L21)),

p2receive(lp22(M2L21))), S2P21)"), nl,

write("XP221 = ", XP221), write(", S1P21 = ", S1P21),

write(", M1L21 = ", M1L21), write(", M2L21 = ", M2L21),

write(", S2P21 = ", S2P21), nl, nl,

write("sequentPlr(XL12, S1L12, plr(put(lp1(M1L12),

lp2(M1L22)), receive(p1l(M2L12), p2l(M2L22))), S2L12)"), nl,

write("XL12 = ", XL12), write(", S1L12 = ", S1L12), write(",

M1L12 = ", M1L12), write(", M1L22 = ", M1L22),

write(", M2L12 = ", M2L12), write(", M2L22 = ", M2L22),

write(", S2L12 = ", S2L12), nl, nl,

write("sequentRp1p(XP112, S1P12, rp1p(p1receive(lp11(M1L12)),

p1put(p1l1(M2L12))), S2P12)"), nl,

write("XP112 = ", XP112), write(", S1P12 = ", S1P12),

write(", M1L12 = ", M1L12), write(", M2L12 = ", M2L12),

write(", S2P12 = ", S2P12), nl, nl,

write("sequentRp2p(XP222, S1P22, rp2p(p2receive(lp22(M1L22)),

p2put(p2l2(M2L22))), S2P22)"), nl,

write("XP222 = ", XP222), write(", S1P22 = ", S1P22),

write(", M1L22 = ", M1L22), write(", M2L22 = ", M2L22),

write(", S2P22 = ", S2P22), nl, nl,

write("=============================================="),!,

nl.

goal

execute(XL11,XP111,XP221,XL12,XP112,XP222).

Приведенная программа содержит четыре раздела

domains,

predicates, clauses, goal.

Раздел

domains

включает в себя описа-

ние структуры всех используемых функторов, раздел

predicates

описание структуры всех используемых предикатов, представляющих