Ismael Mejía
email: ismael.mejia@mines-nantes.fr

Ascola

STRUCTURED AND FLEXIBLE GRAY-BOX COMPOSITION USING INVASIVE DISTRIBUTED PATTERNS 1,2

Keywords: Software Composition, Software Engineering, Distributed Software, Aspect Oriented Programming, Grid Computing, Middleware

The evolution of complex distributed software systems often requires intricate composition operations in order to adapt or add functionalities, to react to unanticipated changes, or to apply performance improvements that cannot be modularized in terms of existing services and components. These evolutions often need controlled access to selected parts of the implementation, e.g., to manage exceptional situations and crosscutting within services and their compositions. However, existing composition techniques typically support only interface-level (black-box) composition or arbitrary access to the implementation (gray-box or white-box composition). In this paper, we present a structured approach to the composition of complex software systems that require invasive modifications. Concretely, we provide three contributions: (i) we present a small kernel composition language for structured gray-box composition using invasive distributed patterns; (ii) we motivate that gray-box composition approaches should be defined and evaluated in terms of the flexibility and control they provide, a notion of degrees of invasiveness is introduced to help assess this trade-off; (iii) we apply our approach to a new case study of evolution and evaluate it in the context of two previous studies involving two real-world software systems: benchmarking of grid algorithms with NASGrid and transactional replication with JBoss Cache. As a main result, we show that gray-box composition using invasive distributed patterns allows the declarative and modular definition of evolutions of real-world applications that need moderate to high degrees of invasive modifications.

INTRODUCTION

The evolution of large-scale distributed software systems often requires the unanticipated introduction of new functionalities or the modification of existing ones. Such evolution tasks are often inherently difficult because of two fundamental problems. First, the compositions cannot be expressed only in terms of the interfaces of the involved systems (non-invasive modifications) but also imply changes to some (typically limited) parts of the corresponding implementations. Second, the compositions often involve functionalities that are not well modularized in the existing systems or in the resulting composed system. Such composition problems occur frequently in legacy ERP systems that, e.g., to cope with new security requirements imposed by changing legal frameworks, such as the Sarbanes-Oxley act in the U.S. (such evolution problems for SAP AG's SOA infrastructure are considered, e.g., in the CESSA research project).

Fig. 1. NASGrid: application structure and scheduling-relevant code parts

As a concrete real-world example (that we will consider in more detail later on), we have studied NASA's NASGrid benchmarking infrastructure for computational grids [START_REF] Frumkin | Nasgrid benchmarks: a tool for grid space exploration[END_REF]. This benchmark is used to time grid computations that may execute on different communication topologies. Fig. 1 shows the main components, shown with gray background, of the NASGrid benchmarking frameworks: three sets of classes that respectively provide a benchmarking interface, exception handling (principally of network conditions), and management of the graph structure representing the graph communication topology (the remainder of the system being constituted essentially by routines for numerical algorithms, called computational tasks in the figure).

NASGrid basically executes computations on distributed nodes and forwards intermediate results according to communication dependencies defined in terms of a topology graph. Grid computations are aborted in the case of exceptions, such as severe network errors; task rescheduling in the case of exceptions is not supported. We have investigated an evolution of NASGrid to add this useful functionality that fits well with existing, frequently long-running, grid applications. Our analysis of the existing code base has shown that the extension of NASGrid by task rescheduling partially requires modifications to the existing interfaces (i.e., sets of public classes and methods that are marked by disks in Fig. 1). However, the extension also requires some access to the NASGrid implementation because the necessary modifications as a whole are crosscutting with respect to the existing structure of NASGrid (the corresponding classes are marked by stars in Fig. 1).

Performing such evolutions using mainstream languages or development methods is highly difficult and error prone: (i) the crosscutting nature of such evolutions involve a potentially large number of modifications that have to be carefully synchronized; (ii) structural means and semantic properties should be supported in order to control the effects of invasive modifications to implementations.

In this paper we present an approach of structured invasive, i.e., gray-box, composition that supports accesses to interfaces and implementations through compositions of basic programming patterns for invasive access, resulting in gray-box compositions whose degree of invasiveness and their impact on an implementation can be controlled explicitly and flexibly. Furthermore, these operators allow crosscutting functionalities that are part of the subsystems to be expressed modularly.

Concretely, we present two three contributions: First, we introduce a kernel language for invasive composition that enables explicit and expressive compositions of invasive distributed patterns (Benavides L. et al, 2008) (henceforth simply called invasive patterns). Invasive patterns and compositions thereof provide flexible control of gray-box compositions and support the modularization of crosscutting functionalities using aspect-oriented programming techniques [START_REF] Kiczales | Aspect oriented programming[END_REF]. We also briefly present an implementation of this kernel language using the AWED system [START_REF] Benavides | Explicitly distributed AOP using AWED[END_REF], (AWED website, 2010) for explicitly-distributed AOP.

Second, we present and evaluate how our approach supports an evolution scenario that adds task rescheduling to NASGrid. This extension is non-trivial and interacts with the original application at 28 places. We show how to modularly implement it by an aspect and four new ordinary classes.

Third, we motivate that gray-box composition should provide flexibility but also strong (structural and property-based) control over invasive modifications. Control is particularly important in order to provide correctness guarantees in the presence of crosscutting concerns. We introduce the notion of degrees of invasiveness. These degrees enable complex compositions to be assessed with respect to their needs for invasive modifications.

Our results show that invasive patterns allow a whole space of evolutions to be expressed that require moderate to high degrees of invasive modifications. Furthermore, compared to previous work they support stronger control over the impact of invasive modifications. This result is backed by an analysis of three evolutions of real-world applications: apart from NASGrid task rescheduling, we discuss two other case studies that we have performed as part of previous work: a less invasive evolution of NASGrid for checkpoint introduction; and a much more invasive evolution of JBoss Cache, a middleware for transactional replication of data in distributed systems.

As to our knowledge, no other approach to gray-box composition has been applied to such a range of evolution scenarios and provides enough flexibility and control to fully modularize the necessary changes.

The article is structured as follows: Section 1 motivates gray-box composition problems in the context of the NASGrid benchmarking application. We define our kernel language for invasive composition in section 2. In section 3 we apply our method to introduce task rescheduling into NASGrid. The characterization of gray-box composition in terms of flexibility and control is presented in section 4. Section 5 presents related work and section 6 concludes.

STRUCTURED AND FLEXIBLE INVASIVE COMPOSITION

While gray-box composition is a well-known and widely-used concept, it is almost always realized in the form of principles and constraints on the use of general-purpose mechanisms which may modify architectures and applications in an unrestricted manner. Frequently, gray-box compositions are therefore implemented using sequences of low-level refactoring transformations or even in terms of arbitrary modifications using general-purpose programming languages. Furthermore, they are rarely supported by higher-level design methods or guided by pattern-based composition strategies. This approach allows arbitrary compositions to be applied but provides only very few structure to help understanding of the modifications. Furthermore, the correctness of the resulting modifications can only be ascertained with much difficulty. Finally, most existing approaches provide little support for crosscutting functionalities, such as task rescheduling in the NASGrid application that cannot be defined concisely and modularly using traditional notions of, e.g., objects and components.

In this section, we provide structured language-level support extended the approach of invasive patterns for invasive composition. We first introduce and discuss several high-level requirements that approaches for invasive composition should meet. We then give necessary background information on invasive patterns before introducing our new kernel language and a first implementation. Finally, we revisit our approach in light of the initial requirements.

Requirements

Evolution scenarios as discussed in the previous section require three essential requirements to be addressed: R1) Enable flexible modifications to the coordination of distributed communications and computations Note that we are less interested in arbitrary refactoring but rather in the coordination of activities in a comprehensive sense, notably message exchanges, remote events and remote execution of activities, as well as the scheduling of activities. R2) Support modularization of crosscutting functionalities that are subject to evolution tasks Crosscutting functionalities are of paramount importance in most large-scale software systems, notably distributed ones. We therefore strive for an evolution method that allows to smoothly integrate them.

R3) Provide structural and property-based control over modifications, in particular invasive ones

Structural control enables modifications to be defined in a modular way (with respect to the original software structure). Property-based control permits the definition of modifications in terms of the execution history of computations, including predicates on the current execution state. As to the best of our knowledge, a fair number of previous approaches supports R1 or R2 (the latter being limited to AO or reflective ones) but none supports all three requirements.

From a general point of view, we address these three issues as follows: we exploit invasive patterns as basic abstractions in order to express coordination and communication requirements of distributed applications that involve crosscutting functionalities. We introduce a composition language over patterns that enables the definition of structured and flexible pattern compositions whose effects may be controlled, e.g., by limiting invasive accesses to contexts defined by event sequences. In the remainder of this section we briefly revisit the notion of invasive patterns for distributed programming and then define a kernel language for the flexible composition of such patterns. Finally, we show how such pattern compositions can be implemented in terms of the AWED system [START_REF] Benavides | Explicitly distributed AOP using AWED[END_REF], a system for distributed aspects.

