/* This file will be automatically compiled in when you compile
your file fridge.pl into ECLiPSe Prolog. */
compressor(c1). compressor(c2). % there are two compressors
Copyright By PowCoder代写 加微信 powcoder
partOf(p1,f1). % plane p1 is a part of fridge f1 %
holds(b1,p1). holds(b2,p1). % bolts b1 and b2 hold backplane p1 %
% In Part 1, question 3, remove comments from the line below
% holds(b3,p1). holds(b4,p1). % bolts b3 and b4 also may hold backplane p1 %
% holds(b5,p1). % bolt b5 also may hold backplane p1 %
inPlace(p1,[]). attached(c1,[]).
covers(p1,c1,[]). turnedOn(f1,[]).
screwed(b1,p1,[]). screwed(b2,p1,[]). % backplane p1 is screwed with bolts b1 and b2 %
% In Part 1, question 3, remove comments from the line below
% screwed(b3,p1,[]). screwed(b4,p1,[]). % p1 may be also screwed with bolts b3 and b4 %
% screwed(b5,p1,[]). % p1 may be also screwed with bolt b5 %
/* Goal state */
% In Part 1, we use everywhere same goal state. However, if you would like,
% you can try as well other goal states for debugging purposes.
goal_state(S) :- attached(c2,S), turnedOn(f1,S).
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com