• Nenhum resultado encontrado

5 The AUSTIN machine put in perspective

5.2 AUSTIN as a Blackboard

sources. For this task it can use information on KSs and data stored on the blackboard. Metaphorically, a control unit is given the role of discussion leader.

… A system with a blackboard architecture is basically data driven. It detects and exploits opportunities for system activities …

… A blackboard architecture which allows concurrent execution of knowledge sources is called a parallel blackboard architecture, provided that the blackboard and control unit are not distributed. A distributed blackboard architecture is a blackboard architecture with a distributed blackboard and control unit.

5.2.1.1 Definition of the main concepts Blackboard

The blackboard itself can be a very complex data structure, consisting in panels, each divided in levels storing ‘units’:

A blackboard unit is a data structure filled with data together with an identifier. A blackboard level is a dynamic abstract store for blackboard units together with an identifier. A blackboard panel is a (possibly partially) ordered set of blackboard levels together with an identifier. A blackboard is an (also possibly partially) ordered set of blackboard panels, together with a number of procedures for accessing its constituents and (optional) additional organising relations.

KS and KSI

A knowledge source or KS is an activity, implemented as a piece of program, called the KS action part (Acti corresponding to KSi), together with a data structure that describes the action part: the KS descriptorThe condition of a KS defines the set of blackboard states for which the KS is annotated as applicable... A precondition is that part of the condition of a KS that determines applicability of a blackboard by using solely blackboard state information.

A knowledge source instantiation, or KSI, denotes a pair consisting of a KS and a context (bound variables, determined by the blackboard state in which this particular KS became applicable)

Events

Even when events are descriptive, they remain very simple pairs (attribute, value): “An event is a data structure representing a state change. In the blackboard architectures we examined, events are either implemented as tokens or as attribute-value pairs. Generally, tokens (also named labels: names to indicate a specific interaction with the blackboard) can be more efficiently matched

with conditions, but are much less flexible than more descriptive events and also necessitate a clear a priori understanding of which events are relevant.”

5.2.1.2 Formalization of the communications

According to Milner’s Calculus of Communicating Systems (CCS) [Milner, 1989], the interaction between processes is signified by a set L of labels; ‘labelx’ denotes input while

‘labely’ denotes output. Typically ‘labelx’ can only communicate with ‘labelx’.

Other conventions in CCS are the following:

α.P The prefix constructor ‘.’ is used to indicate succession. α.P means: “process P follows action α”. The CCS formalism does not require α to have finshed before P starts, only that α has been observed before P begins.

done The special communication ‘done’ indicates that a process has terminated.

P ; Q The construction ‘P ; Q’ indicates that the process Q will proceed after the process P emits the special communication ‘done’.

P + Q Summation ‘+’ indicates choice. ‘P + Q’ means: either P or Q.

P | Q The composition symbol ‘|’ indicates concurrency. If P and Q are defined as a succession of sub-actions, they may be interleaved (if P = p1.p2 and Q = q1.q2, then P | Q = p1.p2.q1.q2 + p1.q1.p2.q2 + p1.q1.q2.p2 + q1.q2.p1.p2 + q1.p1.q2.p2 + q1.p1.p2.q2).

P \ L The symbol ‘\’ is used to hide direct communication opportunities, i.e. (port. P) \ {port} can not communicate over labels ‘port’ and ‘port’.

With the help of Milner’s formalism, [Velthuijsen, 1992] describes the dynamic behaviour of a blackboard system by the following equations:

Let ‘n’ be the number of KS, and ‘m’ the number of available processors to be scheduled for their execution (it is supposed here that no priorities have been associated with KS):

BBS = (BB | KS1 | … | KSn | Sched (m))\ (L = {read, write, start, end}) BB = read.BB + write.BB

KSi =KSi | KSIi i = 1, …, n

KSIi = read(x).(Matchi(x); Acti(x); done + done) i = 1, …, n Matchi(x) = 0 if there is no match, Matchi(x) = done otherwise

Acti(x) = start.Act’i(x) i = 1, …, n

Act’i = int-act.Act’i + read.Act’i+ write.Act’i+ end.done where ‘int-act’ denotes an internal activity of the KS

Sched (m) = Sched | … | Sched ‘m’ times Sched = start.end.Sched

Sched (0) = 0

5.2.1.3 About the control: applicability and selection

Applicability of a KS is decided by the mapping Matchi between the current state of the blackboard and the condition of the KS. KS selection is a mapping sel determining a subset of existing KSI to be executed. This can be put in equations for sequential, parallel as well as distributed blackboards, but we consider it outside the scope of the current comparison.

5.2.2 AUSTIN: a blackboard with semantically controlled events

There is indeed a close matching between AUSTIN concepts and the ones present in blackboard architectures; we illustrate this in Table 16:

AUSTIN concepts Blackboard concepts

utterance Blackboard unit

addition or removal of utterance Blackboard event

conversational pattern KS

commissives KS descriptor (data structure describing

the action part of the KS) starter of conversational pattern KS condition

instantiation of conversational pattern KSI

conversation node action Acti(x)

test (for invocation, activation or revocation of patterns)

Matchi(x) AUSTIN conversational machine Control unit

Table 16: Mapping between AUSTIN and blackboard concepts

The AUSTIN conversational machine, when considered as a blackboard, has the following characteristics:

i) read/write events have great expressivity; instead of being simple couples (attribute, value) they may be complex objects, e.g. conceptual graphs as exemplified in [3.9];

ii) the blackboard itself is not structured in distinct levels and/or panels, but is structured by the three relations between sentences : reductionOf, answerFor

and triggerFor;

iii) because of this expressivity of sentences and this relational structure of the blackboard, the whole control is supported in a simple way: there is no distinction between ‘triggering mechanism’ and ‘precondition’, and the rule for answering questions plays the role of ‘Match’;

iv) the control strategy is independent of the use case. This means that ‘domain experts’ need not worry about the control; it is fully embedded in the abstract machine; moreover this control leads to finite and deterministic computation of the initial state of the blackboard;

v) the knowledge sources are themselves structured in nodes which are the basic working components for the abstract machine; reasoning on the computation can therefore be easily done at the node level.