Invasive patterns

Invasive patterns (Benavides L. et al, 2008) have been introduced as generalizations of standard parallel and distributed programming patterns. Fig. 2 shows three invasive patterns we consider: a gather, a farm and a pipelining pattern. All of them match sequences of execution events (illustrated by the dotted curves) over calls to interface methods or methods called in the implementation. These sequences are matched on one or several source nodes, construct data (using a computation represented by the filled rectangle on the source nodes) that is sent to target nodes and integrated into the computations there (as represented by the filled rectangle on the target side). Invasive patterns allow quantifying over sets of source and target nodes, in particular, the event sequences that trigger actions as well as the actions themselves.

Fig. 2. Invasive Patterns

Invasive patterns provide basic support for the three requirements mentioned above: as frequently used patterns for distributed programming, they support distribution coordination (R1); modularization of crosscutting functionalities (R2) can be achieved by means of aspects for the definition of event sequences (history-based point-cuts in AOP-speak) and actions (advice in AOP-speak) that compute data to be transferred from source to target nodes and that integrate data into target computations. Finally, some control over accesses and computations is provided by their fixed overall structure.

A kernel language for non/invasive composition

In this paper, we introduce a composition language over invasive patterns in order to fully address the requirements for evolution tasks. We strive, in particular, for a language that enables flexible compositions of patterns to handle more complex crosscutting functionalities and provides better control over, possibly invasive, modifications performed by pattern compositions.

Fig. 3. Kernel language for invasive composition

Fig. 3 presents the essentials of our kernel language for invasive composition. Some remarks on notation: non-terminals, such as Prog or P start with an upper case letter and are set in italic font; lexical categories, such as e are denoted by lower case, italic letters; terminals, such as if set in typewriter font. X denotes finite sequences of expressions of non-terminal X. (A more elaborate version of the language that supports, e.g., repetitions in form of regular expressions is in preparation but not needed for the extension of the NASGrid application by dynamic task rescheduling considered in this paper.)

The intuition behind this core language is as follows: operators match contexts that trigger sequences of adaptations. Contexts are built from event sequences that may be guarded. Adaptations include simple manipulations enabling the insertion of glue code, such as communication statements, but also potentially complex pattern compositions built from the three invasive patterns introduced above.

The grammar defines the following syntactic categories: (evolution) programs Prog, patterns P, contexts Ctx, adaptations Adap, and guards G. (Evolution) programs are sequences over evolution operations (instantiations of invasive patterns or pattern compositions). A pattern is defined as a pair of a context and an adaptation. Such a pattern, say (s; t) denotes adaptations on sources s and targets t, typically the extraction of data on sources that are send for further handling to the targets.

Contexts basically of sequences of guarded events, i.e., events that may be matched on specific hosts (represented by subscript h) or under specific conditions (represented by B, the nature of which is unspecified here; typically we expect conditions of limited expressiveness to support property analysis and verification). Adaptations basically come in two forms: sequences of (i) possibly guarded events that represent (computation or communication) glue code potentially triggered on specific hosts and under specific conditions; (ii) structured adaptations in form of pattern compositions.

Note that patterns and pattern compositions may form both the context and adaptation parts of operators. Patterns used in a context position define (possibly guarded) event sequences where an adaptation takes place. Patterns in context position may also perform adaptations themselves: this is used, e.g., to prepare information that is extracted from the context and has to be sent to another host as part of the adaptation (of the encompassing pattern definition). Similarly, patterns as adaptations are typically used to define modifications to be performed locally on the target of the encompassing pattern definition.

Examples. As a first simple example in the context of task scheduling, consider the problem that we have to determine exceptional states at a given node and prepare corresponding summary information to be used for task rescheduling. The exceptional situation may only be relevant for NASGrid task rescheduling in specific contexts and not generally on the occurrence of a given event. This can be modeled by a pattern of the following form is a sequence of events that characterizes the interesting exceptional situations and summarize calculates the summary information based on the past events. Note that, in this example, all events happen on the same node but in general context definitions may refer to remote events.

Our language supports powerful pattern compositions. As a second example in the context of task rescheduling, consider that we need to farm out inquiries about potential exceptional situations to successor nodes and gather the resulting summary information in order to decide on concrete rescheduling actions. This can be defined application of a farm pattern followed by a gather pattern. The farm will match an event sequence on the orginating node, extract information that is needed to identify relevant exceptional situations, send and inject it into the successor nodes. The gather pattern will then monitor for relevant exceptional situations on all successor nodes, summarizes the information on the successor nodes, returns and inject the information on the originating nodes. This algorithm can be defined using our kernel language as follows:

This definition makes explicit the composition of the two patterns farmP; gatherP. The pattern definitions are expressed in terms of the execution events relevant for task rescheduling all events are indexed by the hosts they occur on, either the original one o or each host from the set of successors s) and calls to three auxiliary methods identify o ; inject s ; summarize s (all applications of these methods are also located either on the original node or all successor nodes). Note that in this example, the methods are executed on the same hosts on which the information they depend on (i.e., the arguments to the methods) is found: this is not the case in general.

Implementation using AWED

The AWED system provides an aspect model for distributed systems that provides means for the monitoring of sequences of events, history-based point-cuts in AOP-speak, that occur on different (groups of) hosts. Such event sequences are described in terms of guarded finite-state systems; AWED also provides various means to trigger actions, advice in AOP, where the corresponding point-cut defining event sequences are matched.

The language above can be implemented using AWED in terms of event sequences that define the, interface-level or implementation-level, context (Ctx in the above grammar) and use actions to define adaptations (Adap). Invasive patterns (farm, gather, pipeline) are then implemented as pairs of aspects corresponding to source and target computations of the patterns. Pattern compositions, say p 2 ѻ p 1 , are implemented by aspects that match end-marking events in p 1 and trigger execution of p 2 . We have implemented task rescheduling for NASGrid using AWED this way. Fig. 4. Implementation of task rescheduling in NASGrid using AWED Fig. 4 shows the main component of the implementation of the task rescheduling aspect. Here, the pointcut taskRescheduling (lines 4-11) defines a mixed interface/implementation-level context that identifies exception occurrences (state EXCEPTION) and, possibly multiple, choices of alternative available hosts (state LOOKUP). The second advice (lines 18-27) chooses an alternative and restarts the benchmark (i.e., triggers a farm pattern that sends info to the successor nodes of the current one). Overall, this language provides flexible structured invasive access through pattern compositions that may be subjected to explicit control through predefined compositions and the precise definition of application contexts by means of event sequences.

Fig. 5. Invasive Composition Interface

Implementing composition of invasive patterns. Fig. 5 shows an interface we have developed that represents a subset of the above language that makes explicit invasive patterns and pattern compositions. The pattern composition constructors enable building of compositions from simple operators (constructor op), sequences of compositions (seq), and compositions of farm and gather patterns (the latter two being expressible as sequences and are necessary for the task rescheduling example).

Requirements revisited

We are now ready to evaluate our approach in the light of the requirements introduced above.

R1) Patterns directly allow communications and computations to be coordinated as the passing of information and synchronization between the context and adaptation components of patterns. R2) The modularization of crosscutting functionalities is also directly supported through the quantification over events within the context and adaptation definitions as well as the indexing of events and pattern definitions over sets of hosts. Furthermore, the context and adaptation components of a pattern are similar to the point-cut and advice of traditional aspect languages. R3) Structural and property-based control over invasive compositions is supported by means of the flexible constraints that can be harnessed as part of pattern definitions, e.g., in terms of sets of hosts and condition guards. Our composition approach meets the three requirements.

APPLICATION OF FLEXIBLE INVASIVE COMPOSITION FOR SOFTWARE EVOLUTION

Middleware, i.e., typically component-based software that mediates between a (potentially) distributed operation systems and applications, is a popular approach to cope with the increasing complexity of the development of software systems.Middleware has been accepted by the Industry as a core component of programs that range from web applications to complex data processing architectures, which forms out a core element of multiple applications like financial solutions, enterprise information systems, complex scientific applications, etc. Middleware is frequently subject to evolution because changes in the requirements at the system and application levels may also require changes to the mediating abstraction.

In this section we consider the implementation of an evolution scenario realized using invasive patterns in the context of a real-world middleware system of medium size, the NASGrid application (ca. 21 KLOC). Concretely, we present an evolution scenario which introduces task rescheduling to NASGrid: task rescheduling allows to continue execution of a grid benchmark in case that an originally planned pathway is no longer available. We especially study the use of invasive composition for task rescheduling and how our language can be used to exert control over invasive modifications.

