Hsun-Ming Hu
email: hsunming.hu@gmail.com

Véronique Michel
email: veronique.michel@cepam.cnrs.fr

Patricia Valensi
email: pvalensi06@gmail.com

Horng-Sheng Mii

Elisabetta Starnini
email: elisabetta.starnini@unipi.it

Marta Zunino
email: martazunino@tiscali.it

Chuan-Chou Shen

Stalagmite-Inferred Climate in the Western Mediterranean during the Roman Warm Period

Keywords: Roman warm period, Mediterranean, Roman empire, stalagmite, climate change

) from northern Italy, which reveals a climatic trend of warming and increased humidity throughout the RWP. By comparison with other proxy records in Europe and the circum-Mediterranean region, we argue that the warm, humid climate in southern Europe could be linked to the multi-centennial warming of the Mediterranean Sea. Our record further suggests a century-long rapid drying trend from the early-4th to early-5th century, followed by a 100-year-long drought event, which could have influenced the fall of the Roman Empire.

Introduction

Climate change has widely affected society, ecosystems, and agriculture [START_REF] Giorgi | Climate change hot-spots[END_REF]. Today, the circum-Mediterranean region, with over 500 million inhabitants, has been threatened by severe drought and extreme climate, including floods, heat waves, and cold spells [START_REF] Screen | Caution needed when linking weather extremes to amplified planetary waves[END_REF][START_REF] Mahlstein | Pace of shifts in climate regions increases with global temperature[END_REF][START_REF] Stadtherr | Record Balkan floods of 2014 linked to planetary wave resonance[END_REF]. Such climate changes have been proposed as significant factors in the stability of ancient civilizations [START_REF] Demenocal | Cultural responses to climate change during the late Holocene[END_REF][START_REF] Büntgen | years of European climate variability and human susceptibility[END_REF][START_REF] Bar-Matthews | Mid-Holocene climate variations revealed by high-resolution speleothem records from Soreq Cave, Israel and their correlation with cultural changes[END_REF]. For example, the well-known 4.2-k dry event (4.2 thousand years ago) may have induced the collapse of the Old Kingdom and Akkadian Empire [START_REF] Cullen | Climate change and the collapse of the Akkadian empire: Evidence from the deep sea[END_REF][START_REF] Drysdale | Late Holocene drought responsible for the collapse of Old World civilizations is recorded in an Italian cave flowstone[END_REF]. Increasing climate variability at ~0 A.D. has been suggested as a trigger of the Celtic Expansion and Roman Conquest [START_REF] Büntgen | years of European climate variability and human susceptibility[END_REF]. Human societies have been forced to adapt to severe and unstable hydroclimatic conditions, with consequent climate-driven famine, warfare, diseases and/or political collapse [START_REF] Kaniewski | Environmental roots of the Late Bronze Age crisis[END_REF]. Complete and detailed paleoclimate records provide a means to investigate human responses to past climate change.

The Roman warm period (RWP), from ~200 B.C. to 400 A.D, is one of the warmest periods in the late Holocene [START_REF] Lamb | Climate: Present, Past and Future-V.2: Climatic History and the Future[END_REF][START_REF] Patterson | Two millennia of North Atlantic seasonality and implications for Norse colonies[END_REF]. This period was characterized by a warm, humid climate across Europe [START_REF] Mccormick | Climate change during and after the Roman Empire: Reconstructing the past from scientific and historical evidence[END_REF][START_REF] Frisia | Climate variability in the SE Alps of Italy over the past 17,000 years reconstructed from a stalagmite record[END_REF][START_REF] Esper | Orbital forcing of tree-ring data[END_REF][START_REF] Magny | Holocene climate changes in the central Mediterranean as recorded by lake-level fluctuations at Lake Accesa (Tuscany, Italy)[END_REF][START_REF] Migowski | Holocene climate variability and cultural evolution in the Near East from the Dead Sea sedimentary record[END_REF][START_REF] Zanchetta | Enhanced rainfall in the Western Mediterranean during deposition of sapropel S1: Stalagmite evidence from Corchia cave (Central Italy)[END_REF]. One recent study [START_REF] Margaritelli | Persistent warm Mediterranean surface waters during the Roman period[END_REF] even suggested that the average temperature in the RWP was 2 • C higher than the average temperature over the last century in the western Mediterranean. Although the RWP could be a regional warming event and limited in Europe and the North Atlantic region, to understand the RWP is essential for ancient European societal changes. Hampered by a lack of precisely dated records, the detailed climate variability in the circum-Mediterranean realm in the RWP remains unclear.

Here we present a well-dated stalagmite-based record of climate from the Bàsura cave of northern Italy, from 2500 to 500 years ago (yr BP, relative to 1950 A.D.). We used stalagmite carbon isotopes as a climate proxy and built an absolute age model with U-Th dating techniques. Our records show that precipitation in this region progressively increased over the RWP. A century-long shift to a dryer climate at the end of the RWP possibly contributed to the collapse of the Roman Empire in 476 A.D.

Material and Methods

Cave and Regional Settings

Bàsura cave (44 • 08 N, 8 • 12 E, Figure 1) is located in Toirano, northern Italy, 186 m above sea level [START_REF] Paolo | Reviewing the upper Pleistocene human footprints from the 'Sala dei Misteri' in the Grotta della Bàsura (Toirano, northern Italy) cave: An integrated morphometric and morpho-classificatory approach[END_REF] and 4.3 km from the coast of the Ligurian Sea. The cave has one natural entrance and another artificial tunnel connected to Santa Lucia cave. It features an 890 m-long passage with 10-20 m thick cave ceiling. Genoa (44 • 42 N, 8 • 85 E), 60 km northeast of the cave, has a large regional meteorological station. The station is only several km far from the coast and could share a similar climate feature with the cave, supported by high degrees of similarity of Genoa precipitation data and regional precipitation patterns (Supplementary Materials, Figure S1). Local observatory temperature and precipitation data used in this study were from this station. The region features a Mediterranean-type climate, with hot-dry summers and wet-temperate winters. Observational data of the Global Network of Isotopes in Precipitation-International Atomic Energy Agency (GNIP-IAEA) during 1961-1995 A.D. from the Genoa station show an annual temperature of 14.5 ± 1.2 • C (n = 29, 1σ) and an annual rainfall of 886 ± 106 mm (n = 35, 1σ). More than 70% of the precipitation is contributed during the rainy season between September and February. The average temperature in the Bàsura cave is 15.6 • C, and the relative humidity is 97-100% [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF].

Samples, U-Th Dating and Isotope Measurements

One candle-shaped aragonitic stalagmite, BA14-1, was collected from Bàsura ca This stalagmite is 160 mm in length with no visible hiatuses. Detailed sample figures (S plementary Materials, Figure S2A) and scanning electron microscope images are p sented in [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF] [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF]. A depth interval at 6.5-80.5 mm from the top was used this study. About 0.02-0.05 g subsamples from thirty-five layers were U-Th dated. S samples were drilled for U-Th chemistry, which was performed on class-100 benche the class-10000 clean room at the High-Precision Mass Spectrometry and Environm Change Laboratory (HISPEC), Department of Geosciences, National Taiwan Univer (NTU) [START_REF] Shen | Measurement of attogram quantities of 231 Pa in dissolved and particulate fractions of seawater by isotope dilution thermal ionization mass spectroscopy[END_REF][START_REF] Shen | Variation of initial 230 Th/ 232 Th and limits of high precision U-Th dating of shallow-water corals[END_REF]. U and Th isotopic compositions were measured on a multiple collector ductively coupled plasma mass spectrometer, Thermo-Fisher Neptune, linked with a sample introduction system, Cetec Aridus [START_REF] Shen | High-precision and high-resolution carbonate 230 Th dating by MC-ICP-MS with SEM protocols[END_REF]. An assumed initial atomic 230 Th/ 232 Th ra of 4 ± 2 × 10 -6 was used for correcting U-Th ages. Reported uncertainties in the U-Th tope data and calculated ages are given at a two-sigma (2σ) uncertainty level, or t standard deviations from the mean (2σm). Based on the StalAge depth-age model (Supp mentary Materials, Figure S2B) [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF][START_REF] Scholz | StalAge-An algorithm designed for construction of speleothem age models[END_REF], this segment covers a time period from 550 ± B.C. to 950 ± 7 A.D., including the RWP from 200 B.C. to 400 A.D.

