Theodore Kypraios

A Note on Maximum Likelihood Estimation of the Initial Number of Susceptibles in the General Stochastic Epidemic Model

The initial number of susceptible individuals in a population is usually assumed to be known and statistical inference for some of the quantities of interest, such as the basic reproductive number R 0 , is straightforward. However, in any epidemic, there may exist a number of individuals who may not be involved in the transmission of the disease. In this note we show how maximum likelihood estimators can be derived for the parameters of interest. The proposed methodology is then applied to the Abakaliki smallpox data in Nigeria.

Introduction

Understanding the spread of an infectious disease is a crucial issue in order to prevent major outbreaks of an epidemic. The analysis of outbreak data can be more effective when it is based on a model for the actual process which generates the data. Models could be used to provide a better understanding of the transmission dynamics, the infection process, and the epidemiologically quantities of interest. There exists a comprehensive literature on deterministic and stochastic epidemic modelling; (see for example, [START_REF] Bailey | The mathematical theory of infectious diseases and its applications[END_REF][START_REF] Becker | Analysis of infectious disease data[END_REF][START_REF] Daley | Epidemic modelling: an introduction[END_REF], and the references therein). Many researchers have focused on estimating key quantities of interest, such as the rate at which an infected individual makes contacts with the rest individuals in the population, and the basic reproduction number R 0 [START_REF] Becker | Analysis of infectious disease data[END_REF][START_REF] Becker | Estimation in epidemics with incomplete observations[END_REF][START_REF] Riley | Transmission dynamics of the etiological agent of sars in hong kong: impact of public health interventions[END_REF].

Email address: theodore.kypraios@nottingham.ac.uk (Theodore Kypraios). URL: http://www.maths.nott.ac.uk/∼tk (Theodore Kypraios).

Preprint submitted to Elsevier 2 June 2009

A C C E P T E D M A N U S C R I P T

ACCEPTED MANUSCRIPT

Estimating the size of a population is a common problem in many scientific fields, for example, in ecology [START_REF] Huggins | On the statistical analysis of capture experiments[END_REF][START_REF] Yip | An inference procedure for a capture and recapture experiment with time-dependent capture probabilities[END_REF]. Traditional inference for stochastic epidemic models depends on the knowledge of the initial number of susceptible individuals. [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF] encountered the problem of estimating the initial number of individuals that are susceptible to a disease.

Being able to estimate the number of initially uninfected individuals enable us to determine if there are individuals in the population with either a natural immunity to the disease or are for some reason not exposed to the disease (e.g. isolated). [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF] provided an estimator of the number of initially susceptible individuals as well as its approximate variance, by adopting a martingale framework (see, for example, [START_REF] Becker | Analysis of infectious disease data[END_REF]). Here we show that if the epidemic is fully observed, i.e. infection and removal times are available, a maximum likelihood estimator (MLE) can be derived in a straightforward manner. A simulation study is conducted to compare our MLE and its properties (i.e. its standard error) with the martingale estimator (ME) by [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF].

We then apply our methodology to the Abakaliki smallpox data in Nigeria that has been previously considered by [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF] too.

Notation

We adopt a very similar notation as [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF]. A closed population (i.e. no births/ deaths/ immigration) of size N + a is considered; we assume that at time t = 0 there are α initially infective individuals. Denote by S(t), I(t) and R(t) the number of susceptible, infective and removed individuals respectively at present time t. The infectious periods of different individuals are independent and identically distributed according to some random variable D, which can have any arbitrary but specified distribution. In addition, we assume that the epidemic is observed up to a certain time, say τ . Denote by n I ≤ N and n R ≤ N, the number of individuals who became infected and removed by time T respectively. In general, n R ≤ n I ≤ N. Note that when an individual becomes infected, we also assume that he/she becomes infective at the same time (i.e. able to spread the disease).

The epidemic process (S(t), I(t)) is Markov if and only if the infectious period has the lack-of-memory property. This is the special (Markovian) case where the infectious periods follow an Exponential distribution. Such a model is known as the general stochastic epidemic (GSE). Then, the process (S(t), I(t)) can be fully described in terms of continuous time Markov chains with the following transition rates:

(S(t) = i, I(t) = j) → (S(t + δt) = i -1, I(t + δt) = j + 1) : β N S(t)I(t) (S(t) = i, I(t) = j) → ((S(t + δt) = i, I(t + δt) = j -1) : γI(t)
while the transition probabilities turn out to be:

P[S(t + δt) -S(t) = -1, I(t + δt) -I(t) = 1 | H t ] = β N S(t)I(t)δt + o(δt) P[S(t + δt) -S(t) = 0, I(t + δt) -I(t) = -1 | H t ] = γI(t)δt + o(δt) P[S(t + δt) -S(t) = 0, I(t + δt) -I(t) = 0 | H t ] = 1 - β N S(t)I(t)δt -γI(t)δt + o(δt)
where H t is the sigma-algebra generated by the history of the process up to time t, i.e.

H t = σ{(S(f ), I(f )) : 0 ≤ f ≤ t}, with H 0 = σ{S(0) = N, I(0) = α)
} specifying the initial conditions. Therefore, the probability of an infection or a removal at the time interval [t, t + δt) are βS(t)I(t) + o(δt) and γI(t)+o(δt) respectively. The correction term o(δt) becomes negligible for small δ, i.e. o(δt) δt → 0 as δt → 0. Note that by assuming a closed population, we only need to keep track only (instead of the three) processes, since it holds I(t) + S(t) + R(t) = N for any t.

The form of the transition probabilities show that the probability of infection at time t is proportional to the total number of infectives and susceptibles at time t. The constant of proportionality, β, is referred to as the infection rate. The transition probability of a removal shows that the length of the infectious periods are independent, identically distributed exponential random variables with mean 1/γ, and therefore γ is referred as the removal rate for each individual. The epidemic continues until there are no more infective individuals left circulating in the population.

We assume that we observe the times at which individuals become infected are known i.e. I(t), 0 ≤ t ≤ τ is fully observed. However, we don't observe the initial number of susceptible individuals in the population, N, and therefore the process S(t), 0 ≤ t ≤ T is unobserved.

Maximum Likelihood Estimation

We are interested in drawing inference for the unknown number of initially susceptible individuals in the population (N), given that we have the infection process I(t) and also know that the epidemic has ceased. In this section we show that a maximum likelihood estimator N can be obtained.

First, we consider the likelihood of the data given the parameters of interest, β, γ and N, using counting process theory (see for instance, [START_REF] Andersson | Stochastic epidemic models and their statistical analysis[END_REF]. Letting τ = (τ 1 , τ 2 , . . . , τ n I ), to denote the (ordered) successive removal times observed during [0, T ]. In other words, τ i refers to the ith removal time. Denote by φ 1 the initial infection time and φ = (φ 2 , . . . , φ n I ) the remain successive infection times during (φ 1 , T ); n I denotes the number of total number of individuals (including the initial one) who contracted the disease.

L(τ , φ|β, γ, N) ∝ n I j=1 γI(τ - j ) × n I j=2 β N S(φ - j )I(φ - j ) × exp      - T φ1 β N S(t)I(t) + γI(t) dt      (1)
where the notation φ - j denotes the left hand limit, so for example I(φ - j ) denotes the lim ↑φ j (I(s)), or in other words the time immediately prior to φ j . Note that although I(t) only depends on the infection and removal times, S(t) depends on N too.

We are interested in maximising the log-likelihood of the observed data given the parameters. Therefore, taking the logarithm of (1) gives:

log L(τ , φ|β, γ, N) = (n I -1)(log β -log N) + log   n I j=2 S(φ - j )I(φ - j )   - β N T φ1 S(t)I(t) dt -γ T φ1 I(t) dt + n I log γ + log   n I j=1 I(τ - j )   (2)
The removal rate γ is easily derived by differentiating (2) with respect to γ and set the derivative equal to zero. Then we are left with:

∂ 2 log L(z|N, β) (∂β)(∂N) = 0.
Although there is not available a closed expression for β and N , we can maximise (2) with respect to β and N numerically (see details in Section 4). The inverse of the matrix of the second-order (partial) derivatives (also called the Hessian matrix) would then give us the variance-covariance matrix of the estimators which in turn will lead to the computation of their (approximate) standard errors.

Simulation Study

In this section we conduct a very similar simulation study to the one described in [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF] to compare the efficiency of the proposed MLE to the ME as derived there.

We also consider populations of N = 100, N = 250, N = 1000 and N = 5000 susceptibles with α = 1 initially infective. We chose two different values for the infection rates, β = 1.3 and β = 1.5 and one value for the removal rate, γ = 1. We follow Huggins et al. ( 2004) and we only considered simulated epidemics where more than 20% of the individual were infected; for β = 1.3 we also considered epidemics were more than 40% of the individuals were infected.

For each combination of the parameters, 1000 epidemics were simulated; we then used the statistical language R and the function optim to maximise numerically the log-likelihood with respect to β and N.

The simulation results presented in Table 1 suggest that, overall, the unknown number of initially susceptible individuals in the population is estimated well. Although this is the case for the ME too [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF], the maximum likelihood approach offers higher precision. For each different scenario, i) we compute the standard deviation of the maximum likelihood estimates of N (sd( N )), ii) the average standard error of each of the estimates (av(se( N ))), iii) the coverage and the average final size of the simulated epidemics.

The standard deviation of the 1, 000 estimates of N simulations is significantly lower than the corresponding error of the ME. Furthermore, the average standard errors of the MLE are much smaller especially for small values of N.

