lat3
coniugazione verbi latini
/* lati3a.pro */ /* analisi verbo latino e ricava radici */ /* desinenze richiamate da disco */ /* terza coniugazione ind e cong */
nowarnings include "a:/latino/desi3.pro"
domains Lunga,Lungap,tempo = integer Radix,Radixp,Verbo,Verpop =string f =symbol predicates stampa(f,f,f,f,f,f) presente(string) imperfetto(string) futuro(string) perfetto(string) piuccheperfetto(string) futuroanteriore(string) cpresente(string) cimperfetto(string) cperfetto(string) cpiuccheperfetto(string) fine scelta(integer,string,string) finestra azione goal finestra,azione.
clauses finestra:-makewindow(1,7,1,"",0,0,25,80). azione:- attribute(5), write("scrivi infinito verbo latino 3 con.ne"),nl, write("da coniugare:es.legere "),nl, readln(Verbo), str_len(Verbo,Lunga), Radice=Lunga-3, frontstr(Radice,Verbo,Radix,Des), nl, write("scrivi perfetto indicativo "),nl, write("da coniugare:es.legi "),nl, readln(Verbop), write("----------------------------"),nl, attribute(6), str_len(Verbop,Lungap), Radicep=Lungap-1, frontstr(Radicep,Verbop,Radixp,Desp), write("----------------------------"),nl, write("infinito..............",Verbo),nl, write("radice indicativo.....",Radix),nl, write("radice perfetto.......",Radixp),nl, write("premi enter "),readchar(H), clearwindow, write("premi 1 ..presente indicativo"),nl, write("premi 2 ..imperfetto indicativo"),nl, write("premi 3 ..futuro semplice"),nl, write("premi 4 ..perfetto "),nl, write("premi 5 ..piuccheperfetto "),nl, write("premi 6 ..futuro anteriore "),nl, write("premi 7 ..presente cong."),nl, write("premi 8 ..imperfetto cong. "),nl, write("premi 9 ..perfetto cong. "),nl, write("premi 10 .piuccheperfetto cong. "),nl,
write("premi 11 ..fine"),nl, readint(Tempo), clearwindow, scelta(Tempo,Radix,Radixp). scelta(1,Radix,Radixp):- write("presente "),nl,presente(Radix). scelta(2,Radix,Radixp):- write("imperfetto"),nl,imperfetto(Radix). scelta(3,Radix,Radixp):- write("futuro semplice"),nl,futuro(Radix). scelta(4,Radix,Radixp):- write("perfetto"),nl,perfetto(Radixp). scelta(5,Radix,Radixp):- write("piuccheperfetto"),nl,piuccheperfetto(Radixp). scelta(6,Radix,Radixp):- write("futuro anteriore"),nl,futuroanteriore(Radixp). scelta(7,Radix,Radixp):- write("congiuntivo pres."),nl,cpresente(Radix). scelta(8,Radix,Radixp):- write("congiuntivo imp."),nl,cimperfetto(Radix). scelta(9,Radix,Radixp):- write("congiuntivo per."),nl,cperfetto(Radixp). scelta(10,Radix,Radixp):- write("congiuntivo pper."),nl,cpiuccheperfetto(Radixp).
scelta(11,Radix,Radixp):-fine.
presente(Radix):- dati1(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
stampa(R1,R2,R3,R4,R5,R6):- attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4),write("premi enter"),nl,beep, readchar(_),clearwindow,azione.
imperfetto(Radix):- dati2(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1), concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
futuro(Radix):- dati3(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1), concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
perfetto(Radix):- dati4(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1), concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
piuccheperfetto(Radix):- dati5(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
futuroanteriore(Radix):- dati6(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
cpresente(Radix):- dati7(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
cimperfetto(Radix):- dati8(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
cperfetto(Radix):- dati9(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
cpiuccheperfetto(Radix):- dati10(D1,D2,D3,D4,D5,D6), concat(Radix,D1,R1),concat(Radix,D2,R2), concat(Radix,D3,R3),concat(Radix,D4,R4), concat(Radix,D5,R5),concat(Radix,D6,R6), stampa(R1,R2,R3,R4,R5,R6).
fine:- write("premi enter"),readchar(H),exit.
/* DESI3.PRO */
domains des= symbol predicates dati1(des,des,des,des,des,des) dati2(des,des,des,des,des,des) dati3(des,des,des,des,des,des) dati4(des,des,des,des,des,des) dati5(des,des,des,des,des,des) dati6(des,des,des,des,des,des)
dati7(des,des,des,des,des,des) dati8(des,des,des,des,des,des) dati9(des,des,des,des,des,des) dati10(des,des,des,des,des,des)
clauses dati1("o","is","it","imus","itis","unt"). dati2("ebam","ebas","ebat","ebamus","ebatis","ebant"). dati3("am","es","et","emus","etis","ent"). dati4("i","isti","it","imus","istis","erunt"). dati5("eram","eras","erat","eramus","eratis","erant"). dati6("ero","eris","erit","erimus","eritis","erint"). dati7("am","as","at","amus","atis","ant"). dati8("erem","eres","eret","eremus","eretis","erent"). dati9("erim","eris","erit","erimus","eritis","erint"). dati10("issem","isses","isset","issemus","issetis","issent").