A total of 286 powdered subsamples, 50-100 μg each, were drilled from BA14-1 intervals of 6.5-80.5 mm from the top for stable isotope analyses. Measurements of sta carbon isotopes were performed on a Micromass IsoPrime IRMS at the Stable Isotope boratory, Department of Earth Sciences, National Taiwan Normal University. The sta isotope data are reported in per mil (‰), relative to Vienna Pee Dee Belemnite (VPD and calibrated with two international standards, the National Bureau of Standards (NBS-19) and IAEA-CO-1. The one-sigma external precision (1σ) for the δ 13 C analyses 0.06‰ based on long-term measurements of NBS-19, IAEA-CO-1, and one in-house m (2) Lake Savine [START_REF] Sabatier | 6-kyr record of flood frequency and intensity in the western Mediterranean Alps-Interplay of solar and temperature forcing[END_REF]; (3) Bàsura cave, northern Italy (this study); (4) Cloşani cave, Romania [START_REF] Warken | Reconstruction of late Holocene autumn/winter precipitation variability in SW Romania from a high-resolution speleothem trace element record[END_REF];

(5) Marine sediment core TTR17-434G, Alboran Sea [START_REF] Rodrigo-Gámiz | Sea surface temperature variations in the western Mediterranean Sea over the last 20 kyr: A dual-organic proxy (UK' 37 and LDI) approach[END_REF]; (6) Marine sediment core SW104-ND11, Sicily Channel [START_REF] Miglietta | Numerical analysis of a Mediterranean "hurricane" over south-eastern Italy: Sensitivity experiments to sea surface temperature[END_REF]; [START_REF] Bar-Matthews | Mid-Holocene climate variations revealed by high-resolution speleothem records from Soreq Cave, Israel and their correlation with cultural changes[END_REF] Marine sediment cores MINMC06 and HER-MC-MR3, Minorca Basin [START_REF] Cisneros | Paleoclimate Reconstruction during MIS 5a Based on a Speleothem from Nerja Cave, Málaga, South Spain[END_REF]; (8) Chaara cave, Morroco [START_REF] Brahim | North Atlantic ice-rafting, ocean and atmospheric circulation during the Holocene: Insights from western Mediterranean speleothems[END_REF]. The map was generated using Ocean Data View.

Samples, U-Th Dating and Isotope Measurements

One candle-shaped aragonitic stalagmite, BA14-1, was collected from Bàsura cave. This stalagmite is 160 mm in length with no visible hiatuses. Detailed sample figures (Supplementary Materials, Figure S2A) and scanning electron microscope images are presented in [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF] [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF]. A depth interval at 6.5-80.5 mm from the top was used in this study. About 0.02-0.05 g subsamples from thirty-five layers were U-Th dated. Subsamples were drilled for U-Th chemistry, which was performed on class-100 benches in the class-10000 clean room at the High-Precision Mass Spectrometry and Environment Change Laboratory (HISPEC), Department of Geosciences, National Taiwan University (NTU) [START_REF] Shen | Measurement of attogram quantities of 231 Pa in dissolved and particulate fractions of seawater by isotope dilution thermal ionization mass spectroscopy[END_REF][START_REF] Shen | Variation of initial 230 Th/ 232 Th and limits of high precision U-Th dating of shallow-water corals[END_REF]. U and Th isotopic compositions were measured on a multiple collector inductively coupled plasma mass spectrometer, Thermo-Fisher Neptune, linked with a dry sample introduction system, Cetec Aridus [START_REF] Shen | High-precision and high-resolution carbonate 230 Th dating by MC-ICP-MS with SEM protocols[END_REF]. An assumed initial atomic 230 Th/ 232 Th ratio of 4 ± 2 × 10 -6 was used for correcting U-Th ages. Reported uncertainties in the U-Th isotope data and calculated ages are given at a two-sigma (2σ) uncertainty level, or two standard deviations from the mean (2σ m ). Based on the StalAge depth-age model (Supplementary Materials, Figure S2B) [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF][START_REF] Scholz | StalAge-An algorithm designed for construction of speleothem age models[END_REF] A total of 286 powdered subsamples, 50-100 µg each, were drilled from BA14-1 in intervals of 6.5-80.5 mm from the top for stable isotope analyses. Measurements of stable carbon isotopes were performed on a Micromass IsoPrime IRMS at the Stable Isotope Laboratory, Department of Earth Sciences, National Taiwan Normal University. The stable isotope data are reported in per mil (‰), relative to Vienna Pee Dee Belemnite (VPDB) and calibrated with two international standards, the National Bureau of Standards 19 (NBS-19) and IAEA-CO-1. The one-sigma external precision (1σ) for the δ 13 C analyses is ± 0.06‰ based on long-term measurements of NBS-19, IAEA-CO-1, and one in-house marble standard. The measured value for IAEA-CO-1 is 2.45 ± 0.06‰, consistent with the certificated value of 2.49 ± 0.03‰. The measured value for NBS-19 is 1.94 ± 0.06‰, consistent with the certificated value of 1.95‰.

Results and Discussion

Carbon Isotope Results

The δ 13 C results from stalagmite BA14-1 are given in Supplementary Materials, Table S1. This record (Figure 2B), from 550 ± 10 B.C. to 950 ± 7 A.D. (2500 to 1000 yr BP), varies from -11 to -5‰ (Figure 2B). It features stable δ 13 C values hovering around -9 to -7‰ at 550-200 B.C. and a multi-centennial decreasing trend from -8 to -10‰, between the onset of the RWP in 200 B.C. and its end in 400 A.D. A 100 yr interval featuring a rapid δ 13 C increase, from -10 to -8‰, occurred from 341 ± 14 to 432 ± 17 A.D. This was followed by a high-δ 13 C period that persisted until 526 ± 4 A.D., and subsequent centennial-scale δ 13 C oscillations ranging from -6 to -9‰ were observed after that (Figure 2B).

Climate 2022, 9, x FOR PEER REVIEW 4 of 10

Results and Discussion

Carbon Isotope Results

The δ 13 C results from stalagmite BA14-1 are given in Supplementary Materials, Table S1. This record (Figure 2B), from 550 ± 10 B.C. to 950 ± 7 A.D. (2500 to 1000 yr BP), varies from -11 to -5‰ (Figure 2B). It features stable δ 13 C values hovering around -9 to -7‰ at 550-200 B.C. and a multi-centennial decreasing trend from -8 to -10‰, between the onset of the RWP in 200 B.C. and its end in 400 A.D. A 100 yr interval featuring a rapid δ 13 C increase, from -10 to -8‰, occurred from 341 ± 14 to 432 ± 17 A.D. This was followed by a high-δ 13 C period that persisted until 526 ± 4 A.D., and subsequent centennial-scale δ 13 C oscillations ranging from -6 to -9‰ were observed after that (Figure 2B).

Interpretation of Carbon Isotope Variations

The Hendy test [START_REF] Hendy | The isotopic geochemistry of speleothems-I. The calculation of the effects of different modes of formation on the isotopic composition of speleothems and their applicability as palaeoclimatic indicators[END_REF] on BA14-1 shows two-sigma variability of ±0.08-0.21‰ in δ 18 O and no correlation between δ 18 O and δ 13 C for coeval subsamples of the same growth layers, suggesting negligible kinetic isotope fractionation [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF]. Further duplication tests [START_REF] Dorale | Limitations of Hendy test criteria in judging the paleoclimatic suitability of speleothems and the need for replication[END_REF] also indicated that this stalagmite was deposited with insignificant kinetic isotope effects so that the δ 13 C values reflect environmental factors [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF]. When stalagmites form under or close to isotopic equilibrium, the carbonate δ 13 C mainly reflects the isotopic composition of soil CO 2 , which is inherited from the atmosphere and through soil respiration [START_REF] Amundson | The isotopic composition of soil and soil-respired CO 2[END_REF]. The variation of stalagmite δ 13 C could hence be controlled by bedrock, vegetation productivity, soil activity, and cave pCO 2 [START_REF] Fohlmeister | Main controls on the stable carbon isotope composition of speleothems[END_REF][START_REF] Fohlmeister | Carbon and oxygen isotope fractionation in the water-calcite-aragonite system[END_REF][START_REF] Baker | Elevated and variable values of 13 C in speleothems in a British cave system[END_REF]. During carbonate precipitation, temperature-controlled water-calcite fractionation may also affect the δ 13 C values preserved in the stalagmites [START_REF] Fohlmeister | Main controls on the stable carbon isotope composition of speleothems[END_REF].

Various vegetation types modulate soil CO 2 isotopic compositions via different photosynthesis pathways [START_REF] Mcdermott | Palaeo-climate reconstruction from stable isotope variations in speleothems: A review[END_REF]. For example, previous studies suggest that C3 and C4 plants may lead to δ 13 C values in cave calcite in the range of -6 to -14‰ and +2 to -6‰, respectively [START_REF] Baker | Elevated and variable values of 13 C in speleothems in a British cave system[END_REF][START_REF] Mcdermott | Palaeo-climate reconstruction from stable isotope variations in speleothems: A review[END_REF][START_REF] Rudzka | The coupled δ 13 C-radiocarbon systematics of three Late Glacial/early Holocene speleothems; insights into soil and cave processes at climatic transitions[END_REF]. Considering the reported calcite-aragonite offsets of 1.1-2.3‰ [START_REF] Fohlmeister | Carbon and oxygen isotope fractionation in the water-calcite-aragonite system[END_REF], the values of aragonitic BA14-1 δ 13 C ranging from -6 to -11‰, are equivalent to calcitic carbon isotopic compositions of ~-7 to -13‰, well within the predicted C3-type carbon δ 13 C range (-6 to -14‰). This result agrees with previous studies, which suggest that C3-type plants dominate the vegetation surrounding Bàsura cave in modern times [START_REF] Columbu | Hypogenic speleogenesis, late stage epigenic overprinting and condensation-corrosion in a complex cave system in relation to landscape evolution (Toirano, Liguria, Italy)[END_REF]. However, vegetation changes are not likely to control BA14-1 δ 13 C variations during the late Holocene since this region has been persistently dominated by C3-type plants, even in glacial times [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF][START_REF] Genty | Timing and dynamics of the last deglaciation from European and North African δ 13 C stalagmite profiles-comparison with Chinese and South Hemisphere stalagmites[END_REF][START_REF] Columbu | Palaeoenvironmental changes recorded by speleothems of the southern Alps (Piani Eterni, Belluno, Italy) during four interglacial to glacial climate transitions[END_REF].

Under warm or humid conditions, dense vegetation coverage atop the cave and enhanced soil biological activity could lead to negative values in soil δ 13 C [START_REF] Breecker | The sources and sinks of CO 2 in caves under mixed woodland and grassland vegetation[END_REF]. Meanwhile, increased precipitation could enhance the drip water and infiltration rates, with a reduction in drip water CO 2 degassing and more negative speleothem δ 13 C values [START_REF] Fohlmeister | Main controls on the stable carbon isotope composition of speleothems[END_REF][START_REF] Baker | Elevated and variable values of 13 C in speleothems in a British cave system[END_REF][START_REF] Columbu | Hypogenic speleogenesis, late stage epigenic overprinting and condensation-corrosion in a complex cave system in relation to landscape evolution (Toirano, Liguria, Italy)[END_REF], and vice versa. Prior carbonate precipitation (PCP) [START_REF] Fairchild | Modification and preservation of environmental signals in speleothems[END_REF][START_REF] Fairchild | Speleothems as indicators of wet and dry periods[END_REF] is an additional factor affecting stalagmite δ 13 C values. PCP is defined as the carbonate precipitation from seepage water before it drips into the cave. The process involves CO 2 degassing along the percolation flow path, which favors carbonate precipitation with light carbon isotopes in the cave ceiling, leading to relatively high δ 13 C values in the remaining water body [START_REF] Baker | Elevated and variable values of 13 C in speleothems in a British cave system[END_REF][START_REF] Fairchild | Modification and preservation of environmental signals in speleothems[END_REF][START_REF] Fairchild | Speleothems as indicators of wet and dry periods[END_REF]. Under a dry (wet) condition, long (short) infiltration residence times enable (depress) PCP, enriching (depleting) the aqueous solution and stalagmite in 13 C.

For the reasons above, a warm and humid climate could promote soil activity and vegetation cover, reduce PCP in the epikarst, and decrease stalagmite δ 13 C values in the cave. The negative (positive) BA14-1 δ 13 C value could hence register a humid and warm (cold and dry) climate in this region. This argument can be supported by the covariation of BA14-1 δ 18 O and δ 13 C time series (Figure 2B). Stalagmite δ 18 O at the Bàsura cave is dominated by both the amount effect and the source effect [START_REF] Hu | Tracking the Westerly Wind Directions over Europe since the Middle Holocene[END_REF]. The amount effect describes the negative correlation between δ 18 O values and precipitation amount. The source effect means that more (less) moisture sources from the remote Atlantic Ocean with low δ 18 O values, compared to the regional Mediterranean Sea, could reduce (elevate) stalagmite δ 18 O. Hence, a negative δ 18 O shift reflects strong precipitation or dominant Atlantic-sourced moisture carried by the westerly winds. In the Mediterranean region, the control of δ 13 C and δ 18 O covariation has been suggested to be mainly hydroclimatic, e.g., [START_REF] Columbu | Hypogenic speleogenesis, late stage epigenic overprinting and condensation-corrosion in a complex cave system in relation to landscape evolution (Toirano, Liguria, Italy)[END_REF][START_REF] Columbu | Palaeoenvironmental changes recorded by speleothems of the southern Alps (Piani Eterni, Belluno, Italy) during four interglacial to glacial climate transitions[END_REF][START_REF] Regattieri | Holocene Critical Zone dynamics in an Alpine catchment inferred from a speleothem multiproxy record: Disentangling climate and human influences[END_REF] since high precipitation can decrease δ 13 C by promoting soil activity and vegetation respiration, and δ 18 O by the amount effect. A degree of similarity (r = 0.53, n = 286, p < 0.05) between BA14-1 δ 13 C and δ 18 O data supports that stalagmite δ 13 C variations document precipitation changes, with high (low) precipitation corresponding to low (high) δ 13 C values.

Hydroclimate Changes during the Roman Warm Period

From the onset of the RWP at 200 B.C., both BA14-1 δ 13 C and δ 18 O express a multicentennial decreasing trend until 350 A.D. This trend indicates increasing precipitation during this 550 yr interval in northern Italy (Figure 2B). It is similar to the reduced growth rates (bandwidth) recorded in Scotland stalagmites (Figure 2A) [START_REF] Baker | A composite annual-resolution stalagmite record of North Atlantic climate over the last three millennia[END_REF], which suggests a shift towards a more humid climate. Flood event records from Lake Savine (Figure 2C; [START_REF] Sabatier | 6-kyr record of flood frequency and intensity in the western Mediterranean Alps-Interplay of solar and temperature forcing[END_REF]), northern Italy, display two intervals with over six flooding events per 100 years centered at 50 B.C. and 350 A.D. (Figure 2C) [START_REF] Sabatier | 6-kyr record of flood frequency and intensity in the western Mediterranean Alps-Interplay of solar and temperature forcing[END_REF]. The two periods with intense flooding events are in accord with high stalagmite-based precipitation index values in Romania (Figure 2D) [START_REF] Warken | Reconstruction of late Holocene autumn/winter precipitation variability in SW Romania from a high-resolution speleothem trace element record[END_REF], which also shows periods with relatively high precipitation at 50 B.C. and 350 A.D. While at the first half of the RWP, from 200 B.C. to 100 A.D., BA14-1 δ 13 C and δ 18 O do not suggest strong precipitation as the records from Lake Savine (Figure 2C) [START_REF] Sabatier | 6-kyr record of flood frequency and intensity in the western Mediterranean Alps-Interplay of solar and temperature forcing[END_REF] and Romania (Figure 2D) [START_REF] Warken | Reconstruction of late Holocene autumn/winter precipitation variability in SW Romania from a high-resolution speleothem trace element record[END_REF] do, at the second half of the RWP at 100-400 A.D., all records (Figure 2B-D) reveal that southern Europe could have experienced a wet climate, especially at the late stage of the RWP centered at 350 A.D. The overall 550 yr humid pattern from 200 B.C. to 350 A.D. can also be supported by records from central Italy (Supplementary Materials, Figure S3B,C) [START_REF] Magny | Holocene climate changes in the central Mediterranean as recorded by lake-level fluctuations at Lake Accesa (Tuscany, Italy)[END_REF][START_REF] Zanchetta | Enhanced rainfall in the Western Mediterranean during deposition of sapropel S1: Stalagmite evidence from Corchia cave (Central Italy)[END_REF] and the Dead Sea (Figure S3D) [START_REF] Migowski | Holocene climate variability and cultural evolution in the Near East from the Dead Sea sedimentary record[END_REF]. The stalagmite δ 13 C from central Italy [START_REF] Magny | Holocene climate changes in the central Mediterranean as recorded by lake-level fluctuations at Lake Accesa (Tuscany, Italy)[END_REF] shows a negative excursion during the whole RWP (Figure S3B), suggesting a warm and humid climate. The composite lake level records (Figure S3C) reveal a highstand at the second-half of the RWP at ~350 A.D. [START_REF] Zanchetta | Enhanced rainfall in the Western Mediterranean during deposition of sapropel S1: Stalagmite evidence from Corchia cave (Central Italy)[END_REF]. The lake level record from the Dead Sea suggested relatively high lake levels during the RWP compared to those in pre-RWP. Combined with our record (Figure S3A), this evidence suggests that the RWP featured a humid climate in the Mediterranean realm.

North Atlantic Oscillation (NAO) variation has been widely used to understand precipitation changes over Europe on different geological time scales, e.g., [START_REF] Brahim | North Atlantic ice-rafting, ocean and atmospheric circulation during the Holocene: Insights from western Mediterranean speleothems[END_REF][START_REF] Hurrell | North Atlantic climate variability: The role of the North Atlantic Oscillation[END_REF]. At a positive (negative) phase of the NAO, increased (decreased) pressure contrast between the Azores High and the Icelandic Low results in poleward (equatorial) migrations of the westerlies over the North Atlantic, bringing in strong precipitation in northern Europe (southern Europe and the Mediterranean region) [START_REF] Hurrell | North Atlantic climate variability: The role of the North Atlantic Oscillation[END_REF]. However, the reconstructed NAO index [START_REF] Baker | A composite annual-resolution stalagmite record of North Atlantic climate over the last three millennia[END_REF][START_REF] Olsen | Variability of the North Atlantic Oscillation over the past 5200 years[END_REF] suggests that the NAO shifted from a negative state to a positive condition during the RWP (Figure 1A). The reconstructed NAO index increased from -3 at the beginning of the RWP at 200 B.C., to 0 at 100 B.C.

From 100 B.C. to the end of the RWP at 400 A.D., the reconstructed NAO index, fluctuating between 0 and 2, features two peaks of 1 and 2 at 0 and 300 A.D., respectively (Figure 2A). Most of the RWP was dominated by an NAO-positive phase. A positive NAOstate, associated with enhanced Azores High and Icelandic Low, should force poleward shifts of the westerlies and result in drought conditions in southern Europe. Hence, the humid conditions reflected by Bàsura stalagmite records and other archives in southern Europe (Figure 2B-D) cannot be attributed to the NAO phase.

Bàsura stalagmite-inferred precipitation increases in southern Europe during the RWP (Figure 3A) coincide with multi-centennial warming registered in sea surface temperature (SST) records in the Mediterranean Sea (Figure 3B,C). Sediment SST records from the Alboran Sea in the western Mediterranean (TTR17-434G, Figure 3B; [START_REF] Rodrigo-Gámiz | Sea surface temperature variations in the western Mediterranean Sea over the last 20 kyr: A dual-organic proxy (UK' 37 and LDI) approach[END_REF]), the Sicily Channel of the central Mediterranean (SW104-ND11; Figure 3B; [START_REF] Margaritelli | Persistent warm Mediterranean surface waters during the Roman period[END_REF]) and the Minorca Basin from the northwestern Mediterranean (MINMC06 and HER-MC-MR3; Figure 3C; [START_REF] Cisneros | Paleoclimate Reconstruction during MIS 5a Based on a Speleothem from Nerja Cave, Málaga, South Spain[END_REF]) all suggest a clear warming trend from 200 B.C. to 200 A.D. and a plateau at 200-400 A.D. This 200-yr high SST in the Mediterranean Sea could increase the land-sea temperature contrast in autumn and winter, and enhance frontal rains along the Mediterranean borderland [START_REF] Collins | Long-term Climate Change: Projections, Commitments and Irreversibility[END_REF][START_REF] Pastor | Sea surface temperature in the Mediterranean: Trends and spatial patterns (1982-2016)[END_REF]. The warm Mediterranean Sea could also promote Mediterranean-origin cyclogenesis [START_REF] Margaritelli | Persistent warm Mediterranean surface waters during the Roman period[END_REF][START_REF] Volosciuk | Rising Mediterranean sea surface temperatures amplify extreme summer precipitation in central Europe[END_REF], which brings strong precipitation over northern Italy. Even in northern Africa, the stalagmite-based rainfall index from Morocco shows that regional precipitation increased from 0 to 400 A.D. (Figure 2E; [START_REF] Brahim | North Atlantic ice-rafting, ocean and atmospheric circulation during the Holocene: Insights from western Mediterranean speleothems[END_REF], consistent with the observations at Bàsura (Figure 2B). Accordingly, centennial-scale humid conditions in southern Europe could be attributed to warm Mediterranean seawater, instead of the NAO state.

Rapid positive δ 13 C and δ 18 O shifts in the precisely dated Bàsura records (Figure 2B) reveal a dramatic drop from 341 ± 14 to 432 ± 17 A.D. This 100-yr precipitation decrease is also documented at Lake Savine (Figure 2C) and in Romania (Figure 2D). The agreement indicates a large-scale century-long hydroclimate shift at the end of the RWP. Bàsura isotopic records also show a centennial-scale drought lasting from 432 ± 17 to 526 ± 4 A.D. The drying trend from 341 ± 14 to 432 ± 17 A.D. and the following 100-yr drought might be a factor that contributed to the collapse of the Roman Empire in 476 A.D [START_REF] Büntgen | years of European climate variability and human susceptibility[END_REF][START_REF] Mccormick | Climate change during and after the Roman Empire: Reconstructing the past from scientific and historical evidence[END_REF].

Rapid positive δ 13 C and δ 18 O shifts in the precisely dated Bàsura records (Figure 2 reveal a dramatic drop from 341 ± 14 to 432 ± 17 A.D. This 100-yr precipitation decrease also documented at Lake Savine (Figure 2C) and in Romania (Figure 2D). The agreeme indicates a large-scale century-long hydroclimate shift at the end of the RWP. Bàsura is topic records also show a centennial-scale drought lasting from 432 ± 17 to 526 ± 4 A. The drying trend from 341 ± 14 to 432 ± 17 A.D. and the following 100-yr drought mig be a factor that contributed to the collapse of the Roman Empire in 476 A.D [START_REF] Büntgen | years of European climate variability and human susceptibility[END_REF][START_REF] Mccormick | Climate change during and after the Roman Empire: Reconstructing the past from scientific and historical evidence[END_REF].

Figure 1 .

 1 Figure 1. Locations of Bàsura cave and other cited terrestrial and marine sites. Triangles den caves, and circles denote other terrestrial and marine sedimentary sites: (1) Roaring cave, Scotl [22]; (2) Lake Savine [23]; (3) Bàsura cave, northern Italy (this study); (4) Cloşani cave, Romania [ (5) Marine sediment core TTR17-434G, Alboran Sea [25]; (6) Marine sediment core SW104-ND Sicily Channel [26]; (7) Marine sediment cores MINMC06 and HER-MC-MR3, Minorca Basin [ (8) Chaara cave, Morroco [28]. The map was generated using Ocean Data View.

Figure 1 .

 1 Figure 1. Locations of Bàsura cave and other cited terrestrial and marine sites. Triangles denote caves, and circles denote other terrestrial and marine sedimentary sites: (1) Roaring cave, Scotland [22]; (2) Lake Savine [23]; (3) Bàsura cave, northern Italy (this study); (4) Cloşani cave, Romania [24]; (5) Marine sediment core TTR17-434G, Alboran Sea [25]; (6) Marine sediment core SW104-ND11, Sicily Channel [26]; (7) Marine sediment cores MINMC06 and HER-MC-MR3, Minorca Basin [27]; (8) Chaara cave, Morroco [28]. The map was generated using Ocean Data View.

  , this segment covers a time period from 550 ± 10 B.C. to 950 ± 7 A.D., including the RWP from 200 B.C. to 400 A.D.

Figure 2 .

 2 Figure 2. Proxy-inferred hydroclimate records during the Roman warm period. (A) Stalagmite band-width records from Roaring cave (orange, [22]) and a paleo North Atlantic Oscillation (NAO) index reconstructed from Greenland (blue, [33]). (B) BA14-1 δ 13 C (dark red) and δ 18 O (tiffany blue). Horizontal error bars indicate U-Th ages with 2-sigma errors. (C) A flood event record from Lake Savine [23]. (D) Stalagmite-based precipitation index from Cloşani cave [24]. (E) Stalagmite-based precipitation index from Chaara cave [28]. The yellow bar indicates the interval of the Roman Warm Period from 200 B.C. to 400 A.D.

Figure 2 .

 2 Figure 2. Proxy-inferred hydroclimate records during the Roman warm period. (A) Stalagmite band-width records from Roaring cave (orange, [22]) and a paleo North Atlantic Oscillation (NAO) index reconstructed from Greenland (blue, [33]). (B) BA14-1 δ 13 C (dark red) and δ 18 O (tiffany blue). Horizontal error bars indicate U-Th ages with 2-sigma errors. (C) A flood event record from Lake Savine [23]. (D) Stalagmite-based precipitation index from Cloşani cave [24]. (E) Stalagmite-based precipitation index from Chaara cave [28]. The yellow bar indicates the interval of the Roman Warm Period from 200 B.C. to 400 A.D.

Figure 3 .

 3 Figure 3. Comparison of Basura proxy and marine records in the Mediterranean Sea. (A) Basu BA14-1 δ 13 C (dark red) and δ 18 O (tiffany blue) records. (B) Sea surface temperature (SST) recor Brown: SW104-ND11, Sicily Channel [19]. Dark purple: TTR17-434G, Alboran Sea [25]. (C) S anomaly record from MINMC06 and HER-MC-MR3, Minorca Basin [27]. The yellow bar indica the interval of the Roman warm period from 200 B.C. to 400 A.D.

  We present a 1500 yr stalagmite proxy hydroclimate record from Bàsura cave, nor ern Italy from 550 B.C. to 950 A.D., covering the RWP from 200 B.C. to 400 A.D. Our resu show that during the RWP, southern Europe experienced a warm and humid climate. concurrent warming trend observed in Mediterranean SST records suggests that an creased land-sea temperature contrast and increasing cyclones could be possible facto contributing to multi-centennial wet conditions in southern Europe during the RWP. succession involving a rapid 100-yr drying shift from 341 ± 14 to 432 ± 17 A.D. and a 10

Figure 3 .

 3 Figure 3. Comparison of Basura proxy and marine records in the Mediterranean Sea. (A) Basura BA14-1 δ 13 C (dark red) and δ 18 O (tiffany blue) records. (B) Sea surface temperature (SST) records. Brown: SW104-ND11, Sicily Channel [19]. Dark purple: TTR17-434G, Alboran Sea [25]. (C) SST anomaly record from MINMC06 and HER-MC-MR3, Minorca Basin [27]. The yellow bar indicates the interval of the Roman warm period from 200 B.C. to 400 A.D.

  We present a 1500 yr stalagmite proxy hydroclimate record from Bàsura cave, northern Italy from 550 B.C. to 950 A.D., covering the RWP from 200 B.C. to 400 A.D. Our results show that during the RWP, southern Europe experienced a warm and humid climate. A concurrent warming trend observed in Mediterranean SST records suggests that an increased land-sea temperature contrast and increasing cyclones could be possible factors contributing to multi-centennial wet conditions in southern Europe during the RWP. A succession involving a rapid 100-yr drying shift from 341 ± 14 to 432 ± 17 A.D. and a 100-yr drought event from 432 ± 17 to 526 ± 4 A.D. are observed in the Bàsura stalagmite proxy record and other natural archives. A dramatic hydroclimate change from wet to dry conditions from 341 ± 14 to 432 ± 17 A.D. may have influenced the collapse of the Roman Empire in 476 A.D.

Acknowledgments: We thank G.S. Burr of the Research Center for Future Earth, National Taiwan University, for his constructive suggestions. Constructive and comprehensive reviews by two anonymous reviewers significantly improved this manuscript.

Data Availability Statement: Isotope data can be found at the Zenodo repository (10.5281/zenodo.6669426).

Supplementary Materials:

The following are available online at https://www.mdpi.com/article/10 .3390/cli10070093/s1, Figure S1: Correlation map. Correlation analysis between Genoa precipitation data and regional precipitation patterns during rainy seasons (September-February) in 1950-2008 A.D. (Data from E-OBS 25.0e, [START_REF] Cornes | An Ensemble Version of the E-OBS Temperature and Precipitation Datasets[END_REF]). Color-shades indicate the correlation coefficients (p < 0.1), Figure S2: Photograph of stalagmite BA14-1 and age model. (A) Photograph of stalagmite BA14-1. The brown rectangle marks the section used in this study (6.5-80.5 mm from the top). The blue and red lines indicate the position for isotope analysis, U-Th dates. (B) StalAge-based age model [START_REF] Scholz | StalAge-An algorithm designed for construction of speleothem age models[END_REF] of BA14-1 during 6.5-80.5 mm from the top. The red line indicates the mean age and black lines denote 2-sigma age limits, Figure S3: Comparison among Mediterranean proxy records. (A) Bàsura δ13C (red) and δ18O (tiffany blue). (B) δ13C records from Corchia cave, central Italy [START_REF] Zanchetta | Enhanced rainfall in the Western Mediterranean during deposition of sapropel S1: Stalagmite evidence from Corchia cave (Central Italy)[END_REF]. (C) composite lake level records from central Italy [START_REF] Magny | Holocene climate changes in the central Mediterranean as recorded by lake-level fluctuations at Lake Accesa (Tuscany, Italy)[END_REF]. (D) Dead Sea level [START_REF] Migowski | Holocene climate variability and cultural evolution in the Near East from the Dead Sea sedimentary record[END_REF]. The yellow bar denotes the Roman Warm Period, Table S1


B Combemale

X Crégut

J.-P Giacometti

P Michel

M Pantel

Introducing Simulation and Model Animation in the MDE Topcased 1 Toolkit

Keywords: Topcased, model simulation, animation, Model Driven Engineering, UML 2 StateMachines

The Topcased project aims at developing a modular and generic CASE environment for model driven development of safety critical systems. Model validation is a key feature in this project and model simulation is a major way for validation. The purpose of this paper is to present the current Topcased process for building model simulators and animators.

After introducing the functional requirements for model simulation and animation, it is explained how simulation is currently being integrated in the Topcased environment, presenting the main components of a simulator: a model animator, a scenario builder and a simulation engine. The approach is illustrated by the presentation of the first simulation experiment conducted in the project: the UML 2 StateMachines case study.

Introduction

The work presented here is part of the Topcased project ("Toolkit In OPen source for Critical Applications & SystEms Development") a project of the French "pôle de compétitivité Aerospace Valley", dedicated to aeronautics, space, and embedded systems. The Topcased project [START_REF]Topcased project[END_REF] aims at defining and developing an open-source, Eclipse-based [2], modular and generic CASE environment. It provides methods and tools for the developments of safety critical embedded systems. Such developments will range from system and architecture specifications to software and hardware implementation through equipment definition. Topcased relies on Model Driven Engineering (MDE) technologies both for building system models and for building the CASE environment itself. Model validation and verification (V&V) is a key feature in Topcased. For validation purpose, one must be able to simulate the dynamic behaviour of the system and to obtain execution traces. For verification purpose, one must be able to check that a system ensures correctness properties and if not, to produce an execution trace which illustrates the fact that the property is not ensured. The user must then be able to browse these traces in order to validate the dynamic behaviour and understand the property check failures using a model animator. The MDE technology used in Topcased for defining and tooling modelling languages is centered around the Ecore metalanguage (from EMF: the Eclipse Modeling Framework [3]) and configuration models [START_REF] Gmt | Generative Modeling Technologies) project[END_REF] which are taken as inputs by generative tools (e.g. graphical editor generation).

The purpose of this paper is to present and explain the Topcased process for building model simulators and animators [START_REF]Synthesis on Simulation Needs[END_REF][START_REF]Synthesis on Methods and Tools for Simulation[END_REF].

Section 2 recalls the three main constituents of simulations: workload generation (limited here to the building of scenarios), model execution or animation and results analysis. Then, it focuses on discrete event simulations, the kind of simulations that will be tackled in Topcased, and mentions some existing tools supporting such simulations. Section 3 introduces the functional needs for model simulation and animation in the context of Topcased, covering the main constituents of simulations. Section 4 describes the first simulation experiment conducted in the project, i.e. the UML 2 State Machines case study, and illustrates it by a small example. Section 5 explains how simulation has been integrated in the Topcased environment. It first shows what should be defined to complete the definition of a DSML (Domain Specific Modelling Language). Then, it presents three main tools, a model animator, a scenario builder and a simulation engine which compose the general architecture of the simulator. Afterward, it presents the currently available prototype of the UML 2 State Machines simulator. Finally, the conclusion section proposes short-term perpectives on model animation in Topcased.

Simulation: needs and approaches

Purpose of a simulation

The purpose of a simulation is to gain understanding on a system without manipulating the real system, either because it is not yet defined or available, or because it cannot be exercised directly due to cost, time, resource or risk constraints. Simulation is thus performed on a model of the system.

A simulation is generally defined through three steps (figure 1). The first one consists in generating a representation of the workload, i.e. the set of inputs, to be applied to the studied system. This representation may be a trace (or scenario) depicting a real workload or a synthetic workload artificially generated by heuristics or stochastic functions. The second step concerns the simulation that is performed by applying a workload on a model of the system and producing results. Finally, the third step consists in analyzing simulation results in order to acquire a better understanding of the considered system.

Figure 1: The 3 steps of a simulation These three steps may be separated and supported by different tools, like a scenario builder (as a workload generator), a model execution engine and result analysis tools. It is also possible to combine in the same tool two of these steps or even the three of them. For instance, it is possible to interactively create a trace while the model is executed. It is also possible to couple the execution engine and analysis tools to present, "on the fly" (i.e. during a simulation), synthetic appropriate results.

Topcased proposes an open source and perennial alternative to modelling and simulation tools. Topcased relies on the Eclipse platform [2] and MDE technologies such as EMF, GEF, GMF [3,4], Acceleo, ATL, Kermeta, OpenArchitectureWare and others. Simulation facilities will allow the Topcased user to execute his models in order to check whether they conform to his expectations. Currently, modelling languages considered in Topcased mainly focus on discrete synchronous or asynchronous models. A discrete event computation model can thus be used for the model execution. In order to see whether the models behave as expected, the user will run a model animator that uses the results of the model execution. So, in the Topcased context, simulation will be mainly a means to debug models and validate user requirements.

Discrete Event Simulations

In the simulation of discrete systems, the simulated time is a discrete virtual time. Two mechanisms are considered for the evolution of discrete time:

• a clock-based (or periodic, or fixed-increment time advance) approach: time move forward in the model in equal time intervals,

• an event-based (or next-event time advance) approach: the model is only examined and updated when an event occurs (or when the system state changes); time moves from event to event. The traditional modelling formalisms are based on mathematical foundations and largely preceded the advent of computers. Two kinds of representations have been proposed to model discrete systems [START_REF] Ziegler | Theory of Modeling and Simulation: Integrating Discrete Event and Continuous Complex Dynamic Systems[END_REF]:

• The "Discrete Time System Specification" (DTSS) has been proposed to model systems that operate on discrete time base, such as automata. Time evolution is clock-based (periodic) in this representation.

• The "Discrete Event System Specification" (DEVS or DE) appeared more recently and was defined for computer-based simulations. It offers an event-based approach more easily managed by an executable program than by a pure mathematical model. Thus, we have two main paradigms to model the dynamics of discrete systems: the discrete periodic (DTSS, also named "synchronous") and the discrete event-based (DEVS or DE, also named "asynchronous") formalisms. These formalisms allow to design modular and hierarchical models. A modular and hierarchical construction consists in coupling existing models in order to build larger models of systems. These formalisms are closed under coupling, which means that a coupled model can be treated as a basic component, i.e. reused like a basic component in other compositions. Ptolemy II is component-based and models are constructed by connecting a set of components and have them interact under a domain. In the Discrete-Event domain, components communicate via sequences of timed events. An event consists in a value and time stamp. Components can either be processes that react to events or functions that fire when new events occur. The DE domain gives a deterministic semantics to simultaneous events.

Existing

The efficiency of a tool during simulations and ability to integrate it in an industrial process should be an important criterion when choosing the more adequate tool. But, as they interpret graphically designed models, all these tools more or less lack in efficiency. That point leads to use them as prototyping tools rather than deploying them in ultimate simulation solutions. Thus, a simulation tool is used to quickly and efficiently design a first model and to conduct simulation experiments to improve and validate the model. Once confirmed, this model can be translated in a programming language (e.g. in Java), and coupled with a kernel supporting Discrete Event semantics, to perform efficient simulations.

User requirements for model animation

In the context of Topcased, simulation aims at validating high level domain specific models. Thus, simulation mainly provides a means for the designer to animate his/her models in order to have a better understanding of them and to validate with the user its requirements. The animation may be performed either interactively or driven by a predefined scenario. The main requirements are summarized on the use case diagram of figure 2 and are detailed in the next paragraphs. Of course requirements are described from the user viewpoint. Nevertheless, we have tried to separate concerns. We first describe how a scenario may be described and used to drive the model animation. We then explain how the user may control the animation. Finally, we give requirements about tools to help the user in interpreting the animation results either to visualize effects on the model or to analyse results.

Scenario builder

A scenario is defined as a sequence of input events occurrences. An event occurrence is defined by its occurrence time and its related information that may include one or several elements of the simulated model. In the case of the animation of an UML2 state machine, we have only one kind of user event that consists in injecting one signal. The target element is the state machine receiving the signal and the associated information is the UML2 signal. The term "scenario builder" describes any tool that helps building a scenario. The user while animating the model may build a scenario interactively. A scenario may also be built before animation starts. For example, it may be generated from requirements to validate the model being designed or produced by dedicated tools such as a random scenario builder, a model-checker that exhibits a counter-example or a test generator. Nevertheless, the model designer may be solicited during animation in order to resolve some nondeterministic choices. For example, he should be able to choose which transition will be fired on a nondeterministic automaton. Heuristics may also be defined in order to resolve such non-determinism. Furthermore, the model designer should be able to control the animation through a set of commands similar to those found on a music or video player, or on a program debugger. During animation, different views (discussed in the next section) may be activated and must be updated as the model evolves. A tool providing this functionality is called a "model animator" and should allow a user to:

• load a predefined scenario;

• play the scenario step by step (event by event);

• play automatically: the next step is automatically triggered when an amount of time is elapsed. It also includes the ability to pause and resume the animation;

• restart the execution from the beginning or stop and exit the animator;

• go forward/backward one step, several steps, to the beginning or the end of the animation or to a certain point (condition on the model, occurrence of an event, previously defined break-point, etc). It may also be useful to be able to inspect the animated model, either textually or graphically as discussed in the next section.

Finally, we should note that it is possible to integrate in the same tool the interactive scenario builder and the model animator. It thus provides the user with one unique interface to build his scenario and inspect the evolution of the model according to the scenario.

Simulation visualization

The term "simulation visualization" encompasses any tool that provides the user with feedbacks on the execution. One obvious way to provide the user with feedbacks on the animated model is to display its current state. To do that, one needs to represent some additional dynamic information by extending the graphical notation (graphical concrete syntax) used to edit or visualize the model. The use of colours or classical graphical components (such as progress bars, gauges or lights) used as decoration on the model graphical representation may be useful to represent the state of model items. For example, when executing a state machine, current states and firable transitions may be emphasised by displaying them with specific colours. A gauge may indicate the number of received signals.

To provide the user with a better understanding of the execution, it may be useful to define specific panels that aggregate information of the model or to display the state of some model elements according to time (e.g. with a chronogram). Specific visualization may represent a real interface for the DSL domain. For example, the visualization panel could represent the set of instruments that are present in the cockpit of a real aircraft.

Simulation analysis

Simulation analysis looks like execution visualization. The main difference is that visualization during an execution relies on the user to interpret what he sees, while an analysis tool should provide the user with an interpreted result. For example, analysis tools can verify that an output trace is well formed or that it fulfils some properties. Simulation analysis tools may be coupled with the execution engine in order to explore all performed executions and determine whether some property holds on the system for these executions.

Case study: UML2 state machines

Model animation has first been experimented on UML2 state machines [START_REF]Unified Modeling Language (UML) 2.1.1 Superstructure Specification[END_REF] for models that conform to the UML2 metamodel used by the Topcased graphical editor (based on the Eclipse UML2 plugin [START_REF]Eclipse UML2 plugin website[END_REF]). However, for the first version of the animator, we have targeted only a subset of the UML2 state machines whose metamodel is shown on figure 3. This metamodel describes the structural properties of state machines. In order to clarify their presentation, we use an example to introduce the concepts that are taken into account for the simulation. The example is shown on figure 4. It consists in a unique state machine because currently the animator is only able to simulate a single state machine. The next paragraph describes the example and points out the UML2 concepts that are handled in the simulation and thus present on metamodel (figure 3). These concepts are put in brackets. The state machine (StateMachine concept) on figure 4 models vehicle flashing lights. It is a concurrent state machine composed of four regions (Region), one for the left flashing light, one for the right flashing light, one for the handle and the last one for an internal clock. Left and right flashing lights share the same state machine and could have been considered as two instances of the same class FlashingLight describing through a single statemachine the behaviour of a flashing light. But, because we do not address classes and their instances yet, we have to duplicate the statemachine and rename the signals (Signal) that trigger (Trigger) the transitions (Transition). So, the Lstart signal starts the left light and put it in the composite state called ON. It is composed of exactly one region that consists in two substates switchedOff and switchedOn that indicates whether the light is off or on. The light swaps between these two states according to the TOP signal generated by the clock statemachine. Finally the handle reacts to the user signals pushUp and pushDown and according to its position (down, middle or up) starts or stops the left or the right light.

We only consider local transitions (Transition), i.e. transitions whose source and target states belong to the same region. Transitions are triggered by events (Event) and may execute an activity when they are fired. Activities (Activity) are decomposed into actions. The only action (Action) that is currently handled is the BroadCastSignalAction that broadcasts a signal. An event is either a SignalEvent that corresponds to a specific signal or a time event (TimeEvent) that is related to the time. The transition in the clock region defines a time event indicating that the transition will be fired 3 time units after the state has been entered. The transitions on the handle region are triggered by a signal (either pushUp or pushDown) and, when fired, execute an action that broadcasts the signal that will make the flashing lights regions evolve. Nevertheless, all the elements that are not taken into account for the simulation may be present in the model but are ignored. An audit using OCL constraints must be established to warn the user of the unsupported elements (and the possible failure in the simulation).

Integration of simulation into Topcased

In this section, we describe how simulation has been integrated in Topcased. The main requirement about simulation is the ability to animate a model that has been defined using a Topcased generated editor. The purpose of the simulator is then to animate the model so that the user may be able to validate it. We thus favour interactive simulation and a discrete event model of computation. Despite these choices, most of our proposition is general enough to be applied on a non interactive simulation with other models of computation. In Topcased, we consider that the starting point is the definition of the DSL metamodel and the existence of a graphical editor built using Topcased facilities. Unfortunately, this information is not enough to animate a model. So we first describe what should be defined to complete the definition of the DSL. Then, we describe the general architecture of simulator that relies on three main tools, an animator, an event and scenario builder and a simulation engine. Finally we present the prototype of the UML2 state machine simulator that is currently available.

Definition of additional information

When we want to simulate a UML2 state machine, i.e. execute one of its models, we first have to understand and define what the interactions between the model and its environment are. For example, the user may want to send signals to the state machine to see how it reacts. These interactions are modelled as exogenous events in an event metamodel. For example, the event "inject a signal" adds a signal to the set of signals received by the state machine. All possible events are defined in a specific metamodel (called the event metamodel). Aside exogenous events, we also need to define additional properties that are not part of the UML2 metamodel. For example, we need to know the current state of each active region, we need to be able to say whether a transition is firable or not and we have to store the set of events received by the state machine. These properties are defined in an additional metamodel that relies on the UML2 metamodel. We call it the dynamic metamodel, the initial metamodel being called the static metamodel. Finally, the user should be able to define a scenario before the start of a simulation or to save the scenario corresponding to an interactive simulation. We have defined a trace metamodel in that purpose. It defines a scenario as a sequence of events. So, when defining an executable DSL for dynamic systems, several aspects have to be dealt with. They can be captured in the following metamodels (whose relationships are shown on figure 5):

• The static (or structural) metamodel MMs is the classical modelling language metamodel. It is required for any language in Topcased.

• The dynamic metamodel MMd extends MMs with the attributes, relations and elements required in order to execute a model.

• The event metamodel MMe defines on one hand the events that drive the execution of the model and on the other hand the events which are produced by the execution of the model, that is exogenous and endogenous events.

• The trace metamodel MMt records all external and internal events that occur during the execution of the model. A trace that only contains external events defines a scenario. The metamodel of a DSL, that is its abstract syntax, may be formalised as the following tuple: MM = < MMs, MMd, MMe, MMt >.

In the previous definition, we have not yet expressed the semantics itself, that is the way the model evolves according to the input events in the scenario. It will be presented in the next sections as part of the simulation engine. The animator allows the user to control the animation through a player-like control panel. The main part of the window shows the model being animated. As the designer has defined his model using the Topcased editor, it may be intuitive to reuse the graphical representation of the model provided by the editor to show the current state of the model during animation. Dynamic properties are thus displayed on the graphical representation of the model. For example, current states are displayed as red rectangles the firable transitions as green edges. This is achieved thanks to simulation components that spy the changes of dynamic properties defined in the dynamic metamodel and update accordingly the graphical view of the model. The main benefit of this approach is that no modification is required on the editor configurators that were defined during the construction of the graphical editors. Animation is only built atop the editor and takes advantage of the ability to change graphical properties of the editor widgets and to extend them with decorations.

The animated model may also be inspected in detail by using the properties view of the Eclipse platform that is automatically activated when the Topcased perspective is selected.

Other visualization tools may be started from the animator but they are not yet implemented.

Scenario builder

The event metamodel defines the types of event that may occur during a simulation. It is specific to a given DSL. For example, for state machines, one external event consists in injecting a new signal into the state machine.

A graphical event editor may be useful to trigger events while animation is running. One possibility is to replace or complete the editing palette of the editor by an event builder palette that allows to inject new events to the execution. The ability to define a specific graphical user interface to generate events is certainly a strong point as discussed in section 3.3. A metamodel of the graphical components and a link to the triggered event could be defined in the same way the Topcased editor generator is done. It has not been implemented yet and should be specifically designed for any new DSL. The event or scenario builder aims to inject events that will drive the simulation. An interactive event generator is defined on the main window of the animator. When the user clicks on the play button, he is asked for the UML2 signals to inject in the state machine. The user can save the scenario of all the events he has interactively injected. When the animator is started, the user may decide to load a predefined scenario, for example the one saved during a previous execution or defined thanks to a scenario generator.

Simulation engine

The simulation engine is in charge of updating the dynamic properties of the animated model according to one event occurrence. It consists of two main components. The first one is a generic discrete event based engine that manages an agenda of all the identified events ordered according to their occurrence time. This approach is the most efficient one in term of memory footprint, running time and initial development time. However, it produces code that is very hard to reuse for executing another kind of model. The modelling language semantics is defined in a very pragmatic way closely tied to the syntax and it is very hard to extract a formal representation suitable to formal proof of correctness for the tools.

Other approaches have been identified in [START_REF]Synthesis on Simulation Needs[END_REF] that will be further investigated.

Tools interactions

The different models (static, event, trace and dynamic models) are represented using EMF (Eclipse Modelling Framework) [3], and stored, either in memory as Java objects instances of the classes generated by EMF (or created by the dynamic reflexive API), or serialized as XMI or XML files.

Topcased relies on a model bus in order to facilitate the relation between components. The available bus requires the use of the serialisation approach. However, this approach is quite costly. So, communication between the animator, the event builder and the execution engine is achieved through the shared in-memory EMF-representation of the model and relies on EMF-generated observers to keep a low coupling between those different tools.

Current prototype

A prototype of the UML2 StateMachines simulator has been developed. A screenshot of the simulator running the flashing lights is shown on Figure 6. It reuses the visualization of the model created while building the model with the Topcased graphical editor. During simulation, it is possible to inspect the dynamic information of the model thanks to the dynamic simulation view. It is especially useful for the properties that are not graphically presented. A control view allows to control a simulation with a start button, a stop button and a step by step button. At the moment, the simulation is either interactive or driven by a scenario chosen and loaded when the simulator is started. A batch mode is also possible. This mode is useful for scenario driven simulation as it automatically makes the model evolve according to the scenario with a short delay between steps so that the user can see what happens.

Figure 6. Snapshot of the current prototype.

Conclusion and Perspectives

Model Driven Engineering is becoming a tool of choice for the design of critical embedded systems as it allows to integrate smoothly several modelling languages, thus providing a better way to manage the numerous concerns involved in such systems. The Topcased toolkit aims at providing a framework integrating existing tools for easily defining new Domain Specific Modelling Languages (DSML) for safety critical embedded systems. One key point is the validation and verification of the produced systems. For this purpose, simulation and model animation allows the user to validate his requirements and the designer to verify that his model satisfies these requirements. It is therefore of uttermost importance to ease the integration of simulators and model animators in the toolkit. This contribution presents the preliminary results of the integration of these kinds of tools for the UML2 StateMachines in Topcased. We have presented discrete event simulation used for developing critical embedded systems, the proposed simulation architecture, and insights on how it could be integrated in a MDE way. The simulation architecture involves scenarios generation or interactive construction, model execution, and simulation result exploitation (either in or off line). This lead to the development of the first version of the tools that will be integrated in the next Topcased release synchronised with Eclipse Ganymede in July 2008. The next step in the simulation of UML2 State Machines will be to handle classes and their instances. An instance will then run the state machine of its class. In the flashing lights example, the left and the right lights are both instances of the same FlashingLight class. We will then be able to handle states of instances that will be updated according to the corresponding UML2 actions (used in the activities associated to transitions). The state of instances will also be used in transition guards.

The process proposed in this paper to add simulation to a DSML is currently used to provide animation capabilities for the SAM language (a component and automata based language) and an executable extension of the SPEM process description language defined by the OMG. These experiments should point out generic components (like the discrete event simulation engine or the trace metamodel).

We will also provide tools to automate the generation of simulators as it is already done for the construction of graphical editors thus allowing a model driven engineering approach to the integration of simulators.

  It is quite difficult to interface these tools with the Topcased environment, i.e. to directly use one of these tools to simulate and animate a model defined with a Topcased editor. Nevertheless, it is interesting to analyze their main characteristics and to point out the most useful features for Topcased users. As first simulation experiments in Topcased are devoted to the animation of state-transition based models, we carefully studied the functionalities of Sildex, StateMate and Uppaal tools in the previous RNTL COTRE project. These tools, based on simple or timed automata, provide graphical visualization of simulations highlighting active states and firable transitions, coupled with means to visualize and record execution traces. Another source of inspiration was the Ptolemy II framework developed at Berkeley University[START_REF]Ptolemy II Heterogeneous Modelling and Design[END_REF]. This framework supports heterogeneous modelling, simulation, and design of concurrent systems. Simulation models are constructed under models of computation (or domains) that govern the interaction of the components in the model. The choice of a domain depends on the type of model being constructed. After about 10 years of existence Ptolemy II is a rich and reasonably mature tool, at least for the most important domains, among then the Discrete-Event (DE) domain.

Figure 2 :

 2 Figure 2: Use case of the simulation 3.2 Model animator Animating a model consists in interpreting each event to make the model evolve accordingly. The effect of one event on the model is defined in the execution engine that follows the semantics of the model.

Figure 3 :

 3 Figure 3: Subset of UML2 StateMachines handled in model animator

Figure 4 :

 4 Figure 4: UML2 state machine of vehicle flashing lights

Figure 5 :

 5 Figure 5: Metamodels dependencies 5.2 Model animator

  It only relies on the trace metamodel and thus does not require to be changed to handle a new DSL. The second component is specific to the considered DSL. It provides the execution semantics of the DSL. More precisely, it defines how the model, in fact dynamic properties, should be updated according to one event occurrence. For our current state machines, only two external events have to be dealt with. The first one is "inject a signal". It consists in adding the corresponding signal to the list of signals received by the state machine. The second one is "run". It asks the state machine to treat the received signals and thus to evaluate firable transitions and change current states according to the fired transitions.

	The Topcased toolkit relies on the Eclipse
	environment. As Eclipse is implemented using the
	Java language, Java is the most appropriate solution
	for development. EMF provides the required libraries
	to read, create and modify models conforming to
	Ecore. EMF also provides a code generator (based
	on JET templates) that produces Java classes
	respecting the Ecore definition of the meta-model.
	We have decided to define an ad-hoc simulation
	engine. It consists in an Eclipse plugin for the
	generic discrete event agenda. A Java interface
	defines a method for each exogenous event defined
	in the event metamodel of the DSL. This design
	decision allows to easily define several semantics for
	a given DSL by defining a new implementation of
	this interface. Furthermore, it may be used as a way
	to take into account semantic variation point that are
	generally part of the definition of modelling
	languages like UML.

1 Topcased is partly funded by the French ministry of industry through the FCE call and by the Midi Pyrénées regional institutions.