NASGrid: A grid benchmarking application

We first briefly introduce the application which is a target for the evolution scenario: NASA's NASGrid benchmark for benchmarking executions of grid applications. Grid applications execute complex computations in heterogeneous network topologies. NASGrid supports the formulation of grid algorithms in terms of four different patterns akin to those for massively parallel programming: Helical Chain (HC), Visualization Pipe (VP), Mixed Bag (MB, see figure 6 left) and Embarrassingly Distributed (ED). In order to model different grid algorithms, NASGrid permits to define a data flow graph (DFG, see figure 6 right) that represents the different computations to be executed in the network as well as the (asynchronous) data flow between them. Each computation on a node is modeled by an individual worker thread that executes some numerical computation using common grid algorithm building blocks, such as LU matrix decomposition and Fourier transforms (FT). These computational tasks are supervised by a coordinator thread which sends the results to other nodes as defined by the topology graph. A program like this is commonly executed to measure the performance of a grid architecture. However, there are many aspects that NASGrid ignores, e.g., how to react if a node is down, how to save the state during a computation, or how to measure those additional tasks: all of these are common problems that grid infrastructures must handle to be flexible enough to handle, e.g., common exceptional situations in a distributed system.

Invasive composition for NASGrid task rescheduling

Task rescheduling is a common strategy to achieve high availability in fault-tolerant systems. In a nutshell, it consists in the capacity to reschedule tasks, e.g., in the case of errors or for purposes of load balancing, in order to correct or optimize distributed applications.

The main obstacle for adding task rescheduling in NASGrid, is the static topology representation and benchmark execution. In terms of the NASGrid system architecture shown in Fig. 1, the graph manipulation part does not accommodate topology changes, and the benchmarking part does not allow to probe the status of network connections, nor to test the availability of remote hosts, nor to modify the routing of data between nodes. Our extension to NASGrid introduces these features and exploits them when an exceptional situation occur. In order to achieve that goal we have to extend the interfaces (of interfaces and classes marked disks in the diagrams) and the implementation of the classes (that are marked by stars in the figure) at multiple points. Note that a almost all disks or stars represent several modifications within the same interface or class. Overall, NASGrid has to be modified at 28 locations to extend it modularly by the task rescheduling functionality.

In order to give a concrete idea of which code manipulations are involved in invasive accesses and pattern compositions, let us first have a look at the code excerpt shown in Fig. 7. This excerpt shows the NASGrid code for localization and propagation of data between nodes. In case that a remote node is unavailable (lines 14-17) no reaction is taken and the exception is only passed along. However, as this method makes explicit the data on the real successor nodes of the current node (lines 4-8), we have to access it to update the new node information with the corresponding data after rescheduling. We have extended NASGrid by using invasive composition operators implemented with sequences in AWED as presented in Fig. 4. This required the extension of two interfaces: Benchmark to enable dynamic task rescheduling, and DGraph to permit the dynamic modification of the graph. We also used controlled invasive accesses to inject new code for coordination that corresponds to the identification of the precise context in which exceptional situations have to be handled by means of a sequence of events. and then a farmGather composition operator (cf. 5). Fig. 8 illustrates the resulting compositional algorithm (which gives a high level view of the patterns involved to modularize the task scheduling functionality): when a benchmarking execution fails (represented by the dashed circle) the exception is matched, and an execution of a farm pattern that sends a request to all successor nodes is triggered, then we use a gather pattern to collect the availability and load average information of all successor nodes and proceed to select the best available node (bold node in the figure) and reschedule the computation.

Concretely, using our AWED implementation this is performed using the rescheduling aspect shown in Fig. 4, lines 4-11, we first identify exceptional situations as a context in which a correct initialization (state CONFIG) and the start of a concrete benchmark (START) is followed by a relevant exception (EXCEPTION) to the method Benchserver.PutArcData. We then get the list of successor nodes (state LOOKUP) that are admissible by the topology of the grid application as defined by the user through the class Nodemanager. At that point, the second advice is applied (lines 18-27) that applies the farmGather composition in order to choose the best alternative and invasively modify the graph topology of the run by a call to the method adapter.updateGraphDefinition. Finally, we restart the benchmarking operation proper (RESTART).

The implementation of NASGrid consists of 20490 LOC. The task rescheduling concern is implemented as a whole module using the concepts of invasive operators using 391 lines of code that correspond to the TaskReschedulingAspect in AWED (97 LOC) and three auxiliary classes DFGAdapter, NodeManager and TaskUtility (294 LOC). These classes perform the dynamic graph manipulation and manage the task relocation to the new nodes. Overall we therefore achieve a concise, fully modularized and compositional implementation of the extension of NASGrid by task rescheduling, Furthermore, the composition shown in Fig. 8 provides very precise control on the contexts in which invasive modifications are performed and thus enable, in principle, to model check properties over the event sequences defining such compositions (this is however future work).

Finally, note that the overhead of task rescheduling basically consists, for each exceptional situation, in 1. a sequence of a small number of locally executed instructions up to the exceptional situation, followed by 2. a small number of parallel executions of sequences of two message exchanges for the farmGather composition and 3. a small number of local instructions to reschedule the benchmark). This overhead is clearly negligible compared to the execution of the benchmark itself in almost all use cases (i.e., unless exceptional situations abound, a case that should very rarely happen in a reasonable application of NASGrid).

GRAY-BOX COMPOSITION: FLEXIBILITY VS. CONTROL

Black-box composition is a desirable property for a composition framework because it enables a strict separation of duties in the implementation, use and maintenance of components. These properties only apply to a lesser degree when gray-box composition mechanisms are used (and even not at all in the borderline case where gray-box composition meets white-box composition). Since invasive composition is frequently needed for evolution tasks, in particular, of legacy software systems, it is therefore important to be able to estimate (i) when invasive composition is technically and practically feasible, and (ii) to what extent the desirable properties of black-box composition hold. However, no corresponding studies exist and the existing literature on gray-box composition (notably (Assmann U., 2003), (Kellner K. et al, 2000), (Kojarski S. et al, 2005)) addresses these questions rudimentarily at best.

A systematic treatment of the trade-off between flexibility of the compositions and properties such as implementation independence and provision of correctness guarantees has to be based on main parameters:

-Qualitative and quantitative information of the degree of invasiveness that is needed, in particular, in the context real-world applications. -An analysis of existing composition approaches with respect to the flexibility of and the control over the invasive modifications they provide, as well as the definition of corresponding new composition mechanisms. In the following we present the first analysis (to the best of our knowledge) of the application of gray-box composition techniques that require a widely different degrees of invasive access.

Analysis of three real-world evolution scenarios

In previous work we have applied invasive patterns (without support for pattern composition as introduced here) to two other evolution scenarios, an extension of NASGrid for checkpointing injection and an extension of the replication strategy of JBoss Cache, an infrastructure for replication under transactional control that is part of the JBoss Application Server.

Checkpointing in NASGrid. We have shown how a different reliability property of NASGrid can be improved upon via the introduction of checkpoints (Benavides L. et al, 2008). A checkpointing algorithm for error recovery defines a protocol to create checkpoints (snapshots of the distributed states), and guarantees the global consistency by returning to a previously-recorded state in the case of failure. As we only have to add the snapshot creation and recovery actions, the degree of invasive access required is limited. It is restricted to just the context definition that triggers the snapshot creation, it also includes invasive access to the unexposed data structure in order to create its backup and play it back as part of the recovery.

Evolution of the JBoss Cache replication strategy. We have also shown how to extend the replication strategy of JBoss Cache, an infrastructure that replicates data within a cluster of distributed nodes [START_REF] Benavides | Invasive patterns for distributed programs[END_REF], (Benavides L. et al, 2008). The cache ensures that data replication is consistent with the transactional control over independent accesses to a distributed database. The replication and transaction functionalities are heavily crosscutting within the JBoss Cache implementation (accounting for more than 500 LOC in total scattered over a code base of around 50 KLOC). This refactoring scenario required a high level of invasive access but both concerns, replication and transactional behavior has been fully modularized using invasive patterns (once again without explicit pattern compositions). Degrees of invasiveness. Fig. 9 shows crosscutting diagrams for these two scenarios and the Task rescheduling case study presented in this paper. In the three diagrams columns represent Java classes and stripes within the columns represent the code that is relevant for the corresponding crosscutting functionality: code relevant for checkpointing injection in 9a, code necessary for the definition of task rescheduling in part b, and code implementing transactions or replication functionality in part c.

