latino6a
coniugazione verbi latini
/* latino6a.pro variante migliore di latino6*/ /* analisi verbo latino e ricava radice */ /* desinenze richiamate da disco */ /* coniuga prima coniugazione indicativo */ /* solo una radice laud..non laudav */
nowarnings include "a:/latino/desi1.pro"
domains Lunga,Lungap,tempo = integer Radix,Verbo,Radixp,Verbop =string
predicates presente(string) imperfetto(string) futuro(string) perfetto(string) piuccheperfetto(string) futuroanteriore(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"),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("scrivi perfetto stesso verbo "),nl, write("da coniugare:es.laudavi "),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("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,Radixp). scelta(1,Radix,Radixp):-presente(Radix). scelta(2,Radix,Radixp):-imperfetto(Radix). scelta(3,Radix,Radixp):-futuro(Radix). scelta(4,Radix,Radixp):-perfetto(Radixp). scelta(5,Radix,Radixp):-piuccheperfetto(Radixp). scelta(6,Radix,Radixp):-futuroanteriore(Radixp). scelta(7,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), write("=============================="),nl, attribute(2), write("stampa indicativo presente"),nl, attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4), readchar(_),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), write("=============================="),nl, attribute(2), write("stampa indicativo imperfetto"),nl, attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4), readchar(_),azione.
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), write("=============================="),nl, attribute(2), write("stampa futuro semplice"),nl, attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4), readchar(_),azione.
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), write("=============================="),nl, attribute(2), write("stampa perfetto"),nl, attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4), readchar(_),azione.
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), write("=============================="),nl, attribute(2), write("stampa piuccheperfetto"),nl, attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4), readchar(_),azione.
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), write("=============================="),nl, attribute(2), write("stampa futuro anteriore"),nl, attribute(3), write(R1),nl,write(R2),nl,write(R3),nl, write(R4),nl,write(R5),nl,write(R6),nl, attribute(4), readchar(_),azione.
fine:- write("premi enter"),readchar(H),exit.
/* DESI1.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","as","at","amus","atis","ant"). dati2("abam","abas","abat","abamus","abatis","abant"). dati3("abo","abis","abit","abimus","abitis","abunt"). dati4("i","isti","it","imus","istis","erunt"). dati5("eram","eras","erat","eramus","eratis","erant"). dati6("ero","eris","erit","erimus","eritis","erint"). dati7("em","es","et","emus","etis","ent"). dati8("arem","ares","aret","aremus","aretis","arent"). dati9("erim","eris","erit","erimus","eritis","erint"). dati10("issem","isses","isset","issemus","issetis","issent").