{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

AccDiff_p2 2 - Example accumulators partof(frame P L1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Example- accumulators :- partof(frame, P). Resolve with C0: :- partsacc(frame, [], P). Resolve with C1: :- basicpart(frame). Nothing to resolve with, backtrack to L1 Resolve with C2: :- assembly(frame, subparts), partsacclist(Subparts, [],P). Resolve with B0: :- partsacclist([rearframe, frontframe], [], P). Resolve with C4: :- partsacc(rearframe, [], Hp), partsacclist([frontframe], Hp, P). Resolve with C1 (note substitution of Hp/[rearframe|[]]): :- basicpart(rearframe), partsacclist([frontframe], [rearframe], P). Resolve with B2: :- partsacclist([frontframe], [rearframe], P). York University- CSE 3401- V. Movahedi 17 06_AccDiff L1:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Example- accumulators (cont.) Resolve with C4: :- partsacc(frontframe, [rearframe], Hp1), partsacclist([], Hp1, P). Resolve with C1 (note substitution Hp1 / [frontframe|[rearframe]]: :- basicpart(frontframe), partsacclist([], [frontframe, rearframe], P). Nothing to resolve with, backtrack to L2 Resolve with C2: :- assembly(frontframe, Sub1), partsacclist(Sub1, [rearframe], Hp1), partsacclist([], Hp1, P). Resolve with B1: :- partsacclist([fork, handle], [rearframe], Hp1), partsacclist([], Hp1,P).
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}