Another advantage of the MLE as compared to the martingale approach is that there were no cases (out of the 1,000 simulations) where an estimate could not be derived. Nevertheless, it seems that for small values of N and for minor outbreaks the martingale estimator performs better as it offers better coverage. One possible reason why the maximum likelihood approach provides low coverage in such circumstances could be due to the fact that, for small values of N and minor outbreaks, the likelihood function is flat. This fact combined with the way the standard errors are calculated (see also Section 3) could reflect an underestimation of the standard errors. In addition, it seems that the MLE exhibits negative bias for small population sizes (so as the ME). However, it seems that when the disease is reasonably infective (for instance, β = 1.3 -major outbreak) then this bias is decreasing.

Application

We illustrate the above methodology on the Abakaliki smallpox data in Nigeria. A total of 30 cases was observed and Becker (1989, pg. 111) provides us with the 29 time intervals between the detected cases. From these we can obtain the corresponding infection time of each individual having assumed a certain value for the infectious period. In this sequel we have assumed the infectious period to be fixed and the same for every individual equal to 14 days [START_REF] Mack | Smallpox in europe, 1950-1971[END_REF]. It is then relatively straightforward to maximise the loglikelihood (2) with respect to the parameters of interest N and β. The function optim was used in R to obtain the parameter estimates and their the corresponding standard errors of them (see Table 2).

We obtained N M LE = 35.27 which is relatively close to the value which is reported in [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF], N = 42.1. Our estimator though has a much smaller standard error (6.70) then the one obtained in Huggins et al. (2004) (37.15). It is reported in [START_REF] Bailey | The mathematical theory of infectious diseases and its applications[END_REF] that there were 120 individuals who had close contacts regularly. Obviously, our estimate is much smaller than 120; a possible explanation could be the fact a significant proportion of these individuals were immune to the disease at the start of the epidemic. We are often interested in estimating the number of initially susceptible individuals in a population. In this short note we showed that by assuming the infection and removal times of the individuals are known, maximum likelihood estimates can be derived for both N and the infection rate (β) in a straightforward manner. Overall, the estimator performs well and especially where the is large outbreak. There is simulation-based evidence that in a number of cases these estimators perform better than the ones obtained by using martingale methods as presented in [START_REF] Huggins | A note on the estimation of the initial number of susceptible individuals in the general epidemic model[END_REF].

Although the simulation and the application presented in this note refer to homogenously mixing model, maximum likelihood approaches can be easily used for more complex settings given that the infection times (as well as the removal times) are known. Unfortunately, it is very rare in practice that these will be available. Usually, only the removal times are know while it is often the case that someone may only have the final size of the epidemic. Nevertheless, in this case, it has already been illustrated that data augmentation techniques [START_REF] Tanner | The calculation of posterior distributions by data augmentation[END_REF] seem to be a natural framework for partially observed epidemics [START_REF] O'neill | Bayesian inference for partially observed stochastic epidemics[END_REF][START_REF] Gibson | Estimating parameters in stochastic compartmental models using Markov Chain methods[END_REF][START_REF] Kypraios | Efficient Bayesian Inference for Partially Observed Stochastic Epidemics and A New class of Semi-Parametric Time Series Models[END_REF]. A natural extension of the current maximum likelihood approach is to employ Markov Chain Monte Carlo (MCMC) algorithms draw

