next up previous
Next: Module irpr_kappa(irpr_kappa.kl1) Up: Module irpr_service(irpr_service.kl1) Previous: Creation of irpr

Message sending to irpr system server

After a command parameter of irpr_client is transformed into a message to irpr system server, it is sent through the interface stream IrprITR by a predicate exec_irpr/5. What will be done by these messages are defined in irpr_kappa.kl1.

The first three arguments of exec_irpr/5 are described in order of appearance below.

Mode
A command parameter of irpr_client which has been changed to an atom.
Search_cond
A string of search condition which was standard input of irpr_client.
Result
specifies what will be written to standard output of irpr_client. There can be three types of vls(VLS), vl(VL) and term(Term).

exec_irpr(scd, Search_cond, Result)-IrprITR :-
    IrprITR <= search_current_data(Search_cond, Result0),
    Result = vls(Result0).
exec_irpr(shd, Search_cond, Result)-IrprITR :-
    IrprITR <= search_history_data(Search_cond, Result0),
    Result = vls(Result0).
exec_irpr(sad, Search_cond, Result)-IrprITR :-
    IrprITR <= search_all_data(Search_cond, Result0),
    Result = vls(Result0).
exec_irpr(anm, Search_cond, Result)-IrprITR :-
    IrprITR <= add_new_member(Search_cond, Result0),
    Result = vl(Result0).
exec_irpr(mm, Search_cond, Result)-IrprITR :-
    IrprITR <= modify_member(Search_cond, Result0),
    Result = vl(Result0).
exec_irpr(dm, Search_cond, Result)-IrprITR :-
    IrprITR <= delete_member(Search_cond, Result0),
    Result = term(Result0).
otherwise.
exec_irpr(Mode, _Search_cond, Result)-IrprITR :-
    Result = term(abnormal("Illegal Parameter.",Mode)).

Here, we give a supplementary explanation of output styles of an argument "Result".

vls(VLS)
"VLS" is unified with a list each time output of it is finished in order for irpr_kappa:read_record/5 to be demand driven. It will be written to standard output of irpr_client in the form of "normal([...])".
vl(VL)
"VL" is a term of result. It will be written to standard output of irpr_client in the form of "normal(VL)".
term(Term)
"Term" is a term of result. It will be written to standard output of irpr_client in the form of "Term".