• 沒有找到結果。

Command decomposition and processing in the system occurs in a 5-level invocation scheme.

The five layers involved in this invocation scheme are the Lexical Translation Layer, Syntactic Analyzer Layer, Event-Handling Layer, API Interfacing Layer and the OS API Layer. The highest layers present invocations with the highest level of abstraction. Invocations at these layers have a longer processing life and do not occur as much as in the lower layers. On the other hand lower layers present invocations with the lowest level of abstraction. Invocations at these layers have a shorter processing life and occur with much more frequency than at the higher invocation layers.

The behavior previously described is do to the highly task-specialized component design used that forces the distribution and breaking down of command handling calls to different layers of processing. Lower layers increase in complexity because of the higher number of invocations that are involved. On the contrary, higher layers posses a lower invocation level.

A command’s processing life is directly proportional to its nature, since different commands result in different execution paths [20], so the nature of the command directly affects what layers its invocations traverses.

3.5.1 Layered Sequential Invocation Example

The following example is of a valid command utilized in the system. We take an inside look at all the different types of invocations that take place as the command gets processed as it transverses the above described layer structure (Figure 28) in a top-down manner.

Recognized command by the speech engine: dragactor Actor1 to coordinate 5,6

Figure 29. Example of Sequential Invocation

When the command enters the Lexical Translation Layer it gets processed in to a single Token Set that gets sent to the Syntactic Analyzer Layer through a single invocation.

During the parsing at the Syntactic Analyzer, the sub-structure belonging to “dragactor” is found.

This substructure gets further parsed until the first invocation to the Event Handling Layer is found:

“set the cursor to movement”

This Invocation to the Event Handling Layer is then separated in to two invocations executed on the Windows API Interfacer Layer:

“disable left click emulation”

“disable drawing mode”

These two invocations simply set two values inside the Windows API Interfacer Layer to a Boolean value and their execution ends in this layer.

Back at the Syntactic Analyzer Layer, the parsing continues and the next sequence of invocations to

the Event Handling Layer is found:

I.“select actor Actor1”

II.“store Actor1’s current location”

III.“set the cursor mode to dragging”

Invocation ( I ) will trigger the Event Handling Layer to simply invoke its internal component that handles actors, this invocation will set the current actor in the system to “Actor1”. No further processing is required thus the next invocation at the Syntactic Analyzer Layer gets processed.

Invocation ( II ) will trigger the Event Handling Layer to simply invoke its internal component that handles actors, this invocation will store the current actor location in the system for later referencing.

No further processing is required thus the next invocation at the Syntactic Analyzer Layer gets processed.

Invocation ( III ) triggers two invocations that occur in sequence inside the Event Handling Layer:

A. “enable left click emulation”

B. “enable drawing mode”

These two invocations get served at the Windows API Interfacer and simply set two values inside the Windows API Interfacer Layer’s Mouse AI component to a Boolean value of “true” in order to enable the dragging mode, ending their execution at this layer.

After this invocation, back in the Syntactic Analyzer Layer, the parsing continues and the next invocation to the Event Handling Layer takes place when a match of the word “To” occurs during the parsing. The corresponding invocation under the next left derivation is:

“set selected grid square”

This invocation to the Event Handling Layer triggers the following invocations in the Windows API Interfacer Layer:

I.”set cursor location”

II.”set actor location”

III.”emulate click”

Invocations (I) and (II) get executed at the Windows API Interfacer’s Mouse AI component. (I) sets the cursor location to a specified position in this case “5,6” thus dragging the actor to that position.

(III), on the other hand, invokes the following API calls at the OS API Layer in a sequential order:

“mouse event left down”

“mouse event left up”

These API calls perform a mouse click by first holding the left mouse down and then releasing it.

This is an example of an Invocation that traversed all the existing layers from top to bottom in order to achieve completeness.

Back in the Windows API Interfacer Layer invocation (II) gets handled locally without the need of interfacing with other layers, but instead utilizing the local Actor Handling Component to set the actor to its new location.

3.6 Conclusion

In this chapter the proposed system is introduced and studied in great detail from a high to low level perspective. The different architectural views are analyzed and the behavioral interactions amongst the entities that compose the system are discussed in detail. Overall this chapter provides the reader with a detailed and comprehensive view of all the features, processes and interactions that occur transparently when the user interacts with the system for interfacing applications with recognizers or interacting with applications. This chapter is structured in a task oriented manner, organizing it by separating the different tasks done by the system and going through each of them in detail to enrich the reader’s perception of the overall interfacing environment and its sequential command processing behavior.

The following chapter introduces and discusses the proposed system’s internal language definition.

CHAPTER FOUR

Interfacing Script Language Definition

4.1 Introduction

This chapter describes the language definition of the script language used in this system for users to interact with the interface interfacing environment that references applications. This chapter unveils every aspect of the designed language, its data types, rules, syntax description, and the interpretation steps involved in command processing.

相關文件