Figures 1

 1 Figures 1 illustrates the shape of the log-likelihood and Figure2the profile likelihood of β (right-hand plot) for N = 120 which is the value of N which has been assumed in other attempts of modelling this dataset (see for example, O'Neill and Roberts, 1999).

Fig. 1 .Fig. 2 .

 12 Fig. 1. Profile log-likelihood of β assuming N = 120 for the smallpox data

Table 2

 2 Parameter estimates for the Abakaliki smallpox data

	Parameter Estimate Standard Error	95% CI
	N	35.27	6.70	(22.12, 48.41)
	β	0.14	0.038	(0.065, 0.214)

A C C E P T E D M A N U S C R I P T ACCEPTED MANUSCRIPT

inference the parameters β, γ and N within a Bayesian framework.

Acknowledgments

The author would like to thank Dr Nikos Demiris for comments on earlier versions of this manuscript. In addition, the author is grateful to the editors and the reviewer for their valuable comments and suggestions which have led to improvements in the paper. Finally, funding from Wellcome Trust (Ref:076850) is gratefully acknowledged.


Felipe M Besson
email: besson@ime.usp.br

Pedro M B Leal
email: pedrombl@ime.usp.br

Fabio Kon
email: fabio.kon@ime.usp.br

Towards Verification and Validation of Choreographies *

This technical report presents a study about software tools and approaches for testing web service compositions. Our goals consist on understanding the current scenario of Verification and Validation (V&V) activities (focusing on automated tests) in the SOA context. We also present a prototype we developed to illustrate different types of automated test case scripts for testing web service choreographies.

Introduction

Service-Oriented Computing has been considered the new generation of distributed computing, being widely adopted. In such context, SOA (Service-Oriented Architecture) consists on an architecture aiming at the implementation of Service-Oriented Computing fundamentals by using web services as the building block of applications [START_REF] Hewitt | Java Soa Cookbook. O'Reilly Media[END_REF].

Since the composability of services is one of the SOA principles [Erl07], some approaches for composing services have been proposed. Orchestration is a centralized approach of service composition. Some standards such as WS-BPEL (Web Services Business Process Language) [START_REF]Web Services Business Process Language[END_REF] implement this kind of composition. Although straightforward and simple, its centralized nature has scalability and fault-tolerance problems. To face this problem, choreographies of web services have been proposed as decentralized composition solutions. Some languages, such as WSCI (Web Service Choreography Interface) [W3C02], WS-CDL (Web Services Choreography Description Language) [W3C04], and BPMN2 (Business Process Model and Notation) [START_REF] Omg | Business Process Model and Notation[END_REF] have been also proposed as choreography standards.

In spite of the importance and advantages of web service compositions, just lately the verification and validation of atomic and composed services have received the needed attention [START_REF] Kon | Testing service composition[END_REF]. Nevertheless, the dynamic and adaptive nature of SOA makes most of the existing techniques not directly applicable for testing services and service-centric systems [START_REF] Canfora | Service-oriented architectures testing: A survey[END_REF].

This technical report is a study to understand the current scenario of Verification and Validation (V&V) activities in the context of web services compositions (more specifically choreographies) with focus on automated testing techniques and strategies. V&V is a wide discipline that evolves also monitoring and governance issues, but these latter topics are out of the scope of this document. Then, the goal of this work is to document and study software tools, methodologies and techniques for writing and executing automated test of web services and web services composition. This document is organized as follows: Section 2 presents a brief conceptualization of the existing test strategies and techniques for traditional systems (following the client-server model). Section 3 describes the main software tools for testing services and service composition, while methodologies for creating automated tests for web services compositions are addressed on Section 4. In Section 5, we present a prototype composed of ad hoc scripts for automated choreography tests. Finally, in Section 6, we draw our conclusions and describe ongoing and future work.

Conceptualization and terminology

In this section, we introduce some concepts and terminologies related to software testing. Despite this brief conceptualization refers to testing of traditional systems (client-server model), its understanding makes needed for the testing approaches of web services composition presented in this technical report.

Testing Strategies

During a software development project, different testing strategies can be applied depending on the stage of development. Unit tests focus on the smallest unit of software present in the source code. These tests verify the behavior of a single class or method, and are not directly related to the requirements of the project, except when a key chunk of business logic is encapsulated within a specific class or method [START_REF] Meszaros | xUnit Test Patterns: Refactoring Test Code[END_REF].

At the other extreme, there are acceptance tests to verify the behavior of the entire system or complete functionality. They typically correspond to the execution of scenarios present in the use cases, features, or user stories. They do not depend on the implementation. Normally, they are slower than the other test strategies because they exercise all layers of the system, accessing the real components (mock components are not used) [START_REF] Meszaros | xUnit Test Patterns: Refactoring Test Code[END_REF]. These tests are also called functional, customer, or end-users tests.

Between these two approaches of testing, there are the integration tests, which attend to solve the problems produced when unit tested components are integrated. Their goal is to verify the unit interfaces and interactions. A set of integration tests must be built to explicit goal of exercising these interactions and not the unit functionalities [START_REF] Delamaro | Mutac ¸ão de interface: Um critério de adequac ¸ão interprocedimental para o teste de integrac ¸ão[END_REF]. In this context, integration tests are also called component tests, which aim to verify components consisting of groups that collectively provide some service [START_REF] Meszaros | xUnit Test Patterns: Refactoring Test Code[END_REF]. There are some strategies to perform this integration [Pre01]:

• Top-down: the integration was performed from the main module. Initially, all components that this module depends on are mocked or stubbed, then, these dependencies are substituted incrementally by its real implementation until the system is totally integrated; • Bottom-up: the integration starts in the atomic modules (i.e., components at the lowest levels in the program structure). These components are grouped in clusters. Once all components of a cluster are integrated, the cluster is integrated. Since second cluster integration contain real components, no stubs are needed; • Big bang: all components are combined at once and tested as a whole.

Testing Techniques

Depending on the goals of the test, availability of resources, and other factors, test strategies are combined with different test techniques. When functional or black-box testing are used, the entity (method, class or system) under testing is considered as a complete entity and the internal structure is ignored [START_REF] Glenford | The Art of Software Testing, Second Edition[END_REF]. Then, when some valid and invalid data are provided to the entity under testing, it just verifies whether the actual results are compatible with the expected ones. On the other hand, in the white-box testing technique, internal structure of program aspects as data flow and its internal logic are verified and validated [START_REF] Glenford | The Art of Software Testing, Second Edition[END_REF]. For this reason, this technique is also called "structural test".

Testing Tools

Currently, there are many automated testing frameworks. Open source xUnit1 tools, such as JUnit, SUnit, and CPPUnit, are widely used among developers. The usage of these tools is particular to certain programming languages. Long-established languages have their own xUnit tool, such as Java and C.

There are also mocking tools, such as Mockito 2 and EasyMock 3 , which support these automated test frameworks to generate double components easily. Some tools, such as Cu-cumber4 , Jbee5 , and Fitness6 favor the automated acceptance test writing. They focus on the readability and the ease understanding for non-technical or business customers. Then, these tools encourage customers to write automated acceptance tests by themselves.

Testing tools for SOA

Since web services are the building blocks of SOA [START_REF] Hewitt | Java Soa Cookbook. O'Reilly Media[END_REF], we started our study investigating those tools for testing web services as a unit or, in other words, for testing the functionalities of a web service individually. Some tools used for testing web service compositions were also studied and analyzed.

Atomic Web services testing

The are many software tools for different test techniques at web service level. In Table 1, we present some studied tools with its types of license. Nevertheless, we focus our efforts on tools for functional testing. SoapUI [Evi10] is developed in Java and provides mechanisms for functional, regression, and performance tests. From a valid WSDL (Web Service Description Language), this tool can provide (i) features to build automatically a suite of unit test for each operation, and (ii) a mock serviceto simulate the web service under testing. Besides, the mocked service can be deployed by the tool, making the WSDL interface available like the real service, but only the mocked functionalities are invoked. Finally, SoapUI has mechanisms to measure the test coverage.

In spite of its name suggests restriction to SOAP/WSDL web services, some mechanisms are provided to test other kind of services like REST (Representational State Transfer) and JMS (Java Message Service). All these features are provided by the Open Source version, but a commercial version of SoapUI also provides more resources such as features to apply performance tests in large scale systems.

For testing SOAP/WSDL web services, as mentioned before, SoapUI provides a mechanism that automatically generates a skeleton of test for the operations presented in the WSDL. Although it automates the test creation, the produced test cases are incomplete, as seen in Figure 1 input and output parameters values must be provide manually (fields with "?" character). To improve this feature of SoapUI, WS-TAXI [START_REF] Bartolini | WS-TAXI: A WSDLbased testing tool for web services. Software Testing, Verification, and Validation[END_REF] was proposed. Its goal is to automatically fill these empty fields by deriving XML instances from an XML schema. With this tool, test cases are generated from all possibilities of data combination for skeletons produced by SoapUI. In the example of Figure 1, WS-TAXI would generate test cases (varying the data input) to cover all possibilities of options (lines 09 -21).

Similarly to the tools described above, WebInject [START_REF] Goldberg | Free tool for automated testing of web applications and web services[END_REF] automates the sending of messages (usually XML payloads) and verifies and validates the response messages returned by the the service under testing. It can be used to test SOAP/WSDL and REST web services, as well as any component that has HTTP interfaces (e.g., JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms). The tests for WebInject must be written in XML, which can be considered a drawback in some situations. Because of the verbosity of XML, tests may not be clear as desired.

Some approaches are focused on REST testing. TTR (Test-The-REST) [START_REF] Chakrabarti | Test-the-rest: An approach to testing restful web-services[END_REF] provides mechanisms for applying Functional testings (using a black box strategy) and nonfunctional testing (applying performance tests). Similar to SoapUI, this tool provides features for testing the CRUD operations over REST services resources. CRUD operations in REST context normally correspond to the HTTP methods: POST (for Create), GET (for Read), PUT (for Update) and DELETE (for Delete). TTR is a script-like tool while SoapUI provides a GUI (Graphical User Interface) for tests specification and execution.

A TTR test case is composed of an identification, the URL of Resource, the HTTP Method to be executed, input data, and output data expected. A test case can be composed of other test cases, and it can assist integration test among features of some web service. But similarly to WebInject, test cases have to be written in XML.

Considering the importance of SOA, as observed in Table 1, several automated testing tools for atomic services have been developed. While some tools are dedicated to SOAP/WSDL services, others can also be used for REST and JMS services. As a drawback, in some cases, test cases must be specified in XML, sometimes making its specification more verbose and error-prone than desired.

Web Services Composition Testing

Because of the dynamic nature of orchestrations and choreographies, there are few softwares tools for testing and monitoring the services participanting on such compositions. A systematic review about unit testing approaches for BPEL [START_REF] Zakaria | Unit testing approaches for BPEL: A systematic review[END_REF] carried out in 2009 analyzed 27 papers, in which only four were related to practical frameworks. BPEL4WS Unit Testing [START_REF] Li | Bpel4ws unit testing: Framework and implementation[END_REF] and BPELUnit [START_REF] Mayer | Towards a BPEL unit testing framework[END_REF] present an architecture and a model for specifying unit tests on BPEL process. Since the BPELUnit [START_REF] Mayer | Towards a BPEL unit testing framework[END_REF] is the most active software, we focused on the description of this tool in the next section.

Testing Orchestrations

BPEL process is based on its interaction with web services. Since they are loosely coupled, it is not hard to test its implementation by creating a harness around the process under testing. With this intention, Mayer and Lübke propose an architecture for creating BPEL automated testing frameworks. This framework is divided in four layers: test specification, test organization, test execution and test results [START_REF] Mayer | Towards a BPEL unit testing framework[END_REF].

Test specification layer describes how the tester will express his/her tests. Two extreme techniques are proposed: (i) data-centered approach, which consists on the validation of data structures, for example, a predefined SOAP message is compared with that one sent by the process under test (PUT), and (2) logic-centered approach, in which a programming language must be used to describe all test logic. The first one is simple, but it is less expressive while the latter is more expressive, but also complex.

Test organization layer characterizes the tests arrangement. An approach can consist on grouping tests in test suites to assist the developer usage. This organization has an advantage: the usage of the same setup and tear down methods for all related tests. Tests specifications are executed by a framework by creating a wrapper around the PUT to validate the PUT outputs and send pre-defined inputs. It can be achieved by using two different approaches. On Simulated testing, the BPEL process is simulated in a controlled environment assisting by an engine to perform debugging, control outputs and simulate inputs. The Real-life testing approach actually deploys the process and replaces the real web service partners with mocks. Both techniques depend on the specific engine implementation since they are not standardized.

The last layer is responsible for gathering the results and statistics obtained and presenting them to the end-user. A testing framework could have different metrics to assess this information. Test coverage is one of the metrics that can be used. Using the simulated testing approach, the testing framework, operating in debugging mode, can call methods from the BPEL engine during the simulation. While executing the real-life testing approach, the mocks used could log their activities for subsequent validations.

Based on the architecture described above, Mayer and Lübke report their choices for each layer to develop the BPELUnit. The developer specifies the test in XML language. To allow fast testing, SOAP details received and sent by the PUT are abstracted to the developer.

The framework supports specification of three interaction types with the PUT: one-way, twoway synchronous, and two-way asynchronous.

On the organization layer besides grouping the tests cases, it is mandatory to have the setup and teardown methods to set up and later shut down the web service partners and PUT itself.

As previously mentioned, all the choices on the execution layer depend on the used BPEL engine. BPELUnit supports these diversity with the development of adapters to each one. It uses the real-life approach which deploys the application PUT, executes the tests, and undeploys it.

Testing Choreographies

In the context of choreographies, there are even less tools than for orchestration. Some efforts for testing this kind of composition are found in the literature but they are mostly focused on model checking of choreographies, or data flow analysis from some structure derived from static artifacts. Therefore, none of them provide mechanisms for testing a choreography execution, which is one of our goals. Although some of those tools were also analyzed.

Pi4SOA [START_REF]Pi4 Technologies Foundation. Pi calculus for SOA[END_REF] is a software tool for testing interactions among participants of a choreography from a global model specified in WS-CDL (Web Service Choreography Description Language). Essentially, the purpose of Pi4SOA is modeling choreographies in WS-CDL, by producing the global model and then, a BPEL specification for each participant describing their role in the choreography modeled.

Based on some components such as partners, behaviors and interactions (message exchanges), the choreography is modeled by dragging and dropping these components, since the tool is available as an Eclipse plugin. Once modeled, it is possible to validate the flow among the web services by simulation, which is not performed using real service. Then, at design time, this tool provides mechanisms to verify the global model specified in WS-CDL.

Methodologies for testing web service compositions

An initial effort for understanding the current scenario of testing techniques for orchestrations and choreographies was conducted by Bucchiarone [START_REF] Kon | Testing service composition[END_REF]. Later, a more comprehensive survey to cover SOA testing was conducted by Canfora and Di Penta [START_REF] Canfora | Service-oriented architectures testing: A survey[END_REF]. In this section, we discuss test techniques and methodologies presented in these studies and other complementary ones. Then, we present some practical methodologies for web services composition development, focusing on its V&V activities.

Testing strategies and techniques

Some issues such as dynamicity, adaptiveness, lack of control, and cost of testing are intrinsic properties that limit the testability of service-centric systems [START_REF] Canfora | Testing services and service-centric systems: challenges and opportunities[END_REF]. Nevertheless, based on traditional test strategies and techniques (see Section 2), some alternatives for testing service composition can be classified as presented in Figure 2.

Orchestration

An orchestrator is a program, or code (e.g., a BPEL specification) that defines the behavior of a particular partner. In the unit testing context, an orchestrator can be taken as a unit. The goal of tests consists on exercising its behavior and verifying whether they match the specification or the behavior expected by the customer. Depending on the nature of the orchestrator, black-box or white-box techniques can be applied. When a WS-BPEL process is visible from an external point of view, only its WSDL interface is exposed. In such situation, the process is available as a common service, then the black-box tests that can be applied for such process are equivalent to atomic services [START_REF] Canfora | Service-oriented architectures testing: A survey[END_REF].

When an orchestrator is specified in BPEL and executed by a BPEL engine, this specification can be also taken as the code of the orchestrator (if the engine is correct). In this case, white-box, or implementation-based techniques can be applied. For this kind of technique, mechanisms of structural testing such as control and data flow graphs can be used, and test cases can be derived from these structures. Yuan [START_REF] Yuan | A graph-search based approach to bpel4ws test generation[END_REF] proposes a graph search approach to BPEL test case generation which deals with BPEL special characteristics such as concurrency and synchronization.

Since these tests at unit level are focused on just exercising the behavior of that unit, the behavior of dependent parts must be simulated. This can be done by creating stubs or mock objects for the web services which the unit under testing communicates with. On the integration testing approach, the interaction among components must be exercised and verified, thus, some strategies for integration presented in Section 2 can be adopted. The real web services should be invoked, but exercising third-party services cannot be possible in testing mode. This is one of the most significant problem that integration testing of web services must overcome.

Choreography

At the choreography side, the unit tests can be applied following the same approach defined for orchestration, i.e., each participant is a unit to be tested. Differently from orchestration, the expected behavior for each partner is defined by its role in the choreography. Thus, black-box techniques can be applied for validating this behavior against this specification role.

Similarly to the case of orchestrations, integration tests face the same problems for choreographies. The lack of information about certain partners and the impossibility of exercising some third-party services make this kind of test more difficult. Moreover, the dynamic binding property, in which the endpoint of a participating service is chosen dynamically, can raise serious integration issues [START_REF] Canfora | Testing services and service-centric systems: challenges and opportunities[END_REF]. Due to this property, strong criteria might require testing all possible endpoints that can be assigned to a choreography. In the example illustrated in Figure 3, each abstract interface (hotelSearch, checkFlight, getShuttleTicketPrize and getCabPrice) has some candidates to take on these roles. Because of the dynamic binding, all possible combinations of bindings (24 in total) must be integrated and exercised one-by-one. According to Canfora and Di Penta [START_REF] Canfora | Testing services and service-centric systems: challenges and opportunities[END_REF], some heuristics can be reduced to decrease the number of possible endpoints for testing. For instance, the test integration strategy can ignore those endpoints that violated some QoS or business rule. In the situation of Figure 3, if the service providers establish a business rule, defined in a global agreement, then the cost of the services must be within $15, and just six possibilities would be exercised.

Other approaches like MBT (Model-Based Testing) can be an alternative to derive integration test cases. MBT refers to an approach to derive test cases from the exploitation of formal models. Some works in this direction try to derive test cases from choreography specifications, applying algorithms defined for conformance checking [START_REF] Frantzen | On-The-Fly Model-Based Testing of Web Services with Jambition[END_REF]. Some tools have been developed to convert choreography models into UML diagrams, and then, derive test cases from these diagrams [START_REF] Stefanescu | MBT4Chor: A model-based testing approach for service choreographies[END_REF].

Practical methodologies

After this study on tests for choreographies, we investigated some practical approaches for V&V. In particular, Savara methodology (described bellow) is not just a testing methodology, but rather a methodology related to all stages of a choreography development. Nonetheless, at each stage of development, the produced artifacts are verified and validated. Furthermore the choreography monitoring (at design and runtime) consists on a significant stage of Savara. For these reasons, we decided to include a discussion about SAVARA in this technical report. In the future, we intend to propose and develop a new practical methodology that uses TDD (Test-Driven Development) [START_REF] Beck | Test Driven Development: By Example[END_REF] to guide choreographies development. Since one of our goals is also supply the industry demands, existing technologies and standards like Savara must be studied and analyzed.

The Savara project

The Savara Project [START_REF]Savara: Testable architecture[END_REF] is a set of software tools that comprises the Enterprise Architecture to support a methodology called "Testable Architecture". The methodology aims to ensure that any artifacts defined during the development life cycle of a choreography can be validated with other artifacts in previous and subsequent phases.

This methodology formally has its foundations in pi-calculus. Pi4SOA features (see Section 3.1) are used for verifying and validating some models developed in WS-CDL [START_REF] Kumar | Getting serious about enterprise architecture (whitepaper on alignment between testable architectures and TOGAF)[END_REF]. According to Bhavish Kumar Madurai, Co-chair of the SAVARA Project, the proposed methodology is aligned to the TOGAF Iterative methodology principles [START_REF] Kumar | Getting serious about enterprise architecture (whitepaper on alignment between testable architectures and TOGAF)[END_REF] for Enterprise Architectures. TOGAF (The Open Group Architecture Framework) [START_REF]TOGAF (The Open Group Architecture Framework)[END_REF] is a collective effort of some entities such as consulting and system integrator organizations, as well as end-users. TO-GAF aims at defining detailed processes, methodology, and artifacts for efficient and effective delivery of enterprise architectures for any organization regardless of the size.

During the project development, a file property records information about the artifacts defined in each phase of the software development lifecycle, and the relationships between them. This file is used by Savara tools to validate and ensure that each artifact with its dependencies is valid in respect to each other [START_REF] Brown | Savara 1.1 -Getting started guide[END_REF]. The development process of Savara is divided into the following phases:

1. Modeling the scenarios: Scenarios representing the business requirements are modeled based on UML use cases diagrams and documents. These scenarios correspond to a logical sequence of messages among the partners of the choreography to be developed.

Global Model definition: Based on the present scenarios, a global model that represents

the business flow from an external perspective is developed. Thus, this model specifies the message exchange (in SOAP) among partners but not inside a specific component. This artifact can be written in WS-CDL or BPMN2. 3. Local Model: Defines the interface ("the contract") for each web service. These artifacts are used to validate the global Model in order to guarantee its correct implementation, using the Pi4SOA simulation feature. At this point, the web services can be associated within a Registry/Repository. The Local Model is a kind of orchestration process defined for each service. 4. Service Design: The contracts defined in the Local Model are designed internally. If a service represents a database, it could be defined as the database schema. At this point, for example, a BPEL specification and WSDL interfaces are generated for the services.

Service Implementation and Testing:

Based on the artifacts generated by the previous phase, the services are implemented and BPEL specifications are deployed in BPEL Engines. Since these artifacts (e.g., BPEL specification) were generated based on models, its logic is correct, assuming that the BPEL Engine is correct. At this point, unit tests are applied in the web services. 6. Runtime: the Savara project proposes a runtime monitoring tool to ensure that business processes are executing correctly in accordance with the business requirements defined on the scenarios and global models.

Our Prototype

Based on the study and analysis previously presented, we developed a software prototype for automated testing of composed services. This tool consists of ad hoc automated test scripts developed using the JUnit [START_REF] Beck | Automated testing framework[END_REF] framework. During the development, we tried to identify and apply, whenever feasible, studied testing techniques. We also developed a service choreography to validate our prototype. This work represents a first step towards building a generic testing framework and methodology for Choreographies, which is our long-term goal.

The tested choreography

We designed and implemented a simple choreography on OK (OpenKnowledge)7 , a system which facilitates the interaction among peers without a pre-run-time knowledge of who to interact with or how interactions will proceed. From the OK kernel, fully distributed peer-topeer applications can be developed [BPB + 09].

Applying these principles, we developed a choreography for planning and booking a trip based on the example provided in the WSCI specification8 . A user plans to take a trip and informs the Traveler service where and when to go. At this point, the choreography participants consist of: Traveler, Travel Agency, Airline, and Acquirer. Through this choreography, after ordering a trip, the user can reserve an e-ticket, and finally, confirm (book) or cancel it. Figure 4 presents this flow in OMG's BPMN2 format. As we can observe, each operation is a process which, in BPMN2, is represented by a box that contains the symbol "+".

In our example, the Traveler service initiates the Order Trip process, and then invokes the Travel Agency which searches for the required Flight on the Airline. In this type of diagram, since the Traveler started the process, it is represented differently from the entities called, which in this case, are the Travel Agency and the Airline (both are painted in gray). This interaction is illustrated on Figure 5. Notice that the input message (request) is represented by a white envelope while the output message (response) is represented by a gray one. Even whether the message output of some process consists on the input of another one, this is the representative syntax for those situations. The Reserve Trip process can be seen on Figure 6. Traveler requests a trip reservation to the Travel Agency, which requests a flight reservation to the Airline. Then, the response travels all the flow back until the Traveler service. After these two interactions, a user can request the Traveler to cancel the reservation or to book it. As can be seen, the Cancel Reservation process (Figure 7) is simple. The return value from the Airline and the Travel Agency services are just confirmation messages.

The process described in Figure 8 is more complex than the others. After the Traveler service requests the Book Trip operation, the Travel Agency calls the Acquirer to check whether the user can afford to buy or not for the flight and its services. The Acquirer service sends failure notifications to the Travel Agency and Airline services if the user cannot afford to buy the trip. In this case, these services send messages to the Traveler reporting the failure.

Otherwise, the Acquirer service sends a payment confirmation to the Travel Agency and Airline services. After that, the Airline service confirms the flight price to the Travel Agency, and sends the e-Ticket to the Traveler. After receiving the confirmation from the Acquirer and the Airline, the Travel Agency sends to the Traveler a report (statement) with the total price paid.

Each peer of our choreography is an atomic web service. These services can be accessed by other applications as well as reused by other compositions. We developed our services using different technologies. Traveler and Airline are SOAP/WSDL services while Travel Agency and Acquirer are RESTful web services.

Even though some choreography standard languages (WSCI, WS-CDL, and BPMN2) have been defined, to the best of our knowledge, none of them has been completely implemented. Therefore, we had some difficulties to design and implement our choreography.Since we needed a running choreography for testing, the OpenKnowledge system was selected as the best option for our preliminary work. In spite of OK not being originally designed for SOA applications, it is simple and easy to define and distribute interaction models with it.

As explained before, standardized web service compositions are accessible as atomic services from the exterior. For this reason, we adapted the OK choreography to become accessible as an atomic service. As an advantage, all developed test scripts and the tools are compatible with those standard compositions. Since the choreography was developed incrementally, we tried to apply, whenever possible, TFD (Test-First Development) [START_REF] Meszaros | xUnit Test Patterns: Refactoring Test Code[END_REF].

Proposed test cases

Before starting to implement automated test cases for the presented choreography, we first wrote in pseudo-code some tests we intended to implement. Through this "draft" version of tests, we derived unit and integration tests by analyzing the web services isolately and the choreography flow, respectively. Some web service participants of a choreography are atomic services, and can be accessed outside the choreography. Other ones, such as the Traveler Service, were developed exclusively for our composition. We can describe the internal behavior of each services as • Traveler: this service corresponds to the "trigger" of the choreography. In this first version, it just forwards the received messages to the web service Travel Agency, and interacts directly with users. In more realistic scenarios, this service can store user information and invoke other services to verify/collect data from user (e.g., payment information, historical requests); • Travel Agency: stores information about travelers (end-users), for instance their registers. This functionality is not specified in this choreography model (see Figure 4), but every time a user makes an order trip request, it is invoked. • Airline: it is a stateless service for searching flights. Any other services or end-users can search for flights. However, this service just allows authorized travel agencies to reserve and book flights. Then, users can olny reserve and book tickets with the assistance of an authorized Travel Agency service. • Acquirer: this service manages the financial relationships among the services. Then, it provides internal functionalities such as checking user credit, creating accountants and effecting payments.

The goals of unit tests proposed below consist on apply black-box techniques to exercise these services internal behaviors. In this section, we present a high-level acceptance test specification for verifying and validating some scenarios of choreography. Then, some unit test cases for testing the Airline service are presented.

A concrete implementation of these tests is described in details in the next section. The Figure below presents some acronyms and resource names that will be used in the tests description.

Acceptance tests scenarios

Using black-box, we present below some scenarios and the respectives test cases written to validated it.

Airline unit tests examples

In the following test specifications, some functionalities provided by the airline service are tested at unit level. To apply these tests, some clients must be generated to invoke the service under testing. In the next section, these mechanisms are approached in details.

Implemented test cases

In this section, we describe our approaches for implementing automated tests for the choreography previously presented. Therefore, all approaches to implement unit, integration, and acceptance tests are described. Since we consider integration tests the most important strategy for web service composition, the section about it is more detailed than the others.

Unit tests

Unit tests focus on verifying the behavior of the smallest unit of software which can be a single class or a method. As discussed in Section 4.1, on the choreography context, services are considered the units for unit testing. Therefore, our unit tests validate the service behavior by verifying each provided functionality. In real compositions, often, only the service interface is available, so we decided to focus our efforts on testing techniques related to this scenario. Then, each functionality of the service under testing is validated using the black box testing model.

In our current prototype, to test SOAP web services, a Java SOAP client (developed using JAX-WS 9 ) needs to be developed for each service endpoint (i.e., the client is specific for each endpoint). Once developed, the test specification uses this client to invoke the services. For guaranteeing the independence of these unit tests, at the beginning of the test suite, the prototype publishes the service and at the end, turns it off. Figure 10 shows some unit test cases for the Airline web service. Because of the nature of REST services, we have a generic client (i.e., it is not restricted to a specific endpoint). This tool was adapted from an open source GUI rest client [START_REF]Java application to test RESTful webservices[END_REF] and integrated into our prototype. Similarly to SOAP web services, before running the unit test case, the prototype deploys the service, and at the end, turns it off. In Figure 11, some unit test cases for the Travel Agency service are presented. level, the approach focus on integrating each service at a time in the choreography. Once a service is integrated, the choreography is actived by the tester. Then, it is verified whether the component (service) newly integrated acts as expected. This step is achieved by checking the messages sent by that component. For each message sent, its name, destination, and content are compared with the expected values. We developed and include in our prototype an ad hoc framework that supports implements the steps in this approach. Figure 14 shows an example of that approach usage. As depicted, the tester is integrating the A and B components. In the first step, the tester activates the choreography, invoking the service A. During the choreography enactment, messages are exchanged between services A and B (step 2). Our framework collects the output messages fom B and stores them in a queue. This is performed in the third and fourth steps. When the choreography is over, the tool compares what the tester has specified with the collected data (step 5). Some integration testing techniques presented in Section 2.1 can be combined with our approach. In the top-down procedure, the integration begins with the main module, so its dependencies need to be mocked, which in the example would be the C service. In the bottom-up approach, the integration starts with the most independent modules. In this case, there are no dependencies, so the C component could be a service already integrated in the choreography.

To demonstrate the benefits of this kind of test, we propose an example based on the choreography presented in the previous section. Considering that the Travel Agency can search for flights from more that one airline, suppose that another airline service is integrated to the choreography. This new service is from a Brazilian provider, and consequently, it charges all tickets in BRL (Brazilian Real), but our choreography just works with USD (United States Dollar ). Initially, all unit tests for this new component pass, and the incompatible currency is not noticed at this stage. Then, the integration test detects that the Acquirer service charged the ticket price incorrectly since its service does not apply currency conversions. This situation and the tests that caught this incorrect behavior are presented in Figure 15 Thus, these tests revealed an error in the choreography that should be fixed, for example, by adding a currency converter component. We have used both integration and acceptance testing strategies to validate our choreography flow. With integration testing, some problems of interface matching, like the currency conversion, are identified when a new service is integrated. As a result, it is discovered that an error or failure emerged with the current integration. Even though integration tests are the most efficient ones, they also are more difficult to be applied. On the other hand, acceptance tests are easier to be applied, since the composed service is taken as an atomic one, but they are also slower.

Conclusions and Future Works

This technical report presented our initial research about the current scenario of V&V activities in web services compositions. We focused the research on existing tools and techniques for testing atomic and composed services. Based on the results, we also developed a prototype for automated choreography tests.

When taken as an atomic service, both orchestrations and choreographies testing approaches are equivalent to the techniques for atomic services testing (see Section 4.1). Nevertheless, when the implementation of the orchestrator is available, unit tests can exercise the flow orchestrated using white-box testing techniques.

Although there are some approaches for testing choreographies in the literature, we noticed that these proposed works do not execute the tests on the choreography (running software). In such approaches, the services that compose a choreography are not really invoked by the tests. These testing techniques focus on validating the models that describe the choreography.

The nature of SOA makes the execution of integration tests for composed services more difficult. Because of the lack of service information, how it is implemented, third-part rules, and governance issues, the adoption of this testing strategy may not be feasible in some cases. To experience these issues, we developed a software prototype for testing choreography automated. One of its feature provides mechanisms for applying integration tests by capturing and analyzing messages exchanged among the choreography participants.

For future works, we plan to develop a framework and a set of tools for testing choreographies. With this set of tools, we intend to provide mechanisms for: (i) specifying the needed environment to test and monitor a choreography (running software); (ii) writing and executing tests automated.

All tools proposed will support a TDD methodology for writing high quality automated tests for choreographies. The lessons learned from the prototype development will be used as a valid input for the methodology proposal we intend to develop. All testing techniques and strategies as well as the practical methodologies studied consist on the basis to achieve our goals.

Figure 1 .

 1 Figure 1. Skeleton generated by soapUI [BBMP09]

Figure 2 .

 2 Figure 2. Alternatives for testing web service compositions [ABS07]

Figure 3 .

 3 Figure3. Dynamic binding on the integration test[START_REF] Canfora | Testing services and service-centric systems: challenges and opportunities[END_REF]

Figure 4 .

 4 Figure 4. Choreography global view

Figure 5 .

 5 Figure 5. Process of the Order Trip operation

Figure 6 .

 6 Figure 6. Process of Reserve Trip operation

Figure 7 .

 7 Figure 7. Process of Cancel Trip operation

Figure 8 .

 8 Figure 8. Process of Book Trip operation

Figure 9 .

 9 Figure 9. Acronyms and resource names

Figure 10 .

 10 Figure 10. Unit test case for Airline service

Figure 11 .

 11 Figure 11. Unit test case for Travel Agency service

Figure 14 .

 14 Figure 14. Integration test flow example.

  and Figure16

Figure 15 .

 15 Figure 15. Message flow after new Airline service integration

Figure 16 .

 16 Figure 16. Test case to verify new Airline service integration error

xUnit tools: http://xprogramming.com/software.htm

Mockito: http://mockito.org/

EasyMock: http://easymock.org/

Cucumber: http://cukes.info/

http://sites.google.com/site/jbeetest/

http://fitnesse.org/

OpenKnowledge project: http://www.openk.org/

WSCI official page: http://www.w3.org/TR/wsci

http://jax-ws.java.net/

Acknowledgements

The research leading to these results has received funding from HP Brasil under the Baile Project and from the European Community's Seventh Framework Programme FP7/2007-2013 under grant agreement number 257178 (project CHOReOS -Large Scale Choreographies for the Future Internet).

During the development of atomic services, we faced some problems related to nonidempotent operations (for instance POST). Test cases that usually need certain resources previously created can become dependent of other test cases. This behavior is not acceptable for automated unit tests. To solve this, a strategy could be cleaning all persistence structures affected by the test after its execution.

Acceptance tests

Differently from others testing strategies, acceptance tests verify the behavior of the entire system or complete functionality. From the point of view of an end-user, the choreography is available as an atomic service. Thus, the acceptance test validates the choreography as a unit service, testing a complete functionality. In such context, this type of test is similar to the approaches of unit tests using the black-box model, and there is no need to know how the service is implemented.

In our approach, a tester specifies the tests by calling a service that activates the choreography. Before the execution, he/she needs to execute a script that enacts the choreography and deploys a service. Then, these tests are executed and the actual results are compared with the expected output values.

In the choreography example explained above, the Traveler peer is the service that triggers it. Therefore, to test the Order Trip Operation, shown in Figure 5, the tester calls the method on the Traveler Web Service and compares the returned value with the expected one. The whole flow performed by a user that completes his/her plan can be seen in Figure 12.

Integration tests

Integration tests attend to solve the problems produced when unit tested components are integrated. Their goal is to verify the unit interfaces and interactions. Our approach for applying integration tests is based on the techniques presented by Bucchiarone [START_REF] Kon | Testing service composition[END_REF] as in the incremental integration strategies (see Section 2). After all services have been tested at unit


Damien Rohmer

Marie-Paule Cani

Stefanie Hahmann

Boris Thibert

Folded Paper Geometry from 2D Pattern and 3D Contour

Folded paper exhibits very characteristic shapes, due to the presence of sharp folds and to exact isometry with a given planar pattern. Therefore, none of the physically-based simulators developed so far can handle paper-like material. We propose a purely geometric solution to generate static folded paper geometry from a 2D pattern and a 3D placement of its contour curve. Fold lines are explicitly identified and used to control a recursive, local subdivision process, leading to an efficient procedural modeling of the surface through a fold-aligned mesh. Contrary to previous work, our method generates paper-like surfaces with sharp creases while maintaining approximate isometry with the input pattern.

Introduction

Although extremely common around us, folded paper is almost never represented in 3D films or games. Indeed, none of the existing physically-based simulators, generally designed for cloth, can handle this challenging material. Let us first list the specificities required for modeling paper: Paper material is subject to exact length preservation when it deforms from its 2D, unfolded shape. Therefore, a piece of paper always remains exactly developable onto a plane, whatever the deformations applied to it. Secondly, these deformations are quite different from those of cloth-like material, since they include sharp fold lines. Note that the later would be very difficult to generate using the mesh-based physical simulation used for cloth, since the long, straight sharp folds of arbitrary orientation that may appear under deformation cannot be all well represented by a given predefined mesh. Therefore, modeling paper largely remains an open problem.

In this work, we introduce the first method to generate visually realistic, non regular folded paper geometry, from a 2D pattern and some 3D positioning of its contour curve. Our approach is fully procedural and restricted to the generation of a static shape: the basic idea is to iteratively identify fold lines and use them to recursively subdivide the geome-try until isometry with the pattern is approximately restored. The main advantages of our approach are:

• The intuitive shape control we provide through the specification of the 3D contour curve while nearly preserving length with respect to a given pattern. • The generation of general paper-like surfaces, not restricted to the convex hull of their contour points and where folds are automatically created without the need for any extra user intervention. • The automatic construction of an adapted mesh, aligned with folds and therefore able to accurately represent sharp fold lines. With our method, even complex surfaces can be accurately represented using few polygons. • The efficiency of computations, since no global optimization is required.

Related Work

Surfaces that preserve length with respect to a 2D pattern were already well studied. As standard simulation was shown to be ill-conditioned when stiff elements are used to limit stretch [START_REF] Ko H.-S | Stable but responsive cloth[END_REF], specific physically-based models were introduced [Pro97,VMT07,LTJ07,BB08,TPS09] or the simulation was enhanced with geometric length preservation constraints [START_REF] English | Animating developable surfaces using nonconforming elements[END_REF][START_REF] Stumpp | A geometric deformation model for stable cloth simulation[END_REF]. However, these approaches, developed for cloth-like material, are expensive and none of them is well suited for non-smooth surfaces such as folded paper exhibiting sharp creases. Burgoon [START_REF] Burgoon R | Discrete shells origami[END_REF] included such creases into a thin plate model, but the folding curves were to be traced manually by the user.

In parallel, some purely geometric methods were specifically designed for developable surfaces. Developable tensor product surfaces were first studied [START_REF] Pottmann | Developable rational bézier and b-spline surface[END_REF] but do not handle junction between patches. Procedural methods were developed to generate a ruled developable triangulation when the input data is a 3D contour curve [Fre04,RSW * 07], positional constraints [START_REF] Peternell | Developable surface fitting to point clouds[END_REF], surfaces geodesics [START_REF] Wang | Geodesic-controlled developable surfaces for modeling paper bending[END_REF], or a coarse quadrilateral mesh [LPW * 06]. All these methods are able to generate exact developable triangulation. However, they do not take into account length's preservation with respect to a given pattern. Moreover, the resulting surfaces remain very close to C2 developable patches, i.e. ruled surfaces without singular points and with no sharp edges. Therefore such surfaces always lie in the convex hull of the input contour. In consequence, these models cannot represent the general folded paper shapes we are looking for.

An alternative approach is to deform a preexisting mesh by increasing a developability criterion. Non linear minimization was used by Wang [START_REF] Wang | Achieving developability of a polygonal surface by minimum deformation: a study of global and local optimization approaches[END_REF] for static surfaces and by Popa [PZB * 09] for captured animated meshes. Tang [START_REF] Tang | Quasi-developable mesh surface interpolation via mesh deformation[END_REF][START_REF] Chen | A fully geometric approach for developable cloth deformation simulation[END_REF] added an extra length preserving criterion into the energy formulation to preserve both developability and length with respect to a pattern. However, all these approaches require the use of a predefined surface tessellation into a mesh. Therefore, they are not suited to model folded paper with sharp creases (to which mesh edges would need to be aligned). Moreover the computational time always stays larger than a minute.

Lastly, Decaudin [DJW * 06] proposed a procedural method to generate developable folds for surfaces wrapped around cylinders. Although this could be used to represent sharp paper-like folds (the mesh being predefined to be aligned with fold lines), only a specific, predefined family of folds was modeled.

In contrast with previous work, our method is especially designed for folded paper. It generates non-smooth surfaces that tend to respect isometry with a pattern while interpolating a contour curve. To do so, both smooth and sharp folds are automatically generated where needed to improve isometry, allowing the surface to bump out of the convex hull of its contour.

Recursive generation of folded paper

Overview and features

The inputs of our algorithm are a 2D convex pattern, whose closed polygonal 2D contour is noted Γ, and a closed polygonal 3D curve representing a valid 3D positioning of Γ, noted Γ : t → Γ(t). The bijection from Γ to Γ is supposed to be given. The output is a paper-like triangulated surface interpolating the 3D contour curve and almost isometric to the 2D pattern.

The algorithm, inspired by divide-and-conquer methods, iteratively inserts straight or curved segments between two selected points on the contour of the part of the surface under consideration. The choice of contour points and the shape of the inserted curve between them are based on length criteria to make the resulting surface more and more isometric to the pattern. When curve insertion stops the final surface is generated by smoothly triangulating all surface parts delimitated by the curves. The outline of the algorithm is as follows:

1. Find the line segment [Γ(t 1 ), Γ(t 2 )] to be processed in priority on the 2D pattern. Compute its 3D mapping either as a straight line or as a 3D curve, fig. 1 , Γ 2 ) respectively, as input. Straight lines are inserted in priority when it's possible to find a pair of contour points of the pattern whose 3D counterpart has equal Euclidian distance. If this is not possible and the 3D distance is smaller than the corresponding distance on the pattern, then we have a folded surface inbetween. We therefore have to permit the surface to overpass the convex hull of its contour curve in order to restore isometry to the pattern. A curved fold curve is thus inserted to model this kind of surface. Its profile is determined by a local length minimization in order to improve length preservation through the subdivision steps. All inserted fold lines (curves and straight lines) are polygonal and will belong to the final mesh. No extra remeshing is therefore necessary in order to align the mesh edges with these fold lines. Depending on local mesh geometry they may represent sharp features. Figure 2 illustrates the steps of constructing a surface from a slightly deformed contour curve.

