SE20101110041

SE20101110041



negative (string,symbol)

clear__facts    :?

remerr.ber (symbol, char)    ■    ' :    -

aks (string, symbol, char)    ■    ' ' :r

clauses

run: -

write("AUTOMOBILE, DTAGNOSTIC SYSTEM"),nl, diagnosed(_),!,nl,clear_facts.

run: -

write ("\nUnable to determinate what your problem is \n"), clear_facts.

xpositive(Y),!.■

:- not(xnegative(Y)), ask(X,Y,Reply)


positive (_,Y) positive (X/Y)

Reply='y'.

negative (_,Y) xnegative(Y),!.

negative (X,Y)    - not (Xpositive (Y) ) , aks(X,Y,Re

ply),Reply='n'.

ask (X,Y,Reply)    :~

write(X),nl, readchar(Reply),

write(Reply),nl,    ' •

remember(Y,Reply)

remember (Y,'y'):-asserta(xpositive(Y)).

remember (Y,'n')    :-

asserta (xnegative(Y)).

celar_facts ' retract(xpositive(_)),fail.

clear_facts

°retract(xnegative(_}),fail. clear_facts

nl,nl,write("Please press the space bar to exit. ") , nl readchar(_) .

diagnosed (starter_motor) not(check(engine_turns_over)), check(eleętrical_power), check(relay),

not(check(starter_motor) ) ,

write("Replace starter motornl.

diagnosed (battery_connections) not(check(engine_turns_over)), not(check{electrical_power)), hot(check(battery_connections)), write{"Tighten battery connections."),nl.

diagnosed (battery_water) not(chek(engine_turns_over)), not(check(electrical_power)) , check(battery_connections), write("Fili battery with water."),nl.

diagnosed.(battery_charged) not(check(engine_turns„over)), not(check(electrical_power)), check(battery_connections) , chećk(battery_water), not(check(battery_charged)) ,

write("Battery is not charged. Try jumping it to start"},nl,

write("then check for loose or broken fan belt or defective regulatornl,

diagnosed (relay) :-not(check(engine_turns_over)) , check (electrical_power) ,


Wyszukiwarka

Podobne podstrony:
20/23 Wykaz zbiorów stanowiących księgi rachunkowe Nr zamówienia UPP-STRING Symbol
Symbols1 oelectAII Drl+A Clear Selection ^ Layer ► 1 Symbol ► 1 Make Symbol... Arrange ^ ► i) Lo
skanuj0011 (179) Moj dzień! Do każdego obrazka dobierz właściwy symbol.
skanuj0022 (188) tj. zbiór osi zwykłych i osi inwersyjnych. Środek symetrii oznacza się symbolem f,

więcej podobnych podstron