These figures clearly show that the three case studies require compositions of largely different degrees of invasive access. The checkpointing evolution requires very limited invasive access, the task rescheduling one a moderate number of accesses, and the replication evolution a large number of invasive accesses. Furthermore, none of the three evolutions can be implemented using exclusively black-box composition, and the latter two scenarios are difficult to perform with traditional (white-box) programming mechanisms.

Analysis of the use of invasive patterns

We can now evaluate the use of invasive patterns in these three evolution case studies with respect to the main trade-off flexibility (of compositions) vs. control (that supports in particular correctness guarantees).

Overall this analysis provides solid evidence that invasive patterns provide, in contrast to all previous approaches to gray-box composition, sufficient flexibility and reasonable control to accommodate all degrees of invasiveness required in real-world applications.

Flexibility We have been able to perform all three evolutions in a fully modular way using invasive patterns, thus providing solid evidence that our approach is flexible enough to support applications which require limited invasiveness but also those applications with highly invasive and crosscutting concerns.

Control Our approach provides control over gray-box compositions through the declarative definitions of complex evolutions using pattern compositions. In the case of task rescheduling, the pattern compositions define, for instance, how communications and computations have to be coordinated. Furthermore, the context definitions in patterns define precisely which (potentially crosscutting) execution events are relevant for graybox compositions.

The pattern applications used in the NASGrid checkpointing evolution can straightforwardly be expressed using our pattern composition language and the resulting additional control would allow, e.g., to reason over the correctness properties of checkpoint-based recovery (which is, admittedly rather simple in this case anyway due to the limited invasive nature).

In the case of the JBoss Cache replication evolution, the additional control provided by our composition language is crucial in order to provide the principal correctness properties, such as the absence of certain race conditions during replication. This is however subject of future work.

RELATED WORK

Our work is mainly related to three types of work:

-Other approaches to gray-box composition of software entities. -Approaches that use aspects in order to invasively manipulate software entities, mostly components. -Work that proposes the use of patterns for distributed programming. Compared to our approach, none of these approaches provides similar flexible gray-box compositions that can be controlled precisely using a composition language.

Gray-box composition of software entities

The probably best-known analysis of gray-box composition and an approach relying on code entities with holes as basic building blocks has been presented by [START_REF] Aßmann | Invasive Software Composition[END_REF]. Composition can be controlled by standard abstraction mechanisms such as component parameterization. However, this approach is less structured than explicit pattern compositions and supports less precise control than ours. Work on aspectaware interfaces [START_REF] Kiczales | Aspect-oriented programming and modular reasoning[END_REF] and open modules [START_REF] Aldrich | Open modules: Modular reasoning about advice[END_REF] provides means to export restricted invasive capabilities in component systems without affecting important properties of modular reasoning. The work by (Kellner K. et al, 2000) discusses approaches for the construction of business processes in which different applications can be composed using black, gray, glass or white box components. Our approach, as the first one is equally suited for moderate to highly invasive modifications, but we include a methodology that combines invasiveness and distribution.

Invasive modifications using aspects

The work of [START_REF] Lorenz | Aspectual collaborations: Combining modules and aspects[END_REF] presents a model for so-called aspectual collaboration in which aspects can be used to invasively modify software entities, mostly classes. Such aspect-based approaches provide no structured support in the form of compositions of basic entities as we do and support only very coarsegrained control over invasive modifications. Kojarski and Lorenz (Kojarski S. et al, 2006) study the invasive composition of aspect mechanisms in the context of interacting requirements. They compare the interactions between an aspect for fault-tolerance and one for access-control written in different languages and with different degrees of invasiveness. Our work similarly relies on the interaction of elements with invasive capabilities. However, our language also offers expressive mechanisms to compose different patterns in order to define advanced control flows and control invasive compositions.

Patterns for distributed programming

Cole's work on algorithmic skeletons [START_REF] Cole | Algorithmic skeletons: structured management of parallel computation[END_REF] has introduced the representation of common design solutions for the implementation of principally massively-parallel algorithms via patterns who abstracted common operations like pipelines, farms, etc. Our work can be seen as providing a generalization of these patterns for the programming of heterogeneous distributed algorithms. [START_REF] Schmidt | OO design patterns for concurrent, parallel, and distributed systems[END_REF] has proposed a new set of common patterns for distributed programming, in particular for event-based programming. Other group of patterns have being studied in specific contexts, e.g., for distributed workflow systems (Van der Aarst W. et al, 2003), and in the space of synchronous/asynchronous for the integration of enterprise systems [START_REF] Hohpe | Enterprise Integration Patterns: Designing, building, and deploying messaging solutions[END_REF]. All these previous approaches for patterns for distributed systems define models for non-invasive programming. Our previous work on invasive patterns (Benavides L. et al, 2008) provide patterns as programming abstractions that can be composed manually but without the support of a flexible composition language. Our current work expands invasive patterns with a more rigorous framework that includes a concrete language to define compositions. Furthermore, we have introduced degrees of invasiveness to clarify the benefits of our approach over a range of applications with widely-different graybox composition characteristics

CONCLUSION AND PERSPECTIVES

In this paper we have studied invasive distributed patterns as a means to precise, define and implement graybox compositions for the moderately to highly invasive evolution of real-world distributed applications and middleware, in particular to satisfy a set of common requirements for the evolution of such systems. We have presented three contributions: (i) a kernel language for structured and controlled flexible gray-box composition, (ii) an application of this kernel language and a corresponding implementation using AWED, a system for distributed AOP, to the introduction of task rescheduling into NASA's grid benchmarking application; (iii) a characterization of gray-box composition in terms of flexibility and control, the evaluation of which is supported by a notion of degrees of invasiveness.

This work paves the way to the investigation of a (formally-defined) theory of gray-box composition. Such a theory should extend the structural and property-based control over flexible pattern compositions as presented in this article. Furthermore, it should be complemented by methods for the proof of properties of gray-box compositions, e.g., non-interference properties as well as properties of synchronization and sequentialization of pattern compositions. Finally, the quest for a set of operators that is complete with respect to a large number of evolution scenarios should be undertaken.

Fig. 6 .

 6 Fig. 6. Pattern (left) and topology definition (right) used in NASGrid Fig. 6 (left) represents the dataflow of a mixed bag problem, and its textual representation as a data flow graph in NASGrid (on the right).A program like this is commonly executed to measure the performance of a grid architecture. However, there are many aspects that NASGrid ignores, e.g., how to react if a node is down, how to save the state during a computation, or how to measure those additional tasks: all of these are common problems that grid infrastructures must handle to be flexible enough to handle, e.g., common exceptional situations in a distributed system.

Fig. 7 .Fig. 8 .

 78 Fig. 7. Class BenchServer (fragment) task rescheduling

Fig. 9 .

 9 Fig. 9. Crosscutting diagrams for the three evolution case studies

This work has been supported by the CESSA project (ANR 09-SEGI-002-01, see cessa.inria.gforge.fr).

A preliminary version of this article was presented at the IADIS International Conference on Applied Computing 2010(Mejia, 2010).


Bo Hu

Liang Ma

Wei Zhang

Gaverial Salvendy

Damien Chablat

Fouad Bennis

Can virtual reality predict body part discomfort and performance of people in realistic world for assembling tasks?

Keywords: virtual reality simulation, digital human modeling, evaluation of work design, ergonomics

This paper presents our work on relationship of evaluation results between virtual environment (VE) and realistic environment (RE) for assembling tasks. Evaluation results consist of subjective results (BPD and RPE) and objective results (posture and physical performance). Same tasks were performed with same experimental configurations and evaluation results were measured in RE and VE respectively. Then these evaluation results were compared. Slight difference of posture between VE and RE was found but not great difference of effect on people according to conventional ergonomics posture assessment method. Correlation of BPD and performance results between VE and RE are found by linear regression method. Moreover, results of BPD, physical performance, and RPE in VE are higher than that in RE with significant difference. Furthermore, these results indicates that subjects feel more discomfort and fatigue in VE than RE because of additional effort required in VE.

Relevance to industry

With digital mock-up and VR simulation, work design is evaluated to find potential ergonomics problems at early design stage of works in industries. It reduces cost as well as time consuming. The difference and correlation of evaluation results between VE and RE provide a reference for this method in work design.

Introduction

Musculoskeletal disorder (MSD) is one of serious occupational healthy problems to manual handling workers in industrialized countries, and it affects a significant proportion of workforce. In 2001, National Research Council and Institute of Medicine reported that MSD represented 40% of compensated injuries and cost between 45 and 54 billion dollars per year in United States (NationalResearchCouncil/InstituteofMedicine, 2001). In European Union, there was 40 millions workers suffering from MSD and the financial loss caused by MSD was about between 0.2% and 5% GDP by some estimation [START_REF] Buckle | Work related neck and upper limb musculoskeletal disorders. Luxembourg, European agency for safety and health at work[END_REF]. Hence many researches focus on analyzing potential MSD exposures and how to prevent MSD in work design.