Fold line computation

Case of a straight 3D line. First note that the segment [Γ(t 1 ), Γ(t 2 )] is lying on the 3D surface iff

Γ(t 1 ) -Γ(t 2 ) = Γ(t 1 ) -Γ(t 2 ) .
(1) Therefore, given Γ and Γ, we search for the couple (t 1 ,t 2 ) which best satisfies eq.(1). If Γ(t 1 ) -Γ(t 2 ) -Γ(t 1 ) -Γ(t 2 ) ≥ 0 then there is no compression in this part of the surface, and a straight 3D line would be the best solution to connect the two points in 3D. Otherwise, we have the case of local compression, meaning that the surface between both positions is not planar. A straight line would not be sufficient.

Case of a curved 3D line. If no straight segment can be found, we search for the pair of vertices with least compression in Euclidean distance. Let's suppose that the mapping of the least compressed segment [Γ(t 1 ), Γ(t 2 )] is given by the 3D curve c. We choose c to be a cubic polynomial for the following reasons:

• Cubics can accurately approximate cylindrical or conical sections forming C 2 developable patches. • Cubics are minimizing the bending energy, therefore no spurious oscillation is introduced. • Efficient fitting is possible due to the limited number of degrees of freedom.

A good candidate for the fold curve c is a curve which improves the preservation of length through the recursive splitting algorithm. We therefore look for the optimal cubic curve such that the mesh computed after subdivision minimizes the error in length with respect to the pattern. To compute such an error, we define two pairs of trian- 3. The first pair (S 0 , S 0 ) corresponds to the mesh at the current step. This mesh is defined by the flat Delaunay triangulation, without interior vertices, based on the pair of curves (Γ, Γ). The second pair (S 1 (c), S 1 (c)) corresponds to the mesh obtained after adding the interior fold curve c and its associated 2D seg-ment on the pattern c = [Γ(t 1 ), Γ(t 2 )]. Finally, the length error E is mesured as the L 2 norm on the edges of the mesh:

E(S, S) = ∑ edges i (L i -L i ) 2 ,
with L i (resp. L i ) the i th edge of the mesh S (resp. S). Note that E(S, S) = 0 means that the lengths are exactly preserved everywhere, which means the surface is developable. Finding the curve such that the surfaces created on both sides best preserve the lengths with respect to their pattern can therefore be expressed as a local minimization problem min E(S(c), S(c)) where the curve c is the unknown. In practice this non-linear minimization is solved using a gradient descent method, the BFGS method, starting from an initial guess given by a straight line. This is the most costly part of the algorithm. However this minimization is performed only locally and in a space of low dimension, so the method remains extremely cheap compared to global minimization approaches.

Surface generation

The recursive splitting ends when the surface parts are almost planar. A surface mesh interpolationg the initial contour curve and all inserted segments is generated by triangulating each surface part individually. As for each part the mapping onto the 2D pattern is known, a standard constrained planar Delaunay is performed in the pattern space as illustrated in fig. 3 and then mapped onto 3D. The fold lines are thus embedded into the mesh. This yields a good representation of sharp creases, which are a typical feature of folded paper.

Results

Fig. 2 shows our result in a simple case where no compression is detected: only straight lines are generated so the surface remains in the convex hull of its contour. Note that despite of the quite large 3D deformation, good corresponding rulings are found and the texture is not deformed due to length preservation. Further results of folded paper are shown in fig. 4. Firstly, note that our results are not constrained to stay within the convex hull defined by the 3D contour curve. Secondly, the algorithm automatically generates a mesh with edges aligned along the folds. Therefore very few polygons are required to accurately model non-smooth surfaces. Finally, we can observe that our results are actually closer to the real deformation of a piece of paper (at bottom right) than to cloth simulations with the same contour (yellow surfaces). The reason for that is that we couple a strong constraint on lengths along the surface with the possibility to produce non smooth geometry. All presented results were computed in less than 1s thanks to our local subdivision approach. Moreover, when only straight lines are required, the method is about 10 times faster. In addition, all the resulting surfaces have relative length error below 5%. The input 3D contour curves were computed using a standard cloth simulator using high stiffness mass-spring elements.

