%%%%%%%%%%%%%%% % Concepts %%%%%%%%%%%%%%% conceito person: name: ... birth: tinterval def:inf..sup death: tinterval def:inf..sup gender: {m,f} bio: doc photo: date: tinterval def:inf..sup desc: text casa_fotografica: cli_number: album: Daguerreotype < photo // 1840 1860 Ambrotype < photo // 1854 1860 Carte_da_visite < photo // 1860 1880 ; 6.3 x 10cm Cabinet_card < photo // 1870 1900 ; 10 x 15cm empresa: local: doc: casa: local: event %%%%%%%%%%%%%%% % relations %%%%%%%%%%%%%%% relation brother: person,person #I mother/father: person,person #M / #P conjugue: person,person #S son: person,person #F #F3 #P #MM #MP #PP #PM ... tante/oncle: #MI/#PI in_photo: person+age, photo dono: person,empresa lived_in: person, (casa|local) mecenas: person, (empresa|instituição|pessoa) %%%%%%%%%%%%%%% % CONSTRAINTS % %%%%%%%%%%%%%%% conjugue: simetric, anti-reflexive brother: transitive, simetric, anti-reflexive pai: anti-transitive, anti-simetric, anti-reflexive relação-inversa: pai : filho tio : sobrinho avô : neto person(P) :- P.birth < P.death, P.death-P.birth <100 brother(A,B) :- abs(A.birth - B.birth) < 30 mother(M, F) :- F.birth - M.birth > 12, F.birth - M.birth < 50, M.death >= F.birth % F.aparente = 20..30 % F.ano = 1920..1940 foto(F, P) :- (F.ano - P.birth) in F.aparente in-foto(F,P+age) :- F.ano - P.birth = age active_event(E, P):- P.birth + 10 < E.year, P.death >= E.year active(P,year) :- P.birh + 10 < year < P.death %%%%%%%%%% % PISTAS % %%%%%%%%%% === check_mother(M, C): brother(A,B), nascimento(A,(X1..X2)), nascimento(B,(Y1..Y2)), morte(A,(M1..M2)), morte(B,(Z1..Z2)) => |X1-Y2| < 30, |X2-Y1| < 30 mother(A,B), nascimento(A,(X1..X2)), nascimento(B,(Y1..Y2)) morte(A,(M1..M2)), morte(B,(Z1..Z2)) => X2-Y1 > 15 => X1-Y2 < 50 => Y2 < M1 pai(A,B), nascimento(A,(X1..X2)), nascimento(B,(Y1..Y2)) morte(A,(M1..M2)), morte(B,(Z1..Z2)) => X2-Y1 > 15 => X1-Y2 < 65 => Y2 < M1+1 delta 30 casado(A,B), nascimento(A,(X1..X2)), nascimento(B,(Y1..Y2)) morte(A,(M1..M2)), morte(B,(Z1..Z2)) => idadeA - idadeB < 30 (quase todos) => idadeA - idadeB < 60 (extremo) emigrou(A,p1,Brasil:X) => pista: procurar(A, hemeroteca_BR) => pista: procurar(A, GovernoCivil-Passaportes) emigrou(A,p1,Brasil:RioGrande do Sul), nascimento(A,X ∈ 1750..1880) => pista: procurar(A, 1169142561.Cat_Sel_Cartas_Liberdade_Vol_1.pdf) licenseado(X,Curso) => frequentouUniversidade(X,U,[I-F]) => idade na frequência ∈ [18..30] quase todos => conclusão do curso ∈ [20..30] quase todos => pista: procurar(X, anuário(U.Coimbra,U.Porto,U.Lisboa)) foto(X),datafoto(X,D), ISA(tinplate,X) //tinplate=daguerreotipo => D ∈ 1840..1865 foto(X),datafoto(X,D), ISA(fotocartaovisita,X) => D ∈ 1860..1910 foto(X), datafoto(X,D), present(Y,X), idadeAparente(X,Y, Z±E ) => nascimento(A, D-Z±E )