24FreelanceMarché freelance qui ne dort jamais
Fermé

Transfer from Turbo Prologa to Visual Prolog

759 vues 0 réponse#4940
Statut du projet
Closed
BudgetNégociable
FormatProjet uniquepas de prépaiement
PaiementEspèces, Virement bancaire
Réponses acceptéesTerminéjusqu'à 23.02.2017
Réponses0moyenne de la catégorie : 0,3
Vues75933 en 14 jours

Description du projet

There is an expert car troubleshooting system for the Turbo Prolog. The program asks questions, the person answers, and then we get the program's answer. What a problem is there in the car, according to its signs.
And there's a knowledge base.
The question is, help transfer the program to the Visual Prolog console. I'll pay a coin!

Program code on Turbo Prolog and knowledge base.

[HIGHLIGHT="prolog"]
DOMAINS
I=integer
S=stringing
C=char
Li=i*
Database - knowledge
Cond(i,s)
Rule(s,li)
DATABASE - dialog
Cond_is(i,c)
PREDICATES
Start starting.
Cars
Check(li)
Test_cond(i)
Update
Add_cond(li)
Print_cond(i,li,li)
Read_cond(c,li,li)
Ex_cond(i,li,li,i)
Wr_cond(c,i,li,li)
New_cond(i,li,li)
Read_true_char(c)
Test(c,c)
Clauses
Start:
consult("exp.DDB",knowledge),
nl,nl,nl,nl,write("*** Help cars ****"),nl,
write("Pomochnik obnaryzgenia nepoladki"),nl.
write("Ovetite na voprosi, a ya ykazgy ploblemy"),nl,
cars
retractall(_,dialog),
retractall(_,knowledge)
nl,nl,write (Mogy snova vam pomoch? (1 - da, 2 - net)",
read_true_char(C),
C='1',!, start.
Start:
nl,nl,write("****************** Vsego dobrogo!) Do novih vstrech",
readchar(_).
Cars:-
rule(X,L),
check(L),
nl,nl,write("********************* Expert sistema Help Cars"),nl,
write("* Opredelila nepoladku:",X),nl.
write("ya prav? (1 - da, 2 - net)",
read_true_char(C), C='1'!
Cars:-
nl,nl,write("************************ Ya ne znayu, chto eto za polomka"),nl,
nl,write("Davaite dobavim ee' v bazu znani"),nl,
update.
Update:-
nl,write("Vvedie nepoladky:"),
readln(S),
add_cond(L),
assert(rule(S,L),knowledge),
save("exp.ddb",knowledge).
Add_cond(L):-
cond_is(_,'1'),!
nl,nl,write("*************************** O nepoladki izvestni, prichina:"),
print_cond(1,[],L1),
nl,write("Izvestno li o nem esho chto-nibud?? (1 - da, 2 - net)",
read_true_char(C),
read_cond(C,L1,L).
Add_cond(L):-
read_cond('1',[],L).
Print_cond(H,L,L):-
not(cond(H,_),!
Print_cond(H,L,L1):-
cond_is(H,'1'),!
cond(H,T),
H1=H+1,
nl,write(T),
print_cond(H1,[H|L],L1).
Print_cond(H,L,L1):-
H1=H+1,
print_cond(H1,L,L1).
Read_cond('1',L,L2):-
ex_cond(1,L,L1,N),
new_cond(N,L1,L2)!
Read_cond(_,L,L):-!
Ex_cond(N,L,L,N):
not(cond(N,_),!
Ex_cond(N,L,L1,N2):-
cond_is(N,_),!
N1 = N+1,
ex_cond(N1,L,L1,N2).
Ex_cond(N,L,L1,N2):-
cond(N,S),
nl,write("Y nee",S"?? (1 - da, 2 - net)",
read_true_char(A),
wr_cond(A,N,L,L2),
N1 = N+1,
ex_cond(N1,L2,L1,N2).
Wr_cond('1',N,L,[N|L]):-!
Wr_cond('2',_,L,L):-!
New_cond(N,L,L1):-
nl,write("Est' esho prichini? (1 - da, 2 - net)",
read_true_char(A),
A='1'!,
nl,write("Ukaghite new svoistvo, polomki"),nl,
nl,write("New otlichintelinoe cvoistvo nepoladki '"), readln(S),
assertz(cond(N,S),
N1 = N+1,
new_cond(N1,[N|L],L1).
New_cond(_,L,L).
Check([H|T]):-
test_cond(H),
check(T).
Check([]).
Test_cond(H):-
cond_is(H,'1'),!
Test_cond(H):-
cond_is(H,'2'),!
fail.
test_cond(H):-
cond(H,S),
nl,nl,write("Y vas",S"??? (1 - da, 2 - net)",
read_true_char(A),
assert(cond_is(H,A),
test_cond(H).
Read_true_char(C):-
readchar(C1),
test(C1,C).
Test(C,C):-
'1'
Développement de logiciels Espèces, Virement bancaire
24
Vingt · conseil

Comment rédiger une réponse qui sera sélectionnée

  • Commencez par la tâche du client, pas par une histoire sur vous-même.
  • Liez un ou deux travaux similaires de votre portfolio.
  • Indiquez un prix et une date limite — et ce qu'ils incluent exactement.
  • Posez une question de clarification : cela lance la conversation.

Réponses 0

Les textes des réponses ne sont visibles que par le client.

Même catégorie

Projets similaires

Tous les projets de la catégorie
Warehouse inventory app with barcode scanner

Warehouse inventory app with barcode scanner

Looking for a developer to build a mobile warehouse inventory app with barcode scanning, receiving, dispatch, stocktake and reports.

Développement de logiciels24.09.20260184
0réponse
Website accessibility audit against WCAG

Website accessibility audit against WCAG

We need an independent WCAG accessibility audit of our website: keyboard, contrast, screen readers and a clear report with fixes.

Développement de logiciels24.09.20260180
0réponse
Bon à savoir
Comment puis-je répondre à ce projet ?

Connectez-vous en tant que freelance, décrivez comment vous allez résoudre la tâche, indiquez votre prix et votre délai. Le client lit les réponses et engage un dialogue avec les meilleures.

Qui peut voir ma réponse ?

Seul le client qui a posté le projet et vous. Les autres freelances ne voient pas votre texte ou votre prix.

Où puis-je trouver un travail similaire ?

De nouveaux projets dans “Développement de logiciels” apparaissent chaque jour. Tous les projets de la catégorie

FOR CLIENTS · SAFE DEAL ESCROW

Need a similar project? Post your task for free in 30 seconds

Get competitive bids from verified freelancers and release payment only when you approve the work via Safe Deal.

Post a Task for Free →How Safe Deal Works
FOR FREELANCERS · PAYORA 1-CLICK

Pin your profile to the TOP of the category for $5 / week

Boost your profile and portfolio to #1 in the directory (1-click crypto & fiat checkout via Payora) to get 5× more direct orders.

Pin Profile to TOP ($5/wk)Top Up via Payora