Discussion and Future Work

We have presented an efficient method to generate paper-like geometry that approximately preserves length with respect to a 2D pattern. The method seamlessly handles non-smooth surfaces thanks to a recursive meshing process that aligns edges along fold curves. Despite of its good visual results, our method still has a number of limitations, which we hope will inspire future research: Firstly, providing valid 3D contour curves as an input is not an easy task: most closed curves of the right length would not be a solution for the contour of a surface isometric with the pattern. Therefore, we used a cloth-simulator to generate our input curves, which is a bad solution in terms of shape control. Being able to input just a few position constraints would be highly desirable. Secondly, our algorithm is a greedy one: nothing insures that it converges towards the best possible solution, and the latter might not be reachable with the cubic curves we use: therefore, our isometry error generally stops decreasing after while, which mean we reached a local minima. Thirdly, the current method does not insure that the generated surface is self-intersection-free, and nor avoids collisions with obstacles during the generation process, so the result is not always visually plausible. Lastly, setting up an animation method for dynamically folding virtual paper is still an unsolved challenge. The method we just presented is only a first step in this direction.

Figure 1 :

 1 Figure 1: Recursive subdivision step: the 2D pattern and the corresponding 3D contour (middle) are split into two pieces (left and right) along a fold line, which is straight in pattern space.the inserted curve between them are based on length criteria to make the resulting surface more and more isometric to the pattern. When curve insertion stops the final surface is generated by smoothly triangulating all surface parts delimitated by the curves. The outline of the algorithm is as follows:

