latino7
coniugazione verbi latini
/* latino7.pro */ /* analisi verbo latino e ricava radice */ /* desinenze richiamate da disco */ /* coniuga prima coniugazione indicativo */ /* solo una radice laud..non laudav */
nowarnings include "a:/latino/desi.pro"
domains Lunga,tempo = integer Radix,Verbo =string f =symbol predicates stampa(f,f,f,f,f,f) presente(string) imperfetto(string) futuro(string) perfetto(string) piuccheperfetto(string) futuroanteriore(string) fine scelta(integer,string) finestra azione goal finestra,azione.
clauses finestra:-makewindow(1,7,1,"",0,0,25,80). azione:- attribute(5), write("scrivi infinito verbo latino"),nl, write("da coniugare:es.laudare "),nl, readln(Verbo), write("----------------------------"),nl, attribute(6), str_len(Verbo,Lunga), Radice=Lunga-3, frontstr(Radice,Verbo,Radix,Des), write("----------------------------"),nl, write("infinito..............",Verbo),nl, write("radice indicativo.....",Radix),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 ..fine"),nl, readint(Tempo), clearwindow, scelta(Tempo,Radix). scelta(1,Radix):- write("presente "),nl,presente(Radix). scelta(2,Radix):- write("imperfetto"),nl,imperfetto(Radix). scelta(3,Radix):- write("futuro semplice"),nl,futuro(Radix). scelta(4,Radix):- write("perfetto"),nl,perfetto(Radix). scelta(5,Radix):- write("piuccheperfetto"),nl,piuccheperfetto(Radix). scelta(6,Radix):- write("futuro anteriore"),nl,futuroanteriore(Radix). scelta(7,Radix):-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).
fine:- write("premi enter"),readchar(H),exit.
/* DESI.PRO */ /* da usare con latino3..latino4 */
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","as","at","amus","atis","ant"). dati2("abam","abas","abat","abamus","abatis","abant"). dati3("abo","abis","abit","abimus","abitis","abunt"). dati4("avi","avisti","avit","avimus","avistis","averunt"). dati5("averam","averas","averat","averamus","averatis","averant"). dati6("avero","averis","averit","averimus","averitis","averint"). dati7("em","es","et","emus","etis","ent"). dati8("arem","ares","aret","aremus","aretis","arent"). dati9("averim","averis","averit","averimus","averitis","averint"). dati10("avissem","avisses","avisset","avissemus","avissetis","avissent").