Appendix H

Rule-based system: Meta-locutionary operators

 

 

% Metalocutionary rule-based system -- metalocutionary operators

% last rev. 10-21-88

%%%%%

%%%%%  information-level operators

%%%%%

%

%  do_assert

%  assertion_received_1

%  do_request

%  request_received_2

%

op(    % do_assert

  if([   conversants(Me,Other),

         act(Me,assert(Info,Other),goal_true),

         believe(Me,turn(Me),mutually_known_true) ]),

  not([]),

  test([ ]),

  action([ act(Me,assert(Info,Other),true) ]),

  effects([ del(act(Me,assert(Info,Other),goal_true)) ]),

  atts([ name(do_assert),

         level(information) ]) ).

op(    % assertion_received_1

  if([   conversants(Me,Other),

         act(Other,assert(believe(Other,Info,Belief_value),Me),true),

         believe(Me,turn(Other),mutually_known_true) ]),

  not([ believe(Other,Info,Belief_value) ]),

  test([]),

  action([]),

  effects([ add(believe(Other,Info,Belief_value)) ]),

  atts([ name(assertion_received_1),

         level(information) ]) ).

op(    % do_request

  if([   conversants(Me,Other),

         act(Me,request(Info,Other),goal_true),

         believe(Me,turn(Me),mutually_known_true) ]),

  not([]),

  test([]),

  action([ act(Me,request(Info,Other),true) ]),

  effects([ del(act(Me,request(Info,Other),goal_true)),

         del(believe(Me,turn(Me),mutually_known_true)),

         add(believe(Me,turn(Other),mutually_known_true)) ]),

  atts([ name(do_request),

         level(information) ]) ).

op(    % request_received_2

  if([   conversants(Me,Other),

         act(Other,request(act(Me,Act,goal_true),Me),true),

         act(Me,Act,goal_true) ]),

  not([]),

  test([]),

  action([]),

  effects([ del(act(Other,request(act(Me,Act,goal_true),Me),true)) ]),

  atts([ name(request_received_2),

         level(information) ]) ).

%%%%%

%%%%%  turn-level operators

%%%%%

%

%  acknowledge_my_turn

%  my_turn_acknowledged

%  acknowledge_others_turn

%  others_turn_acknowledged

%  recognize_my_turn_1

%  recognize_my_turn_2

%  give_turn_1

%  give_turn_2

%  request_turn

%  hold_turn

%

op(    % acknowledge_my_turn

  if([   conversants(Me,Other),

        believe(Me,turn(Other),mutually_known_true),

         act(Other,give_turn(Me),true) ]),

  not([]),

  test([]),

  action([ act(Me,acknowledge_turn(turn(Me),mutually_known_true),true) ]),

  effects([ del(act(Other,give_turn(Me),true)),

        del(believe(Me,turn(Other),mutually_known_true)),

         add(believe(Me,turn(Me),mutually_known_true)) ]),

  atts([ level(turn),

         name(acknowledge_my_turn) ]) ).

op(    % my_turn_acknowledged

  if([   conversants(Me,Other),

believe(Me,turn(Me),true),

         act(Other,acknowledge_turn(turn(Me),mutually_known_true),true) ]),

  not([]),

  test([]),

  action([]),

  effects([ del(believe(Me,turn(Me),true)),

         add(believe(Me,turn(Me),mutually_known_true)),

         del(act(Other,acknowledge_turn(turn(Me),mutually_known_true),true)) ]),

  atts([ level(turn),

         name(my_turn_acknowledged) ]) ).

op(    % acknowledge_others_turn

  if([   conversants(Me,Other),

         believe(Me,turn(Me),mutually_known_true),

         act(Other,take_turn,true) ]),

  not([ act(Me,Act,goal_true) ]),

  test([]),

  action([ act(Me,acknowledge_turn(turn(Other),mutually_known_true),true) ]),

  effects([ del(act(Other,take_turn,true)),

         del(act(Me,acknowledge_turn(turn(Other),mutually_known_true),true)),

         del(believe(Me,turn(Me),mutually_known_true)),

         add(believe(Me,turn(Others),mutually_known_true)) ]),

  atts([ level(turn),

         name(acknowledge_others_turn) ]) ).

