• Nenhum resultado encontrado

Inside the nodes of the conversational patterns

3 AUSTIN: a conversational abstract machine

3.8 The ‘Sudoku filling problem’

3.8.4 Inside the nodes of the conversational patterns

Each pattern consists of several nodes, ‘driven by eachother’ according to dependency to information asked through directives. For each pattern, we list and briefly describe the different nodes in the following way:

- name of the node

- list of its drivers (nodes from the same pattern)

- input: either triggerFor (starter) or answersFor (list of directives)

- output in the form of commissives, assertives and directives

conversational pattern: LAUNCHER

starter:

SAlauncher = ([max:State:ALL:*].[dimension:Param: ALL:*]; SA)

commissives:

CA01 = ([test:Value: ALL].[row:XY: ALL:*].[column:XY: ALL:*].[dimension:Param: ALL:*]. [when:State: ALL:*]; CA) CA02 = ([test:Set: ALL:*].[dimension:Param: ALL:*].[when:State: ALL:*]; CA)

CD03 = ([accepted:Value: ALL].[row:XY: ALL].[column:XY: ALL].[when:State: ALL:*]; CD) startNode: LAUNCHER-1

drivers: none

input: triggerFor (SAlauncher) contains the information dim= dimension and maximum number of states; from which the indexes for {rowi}, {columnj}, {setk} and {staten} can be computed.

output: assertives for Cell and Set invocation; and directive for gathering results replace the commissives.

CA011i, j, n = ([test:Value: ALL].[row:XY:rowi].[column:XY:columnj].[dimension:Param:dim]. [when:State:staten]; AA) CA021k, n = ([test:Set:setk].[dimension:Param: dim].[when:State:staten]; AA)

DD030 = ([accepted:Value: ALL].[row:XY: ALL].[column:XY: ALL].[when:State:>0]; DD)

postNode: LAUNCHER-2 drivers: LAUCHER-1

input: answersFor (DD030)

output: no sentences are output, but a recapitulation of the new state of the grid is provided to the user.

conversational pattern: CELL

starter:

SAcell = ([test:Value: ALL:*].[row:XY: ALL:*].[column:XY: ALL:*].[dimension:Param: ALL:*]. [when:State: ALL:*]; SA)

commissives:

CA06 = ([accepted:Value: ALL:*].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CA) CA07 = ([rejected:Value: ALL:*].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CA) CD08 = ([accepted:Value: ALL].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CD) CD09 = ([rejected:Value: ALL].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CD)

startNode: CELL-1 drivers: none

input: triggerFor (SAcell) contains the information rowa, columnb and staten corresponding to the invocation; a and b which index row and column are constants.

output: commissives and directives replacing the initial commissives; it should be noted that Cell-1 asks questions about states previous to staten and commits itself to provide information at staten+1.

CA061 = ([accepted:Value: ALL:*].[row:XY:rowa].[column:XY:columnb]. [when:State:staten+1]; CA) CA071 = ([rejected:Value: ALL:*].[row:XY:rowa].[column:XY:columnb]. [when:State:staten+1]; CA) DD080 = ([accepted:Value: ALL].[row:XY:rowa].[column:XY:columnb].[when:State:<=staten]; DD) DD090 = ([rejected:Value: ALL].[row:XY:rowa].[column:XY:columnb].[when:State:<=staten]; DD)

postNode: CELL-2 drivers: CELL-1

input: answersFor (DD080 & DD090) which contain the information about the eventual existence of a value accepted before staten for the cell; as well as about values rejected before staten.

output: assertives describing accepted values for the cell, as well as rejected values for its neighbours {(rowp, columnq}) at staten+1; p and q which index row and column for the neighbours indicate a matrix.

AA0610 = ([accepted:Value: va, b].[row:XY:rowa].[column:XY:columnb]. [when:State:staten+1]; AA) AA0710p,q = ([rejected:Value:va, b].[row:XY:rowp].[column:XY:columnq]. [when:State:staten+1]; AA)

conversational pattern: SET

starter:

SAcell = ([test:Set: ALL:*].[dimension:Param: ALL:*].[when:State: ALL:*]; SA)

commissives:

CA06 = ([accepted:Value: ALL:*].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CA) CA07 = ([rejected:Value: ALL:*].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CA) CD08 = ([accepted:Value: ALL].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CD) CD09 = ([rejected:Value: ALL].[row:XY: ALL:*].[column:XY: ALL:*].[when:State: ALL:*]; CD)

startNode: SET-1 drivers: none

input: triggerFor (SASet) contains the information setk,and staten corresponding to the invocation.

output: the set asks questions related to its own cells {(rowi, columni}); i and j which index

row and column indicate a matrix.

CA061i, j = ([accepted:Value: ALL:*].[row:XY:rowi].[column:XY:columnj]. [when:State:staten+1]; CA) CA071i, j, = ([rejected:Value: ALL:*].[row:XY:rowi].[column:XY:columnj]. [when:State:staten+1]; CA) DD0810 i, j = ([accepted:Value: ALL].[row:XY:rowi].[column:XY:columnj].[when:State:<=staten]; DD)

postNode: SET-2 drivers: SET-1

input: answersFor (listDD0810 i, j) which contain the information about which cells in the set are still waiting for a value.

output: directives asking for rejected values related to those cells still waiting.

DD0910 p, q = ([rejected:Value: ALL].[row:XY:rowi].[column:XY:columnj].[when:State:<=staten]; DD)

postNode: SET-3 drivers: SET-1,SET-2

input: answersFor (listDD0810 i, j & listDD0910 p, q) which contain the information about free cells and restricted values for them.

output: accepted values for the cells of the set, as well as rejected values for their neighbours {(rowp, columnq}) at staten+1; i and j which index row and column for the cells and p and q which index row and column for the neighbours indicate a matrix.

AA0610i, j = ([accepted:Value: vi, j].[row:XY:rowi].[column:XY:columnj]. [when:State:staten+1]; AA) AA0710p, q = ([rejected:Value:vi, j].[row:XY:rowp].[column:XY:columnq]. [when:State:staten+1]; AA)