It is believed that MSD is closely related to postures, physical overexertion, duration and frequency of physical effort, discomfort, and physical fatigue [START_REF] Pheasant | Working practices in a perchery system, using the OVAKO Working posture Analysing System (OWAS)[END_REF]. In order to prevent MSD risks, many evaluation methods have been developed to investigate ergonomics problems in design. These methods can be mainly classified into subjective (e.g., RPE, BPD) and objective evaluation methods (e.g., RULA, OWAS) [START_REF] Li | Current techniques for assessing physical exposure to work-related musculoskeletal risks, with emphasis on posture-based methods[END_REF]). Borg's scale, also called Rated Perceiving Exertion (RPE) method, has been applied for evaluating effort of subjects in variety of researches and it has been validated in consistence to several psychological variables (e.g., heart rate) [START_REF] Garcin | Ratings of perceived exertion (RPE) during cycling exercises at constant power output[END_REF][START_REF] Kim | Modelling of shoulder and torso perception of effort in manual transfer tasks[END_REF]. Body part discomfort (BPD) method was developed to evaluate discomfort intensity of subjects. [START_REF] Corlett | A technique for assessing postural discomfort[END_REF][START_REF] Lowe | Accuracy and validity of observational estimates of shoulder and elbow posture[END_REF][START_REF] Yuan | Influence of hand grenade weight, shape and diameter on performance and subjective handling properties in relations to ergonomic design considerations[END_REF]. Some posture-based observation methods have been developed to assess physical exposures objectively. OWAS was designed to facilitate evaluation process of the overall human body [START_REF] Pheasant | Working practices in a perchery system, using the OVAKO Working posture Analysing System (OWAS)[END_REF]. Posture targeting method [START_REF] Corlett | Posture Targeting: A Technique for Recording Working Postures[END_REF] and REBA [START_REF] Hignett | Rapid Entire Body Assessment (REBA)[END_REF] were designed to evaluate entire body postures, while RULA was specially designed to evaluate upper body postures (McAtamney and Corlett, 1993;[START_REF] Bao | Two posture analysis approaches and their application in a modified Rapid Upper Limb Assessment evaluation[END_REF]. However, in these conventional methods, evaluation has to be carried out in field and it requires much effort and expensive physical mock-up.

Digital human modeling and virtual human simulation (e.g., 3DSSPP™, EAI Jack ® , RAMSIS) have been created to facilitate ergonomic evaluations. Using these tools, visual scope and reach envelope of users representing specific populations can be analyzed (e.g. EAI Jack ® ) [START_REF] Chaffin | Digital Human Modeling for Vehicle and Workplace Design[END_REF]. Some DHM tools can calculate out biomechanics attributes of manual handling operations (e.g. Anybody ® Modeling System, 3DSSPP™) and give predictions of fatigue and disorder. These analysis results can be used to find and fix ergonomics problems of proposed designs and improve the work design.

Virtual human simulation provides a quick, virtual representation of human being in simulated working environment. Physical mock-up is not any more necessary in virtual human simulation, and different aspects can be assessed with rapid computational efficiency. The main issue of using virtual human simulation is that the movement or the motion is obtained via inverse kinematics, and the virtual human has a robot-like behavior, but not natural or mimic enough [START_REF] Chaffin | Three-dimensional biomechanical static strength prediction model sensitivity to postural and anthropometric inaccuracies[END_REF].

Using virtual reality (VR) technology is able to provide an immersive working environment. Several peripheral devices have been invented to provide different interaction ways between user and VR systems, such as: motion tracking systems, haptic interfaces, etc. VR techniques, in combination with DHM tools, have been used more and more to enable the participation of human being [START_REF] Buck | Immersive user Iinteraction within Industrial virtual environment[END_REF]. VR has also been used in ergonomic applications [START_REF] Whitman | Virtual reality: its usefulness for ergonomic analysis[END_REF][START_REF] Jayaram | Introducing quantitative analysis methods into virtual environments for real-time and continuous ergonomic evaluations[END_REF][START_REF] Wang | Development and Application of Integrated Human Machine Interaction Simulation System[END_REF].

The aim of integrating ergonomic evaluation methods into VR is to facilitate work design process, enhance design efficiency, and lower the design cost.

Hypothetically, if a virtual environment could provide 100% fidelity, the workload in virtual environment (VE) might be the same as in realistic environment (RE).

Our main concern is whether the evaluation result in VR with different presence level is consistent to the evaluation in RE. Therefore, we proposed an experimental approach to check the relation between the evaluation results in VR and VE for same physical operations.

In this paper, we presented our preliminary experiment results in a VR system only with visual feedback. The purpose of our research is to analyze evaluation results in VE and RE for the same tasks. Subjective evaluation methods (BPD, RPE) are used to evaluate discomfort and perceived exertion effort in both environments, and objective methods (posture, fatigue) are used to evaluate physical aspects of the task. The relationship of evaluation results in RE and VE is analyzed with regression method.

Method

Subjects

30 male subjects participated in this experiment after giving their informed consent. They were all recruited from a manufacturing enterprise. They were all free from musculoskeletal disorders. Their mean age was 41.8 y (s.d.=11.5 y), mean height was 172.0 cm (s.d.=5.5 cm), and the mean mass was 69.5 kg (s.d.=12.2 kg). Twenty-two of them are all professional hand-tool operators and their working experience varies from 3 to 20 years. The other subjects use hand-tools occasionally.

Task description

The task in this experiment was designed by simplified from typical assembling tasks (hand drilling operations). The task consisted of several elementary operations in assembling tasks: holding and lifting a hand-tool, reaching and hitting targets, and keeping alignment between the tool and the target for assembly operations. Each subject was asked to perform the simulated drilling operations while sitting or standing at a fixed working position and facing at a tool work station and a work platform.

A 1.5 kg weighted hand-tool was used in this experiment for simulating the external physical load. The hand-tool was made of a plastic cover with weighted materials to replace a real powered pistol drill. It was placed on a fixed work station, which had a height of 70 cm and was placed in front of the subject with a horizontal distance 80 cm.

The working position of a subject was fixed in the workplace. Operation targets were placed on two fixed platforms, for sitting posture and standing posture, respectively. Both platforms were placed 80 cm ahead of the subject. The heights of the platforms were 80 cm and 140 cm, for sitting posture and standing posture, respectively.

All the operation targets were located in target models. The size of target model for standing tasks was 550 mm (Height) by 400 mm (Width), and the size of target model for sitting tasks was 400 mm (Height) by 600 mm (Width). There were 9 numerated target points with different positions. Physical target models were used in RE, while the same digital models were used in VE (Figure 1) The following steps were necessary to complete simulated assembling tasks.

1. The subject reached and held the hand-tool at a fixed position and lifted it.

2. The subject placed the hand-tool in alignment with a target point of the model and kept his posture for 4 seconds.

3. The subject had to finish all the 9 target points in ascending order as a loop.

4. One task might include different number of loops.

Apparatus

The VR simulation system used in this experiment was developed in the Virtual Reality and Human Interface Technology (VRHIT) laboratory of Tsinghua University. This system provided immersive virtual scenarios for subjects based on OpenGL ® . Virtual objects can be created with 3D modeling tools (e.g. AutoDesk ® 3ds MAX, PTC ® Pro/E) and imported into the system. Motion tracking devices, digital head mounted display (HMD), data gloves, and multimodal feedback devices can be linked to the system as peripherals.

Meanwhile, a manikin (digital human model) can be provided in this VR simulation system, and it can be driven by captured data from motion tracking devices. The manikin interacts with other virtual objects, and interactive virtual scenes are displayed to subjects. The manikin is used to provide visual representation of the subject in VE for better understanding the interactions between subject and virtual scenarios.

The VR motion simulation system can be used for simulating assembling, handling, and maintenance operations in industries. It has been used in projects collaborated with industrial enterprises [START_REF] Hu | Development and Implementation of a Human Scale Motion Simulation System with Multimodal Feedback[END_REF].

In this experiment, we used two sets of magnetic motion tracking devices (totally six sensors) made by Pohemus Corp to track subject's motion. These sensors were mounted on the head and key joints of a subject for tracking working posture. The acquisition rate is 30 Hz per sensor and the static accuracy of each sensor is 1 mm.

Taking a right-handed worker as an example, four electromagnetic sensors were mounted on the head, the right shoulder, the right elbow, and the right wrist of a subject (Figure 2). The captured coordinates by sensors represented the positions of key joints and depicted the posture of the subject. In this experiment, the sensor mounted on head was used to determine position and orientation of viewpoint in VE. Sensors mounted on shoulder, elbow, and wrist, were used to calculate the posture of right arm. The other two sensors were mounted on the two ends of the hand-tool to obtain its position and orientation while subjects were performing tasks.