Figure 2 :

 2 Figure 2: Reconstruction of a sheet of paper. Left to right: initial contours (2D pattern and 3D), recursive insertion of straight fold lines, resulting surface.

Figure 3 :

 3 Figure 3: Pair of meshes (S 0 , S 0 ) without interior points and (S 1 (c), S 1 (c)) after adding the 3D curve c. gulated surfaces such as illustrated in fig. 3. The first pair (S 0 , S 0 ) corresponds to the mesh at the current step. This mesh is defined by the flat Delaunay triangulation, without interior vertices, based on the pair of curves (Γ, Γ). The second pair (S 1 (c), S 1 (c)) corresponds to the mesh obtained after adding the interior fold curve c and its associated 2D seg-

Figure 4 :

 4 Figure 4: Results for folded surfaces. From left to right: Input 3D contour curve; Pattern and 3D surface with separation segments; Final rendering; Comparison between cloth simulator (yellow) and real experiment (white).

  middle. 2. Split the pattern region Γ into two parts Γ 1 and Γ 2 , and associate to them the new local 3D contour curves, Γ 1 and Γ 2 respectively, fig. 1 left and right. 3. Repeat the subdivision steps recursively on the two independant regions by considering the new couples (Γ

	2

1

, Γ 1 ) and (Γ


Igor Martial
email: igor.martial@institutoptique.fr

François Balembois

Julien Didierjean

Patrick Georges

2.5 mJ, sub-nanosecond pulses from single-crystal fiber amplifier in a kHz MOPA system

A Master Oscillator Power Amplifier configuration using a Nd:YAG single-crystal fiber to amplify a passively Q-switched microlaser is presented. We achieved the amplification of 80 µJ, sub-nanosecond pulses to the multi-millijoule regime.

Introduction

The MOPA (Master Oscillator Power Amplifier) configuration is very useful to extend laser performance of passively Q-switched sub-nanosecond Nd:doped microlaser addressing applications like material processing or instrumentation which require high energy (several millijoules), sub-nanosecond pulses at the kHz regime. Different configurations and gain media have already been used in the past few years. Multipass amplifiers with Nd:YAG or Nd:YVO4 bulk crystals can reach high energy (>100 mJ) for pulse duration of few tens of ns at low repetition rate (<200 Hz) [START_REF] Ostermeyer | Diode-pumped Nd:YAG master oscillator power amplifier with high pulse energy, excellent beam quality, and frequency-stabilized master oscillator as a basis for next-generation lidar system[END_REF] or energy below the millijoule level for sub-nanosecond pulses at the kHz regime [START_REF] Gaydardzhiev | A compact Nd:YAG slab amplifier for miniature solid state Q-switched lasers[END_REF]. Yb fiber amplifiers [START_REF] Galvanauskas | High peak power pulse amplification in large-core Yb-doped fiber amplifier[END_REF][START_REF] Di Teodoro | Multistage Yb-doped fiber amplifier generating megawatt peak-power, subnanosecond pulses[END_REF] provide high efficiency and high beam quality but are limited to the MW peak-power due to nonlinear effects. Recently the millijoule level with sub-nanosecond pulses at 10 kHz was demonstrated, but with a more complex system using two transverse pumped Nd:YVO4 amplifiers operating at grazing incidence [START_REF] Agnesi | High Peak Power Sub-Nanosecond MOPA Laser[END_REF].

Bridging the gap between bulk crystals and glass fibers, single-crystal fibers are interesting new laser media [START_REF] Didierjean | High-power laser with Nd:YAG single-crystal fiber grown by the micro-pulling-down technique[END_REF][START_REF] Sangla | High power laser operation with crystal fibers[END_REF]. Indeed, crystal fibers are long and thin rod where the pump is guided (like in fibers) and where the signal in unguided (like in bulk materials) propagating with beam size much larger than in typical glass fibers. Hence the crystal fibers can benefit from the good thermal management coming from fibers and may sustain high peak power pulses and have high emission and absorption cross-section as the bulk crystals. Because the pump is confined in the single-crystal fiber, the gain can be high (following the trend observed in glass fibers). Therefore, it could be very interesting to use this particular gain medium as an amplifier in a MOPA design. Nd doped single-crystal fibers have already been used to amplify high repetition rate microchip laser [START_REF] Martial | Amplification of a Passively Q-Switched Nd:YAG Microlaser in a Crystal Fiber[END_REF] and an average power of 7 W at 29 kHz was obtained with a moderate peak-power of 45 kW. In this work we study the potential of single-crystal fibers to amplify pulses above the MW level.

Experiment

The experimental setup (Fig. 1) consisted in a simple pass amplifier using a Nd:YAG crystal fiber, a high power fiber coupled laser diode for the pump and a Nd:YAG passively Q-switched oscillator emitting at the wavelength of 1064 nm for the seed.

The pump laser diode emitted 60 W at 808 nm (100 µm diameter fiber with numerical aperture of 0.22). Its output is imaged into the crystal through a dichroic mirror by a 1:4 telescopes consisting of two AR coated lenses and with the focal lengths of 50 mm and 200 mm respectively. In order to maximize the output power, the focus point is put slightly inside the single-crystal fiber, close to the pumped face. It corresponds to a 400 µm diameter beam. Then the pump beam is guided by total internal reflections inside the crystal fiber. The Nd:YAG crystal fiber -50 mm long and a diameter of 1 mm -was 0.2% at. doped and mounted in a water-cooled copper block. A pump absorption of more than 94% is reached. As seed source, we used a passively Q-switched Nd:YAG microlaser providing linearly polarized and diffraction limited 400 ps pulses at the frequency of 1 kHz with an energy of 80 µJ and an average power of 80 mW. The signal was sent inside the single-crystal fiber in a counter propagating way with respect to the pump. A half-wave plate and a thin film polarizer allowed an adjustment of the input power inside the crystal fiber. Then the signal was slightly focused so that it was in free space propagation. Because of the transmission of each optical component, the maximum input power inside the crystal fiber was about 60 mW.

Results

With this configuration, the influence of the position and the size of the waist of both seed beam and pump beam were carefully studied in order to reach the highest efficiency. Fig. 2 shows the output single pulse energy as a function of the pump power. Pulses with an energy of 1.56 mJ are obtained under 60W of pump power corresponding to a peak-power of 3.9 MW assuming a pulse duration of 400 ps after amplification. This represents a gain of 26. The M 2 at the output of the microlaser is 1.1. The M 2 of the beam injected in the crystal fiber is 1.3 due to non-optimized optics for the beam propagation. After amplification, the M 2 becomes approximately 1.45. This shows that the crystal fiber amplifier induces only limited distortion on the input laser beam. The output energy presented no obvious sign of saturation versus the pump power. This means that higher energy could be extracted with more pump power. This clearly shows the advantage of crystal fiber limiting the parasitic effects (such as upconversion) and the thermal effects by a low doping concentration in Nd.

Preliminary experiments were done in order to extract more energy from the gain medium by using a double pass configuration. The double pass is achieved by switching the polarization of the signal. At the output of the single-crystal fiber, the signal is sent through a quarter-wave plate and reflected back by a flat mirror. First results show a gain of 1.6 between the first and the second pass (see Fig. 3). This leads to an output single pulse energy of 2.52 mJ at maximum pump power, corresponding to a peak-power of 6.3 MW assuming a pulse duration of 400 ps after amplification.

Conclusion

We have demonstrated that Nd:YAG single-crystal fiber is a laser medium with high gain able to produce mJ, MW pulses in a very simple design. To our best knowledge, this is the first time that such performances are obtained in a simple one pass configuration (1.56 mJ, 3.9 MW). It overcomes the performances of fiber amplifiers by the peak power and the previous Nd doped bulk amplifiers by its simplicity.

The first results obtained in double pass are very encouraging for the development of a multi-millijoule Nd:YAG single-crystal fiber amplifier.

Fig. 1 .

 1 Fig. 1. Experimental setup for single or double pass configuration.

Fig. 2 .

 2 Fig. 2. Output single pulse energy versus the pump power at 1 kHz in single pass configuration. Inset: Beam radius of the signal versus the position for an output single pulse energy of 1.56 mJ and spatial profile of the signal beam.

Fig. 3 .

 3 Fig. 3. Output single pulse energy versus the pump power at 1 kHz in double pass configuration.

Acknowledgement

The authors are grateful to Teem Photonics (Meylan, France) for the loan of the Nd:YAG passively Q-switched microlaser.


Igor Martial
email: igor.martial@institutoptique.fr

Julien Didierjean

François Balembois

Patrick Georges

Er:YAG single-crystal fiber laser in Q-switched operation

Keywords:

We describe an efficient Q-switched laser emission from a directly grown Er 3+ :YAG single-crystal fiber resonantly pumped by a laser diode in an off-axis configuration. The laser produces 2 mJ, 38 ns pulses at 1 kHz.

Introduction

The yttrium aluminium garnet (YAG) crystal doped with Er 3+ is one of the most attractive materials for the development of multi-watt compact eye safe laser sources around 1.6 µm. Such sources are required for many applications like remote sensing, free-space communications, range detection, and designation. The optical transition between the 4 I15/2-4 I13/2 manifolds includes the possibility for in-band pumping (between 1.45 and 1.53 µm). This minimizes the heat generated by the pumping process and hence limits the thermally induced birefringence and the thermal lens. Er:YAG lasers can be resonantly pumped using erbium-doped fiber lasers (EDFL) [START_REF] Chen | Multiwatt continuous-wave and Q-switched Er:YAG lasers at 1645 nm: performance issues[END_REF][START_REF] Setzler | Resonantly pumped eyesafe erbium lasers[END_REF][START_REF] Kim | Fiber-Laser-Pumped Er:YAG Lasers[END_REF][START_REF] Young | Efficient 1645-nm Er : YAG laser[END_REF]. The excellent beam quality of EDFL allows good spatial overlap of the pumped volume with the laser mode and efficient pump absorption due to the narrow linewidth. High power and good optical efficiency have been achieved using this EDFL pumping [START_REF] Kim | Fiber-Laser-Pumped Er:YAG Lasers[END_REF]. However, this pumping approach adds complexity, weight and volume to the laser system. Additionally, the overall optical to optical efficiency with EDFL pumping is typically only about 28% due to the number of stages [START_REF] Kim | Fiber-Laser-Pumped Er:YAG Lasers[END_REF].

Direct pumping using high power laser diodes can be a solution to improve the overall efficiency of the system [START_REF] Chang | Stable, Single Frequency Er:YAG Lasers at 1.6 µm[END_REF][START_REF] Garbuzov | 110 W(0.9 J) pulsed power from resonantly diode-laser-pumped 1.6-μm Er:YAG laser[END_REF][START_REF] Kudryashov | Resonantly diode-pumped Er:YAG laser: 1470-nm versus 1530-nm CW pumping case[END_REF][START_REF] Eichhorn | High-power resonantly diode-pumped CW Er3+:YAG laser[END_REF]. However, such direct pumping is complicated because of the low brightness of laser diodes. For this purpose, the use of long and thin rods (single-crystal fiber), confining the pump beam close to the signal beam, represents one way to manage the poor beam quality of pump laser diodes and to achieve high pump intensities along the whole laser medium [START_REF] Bigotta | Q-switched resonantly diode-pumped Er3+:YAG laser with fiberlike geometry[END_REF]. However, these rods are difficult to manufacture from standard Czochralski-grown boules: after cutting and complex polishing of the cylinder, it is difficult to reduce the diameter below 1 mm for a few centimeter long sample. The micro-pulling-down technique (µPD) provides a solution to this problem as laser rods can be elaborated directly, without any additional polishing of the cylinder [10]. The diameter can be easily reduced to a few hundreds of microns and typical crystal lengths can be up to 80 cm. In a previous work [START_REF] Martial | Er:YAG fiber-shaped laser crystals (single crystal fibers) grown by micro-pulling down: Characterization and laser operation[END_REF], we demonstrate the growth of laser quality Er:YAG single-crystal fiber by the micro-pulling-down technique and the first laser ever achieved with such gain medium.

In this work, we improve the setup by using the all potential of single-crystal fiber in an off-axis pumping configuration. We report Q-switched operation of a directly grown Er:YAG single-crystal fiber for the first time to our knowledge.

Experiment

The experimental setup is shown in Fig. 1 and consists of an off-axis end-pumped actively cooled 0.5% Er 3+ :YAG single-crystal fiber which has a diameter of 800 µm, a length of 60 mm and anti-reflection coatings on both ends. We use a bi-concave cavity. The first concave mirror is highly reflective at 1645 nm and the second one has a transmission of 30%. The pump light is provided by a fiber-coupled laser diode, with a 400 µm core diameter and a numerical aperture of NA = 0.22, delivering up to 80 W at 1532 nm (~1 nm FWHM). The fiber is imaged into the crystal by a 1:1 telescopes consisting of two AR coated lenses L1 and L2 with the focal lengths of 50 mm. In order to maximize the output power, the focus point is put slightly inside the single-crystal fiber, close to the pumped face. It corresponds to a 400 µm diameter beam. The pump beam is then guided inside the single-crystal fiber by total internal reflections. This off-axis configuration enables to keep a good overlap between the pump and signal beams, without the need of a dichroic mirror to combine both. This offers an important advantage because of the complex manufacturing and low damage threshold of dichroic mirrors designed for such a small difference between the signal and pump wavelength.

Results

We first tested the laser in CW operation. With a transmission of 20% for the output coupler, the measured absorbed pump laser threshold was 15.8 W and the maximum output power at 1645 nm was 7.3 W for 58 W of absorbed pump power, leading to a slope efficiency of 18%. Fig. 2 reports the measured output power versus the absorbed pump power. In order to realize Q-switched operation in the off-axis pumping configuration, an acousto-optic modulator is placed inside the cavity and an output coupler with a higher transmission (T = 30% @ 1645 nm) is used to prevent any damage on optics and coatings. The A.O.M. modulator introduces 7% losses inside the cavity. In this configuration, in CW operation the measured laser threshold is 17 W and the maximum output power at 1645 nm is 4.7 W for 58 W of absorbed pump power (see Fig. 2). In Q-switched regime, at the repetition rate of 5 kHz, the laser efficiency is identical as in CW regime. This indicates that there was no increase in losses due to up-conversion or amplified stimulated emission (ASE) when Q-switching at 5 kHz. The dependence of average output power and single pulse energy versus the repetition rate is shown on Fig. 3. Inset. Temporal profile of a pulse at 1 kHz.

For the maximum absorbed pump power (58 W), the laser could not be operated at lower repetition rates than 1 kHz due to damage of the optical coatings caused by the intra-cavity peak power of the pulses. At 1 kHz, the pulse energy was 2 mJ with a pulse duration of 38 ns. The inset in Fig. 3 shows the temporal profile of a 2 mJ pulse obtained at 1 kHz. In this configuration, the pulse duration was similar to the one obtained with efficient EDFL pumping system [START_REF] Kim | Fiber-Laser-Pumped Er:YAG Lasers[END_REF] and shorter than in recent diode pumping system [START_REF] Chang | Resonantly diode-pumped continuous-wave and Qswitched Er:YAG laser at 1645 nm[END_REF] and leads to peak-power up to 53 kW.

Conclusion

In conclusion, we have demonstrated an efficient Er:YAG single-crystal fiber laser resonantly pumped using CW diodes at 1532 nm. Using an off-axis pumping scheme CW output powers up to 7.3 W have been obtained and in Qswitched operation, the average power is 3,4 W at a 5 KHz repetition rate. The highest single pulse energy obtained was 2 mJ with a pulse duration of 38 ns at the repetition rate of 1 kHz. To our knowledge, this is the first Q-switched directly grown Er:YAG single-crystal fiber laser. Higher pulse energy should be achieved by employing a moretransparent output coupler.

Acknowledgement

This work is supported by the DGA (Direction Générale de l'Armement) under the project FEYPIA n° 2008 34 0019.

Fig. 1 .

 1 Fig. 1. Experimental setup

Fig. 2 .

 2 Fig.2. Output power at 1645 nm versus absorbed pump power at 1532 nm in CW regime (blue cricle) with an output coupler transmission of 20%. Red diamond-shape and green square are related to laser operation with the A.O.M and Toc = 30% in CW and in Q-switched operation respectively.

Fig. 3 .

 3 Fig. 3. Output average power (blue circle, right axis) and output single pulse energy (red square, left axis) at 1645 nm versus the repetition rate under 58 W of absorbed pump power in off-axis pumping Q-switched regime with an output coupler transmission of 30%.