op(    % others_turn_acknowledged

  if([   conversants(Me,Other),

        believe(Me,turn(Other),true),

         act(Other,acknowledge_turn(turn(Other),mutually_known_true),true) ]),

  not([]),

  test([]),

  action([]),

  effects([ del(believe(Me,turn(Other),true)),

    add(believe(Me,turn(Other),mutually_known_true)),

    del(act(Other,acknowledge_turn(turn(Other),mutually_known_true),true)) ]),

  atts([ level(turn),

    name(others_turn_acknowledged) ]) ).

op(    % recognize_my_turn_1

  if([   conversants(Me,Other),

         act(Other,give_turn(Me),mutually_known_true),

         believe(Me,turn(Other),_) ]),

  not([ act(Me,request-turn,true) ]),

  test([]),

  action([]),

  effects([ del(believe(Me,turn(Other),_)),

         del(act(Other,give_turn(Me),mutually_known_true)),

         add(believe(Me,turn(Me),mutually_known_true)) ]),

  atts([ name(recognize_my_turn_1),

         level(turn) ]) ).

op(    % recognize_my_turn_2

  if([   conversants(Me,Other),

         act(Other,give_turn(Me),mutually_known_true),

         act(Me,request-turn,true),

         believe(Me,turn(Other),_) ]),

  not([]),

  test([]),

  action([]),

  effects([ del(believe(Me,turn(Other),_)),

         del(act(Me,request-turn,true)),

         del(act(Other,give_turn(Me),mutually_known_true)),

         add(believe(Me,turn(Me),mutually_known_true)) ]),

  atts([ name(recognize_my_turn_2),

         level(turn) ]) ).

op(    % give_turn_1

  if([   conversants(Me,Other),

         act(Other,Act,goal_true),

         believe(Me,turn(Me),mutually_known_true) ]),

  not([]),

  test([]),

  action([ act(Me,give_turn(Other),true) ]),

  effects([ del(believe(Me,turn(Me),mutually_known_true)),

         del(act(Me,give_turn(Other),true)),

         add(believe(Me,turn(Other),true)) ]),

  atts([ name(give_turn_1),

         level(turn) ]) ).

op(    % give_turn_2

  if([ conversants(Me,Other),

    act(Other,request_turn,true),

    believe(Me,turn(Me),mutually_known_true) ]),

  not([ act(Me,Act,goal_true) ]),

  test([]),

  action([ act(Me,give_turn(Other),true) ]),

  effects([ del(believe(Me,turn(Me),mutually_known_true)),

         del(act(Me,give_turn(Other),true)),

         del(act(Other,request_turn,true)),

         add(believe(Me,turn(Other),mutually_known_true)) ]),

  atts([ name(give_turn_2),

         level(turn) ]) ).

op(    % give_turn_3

  if([   conversants(Me,Other),

         act(Me,request(Info,Other),goal_true),

         believe(Me,turn(Me),mutually_known_true) ]),

  not([]),

  test([]),

  action([ act(Me,give_turn(Other),mutually_known_true) ]),

  effects([ del(believe(Me,turn(Me),mutually_known_true)),

         del(act(Me,give_turn(Other),mutually_known_true)),

         add(believe(Me,turn(Other),true)) ]),

  atts([ name(give_turn_3),

         level(turn) ]) ).

op(    % request_turn

  if([   conversants(Me,Other),

         act(Me,Act,goal_true),

         believe(Me,turn(Other),mutually_known_true) ]),

  not([ act(Me,request_turn,true) ]),

  test([ ( Act = assert(Info,Other) ; Act = request(Req,Other) ) ]),

  action([ act(Me,request_turn,true) ]),

  effects([]),

  atts([ name(request_turn),

         level(turn) ]) ).

op(    % hold_turn

  if([   conversants(Me,Other),

         act(Me,Act,goal_true),

         believe(Me,turn(Other),true) ]),

  not([ act(Me,hold_turn,mutually_known_true) ]),

  test([ ( Act = assert(Info,Other) ; Act = request(Req,Other) ) ]),

  action([ act(Me,hold_turn,mutually_known_true) ]),

  effects([ del(believe(Me,turn(Other),true)),

         add(believe(Me,turn(Me),true)) ]),

  atts([ name(regain_turn),

         level(turn) ]) ).