Figure 2 Magnetic sensors mounted on a subject A digital HMD, made by 5DT Corp., was used for displaying immersive virtual scenarios to subjects in the experiment. Its field of view (FOV) was 39°( Horizon) by 31°(Vertical) and its resolution was 800 by 600 (pixels).

A force measurement device was used in the experiment for measuring the force capacity of a subject's arm. Its maximum measuring range is 60 kg. Its resolution was 0.01 kg.

The force measurement device and motion tracking devices were used in RE as well.

Design of experiment

The objective of this experiment is to compare evaluation results between RE and VE, then find out their relationship and difference. Considering possible effects on experiments, three with-subjects factors were involved in this experiment. Their levels and descriptions are demonstrated in Table 1.

All tasks were done both in RE and VE. Subjects were divided into two groups for different sequences of sessions. Group 1 performed the RE session at first, then the VE session. With an inverse sequence, Group 2 performed the VE session at first, then the RE session. Tasks of RE sessions were the same as those in VE sessions, and the relative position of a target model to a subject in the RE sessions were the same as those in VE sessions. Working posture tasks, duration of tasks, and size of target points were involved as within-subject factors in the experiment. Each factor has two levels.

Working posture tasks consist of sitting posture and standing posture. Two types of target points with different sizes were designed initially to represent the difficulty of an assembly task in this experiment: ø6 and ø18. The duration of tasks has two levels: one level is two loops in a task and the other level is four loops in a task.

These three factors make up of eight different treatments for a subject. A performing sequence of these treatments was assigned randomly to each subject.

Each subject performs tasks with the same sequence of treatments in RE session and VE session.

Experimental protocol 2.5.1. Objective evaluation results

Two objective indexes, working posture and physical performance (fatigue),

were measured for assessing operation tasks.

In our experiment, in most cases, right arm was mainly engaged in the operation, and the angle between the forearm and the upper arm indicated the working posture directly. This variable could be used to assess the posture.

The physical performance of each subject, indicated by the decrease of the maximum force capacity, was measured to representing fatigue since the decrease of the force capacity is the most direct measurement of fatigue [START_REF] Vøllestad | Measurement of human muscle fatigue[END_REF].

The maximum voluntary contraction of the right arm was measured by the force measurement device and denoted as before F before starting a task. After finishing a task, the maximum voluntary contraction was measured again and it was denoted as after F

. The normalized decrease of force capacity, calculated by   before after before F F F  , was used as physical performance in this experiment.

Subjective evaluation results

The subjective evaluation was carried out using two methods: BPD and RPE.

A self-reported questionnaire, consisting of BPD scale and RPE scale, was used for collecting subjective sensation of subjects in RE and VE. In the questionnaire, Borg's scale with 6-20 point was used for RPE questions. The 11-point scale and the original body part diagram of Corlett was used in BPD scale [START_REF] Corlett | A technique for assessing postural discomfort[END_REF]. The original body part diagram of BPD divided entire body into twelve regions: neck, shoulders, upper arms, forearms, upper back, middle back, lower back, buttocks, left thigh, right thigh, left shank, right shank.

Subjects were asked to report their evaluation of BPD and RPE when they finished a task as subjective evaluation result.

Presence of VE

A presence questionnaire was used for assessing presence of a subject in VE session. The presence questionnaire of this experiment was created referring to Witmer and Singer's presence questionnaire [START_REF] Witmer | Measuring Presence in Virtual Environments: A Presence Questionnaire[END_REF].

Seven-point scale was used in the presence questionnaire. Higher total score of answers in scale of the questionnaire indicates higher presence.

Data analysis

Posture

The posture of each subject was denoted as an 8 by 9 matrix, A . Each row represents one of the eight experimental configurations and each column represents one of the nine points on target models. The eight experiment configurations were enumerated in Table 2. For each element of A , denoted as ij a , represents the posture under a given experiment configurations while operating a given target point.

  R E V E R E ij ij ij ij a a a a  
, which is also an 8 by 9 matrix. Furthermore, the posture difference for each subject between RE and VE was denoted as a vector,  , whose element was calculated by

  9 2 1 1 9 i ij i a      .

Physical performance

The physical performance, calculated by   before after before F F F  , was used as fatigue index of subjects. Performance of thirty subjects was denoted as an 8 by 30 matrix P . Each row represents one of the eight experimental configurations and each column represents one of the thirty subjects. For each element of P , denoted as ij p , experimental configurations represented by the subscript i was demonstrated in Table 2. Then some matrices of physical performance in a working environment can be calculated out by categorized with different factors (Table 3).

Table 3 The physical performance categorized with different factors

Term

Calculation Description

P  8 1 1 8 j ij i p p    
The overall mean of a working environment

SD P 4 1 1 4 SD j ij i p p   
The mean of standing posture tasks

ST P 8 5 1 4 ST j ij i p p   
The mean of sitting posture tasks

L P   1 3 5 7 1 4 L j j j j j p p p p p    
The mean of long duration tasks

S P   2 4 6 8 1 4 S j j j j j p p p p p    
The mean of short duration tasks

LG P   3 4 7 8 1 4 LG j j j j j p p p p p    
The mean of tasks with large size points of target model

SL P   1 2 5 6 1 4 SL j j j j j p p p p p    
The mean of tasks with small size points of target model Difference and relationship of physical performance were analyzed with these results of RE and corresponding results of VE with paired t-test and linear regression method respectively.

Body part discomfort

BPD method measures discomfort intensities of 12 body parts in the entire body. For the k th part of body, the BPD results were denoted as an 8 by 30 matrix 4).

B  8 1 1 8 j ij i b b    
The overall mean of a working environment

SD k B 4 1 1 4 SD j ij i b b   
The mean of standing posture tasks

ST k B 8 5 1 4 ST j ij i b b   
The mean of sitting posture tasks

L k B   1 3 5 7 1 4 L j j j j j b b b b b    
The mean of long duration tasks

S k B   2 4 6 8 1 4 S j j j j j b b b b b    
The mean of short duration tasks

LG k B  

3 4 7 8 1 4 LG j j j j j b b b b b    
The mean of tasks with large size points of target model

SL k B   1 2 5 6 1 4 SL j j j j j b b b b b    
The mean of tasks with small size points of target model

For BPD data analysis, two rules were used for eliminating outlier data before data analysis. The first rule was that the BPD scores of RE and VE less than 1-point were eliminated. 1-point is assigned as very little discomfort sensation and 0.5-point is assigned as just feel discomfort sensation in scale of BPD. Using 1-point as a threshold for filtering outlier data is helpful to decrease unstable data of BPD. The second rule was that BPD data were eliminated when BPD scores for a subject were all zero in RE and VE. 0-point is assigned as no discomfort sensation in scale of BPD. Hence these kinds of data are eliminated as outlier data is helpful to decrease interference of void data. After eliminating data, results of 27 subjects were used for analysis.

Difference and relationship of BPD were analyzed with these results of RE and corresponding results of VE with paired t-test and linear regression method respectively.

Rated perceived exertion(RPE)

RPE method was used to measure effort of subjects for performing tasks. RPE result of thirty subjects was denoted as an 8 by 30 matrix R . The element of R , denoted as ij r , represented the RPE result of the j th subject under the i th experimental configuration. Then some matrices can be calculated out by categorized with different factors in a working environment (Table 5).

Table 5 The RPE categorized with different factors Term Calculation Description

R  8 1 1 8 j ij i r b    
The overall mean of a working environment

SD R 4 1 1 4 SD j ij i r r   
The mean of standing posture tasks

ST R 8 5 1 4 ST j ij i r r   
The mean of sitting posture tasks

L R   1 3 5 7 1 4 L j j j j j r r r r r    
The mean of long duration tasks

S R   2 4 6 8 1 4 S j j j j j r r r r r    
The mean of short duration tasks

LG R  

3 4 7 8 1 4 LG j j j j j r r r r r    
The mean of tasks with large size points of target model

SL R   1 2 5 6 1 4 SL j j j j j r r r r r    
The mean of tasks with small size points of target model Difference of RPE was analyzed with these results of RE and corresponding results of VE with paired t-test.

Both objective and subjective evaluation results were analyzed with SPSS ® and analysis results were plotted with Sigmaplot ® .

Results

Posture

Difference of a subject's posture between RE and VE was denoted by an eight by one vector  , which represents posture difference under different experimental configuration. Hence the overall posture difference of 30 subjects was denoted as a 240 by 1 matrix

  1 30 T TT     
, representing all observed value of thirty subjects. The histogram of the observed differences was plotted in Figure 3, and an interval 5% is used to divide all the observed differences.

