To jest stara wersja strony!
Opis
Filip Haftek filiphaftek@o2.pl
Investigate runtime integration aspects, mainly
semi-automatical building of a GUI for Prolog programs possibilities
XPCE, Static QT/Gtk, Gtk-Server, Java (Swing), Eclipse (SWT)
XPCE, QT, GTK, GtkServer, Java etc., SWI Prolog documentation
Feasibility study, a prototype.
SWING LogTalk
Spotkania
080304
080318
080401
080422
080520
Projekt
1. PROSTY SYSTEM EKSPERCKI
Predykat tworzący okno z pytaniem:
question(Result,T):-
jpl_call('javax.swing.JOptionPane','showConfirmDialog',[(@null),T,'Question',0],X),
change(X,Result).
info(X):-
jpl_call('javax.swing.JOptionPane','showMessageDialog',[(@null),X],F).
Predykat get_yes_or_no:
Przed:
get_yes_or_no(Result) :- get(Char),
get0(_),
interpret(Char,Result),
!.
Po:
get_yes_or_no(Q,Result) :-
ask_question(Q,X),
question(Result,X).
Predykat ask_question:
Przed:
ask_question(fuel_is_ok) :-
write('Look in the carburetor. Can you see or smell gasoline?'),nl.
Po zmianach stał się termem:
ask_question(fuel_is_ok,'Look in the carburetor. Can you see or smell gasoline?').
Predykat user_says:
Przed:
user_says(Q,A) :- \+ stored_answer(Q,_),
nl,nl,
ask_question(Q),
get_yes_or_no(Response),
asserta(stored_answer(Q,Response)),
Response = A.
Po:
user_says(Q,A) :- \+ stored_answer(Q,_),
get_yes_or_no(Q,Response),
asserta(stored_answer(Q,Response)),
Response = A.
Plik car.pl
2. ZAAWANSOWANE SYSTEMY EKSPERCKIE
pp :
question2(Result,Question):-
jpl_datums_to_array(Question,Q),
jpl_new('miw2.YNQuestion',[Q],D),
jpl_call(D,setVisible,[@(true)],_),
jpl_call('miw2.YNQuestion',getValue,[],V),
Result = V.
myQuestion(Question,Choices,Response):-
jpl_datums_to_array(Choices,L),
jpl_datums_to_array(Question,Q),
jpl_new('miw2.MyRBForm',[L,Q],F),
jpl_call(F,setVisible,[@(true)],_),
jpl_call('miw2.MyRBForm',getValue,[],V),
Response = V.
Sprawozdanie
1. Klasy Javy wykorzystywane z poziomu języka Prolog:
Info
MyRBForm
MyCBForm
YNQuestion
MainForm
PlFileChooser
2. Predykaty wykorzystyjuące klasy Javy:
myQuestion(Question,Choices,Response)
question2(Result,Question)
info(X)
Materiały
Pytania:
- nazwa zwierzaka w MyCBForm
- rozmiar Frame - 2 opcje