Physical performance (Fatigue)

The physical performance result of 30 subjects measured in RE was denoted

Size of the target points: Large vs. Small

In this experiment, size of target points consists of large and small target points.

The performance of large target points tasks measured in RE was denoted as was demonstrated in Table 8.

Table 8 The descriptive information of

Body part discomfort

Discomfort of forearms, the upper arms, the shoulders, and neck was reported by subjects in this experiment. However, only significant correlation of forearms between RE and VE was found.

For forearms, BPD result of thirty subjects was denoted as B  . These BPD results of B  were filtered according to eliminating rules mentioned above, and remained 27 elements of The result was shown in Figure 5. was demonstrated in Table 9. 10. ). Furthermore 11. ).

Significant difference of RPE between RE and VE were also found in different experimental configurations based on three factors: working posture tasks, duration of tasks, and size of target points (Table 12). ).

Discussion

In our experiment, different aspects of the same manual handling operations were evaluated using different evaluation methods both in RE and VE sessions. Posture and physical fatigue were used to evaluate the physical tasks objectively, while RPE and BPD were used to assess the tasks subjectively. Comparisons between these evaluations were made to check the availability of those evaluation methods in VE.

Slight differences were found in postures under different working environment, since 80.4% of the 240 observed differences were less than 5%. In this experiment, there were no restrict to limiting posture of subjects while performing tasks. In conventional ergonomics posture assessment methods, the flexible range of joints was divided into several segments. For examples, the total flexible range (360°) of elbow is divided into eight intervals in posture targeting method [START_REF] Corlett | Posture Targeting: A Technique for Recording Working Postures[END_REF] . RULA and REBA divide the movement range of the forearm into two intervals: less than 60°and more than 100°, 60°-100 ° (McAtamney and Nigel Corlett, 1993;[START_REF] Hignett | Rapid Entire Body Assessment (REBA)[END_REF]. According to conventional posture assessment methods, postures of RE and VE can be treated as postures with same effect to people. While integrating posture-based evaluation methods in VE, the slight difference between VE and RE might not generate great differences while evaluating the postures. We think that it is feasible to use conventional observation methods in VE to evaluate physical tasks and almost the same evaluation results can be obtained in VE as in RE.

Significant differences were found in physical performances, BPD, and RPE evaluation results under difference environments. As shown in the all regression results of BPD, results in VE were greater than that in RE. These results indicated that subjects felt more discomfort in forearm in VE than in RE while performing the same tasks. In addition, the regression results of performance also indicated that subjects felt more fatigue in VE than RE. Moreover, RPE results give supports to the results of BPD and performance. RPE results indicated that more effort was required in VE than RE for same tasks. In addition, experimental factor of duration tasks had effect on RPE. The mean of RPE with long duration tasks (four loops) was higher than that with short duration tasks, and their difference was significant. This result indicates that long duration tasks require more effort than short duration tasks given by subjects.

In this experiment, subjects reported their sensation of presence in VE by presence questionnaire. The C ro n b ach  of the presence questionnaire was 0.815, and the mean of presence was 4.01 (s.d.=0.62) in the experiment. The result indicated that the VE could only provide an acceptable level of presence, but not immersive enough to replace the RE. Under ideal conditions, VR should provide 100% fidelity to subjects with immersive scenarios in VE as RE. However it is difficult to achieve 100% fidelity because of technical limitations, and these differences might generate influences on human's performance in VE.

ACT-R theory is used to analyze difference of evaluation results between RE and VE. An assembling task often consists of positioning, reaching, adjusting accurately, and hitting operations and it requires perception and manual action. An assembling task is processed by visual module and manual module of the mind according to ACT-R theory. The cognitive model of ACT-R theory divides generally the cognitive processing unit into three main parts: a visual module, a manual module, and a processing unit [START_REF] Anderson | An integrated theory of Mind[END_REF]. The visual module estimates the position of the object and sends related information to processing unit of the mind.

The processing unit selects an appropriate way and sends it to the manual module.

Processing unit can select the most optimum way in RE because of practical experiences. It spends less time and generates less workload of people to accomplish operations. However, it is different when people recognize and estimate the position of a virtual object in VE. Because the perspective of visual scenes and position of viewpoint is different from that in RE, participant cannot determine the distance of virtual objects in VE accurately based on their experience of RE. Some researches indicated that subjects cannot determine the distance to them of an object accurately in VE with their experience of the RE [START_REF] Arthur | The perception of spatial layout in real and virtual worlds[END_REF][START_REF] Witmer | Judging Perceived and Traversed Distance in Virtual Environments[END_REF][START_REF] Keyson | Estimation of Virtually Perceived Length[END_REF][START_REF] Armbrüster | Depth Perception in Virtual Reality: Distance Estimations in Peri-and Extrapersonal Space[END_REF]. Then the procedure of coming from visual module to processing unit, then to manual module is required to repeat many times while subjects are performing their tasks in VE. The misestimation of the distance results in that subjects have to try and trail during their reaching, accurate adjusting, and hitting operations. Therefore, performing the same tasks requires additional effort in VE because of cognitive limitation in VE, and consequently causes more additional discomfort and fatigue. Furthermore, as observed in the experiment, subjects spent more time to finish a task in VE than RE. Although significant differences were found in evaluation methods, linear regression method was used to assess the relationship between RE and VE as well, since it is believed that great linear correlation might be found when 100% fidelity could be provided in VE. After linear regression, R 2 in BPD and physical performance were 0.347 and 0.571, respectively. Based on the current technical specifications of the VR system, only with limited visual feedback, the regressed result indicates that evaluation in VE and RE was fairly related. Although the found linear regression results were not good enough, we could also state that certain relationship could be found if further technical improvements can be done in our future research work.

There are several technical limitations in this experiment. First, the presence provided by the VR simulation system is not good enough, and only acceptable presence was provided by the VR system. In addition, other feedbacks except visual feedback have not been involved in VE. Second, only a specific task was tested in our current research, and some other typical tasks have not been tested in our experiment. Third, subjects were not trained to how to use the VR devices for long time in this experiment, and their not enough acquaintance of VR devices might have effect on the accuracy of results.

Conclusion and Perspectives

In this experiment, the relationship and difference of subjective and objective evaluation results between RE and VE were analyzed for same tasks. Slight difference in postures engaged in manual handling operations was found, but those differences might not influence the evaluation results using posture-based evaluation methods. Significant differences were found both in objective (physical performance) and subjective evaluation methods (RPE and BPD). Results of BPD and performance in VE are greater than in RE for performing the same tasks partially due to extra cognitive efforts in VE. Furthermore, subjects felt more discomfort and fatigue in VE than RE. In spite of these differences, relationships of BPD and physical performance between VE and RE are analyzed with linear regression method. Correlations of BPD between RE and VE were found, for BPD and physical performance respectively, indicating that certain relationship might exist in evaluation results between RE and VE.

In our future work, multimodal feedbacks (e.g. audio, tactile) will be involved in the experiment to increase the presence in VE. Different evaluation methods will be carried out for the same tasks in VE in order to find out the trend of the correlation in evaluation results between VE and RE.

  (a): physical model for standing task. (b): digital model for standing task (c): physical model for sitting task. (d): digital model for sitting task Figure 1 The target models in VE and RW

  the BPD result of the the j th subject under the i th experimental configuration. Then some matrices of BPD result can be obtained by categorized with different factors (Table

Figure 3

 3 Figure 3 Histogram of relative difference of posture between and VE

  Figure 5 The regression result of

  .2. Duration of Tasks: Long vs. Short In factors of this experiment, task duration consist of long duration and short duration. For right forearm, the BPD result of long duration tasks, measured in RE, was denoted as L RE B , and that measured in VE was denoted as L VE B . The BPD result of short duration tasks, measured in RE, was denoted as S

  .3. Size of target points: Large vs. Small In factors of this experiment, size of target points consists of large point and small point. For right forearm, the BPD result of large point tasks, measured in RE, was denoted as LG RE B , and that measured in VE was denoted as LG VE B . The BPD result of small point tasks, measured in RE, was denoted as SL

Table 1

 1 Factors and their levels in the experiment

	Factors	Levels	Description
	Working posture tasks	ST SD	Sitting task Standing task
	Duration of tasks	L S	4 loops in a task 2 loops in a task
	Size of target point	LG SL	Diameter of a target point is 6 mm Diameter of a target point is 18 mm

Table 2

 2 Experimental configurations represented by the subscript i

	i	Experimental Configuration
	1	ST and SL and L
	2	ST and SL and S
	3	ST and LG and L
	4	ST and LG and S
	5	SD and SL and L
	6	SD and SL and S
	7	SD and LG and L
	8	SD and LG and S
	The relative posture difference matrix between VE and RE, denoted as A , can
	be calculated by

Table 4

 4 The BPD categorized with different factors

	Term	Calculation	Description
	k

  The regression was shown in Figure4.

									L VE P	SD VE P	0.151 0.174	0.05599 0.05697
								P	S	P	ST	0.129 0.105	0.04375 0.03653
									RE	RE
		.25	Sitting Tasks Short			Observed
									P	S	P	ST	0.144 0.121	Regression 0.04003 0.03947
									VE	VE
		.20
	.15 Difference between significant difference was found ( SD RE P and t   SD VE P was tested with paired t-test and the 3.680 RE VE , 0.05 p  ). Furthermore SD RE P and Difference between L RE P and L VE P was tested with paired t-test and the significant difference was found ( 3.376 RE VE t   , 0.05 p  ). Furthermore L RE P and L VE P were Realistic Environment .10 SD VE P were regressed by a linear model and its result was regressed by a linear model and its result was ( 2 0.450 R  , 2 2 .9 0 1 F  , 0.05 p  ):
	( 2 0.462 R 	.05 , F 	2 4 .0 1 1	,	p 	0.05	):
						ˆ0.056 0.524 LL pp 
							R E		V E
	0.00				ˆ0.054 0.459 SD pp 	SD
							R E		V E
	0.00 Difference between S .05 P	.10 and S P	.15 was tested with paired t-test and significant was .20 .25 .30
				RE			VE
							Virtual Environment
	Difference between ST RE P found ( 2.665 RE VE t   , p 	and ST VE P RE 0.05 ). S P and S was tested with paired t-test and significant VE P were regressed by a linear model and
	difference was found( its result was( 2 0.404 RE VE t   R  , 1 8 .9 6 5 2.671 , F 	0.05 0.05 ). ST RE P p  p  , ):	and ST RE P	were regressed by a
	linear model and its result was( 2 0.561 R 	,	F 	3 5 .7 9 8	,	p 	0.05	):
						0.034 0.5 8 ˆ ˆ8 SS pp  
							R E		V E
	R E 3.2.1. Working Postures Tasks: Sitting vs. Standing 0.011 0.8 ˆST pp  19 	V E ST
	as RE P  , and that measured in VE was denoted as VE P  . The mean of RE P  , which was
	calculated by 3.2.2. Duration of Task: Long vs. Short In this experiment, working posture tasks consist of standing and sitting posture 30 1 1 30 j R E R E j pp     , was 0.126 (s.d.=0.03795). The mean of VE P  , tasks. Performance result of standing posture tasks, measured in RE, was denoted In this experiment, duration of task consists of long and short duration.
	which was calculated by as SD RE P , and that measured in VE was denoted as SD 30 1 VE P . Performance result of sitting Performance result of long duration tasks, measured in RE, was denoted as L P , and 1 j V E V E pp    RE , was 0.147 (s.d.=0.0454). Difference 30 j  posture tasks, measured in RE, was denoted as was denoted as ST RE P , and that measured that measured in VE was denoted as L P . Performance result of short duration tasks,
									VE
	between RE P  and VE P  was tested with paired t-test, and significant difference in VE was denoted as ST VE P . The descriptive information of SD RE P , SD VE P , ST RE P , and ST VE P was measured in RE, was denoted as S P , and that measured in VE was denoted as S P .
							RE		VE
	was found ( demonstrated in Table 6. RE VE t   The descriptive information of L 3.838 , p  P , L 0.05 P , S ). P , and S P was demonstrated in Table 7.
						RE		VE	RE	VE
	Furthermore RE P  and VE P  were regressed by a linear model, and result was Table 6 The descriptive information of SD RE P , SD VE P , ST RE P , and ST P VE Table 7 The descriptive information of L P , L P , S P , and S P
									RE	VE	RE	VE
	( 2 0.568 R  Working Posture Task , 3 6 .8 3 5 F  , 0.05 p  Performance ):	Mean Std Deviation
	Duration of Task		Performance	Mean	Std Deviation
		Standing Tasks Long	ˆ0.03 RE pp  0. 29 3 6 RE   VE SD P 0.123 RE L P 0.147	0.03782 0.04447

Figure 4 Regression result of the physical performance Performance results were classified and analyzed under different experimental configurations. All results were classified into different categories for analysis based on three factors: working posture tasks, duration of tasks, and size of target points.

  B  were used for analysis. The BPD result of forearms,

	their difference was significant (	RE VE t  	5.932	,	p 	0.05	).	RE B  and	VE B  were
	regressed by a linear model, and the regression result was
	( 2 0.506 R 	,	F 	2 5 .5 6 1	,	p 	0.05	):
							ˆ0 .5 6 7 0 .8 5 4 bb    
							R E			V E
	measured in RE, was denoted as	B  , and that measured in VE was denoted as	B  .
									RE	VE
	The mean of
										B  , and
										VE

RE B  was 2.242 (s.d.=1.285), and the mean of VE B  was 3.290 (s.d.=1.070). Paired T-test was used for testing difference of RE B  and

Table 9

 9

	The descriptive information of SD B , SD B , ST B ,and ST B
				RE	VE	RE	VE
	Working Posture Tasks	BPD	Mean	Std Deviation
		B	SD	2.139	1.168
			RE
	Standing tasks
		B	SD	3.301	1.339
			VE
		B	ST	2.353	1.621
			RE
	Sitting tasks
		B	ST	3.273	1.045
			VE
	Paired T-test was performed for finding difference of SD B	and SD B . Significant
					RE	VE
	difference was found between them (	RE VE t  	5.266

Table 10

 10

	The descriptive information of L B , L B , S B , and S B
							RE	VE	RE	VE
	Duration of Tasks	BPD			Mean	Std Deviation
			B	L			2.657	1.420
			RE
	Long
			B	L			3.745	1.251
			VE
			B	S			1.798	1.264
			RE
	Short
			B	S			2.889	1.012
			VE
	Difference between L B	and L B	was tested with paired t-test. Their difference
		RE		VE
	was significant (	RE VE t  	5.071	,	p 	0.05

Table 11

 11

		The descriptive information of LG B , LG B , SL B , and SL B
												RE	VE	RE	VE
	Size of target points		BPD		Mean	Std Deviation
						B	LG			2.066	1.238
						RE
		Large
						B	LG			3.241	1.032
						VE
						B		SL			2.416	1.465
							RE
		Small
						B		SL			3.333	1.218
							VE
	Paired t-test was performed for difference between LG B and LG B , and its result
												RE	VE
	was significant (	RE VE t  	6.103	,	p 	0.05	). Furthermore	B	RE LG	VE and LG B	were
	regressed with linear model and the result was ( 2 0.391 R 	,	F 	1 6 .0 6 6	,	p 	0.05	):
				ˆ0.364 0.750 L G bb   	L G
				R E								V E
	In addition, difference between SL B		and SL B	was tested with paired t-test. The
						RE				VE
	result was significant (	VE t  	4.937		,	p 	0.05	). Furthermore	B	RE SL	VE and SL B
	were regressed with linear model. The result was ( 2 0.571 R 	,	F 	3 3 .3 0 4	,	p 	0.05	):
				ˆ0.614 0.909 SL bb   	SL
				R E								V E

Table 12

 12 Descriptive information of RPE

					Factor		Levels	RE	VE	RE VE t 
		Working posture task	SD ST	11.683(1.925) 14.575(1.674) -6.490 ** 11.775(1.890) 14.283(1.748) -6.088 **
		Duration of task		L S	12.375(2.037) 15.075(1.652) -7.140 ** 11.083(1.780) 13.783(1.606) -5.648 **
		Size of target points	LG SL	11.633(1.912) 14.258(1.568) -6.058 ** 11.818(1.848) 14.600(1.636) -6.728 **
		Note: () is standard deviation, ** represents p <0.05
		In addition, experimental factor of duration tasks had effect on RPE. The mean of
	RPE with long duration tasks, denoted as L R , was 13.680 (s.d.=1.599), and the mean
	of RPE with short duration tasks, denoted as S R was 12.409 (s.d.=1.068). Their
	difference was significant (	LS t  	5.871	,	p 	0.05	). However, for the factor of working
	posture task, difference of RPE between	R	ST	and	R	SD	was not significant
	(	ST SD t  	0.268	,	p 	0.791	). For the factor of size of target points, difference of RPE
	between LG R	and SL R	was not significant (	LG SL t  	1.622	,	p 	0.116

Acknowledge

The authors would like to acknowledge to the financial support form the National Natural Science Foundation under grand number 5020514, and from European Aeronautic Defense and Space (EADS). The project was carried out through collaboration between Tsinghua University and ECN promoted by Région des Pays de la Loire.