H Bouaziz
email: hamida.bouaziz@femto-st.fr

S Chouali
email: schouali@femto-st.fr

Ahmed Hammad
email: ahammad@femto-st.fr

H Mountassir

Hamida Bouaziz Is A Phd

SysML Model-Driven Approach to Verify Blocks Compatibility

Keywords: model-driven, SysML, sequence diagram, interface automata, ATL, Acceleo

In the component paradigm, the system is seen as an assembly of heterogeneous components, where the system reliability depends on these components compatibility. In our approach, we focus on verifying compatibility of components modelled with SysML diagrams. Thus, we model component interactions with sequence diagrams (SDs) and components with SysML blocks. The SDs constitute a good start point for compatibility verification. However, this verification is still inapplicable directly on SDs, because they are expressed in informal language. Thus, to apply a verification method, it is necessary to translate the SDs into formal models, and then verify the wanted properties. In this paper, we propose a high-level model-driven approach which consists of an ATL grammar that automates the transformation of SDs into interface automata. Also, to allow an easy use of Ptolemy tool to verify properties on automata, we have proposed some Acceleo templates, which generate the Ptolemy entry specification.

university of Bourgogne Franche-comté, and a member of the department of computer science and complex systems (DISC) in FEMTO-ST institute. His area of research includes the use of formal methods in the specification and the verification of complex systems. His research interests concern also Model-Driven Engineering (MDE) and model transformation.

Hassan Mountassir received his HDR (French post-doctoral degree allowing its holder to supervise PhD students) degree in Software Engineering in 2001 from Bourgogne Franche-Comté university. Currently, he is a professor in the department of Computer Sciences at Femto-ST institute. His research interests include component-based systems, formal methods and verification techniques.

Introduction

The design and the development of large software and systems are addressed by the introduction of new paradigms such as object and component paradigms. The use of components as the development unit allows handling the complexity of these large systems. Basing on the notion of component, OMG and INCOSE have founded the System Modelling Language (SysML) [START_REF] Omg | OMG Systems Modeling Language (OMG SysML T M ) Version 1.3[END_REF]. This language shows the system as a set of blocks OMG (2012). SysML uses the Block Definition Diagram (BDD) and the Internal Block Diagram (IBD) to structure the blocks and to establish links between them. To model the behaviour, SysML uses the State Machine (SM), the Sequence Diagram (SD) and the Activity Diagram (AD).

In SysML, interactions between blocks are modelled using IBDs and SDs. These interactions take the form of architectural links in the IBDs. However, SDs, which interest us in this paper, allow us to model the scheduling of these interactions using life lines of blocks. Thus, the SDs constitute a good start point to verify the interactions inside the system. Since formal verification is still inapplicable directly on SysML models [START_REF] Bouaziz | SysML Blocks Adaptation[END_REF]), therefore to apply a verification method, it is necessary to translate the SysML models to formal ones, and then verify the wanted properties.

In our work, the interactions are represented using a set of SDs. Each SD is associated with a block, and it describes the interaction scenarios of a block with its environment. To formalize the semantic of SDs, we transform them into interface automata (IAs) (de [START_REF] De Alfaro | Interface automata[END_REF]). IAs constitute a good formal model to represent the scenarios of requesting (output actions) and performing (input actions) services of a block. The composition of interface automata allows us to verify some relations and properties on blocks such as the consistency and the compatibility (i.e. verify the existence of an environment where it is possible to connect these blocks).

Our approach of transforming SDs into IAs is mainly based on meta-modelling [START_REF] De Lara | Meta-modelling and graph grammars for multi-paradigm modelling in atom3[END_REF]) and meta-model transformations [START_REF] Czarnecki | Classification of model transformation approaches[END_REF]). Such approach consists on defining the meta-models of the source and the target models, and then specifying the correspondences between them in the meta-level. To avoid user errors during the transformation from the SDs to IAs, we have proposed an automated ATL (ATL, n.d.) grammar, which performs this transformation automatically. After, to verify some properties on the resulted interface automata, we have opted for Ptolemy (Ptolemy, n.d.) tool that requires as entry a textual specification. For this purpose, we have used Acceleo (Acceleo, n.d.) to define a set of templates on our meta-model of interface automata, that allows us to generate automatically the Ptolemy entry specification. Thus, this tool chain, that we have developed, allows to assist the architect during the verification phase by discharging him from doing many tasks.

The remainder of the paper is organized as follows: In section 2, we present the background about SysML sequence diagrams, interface automata, ATL and Acceleo. Next, in section 3, we introduce our proposed approach. After, Section 4, gives details of transforming sequence diagrams into interface automata. Next, Section 5, presents the Acceleo templates that we have proposed to generate Ptolemy entry specification. In Section 6, we present how we verify the compatibility of the blocks. In section 7, we illustrate our approach by a case study. In section 8, we discuss related work. Finally, in Section 9, we conclude and we present perspectives of our work.

Preliminaries

Sequence Diagram

Sequence diagram (see figure 3) is a graphical diagram of SysML. It represents the interactions by focusing on the observable exchange of messages between blocks. A sequence diagram has two dimensions, where the vertical dimension represents time and the horizontal one represents the blocks which participate in the interaction [START_REF] Rumbaugh | The Unified Modeling Language reference manual[END_REF]). It consists of a set of lifelines which represent the interacting blocks. The temporal execution of interactions is shown as a succession of messages. A message takes the form of an arrow originates at the sender and ends at the receiver. An SD can also contain a set of combined fragments (CFs). CFs are used to express different types of control flows, such as concurrency, choice and loop [START_REF] Rumbaugh | The Unified Modeling Language reference manual[END_REF]). They are defined by interaction operators (Alt, Loop, Break, etc) and corresponding interaction operands.

Interface Automata

Interface automata (de Alfaro and Henzinger (2001)) were introduced by Alfaro and Henzinger to specify components interfaces and also to verify components assembly based on their actions. The set of actions is decomposed into three groups: input actions, output actions and internal actions. Input actions allow us to model the methods that the component exposes to its environment. These actions are labelled by the character '?'. The output actions model the methods that the component needs to invoke from other components. These actions are labelled by the character '!'. Internal actions are methods that can be activated locally and are labelled by the character ';'.

An interface automaton A is represented by the tuple:

⟨ S A , I A , Σ I A , Σ O A , Σ H A , δ A ⟩
Where:

• S A is a finite set of states. I A ⊆ S A is a set of initial states.

• Σ I A , Σ O A , and Σ H A , respectively denote the sets of input, output, and internal actions. The set of actions of A is denoted by Σ A .

• δ A ⊆ S A × Σ A × S A is the set of transitions between states.

Definition 1 (Synchronous product):

The synchronous product is used to capture the parallel execution of two components represented by their interface automata. Before computing the global behaviour of the two components, it is mandatory to verify if they can be assembled by testing their composability. Two interface automata A 1 and A 2 are composable if:

Σ I A1 ∩ Σ I A2 = Σ O A1 ∩ Σ O A2 = Σ H A1 ∩ Σ A2 = Σ A1 ∩ Σ H A2 = ∅.
The synchronous product between two interface automata A 1 and A 2 is defined as:

A1 ⊗ A2 = ⟨ SA 1 ⊗A 2 , IA 1 ⊗A 2 , Σ I A 1 ⊗A 2 , Σ O A 1 ⊗A 2 , Σ H A 1 ⊗A 2 , δA 1 ⊗A 2 ⟩ • S A1⊗A2 = S A1 × S A2 and I A1⊗A2 = I A1 × I A2 . • Σ I A1⊗A2 = (Σ I A1 ∪ Σ I A2 ) \ Shared(A 1 , A 2 ). • Σ O A1⊗A2 = (Σ O A1 ∪ Σ O A2 ) \ Shared(A 1 , A 2 ). • Σ H A1⊗A2 = Σ H A1 ∪ Σ H A2 ∪ Shared(A 1 , A 2 ). • ((s 1 , s 2 ), a, (s ′ 1 , s ′ 2 )) ∈ δ A1⊗A2 if -a ̸ ∈ Shared(A 1 , A 2 ) ∧ (s 1 , a, s ′ 1 ) ∈ δ A1 ∧ s 2 = s ′ 2 -a ̸ ∈ Shared(A 1 , A 2 ) ∧ (s 2 , a, s ′ 2 ) ∈ δ A2 ∧ s 1 = s ′ 1 -a ∈ Shared(A 1 , A 2 ) ∧ (s 1 , a, s ′ 1 ) ∈ δ A1 ∧ (s 2 , a, s ′ 2 ) ∈ δ A2 .
We define by

Shared(A 1 ,A 2 ) = (Σ I A1 ∩ Σ O A2 ) ∪ (Σ O A1 ∩ Σ I A2
) the set of shared actions between A 1 and A 2 .

Definition 2 (Parallel composition):

The composition of two interface automata A 1 and A 2 is denoted by A 1 ∥ A 2 , it is computed by eliminating from the product A 1 ⊗ A 2 the illegal states and all states reached from these illegal states by enabling output and internal actions. A 1 and A 2 are compatible iff A 1 ∥A 2 ̸ = ∅ The set of illegal states of two interface automata A 1 , A 2 is defined as:

Illegal(A1, A2)=        (s1, s2) ∈ SA 1 × SA 2 | ∃a ∈ Shared(A1, A2).   a ∈ Σ O A 1 (s1) ∧ a ̸ ∈ Σ I A 2 (s2) ∨ a ∈ Σ O A 2 (s2) ∧ a ̸ ∈ Σ I A 1 (s1)         
We define by Σ I A (s 1 ), Σ O A (s 1 ), respectively the set of input and output actions enabled at the state s 1 .

ATL: Atlas Transformation Language

ATL (ATL, n.d.) is a model transformation language and toolkit. In the field of Model-Driven Engineering (MDE), ATL provides a way to produce a number of target models from a set of source models. An ATL transformation program is composed of rules that define how source model elements are matched and navigated to create and initialize the elements of the target models. These rules are based on a mixture of declarative and imperative constructs. The set of the rules constitutes the ATL grammar.

Each ATL rule is characterized by two mandatory elements:

• from : A pattern on the source model with possible constraints.

• to : One or more elements of the target model, it indicates how target elements must be initialized from the corresponding source element.

Acceleo

Acceleo is the result of several man-years of R&D started in the French company Obeo (Obeo, n.d.). Acceleo is a source code generator of the eclipse foundation. It implements the MDA (Model driven architecture) approach to realize application starting from EMF (Eclipse Modelling Framework) models. It is an implementation of the norm of the Object Management Group (OMG) for transforming models to text (M2T), where the transformations take the form of templates.

Our Methodology

Our approach aims to prepare the SysML blocks for the compatibility verification phase. We show an overview of our methodology in figure 1. To verify the compatibility of two blocks, modelled using sequence diagrams, we start by applying the ATL grammar, that we will expose in section 4, on their corresponding meta-models , in order to obtain their equivalents of interface automata. For verifying the compatibility of the blocks, we use the Ptolemy tool. Ptolemy contains a module which allows the verification and the composition of interface automata. To discharge the user from redrawing the interface automata using the Ptolemy user interface, we propose a set of Acceleo templates to generate automatically the Ptolemy entry specifications corresponding to the interface automata specifications obtained in the previous step.

Transforming SDs of blocks into interface automata

In our work, the sequence diagrams are used to visualize the scheduling of the different interactions of each block with its environment. In the sequence diagram of a block B, the environment life line will represent the set of all blocks with which the block B can interact. Thus, in our context, we aggregate all the blocks that interact with B in one block that we call ENV.

To transform these sequence diagrams into interface automata, some correspondences are given in [START_REF] Chouali | Formal verification of components assembly based on sysml and interface automata[END_REF]). In our paper, we analyse more constructs with more detail. Also, our approach is a meta-model driven approach that define the correspondences in meta-level. To implement these correspondences and to automate the transformation, we propose a set of ATL rules. Our ATL grammar doesn't deal with combined fragments as an isolated units as in the works have already done on Petri nets and the other kinds of automata. It deals with the different cases of nested combined fragments.

This ATL grammar is defined on the meta-model of sequence diagram as source and meta-model of interface automata as target.

Sequence Diagram Meta-Model

By intention to reuse existed modelling tools, we have used the sub set of Papyrus (Papyrus, n.d.) SysML meta-model and its graphical editor to draw the sequence diagrams. In figure 2, we represent the classes set of Papyrus meta-model that allows us to model sequence diagrams, and in figure 3, we give an example of a sequence diagram which is modelled using Papyrus editor.

In figure 2, the root class is the class Interaction. So, sequence diagrams, that we will model, will be the instances of this class. Each interaction can include a set of life lines, a set of messages and finally a set of interaction fragments. The classes:

• LifeLine: each instance of this class represents an object which participates in the interaction. It will be the support of sending (resp. receiving) events executed (resp. intercepted) by the object.

• Message: defines the messages set interchanged between objects. Each message has two ends; a send end and a receive end.

• InteractionFragment: is the super class of the classes: Interaction, CombinedFragment, InteractionOperand and OccurenceSpecification.

• CombinedFragment: each combined fragment includes a set of interaction operands, and it has its own interaction operator. The interaction operator takes a value of this list [alt, opt, break, loop, par, . • MessageOccurenceSpecification: Each event associated to the life line is represented as a message occurrence specification. It represents an extremity of a message. We can know the life line, to which the specification is associated, by executing the method getCovered() of the super class OccurenceSpecification. We can also obtain the message started or finished at this specification, by navigating through the association message of the super class MessageEnd.

The classes MessageEnd, Message and InteractionFragment inherit the class NamedElement which its self inherits the class Element. The association 'owner' allows us to obtain the father element of the current element, however the association 'ownedElement' allows us to obtain the children elements of the current element.

Interface Automata Meta-Model

Basing on the formal definition of interface automata formalism given in section 2, we have proposed their meta-model in figure 4. The classes:

• InterfaceAutomaton: is the root. Each interface automaton has a name which represents the name of the block to which this automaton is associated. Each instance of this class can include a set of states, a set of transitions and a set of ports(in-ports, out-ports). • Transition: each instance of this class has three values to specify. The action which is the label of this transition, the source state and the target state.

• Inport: represent the ports associated with the input actions.

• Outport: represent the ports associated with the output actions.

In Figure 5, we present an interface automaton which is modelled using our editor. We have used the Graphical Modelling Framework (GMF) to specify and generate our graphical editor of interface automata.

Basic Interaction Transformation Rules

An interface automaton specifies the interactions of a block 'B' with its environment, where the environment represents all the blocks with which the block 'B' can interact. So, the interface automaton will be associated to the life line of the block 'B'.

To perform the basic transformations (interactions without combined fragments), we have three rules:

• Rule 1: LifeLine2InterfaceAutomaton

This rule allows us to initialize the interface automaton which is associated to the block 'B'. The name of the interface automaton will be the name of the block 'B'. The in-ports are created using the helper 'createInports', because we need to create one in-port for all messages having the same name, which are received by the block 'B'. To create the out-ports, we have used the helper 'createOutports', which creates one out-port for all messages having the same name, which are emitted by 'B'. • Rule 2: MessageOccurrenceSpecification2State

We are only interested with events (sending and receiving of messages) associated to the life line of our block 'B'. These events (mos) are the instances of the class • Rule 3: Message2Transition

A message, which has an extremity that starts or ends at the life line of the current block 'B', must be transformed into a transition in the interface automaton of 'B'.

For a message mos 1 mes -→ mos 2 (where mos1 and mos2 are message occurrence specifications), we create a new transition. This transition will be labelled with the action 'mes', but to specify the type of this action and to fix the beginning and the end states of this transition, we must analyse three cases:

B (1) ENV mes mos 1 mos 2 mos i mes! B (2)
ENV mes mos 2 mos 1 mos i mes?

(3) B mos 1 mos 2 mes mes;

Figure 6: Message transformation -Only mos 1 is associated to the life line of 'B' (see figure 6 (1)): In this case, the label will be an output action 'mes!'. The transition starts at the state associated to mos 1 and ends at the state associated to mos i (the next message occurrence specification of mos 1 on the life line of 'B').

-Only mos 2 is associated to the life line of 'B' (see figure 6 (2)): In this case, the label will be an input action 'mes?'. The transition starts at the state associated to mos 2 and ends at the state associated to mos i (the next message occurrence specification of mos 2 on the life line of 'B').

mos 1 and mos 2 are associated to the life line of 'B' (see figure 6 (3)): In this case, the label will be an internal action 'mes;'. The transition starts at the state associated to mos 1 and ends at the state associated to mos 2 .

ALT Combined Fragment Transformation Rules

The alt fragment allows us to express alternative behaviours according to guards. To transform the alt combined fragment, we have proposed three rules. Two rules for the beginning of alt, and the third one is for processing the end of alt.

For the beginning of alt, we distinguish between two cases:

• Rule 1: TransformAltWichFollowsAMsg

In the case when the combined fragment 'alt' follows a message 'mes', to transform alt, we create a state which represents the beginning of 'alt', and three transitions (see figure 7(1)).

-'t1' allows us to connect the beginning of 'alt' with the previous behaviour using the message just before 'alt'. -'t2' allows us to connect the beginning of 'alt' with the behaviour of the first operand using guard as internal action. -'t3' allows us to connect the beginning of 'alt' with the behaviour of the second operand using guard as internal action.

rule TransformAltWichFollowsAMsg { from alt : SD!CombinedFragment (thisModule.FollowedAMessage(alt)) to s : IA!State (name <-'BeginAlt'), t1 : IA!Transition ( action <-thisModule.previousMessage(alt).name.concat(...

-specify the type of action as in rule 2), source <-thisModule.resolveTemp( thisModule.PreviousMessageOccurence(alt),'s'), target <-s), t2 : IA!Transition ( action <-alt.operand->at(1).guard...concat(';'), source <-s, target<-thisModule.resolveTemp(thisModule. 1)), 's')), t3 : IA!Transition ( action <alt.operand->at(1).guard...concat(';'), source <s, target<-thisModule.resolveTemp(thisModule.

getTheFirstElement(alt.operand->at(

getTheFirstElement(alt.operand->at(2)), 's')), }

-FollowedAMessage (alt) is an ATL helper that returns true if alt follows a message.

-previousMessage(alt) is an ATL helper that returns the message which is before alt.

-PreviousMessageOccurence(alt) is an ATL helper that returns the message occurrence specification which is before alt.

-getTheFirstElement(op) is an ATL helper that returns the first element in the operand op.

• Rule 2: TransformFirstAltInInteractionOrOperand

This rule processes 'alt' in case when it is the first element of the global interaction, the first element in an operand, or when it follows a combined fragment. The difference between this rule and the last one, reside in the transition t1. In this rule, we don't create the transition t1 because when 'alt' is :

the first element in the interaction (see figure 7(2)): we don't need this transition.

directly after a combined fragment 'cf' (see figure 7(4)): this transition will be created by the rule which processes the end of 'cf'.

the first element of an operand 'op'(see figure 7(3)): this transition will be created by the rule which processes the beginning of the combined fragment of 'op'.

rule TransformFirstAltInInteractionOrOperand { from alt : SD!CombinedFragment (thisModule.FirstElementOrFollowsCF(alt)) to s : IA!State (-the same as rule 1), t2 : IA!Transition (-the same as rule 1), t3 : IA!Transition (-the same as rule 1), } -FirstElementOrFollowsCF (alt) is an ATL helper that returns true if alt is the first element in the interaction, the first element inside an operand, or it follows directly a combined fragment.

• Rule 3: TransformEndAlt This rule (see figure 7(5)) allows us to process the end of an 'alt' operand. It takes as parameters this operand and the last message occurrence specification (mos) inside it.

It creates a transition between the state associated to mos and the state associated to the next element of the combined fragment to which this operand belongs (op.owner).

The next element may be message or a combined fragment. The transition takes as label the name of message whose 'mos' is one of its ends.

B ENV mes

alt [cond1] [cond2] mes! cond1; cond2;
(1) CF after a Message B ENV

alt [cond1] [cond2] cond1; cond2;
(2) CF the first element of SD B ENV

[cond]

alt [cond1] [cond2] cond; cond1; cond2;
(3) alt is the first element in an Operand B ENV

CF

alt [cond1] [cond2] cond1; cond2; (4) alt after a CF B ENV alt [cond1] [cond2] mes1 mes2 Next element mes1! mes2!
(5) the end of alt operands and mos.getCovered().name<>'ENV') to t : IA!Transition ( action <-mos.message.name.concat( -specify the type of action as in rule 2), source <-thisModule.resolveTemp(mos,'s'), target <-thisModule.resolveTemp( thisModule.

getNextElement(op.owner),'s'), }

-isTheLastMessageInOperand(mes, op) returns true if the message mes is the last message in the operand op.

-getNextElement(cf) returns the next message or combined fragment of the combined fragment cf.

Using the same manner of thinking, we can define rules for other combined fragments.

Generation of Ptolemy specification

At this step, and to discharge the user from redrawing the interface automata using the Ptolemy user interface, we propose a set of Acceleo templates to generate automatically the Ptolemy entry specification.

By analysing an entry file of ptolemy interface automaton, and by eliminating information related to the position of nodes on the ptolemy canvas, we have obtained its skeleton and we have defined six Acceleo templates. We have eliminated the information related to the position of nodes on the canvas, because the ptolemy, when it doesn't find information about the position of a node, it uses its default values.

The first Acceleo template 'generateIA' is the main template, it creates the file of the Ptolemy specification and its header, and calls the other templates. The templates, after the principal one, each one has a name that corresponds to its role.

• generateInport(inport : Inport): it allows us to generate the Ptolemy specification of each in-port of the concerned interface automaton.

• generateOutport(outport : Outport): it will be called iteratively (as the previous template) by the main template to generate the Ptolemy specification for each out-port of the concerned interface automaton.

• generateState(state : State): it allows us to generate the Ptolemy specification for automaton states.

• generateRelation(transition : Transition, i:Integer) and generateLinks ( transition : Transition, i:Integer): these The interactions of the sensor and the computing-unit blocks are represented as sequence diagrams (see figure 9 and figure 10). To draw sequence diagrams, we have used the papyrus editor.

By applying our ATL rules on the sequences diagrams of the sensor and the computing unit, we have obtained their equivalents of interface automata. In figure 11 and figure 12, we present the resulted interface automata in our graphical editor. By applying the acceleo templates, that we have defined to generate Ptolemy specification, we have obtained these files.

• Ptolemy file of Sensor block: <?xml version="1.0" standalone="no"?> <!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN" "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd"> <entity name="sensor" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomaton"> <port name="pos" class="ptolemy.actor.TypedIOPort"> <property name="output"/> </port> <port name="spos" class="ptolemy.actor.TypedIOPort"> <property name="input"/> </port> <entity name="s1" class="ptolemy.domains.modal.kernel.State"> </entity> <entity name="s0" class="ptolemy.domains.modal.kernel.State"> <property name="isInitialState" class="ptolemy.data.expr.Parameter" value="true"></property> </entity> <relation name="relation" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="spos?"></property> </relation> <relation name="relation2" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="pos!"></property> </relation> <link port="s1.outgoingPort" relation="relation"/> <link port="s0.incomingPort" relation="relation"/> <link port="s0.outgoingPort" relation="relation2"/> <link port="s1.incomingPort" relation="relation2"/> </entity>

• Ptolemy file of Computing-Unit block:

<?xml version="1.0" standalone="no"?> <!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN" "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd"> <entity name="Computing Unit" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomaton"> <port name="far" class="ptolemy.actor.TypedIOPort"> <property name="output"/> </port> <port name="halt" class="ptolemy.actor.TypedIOPort"> <property name="output"/> </port> <port name="pos" class="ptolemy.actor.TypedIOPort"> <property name="input"/> </port> <entity name="s0" class="ptolemy.domains.modal.kernel.State"> <property name="isInitialState" class="ptolemy.data.expr.Parameter" value="true"> </property> </entity> <entity name="s2" class="ptolemy.domains.modal.kernel.State"> </entity> <entity name="s3" class="ptolemy.domains.modal.kernel.State"> </entity> <entity name="s1" class="ptolemy.domains.modal.kernel.State"> </entity> <relation name="relation" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="pos?"> </property> </relation> <relation name="relation2" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="BDistance;"> </property> </relation> <relation name="relation3" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="SDistance;"> </property> </relation> <relation name="relation4" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="far!"> </property> </relation> <relation name="relation5" class= "ptolemy.domains.modal.kernel.ia.InterfaceAutomatonTransition"> <property name="label" class="ptolemy.kernel.util.StringAttribute" value="halt!"> </property> </relation> <link port="s0.outgoingPort" relation="relation"/> <link port="s1.incomingPort" relation="relation"/> <link port="s1.outgoingPort" relation="relation2"/> <link port="s2.incomingPort" relation="relation2"/> <link port="s1.outgoingPort" relation="relation3"/> <link port="s3.incomingPort" relation="relation3"/> <link port="s2.outgoingPort" relation="relation4"/> <link port="s0.incomingPort" relation="relation4"/> <link port="s3.outgoingPort" relation="relation5"/> <link port="s0.incomingPort" relation="relation5"/> </entity>

Using Ptolemy tool, we can use these two files to verify the composability and the compatibility of the sensor and the computing unit blocks. In figure 13, we present the result of composing the two interface automata using Ptolemy tool. Because the composition is not empty, we deduce that the control unit and the sensor blocks are composable and compatible. If we assemble them in the same system, we obtain a system part that interacts with the rest of the system according to the scenarios modelled as an interface automaton in figure 13.

Related work

In literature, various research works have been done to transform informal models to formal ones [START_REF] Rehab | TGG-based process for automating the transformation of UML models towards B specifications[END_REF]) [START_REF] Aouag | From UML 2.0 diagrams to aspect oriented diagrams using graph transformation[END_REF]) [START_REF] Guerrouf | A graph transformation approach of mobile activity diagram to nested Petri nets[END_REF]) [START_REF] Debbabi | Verification and Validation in Systems Engineering -Assessing UML/ SysML Design Models[END_REF]). These transformations are generally implemented and offered as tools which can assist architects during the verification of their systems. Many of these works are dedicated to generate formal models from UML and SysML diagrams [START_REF] Rehab | TGG-based process for automating the transformation of UML models towards B specifications[END_REF]) [START_REF] Aouag | From UML 2.0 diagrams to aspect oriented diagrams using graph transformation[END_REF]) [START_REF] Rahim | Recursive ECATNets-based approach for formally verifying System Modelling Language activity diagrams[END_REF]), which are considered as informal models. In fact, the sequence diagram, which is a shared model between UML and SysML, was be the matter of many transformation works. The most of the proposed approaches are based on using transformation rules, and they differ essentially in the target model of transformation.

In [START_REF] Kessentini | Examplebased sequence diagrams to colored petri nets transformation using heuristic search[END_REF]), [START_REF] Ribeiro | Some rules to transform sequence diagrams into coloured petri nets[END_REF]), we find a description of an automated transformation method, which allows transforming the sequences diagrams to their equivalents of coloured Petri Nets. In [START_REF] Emadi | Mapping annotated use case and sequence diagrams to a petri net notation for performance evaluation[END_REF]), the authors have proposed some correspondences to transform sequence and use case diagrams to Petri Net. These correspondences formalize interactions composed of messages and combined fragments (alternative, optional and loop). Authors in [START_REF] Merah | Design of atl rules for transforming uml 2 sequence diagrams into petri nets[END_REF]), basing on Metamodelling and ATL grammars, they have defined a set of ATL rules to transform SDs to Petri Nets. They have proposed rules for the basic constructs of SDs and for a sub set of combined fragments kinds (Alt, Par). In [START_REF] Chaoui | From uml sequence diagrams to ECATNets: a graph transformation based approach for modelling and analysis[END_REF]), a grammar, which based on graph transformation, was proposed to transform the sequence diagram to ECATNets, a variant of Petri Net. The authors have based on the AT oM 3 tool to implement meta models of SDs and ECATNets, to generate the modelling tools and to implement the graph grammar which performs the transformation. They are also some works which have as target models a textual specification. In (Ait [START_REF] Oubelli | From UML 2.0 Sequence Diagrams to PROMELA code by Graph Transformation using AToM3[END_REF]), a graph grammar was used to generate Promela code starting from SDs. The authors used also the tool AT oM 3 for meta-modelling and for implementing the graph transformation grammar. In [START_REF] Merah | Design of atl rules for transforming uml 2 communication diagrams into buchi automata[END_REF]), The authors, they propose a grammar to transform the communication diagram, which has a near semantic to that of SD, to Buchi automata.

In [START_REF] Chouali | Formal verification of components assembly based on sysml and interface automata[END_REF]), some correspondences between sequence diagram and interface automata are given. This work was be the reference in [START_REF] Carrillo | Formalizing and verifying compatibility and consistency of sysml blocks[END_REF]) to prepare the sequence diagram of SysML blocks for the compatibility verification phase. But, in [START_REF] Carrillo | Formalizing and verifying compatibility and consistency of sysml blocks[END_REF]), this transformation have done manually, which can be considered as a source of user errors. That's why, we propose, in this paper, the correspondences for more constructs, and we propose, also, a set of ATL rules to automate this transformation. Contrary to the works mentioned before, which they don't take into consideration the case of nested combined fragments, in our work, we explain the different cases, and how we deal with them.

The second phase concerns Ptolemy tool, which is used to verify the interface automata compatibility, and to compute their parallel composition. To discharge the user from redrawing the resulted interface automata using the Ptolemy user interface, we have proposed a set of Acceleo templates to generate the entry code of Ptolemy. The other strong point of our work is the use of the meta-model of UML and SysML sequence diagram proposed by Papyrus, and so we base on its graphical editor to draw sequence diagrams.

Conclusion

The point we want to address in our paper is how can we prepare the SysML blocks interactions for verification. Thus, our proposed approach is based on specifying the correspondences between the blocks sequence diagrams and interface automata. The goal of this paper is to present how it's possible to automate the transformation from sequence diagrams to interface automata using ATL. We have shown the transformation of the basic constructs of sequence diagrams. We have also given the ATL rules to transform the alternative combined fragment. The second objective of our work concerns Ptolemy tool, which is used to verify the interface automata compatibility, and to compute their parallel composition. To discharge the user from redrawing the resulted interface automata using the Ptolemy user interface, which can considered as a source of errors, we have proposed a set of Acceleo templates to generate the entry code of Ptolemy. We have also given an overview of how can we use the generated files to verify the compatibility of blocks. To illustrate our approach, we have apply it through a CyCab case study.

As future works, we plan to utilize the use case diagrams for interlinking the different sequence diagrams of blocks during the transformation into interface automata. We plan also to back-annotate the results of interface automata compatibility verification on the source sequence diagrams.

Figure 1 :

 1 Figure 1: Our Methodology

Figure 2 :

 2 Figure 2: Papyrus Meta-Model of SysML Sequence Diagram

Figure 3 :Figure 4 :

 34 Figure 3: Sequence diagram elements

Figure 5 :

 5 Figure 5: Generated Interface Automata Editor

  SD!Lifeline (lifeline.name<>'ENV') to ia : IA!InterfaceAutomaton ( name <-lifeline.name, states <-IA!State.allInstances(), transitions <-IA!Transition.allInstances(), inports <-thisModule.createInports(lifeline), outports <-thisModule.createOutports(lifeline) ) }

Figure 7 :

 7 Figure 7: Alt transformations

Figure 8 :

 8 Figure 8: Block Definition Diagram of CyCab

Figure 9 :

 9 Figure 9: SD of Sensor Figure 10: SD of Computing-Unit

Figure 11 :

 11 Figure 11: SD of Sensor Figure 12: SD of Computing-Unit

Figure 13 :

 13 Figure 13: Parallel composition of Control Unit and Sensor

  'MessageOccurrenceSpecification', where their life line is not the environment but the current block 'B'( mos.getCovered ̸ = ENV ). So, we must create a state for each message occurrence specification.

	rule MessageOccurenceSpecification2State {
	from mos : SD!MessageOccurrenceSpecification
	(mos.getCovered().name <> 'ENV')
	to s : IA!State (name<-mos.message.name.concat('start'))
	}

The Blocks Verification

We want to verify the composability and the compatibility of the blocks. To do that, we base on the interface automata which describe the interaction protocols of these blocks.

• Two blocks B 1 and B 2 are considered as composable if their interface automata A 1 and A 2 are composable:

• Two blocks are compatible, if they are consistent and their interface automata are compatible. According to the optimistic approach of Henzinger, two interface automata are compatible if their composition is not empty:

To verify the composability and the compatibility of the blocks, we use the Ptolemy tool. we give it, as entry, the generated files (the files that we have generated using our Acceleo templates). Ptolemy computes the composition of interface automata and delivers the result. If the result of composition is not empty, this means that the blocks are compatible.

Case Study: CyCab

CyCab [START_REF] Baille | The INRIA Rhone-Alpes CyCab[END_REF]) is a new means of electrical transportation, it is conceived basically for free-standing port services. It is controlled by a computer system. The CyCab system has two major parts: the station and the vehicle. The vehicle is guided by the information received from the station, which allows to situate the vehicle.

In this case study, we are only interested by the 'station' part. The station has a sensor that receives signals from vehicle giving the vehicle position (pos?). The station has also a computing units that sends a signal (far! or halt!) to the vehicle to indicate if it is far from the station or not. In figure 8, we present the architecture of the Cycab System using the SysML BDD.


Ting-Ting Wang

Vincent Laude
email: vincent.laude@femto-st.fr

Muamer Kadic

Yan-Feng Wang

Yue-Sheng Wang

Complex-eigenfrequency band structure of viscoelastic phononic crystals

Keywords: phononic crystal, band structure, viscoelasticity, complex band structure

The method in this paper applies to the prediction of temporal damping in phononic crystal structures composed of materials that can be described by a viscoelastic model such that the imaginary part of elastic constants is proportional to frequency.

Introduction

Phononic crystals for elastic waves are classical analogs to crystal lattices for phonons [START_REF] Kushwaha | Acoustic band structure of periodic elastic composites[END_REF][START_REF] Laude | Phononic Crystals: Artificial Crystals for Sonic, Acoustic, and Elastic Waves[END_REF]. They are described with continuum mechanics and can also be viewed as periodic composites. At the frequencies involved, that go from audible sound (a few Hz), to ultrasound (up to a few tens of GHz), it is usual to neglect material losses in a first approximation. In any solid material, however, material loss is present and ultimately increases with frequency. The Kelvin-Voigt viscoelastic model for isotropic solid materials, that turns Young's modulus E into a complex and dispersive number E + ıωη with ω the angular frequency and η the viscosity, applies well at ultrasonic frequencies. In crystals such as silicon or quartz, material loss can often be modeled by adding an imaginary part to the elastic tensor, in a first approximation proportional to the frequency [START_REF] Auld | Acoustic Fields and Waves in Solids[END_REF][START_REF] Royer | Elastic waves in solids[END_REF]. As a result, the elastic tensor c ijkl becomes the complex valued tensor c ijkl + ıωη ijkl , with η ijkl the phonon viscosity tensor. Sonic crystals for acoustic waves also contain viscous fluids that can be described by a dynamical viscosity leading to a bulk modulus whose imaginary part increases proportionally to frequency. This applies to common fluids supporting sound propagation, such as air and water.

In the literature on phononic crystals, having a reliable measure of the effect of material loss on wave propagation has been a standing salient problem, with obvious practical implications [START_REF] Psarobas | Viscoelastic response of sonic band-gap materials[END_REF][START_REF] Liu | Theoretical study of two-dimensional phononic crystals with viscoelasticity based on fractional derivative models[END_REF][START_REF] Laude | Evanescent Bloch waves and the complex band structure of phononic crystals[END_REF][START_REF] Hussein | Theory of damped Bloch waves in elastic media[END_REF][START_REF] Merheb | Viscoelastic effect on acoustic band gaps in polymer-fluid composites[END_REF][START_REF] Moiseyenko | Material loss influence on the complex band structure and group velocity in phononic crystals[END_REF][START_REF] Laude | Effect of loss on the dispersion relation of photonic and phononic crystals[END_REF][START_REF] Wang | Wave propagation in two-dimensional viscoelastic metamaterials[END_REF][START_REF] Krattiger | Anisotropic dissipation in lattice metamaterials[END_REF][START_REF] Frazier | Generalized Bloch's theorem for viscous metamaterials: Dispersion and effective properties based on frequencies andwavenumbers that are simultaneously complex[END_REF].

Since the band structure gives the dispersion relation of Bloch waves, i.e. of the eigenmodes of phononic crystals, it is natural to try and generalize it to complex quantities describing attenuation in space or damping in time. The complex band structure gives the complex-valued Bloch wavevector as a function of real frequency [START_REF] Laude | Evanescent Bloch waves and the complex band structure of phononic crystals[END_REF][START_REF] Psarobas | Scattering of elastic waves by periodic arrays of spherical bodies[END_REF][START_REF] Romero-García | Evidences of evanescent Bloch waves in phononic crystals[END_REF]. It is in essence well suited to the description of the attenuation in space of monochromatic waves originating from a source of finite extent excited at a given frequency.

There are other situations where the wavevector can be imposed, such as with laser generated ultrasound, but waves will be damped as time goes by after the excitation process. Enhanced energy damping in metamaterials has also been proposed [START_REF] Hussein | An emergent phenomenon in dissipative metamaterials[END_REF][START_REF] Depauw | Metadamping and energy dissipation enhancement via hybrid phononic resonators[END_REF]. It is the purpose of this paper to propose a complex-eigenfrequency band structure method that is suited for viscoelastic materials. In the following, an augmented complex eigenvalue problem is defined using an auxilliary field technique, giving direct damping information for every Bloch wave in the band structure. Examples are given for a sonic crystal of rigid scatterers in air, for steel-epoxy phononic crystals, and for a holey silicon phononic crystal. It is found that numerical results follow closely the perturbation theory in Ref. [START_REF] Laude | Effect of loss on the dispersion relation of photonic and phononic crystals[END_REF], according to which the damping of a given Bloch wave can be estimated at any frequency from a volume average of the viscoelastic constituents weighted by the Bloch wave distribution. In particular, the complex-eigenfrequency band structure ω(k) does not capture any spatial propagation information but provides one with information complementary to the complex band structure k(ω).

Theory

Complex eigenvalue problem

We consider a primitive unit-cell of an artificial crystal, such as those depicted in FIgures 1-3.

Elastic Bloch waves have a displacement vector of the form U(r, t) = u(r) exp(ı(ωtk • r)) where u(r) is the periodic part of the Bloch wave, ω is the angular frequency, t is the time variable, and k is the Bloch wavevector. In elastic solids, the stress and strain tensors are related by Hooke's law via the order-4 elastic tensor c ijkl . Bloch waves of phononic crystals are obtained by solving an eigenfrequency problem under periodic boundary conditions. In viscoelastic solids, Hooke's law is generalized to a complex-valued elastic tensor c ijkl + ıωη ijkl , with η ijkl the order-4 phonon viscosity tensor. The imaginary part is thus explicitly proportional to the angular frequency. As a result, the eigenfrequency problem becomes non trivial, since the matrix coefficients depend on frequency. A complex eigenfrequency band structure can anyway be obtained using the method described in the following and with the assumption that viscoelastic losses are proportional to ω. We start with the formal eigenproblem with a viscoelastic term

(K(k) + ıωV(k) -ω 2 M)u = 0, (1)
with u a vector of the degrees of freedom (d.o.f), K a stiffness matrix, M a mass matrix, and V a viscosity matrix. Note that both the stiffness matrix and the viscosity matrix are a function of the Bloch wavevector k; we omit the dependence on k in the rest of this sub-section for simplicity of the presentation. The mass matrix generally has constant coefficients. All matrices are square and the number of lines equals the number of d.o.f of the system. We set λ = ıω and rewrite Eq. ( 1)

(K + λV + λ 2 M)u = 0. ( 2
)
This second-degree polynomial eigen-equation is equivalent to the first-degree system of equations

v = λu, (3)
Ku + λVu + λMv = 0, (4)
or finally equivalent to the double-size eigenvalue problem

K 0 0 1 u v = λ -V -M 1 0 u v . ( 5
)
This asymmetric eigenvalue problem yields complex eigenvalues, and hence the complex-eigenfrequency band structure. The wavevector k enters via the dependence of matrices K and V. Note that the eigensystem can be written in an Hermitian symmetric form, providing the mass matrix can be inverted and is symmetric, and both K and V are Hermitian symmetric, e.g.

K 0 0 -M -1 u -Mv = λ -V 1 1 0 u -Mv (6)
As a result, eigenvalues come in complex conjugate pairs (λ, λ * ). Each pair of eigenfrequencies have the same real part (and hence propagation constant) but opposite imaginary part. The eigenfrequency with positive imaginary part is a mode of vibration that attenuates in time, whereas the eigenfrequency with negative imaginary part is a mode of vibration that amplifies in time. Note that their respective excitation is dictated by initial boundary conditions. For instance, specifying that the energy in the mode cannot grow to infinity with increasing time disqualifies the amplifying mode of vibration.

Phononic crystal containing viscoelastic materials

We now specify how to obtain an equation of the form (1) for a phononic crystal composed of viscoelastic materials. For elastic waves in solids, the elastodynamic equation for the displacement vector components U i can be written as the partial differential equation [START_REF] Laude | Phononic Crystals: Artificial Crystals for Sonic, Acoustic, and Elastic Waves[END_REF] -[(c ijkl (r)

+ ıωη ijkl (r))U k,l (r)] ,j = ω 2 ρ(r)U i (r) (7)
A variational formulation of the problem of Bloch wave propagation allows one to write the eigenvalue problem in the form [START_REF] Kushwaha | Acoustic band structure of periodic elastic composites[END_REF]. Note that we consider the periodic part of the elastic Bloch waves as the variables for the variational formulation. A weak form suitable for finite element implementation can be obtained directly by considering a mixed finite element space with variables (u, v) and test functions (u , v ) and reads (where the dependence of functions on the space coordinates is implicit)

Ω u v T (∇ + ık)c(∇ -ık) 0 0 1 u v = λ Ω u v T -(∇ + ık)η(∇ -ık) -ρ 1 0 u v (8)
under periodic boundary conditions. This is the formulation we use for implementation of the complex-eigenfrequency band structures in Sections 3.2 and 3.3. The different matrices thus have the following formal expressions

K(k) = Ω (u i,j + ık j u i )c ijkl (u k,l -ık l u k ), (9)
V(k) = Ω (u i,j + ık j u i )η ijkl (u k,l -ık l u k ), (10)
M = Ω u i ρv i . ( 11
)

Extension to sonic crystals

Acoustic Bloch waves have a pressure field of the form P(r, t) = p(r) exp(ı(ωtk • r)) with p(r)

the periodic part of the pressure field. Wave propagation in a sonic crystal can be written as the partial differential equation

-[ρ(r) -1 P ,j (r)] ,j = ω 2 (B(r) + ıωη(r)) -1 P(r). (12)
Here the elastic modulus B and the viscosity η are scalar functions of position. Generally speaking, we have a problem to obtain an equation of the form (1) since the kinetic part of the equation involves the inverse function (B(r) + ıωη(r)) -1 . Restricting the problem to a single homogeneous viscous fluid, however, the material constants are independent of space coordinates and ( 12) can be multiplied by

1 + ıωη/B to get - 1 ρ P ,j (r) ,j - ıωη ρB P ,j (r) ,j = ω 2 1 B P(r). ( 13
)
As a result, we can introduce q = ıω p and the test functions (p , q ) to obtain the following variational

formulation Ω p q T (∇ + ık) 1 ρ (∇ -ık) 0 0 1 p q = λ Ω p q T -(∇ + ık) η ρB (∇ -ık) -1 B 1 0 p q (14)
under periodic boundary conditions. The different matrices thus have the following formal expressions

K(k) = Ω (∇q + ıkq) 1 ρ (∇p -ıkp), (15)
V(k) = Ω (∇q + ıkq) η ρB (∇p -ıkp), (16)
M = Ω p 1 B q. ( 17
)
Table 1. Independent material constants used in this work.

Results

The variational formulations of the previous section were implemented with the finite element method with language FreeFem++ [START_REF] Hecht | New development in freefem++[END_REF]. Obviously, this choice is not unique and other finite element codes could be employed for the same purpose. In the following of this section, we consider representative two-dimensional artificial crystals. Their unit cells are represented on a finite element mesh enclosed by boundaries. Periodic boundary conditions are applied on the external boundaries.

Lagrange finite elements of degree 2 are used for the approximation of all unknown and test functions.

Sonic crystal of rigid rods in air

As a first example, we consider a two-dimensional sonic crystal of rigid rods in air, as was for instance considered experimentally by Miyashita for cylindrical rods [START_REF] Miyashita | Numerical investigations of transmission and waveguide properties of sonic crystals by finite-difference time-domain method[END_REF][START_REF] Miyashita | Full band gaps of sonic crystals made of acrylic cylinders in air -Numerical and experimental investigations[END_REF] and by Lu et al. for triangular rods [START_REF] Lu | Observation of topological valley transport of sound in sonic crystals[END_REF]. The solid rods are supposed to be sufficiently heavy and stiff that only negligible elastic waves can be excited inside them for sound waves incident from air. As a result, the unit-cell of the crystal depicted in Fig. 1(a) (square lattice) or Fig. 1(c) (hexagonal lattice) is composed of a hollow air square or hexagon. With only a single fluid constituent, the theory of Sec. 2.3 can be applied.

The viscosity of air is conventionally 0.0183 mPa.s at a temperature of 20 • C, as reported in Table 1.

Combined with an elastic modulus B = 142 kPa, one would expect theoretically for longitudinal plane waves a quality factor Q = B ωη = 12350 at a frequency of 100 kHz [START_REF] Auld | Acoustic Fields and Waves in Solids[END_REF]. For the m-th band of the crystal, the quality factor is estimated from the complex eigenfrequencies as Q

m (k) = Re[ω m (k)] 2Im[ω m (k)] . ( 18
)
Figure 1 shows the complex-eigenfrequency band structures in the square and the hexagonal lattice cases, for lattice constant a = 1 mm. Also plotted are the empty-lattice models obtained when there is no rod in the unit-cell. Though the band structures are very different if the rod is present or not, the quality factor appears to be the same in both case. Actually, Q is simply inversely proportional to frequency in this single-fluid case (see the discussion of Section 4).

Epoxy-steel phononic crystal

The width of the Bragg band gaps of solid-solid phononic crystals is known to be favored by a high contrast between the elastic constants and the mass density of the contituent solids, in case of hard and heavy inclusions in a soft and light matrix. Phononic crystals of steel rods or spheres in an epoxy matrix are an archetypal example, in both 2D [START_REF] Vasseur | Experimental and theoretical evidence for the existence of absolute acoustic band gaps in two-dimensional solid phononic crystals[END_REF] and 3D [START_REF] Hsiao | Waveguiding inside the complete band gap of a phononic crystal slab[END_REF][START_REF] Khelif | Octave omnidirectional band gap in a three-dimensional phononic crystal[END_REF]. With lattice constants of the order of millimeters, attenuation was not observed to be problematic for experiments, though epoxy materials are presumably viscoelastic. The viscosity of epoxy materials is quite variable, depending on the composition and on the processes used. We consider in Table 1 rather arbitrary values for the viscosity tensor of epoxy, for illustration purposes. Here, the viscosity of steel is neglected with respect to that of epoxy. For the 2D hexagonal lattice phononic crystal of cylindrical steel rods in an epoxy matrix depicted in Fig. 2(a), the complex-eigenfrequency band structure shown in Fig. 2(b) as a large Bragg band gap [START_REF] Vasseur | Experimental and theoretical evidence for the existence of absolute acoustic band gaps in two-dimensional solid phononic crystals[END_REF] and the quality factor Q decreases again hyperbolically with increasing frequency.

If the roles of steel and epoxy are reversed, for the case of epoxy rods in a steel matrix depicted in Fig. 2(c), then it is known that Bragg band gaps are not favored anymore but that local resonances are induced [START_REF] Liu | Locally Resonant Sonic Materials[END_REF][START_REF] Goffaux | Evidence of Fano-Like Interference Phenomena in Locally Resonant Materials[END_REF][START_REF] Wang | Two dimensional locally resonant phononic crystals with binary structures[END_REF]. In the complex-eigenfrequency band structure shown in Fig. 2(d), such a local resonance appears for instance around a frequency of 1.25 MHz. It can be observed that the flatter bands have a much smaller quality factor compared to steeper bands. Actually, and despite appearances, this phenomenon is not related with band steepness but with the spatial distribution of Bloch waves within the unit-cell, as discussed in Section 4.

phononic crystal of holes in silicon

Another system that has been often considered for microsonic applications is the case of holes in a crystal matrix. In the case of silicon phononic crystals [START_REF] Wu | Frequency band-gap measurement of two-dimensional air/silicon phononic crystals using layered slanted finger interdigital transducers[END_REF][START_REF] Otsuka | Broadband evolution of phononic-crystal-waveguide eigenstates in real-and k-spaces[END_REF], cylindrical holes can be obtained by etching at the microscale. The phonon viscosity tensor for silicon has been discussed e.g. in Ref. [START_REF] Lamb | Anisotropic acoustic attenuation with new measurements for quartz at room temperatures[END_REF],

from which the values in Table 1 are taken. Alternative values are given by Helme and King [START_REF] Helme | The phonon viscosity tensor of Si, Ge, GaAs, and InSb[END_REF]. For a 2D square lattice phononic crystal of holes in silicon depicted in Fig. 3(a), the complex-eigenfrequency band structure shown in Fig. 3(b) has a clear Bragg band gap, whereas in the case of the 2D hexagonal lattice depicted in Fig. 3(c) the band gap in Fig. 3(d) closes. More significantly, if it is again observed that the quality factor varies as the inverse of frequency, there are different damping rates for the different bands. As discussed in Section 4, this variability is anisotropic in nature and the quality factor depends on the vector polarization of Bloch waves.

Discussion

In all numerical results presented in Sec. 3, the imaginary parts of the viscoelastic constants were much smaller than their real parts. These results are thus mainly relevant to the case where one is interested in engineering wave propagation properties through a sonic or phononic crystal with small damping. Of course, the equations defining the complex-eigenfrequency band structure also apply beyond this small attenuation regime, as could be interesting for applications to the mitigation of sound or vibrations. In the small damping limit, the first-order perturbation theory of Ref. [START_REF] Laude | Effect of loss on the dispersion relation of photonic and phononic crystals[END_REF] applies.

The main result of this theory in our context is that the relative variation of the frequency of a band at a fixed value of the Bloch wavevector is given by

δω| k ω = ı 2 ω ∇ k u|η|∇ k u ∇ k u|c|∇ k u (19)
where

∇ k u|c|∇ k u = Ω (u * i,j + ık j u * i )c ijkl (u k,l -ık l u k ), (20)
∇ k u|η|∇ k u = Ω (u * i,j + ık j u * i )η ijkl (u k,l -ık l u k ). (21)
The latter equations are the spatial averages of the real and imaginary part of the viscoelastic tensor taken with respect to the particular Bloch wave considered. They include all the influence of the details of the crystal on the appearance of an imaginary part for the eigenfrequency. The quality factor for band m can then be estimed as

Q m (k) = ∇ k u|c|∇ k u ω m (k) ∇ k u|η|∇ k u . (22)
A practical algorithm, and an alternative to the theory of Sec. 3 in the limit of small viscoelasticity, is to solve for the lossless band structure first, thus obtaining the real eigenvalues ω m (k) and their corresponding Bloch waves. Eq. ( 22) then gives a first-order perturbation theory estimate of the quality factor for any band.

When there is a single homogeneous material in a sonic crystal, e.g. as is the case for the air crystal with rigid inclusions of Fig. 1, the relative frequency variation simplifies to

δω| k ω = ı 2 ω η B , (23)
i.e. the distribution of the Bloch wave has no incidence on the result and the quality factor has the same expression as for a plane wave in an homogeneous medium, Q = B ωη . This is the reason why the sonic crystal and the empty lattice model show the same variation of the quality factor with frequency in Fig. 1. Note that the quality factor is also independent of the filling fraction of the crystal in this scalar homogeneous case. When there is a single homogeneous but anisotropic material in a phononic crystal, as is the case for the holey silicon crystal of Fig. 3, similar conclusions can be drawn but the quality factor is not independent of the filling fraction and it further depends on the direction of propagation and on the polarization of the particular Bloch wave, i.e. the ratio of the material averages C / η is different for quasi longitudinal and quasi shear Bloch waves. As a consequence, considering the empty lattice model in this case would not be meaningful.

In the case of a phononic crystal with several constituents, as in the case of steel-epoxy crystals in Fig. 2, the material averages can be decomposed over matrix and inclusion regions according to

δω| k ω = ı 2 ω ∇ k u|η|∇ k u matrix + ∇ k u|η|∇ k u incl. ∇ k u|c|∇ k u matrix + ∇ k u|c|∇ k u incl. . (24)
As a result, damping further depends on the spatial distribution of the Bloch wave. For instance, in the case of a local resonance that results from the hybridization of a resonance of an inclusion (i.e., a flat band) with propagating waves in the matrix (i.e., a band with a given slope), the Bloch waves of the flat band are generally localized inside the inclusion and suffer larger damping if the viscosity of the inclusion is larger than the viscosity of the matrix. That is the situation observed for the local resonances in Fig. 2(d).

We note that in comparison with the complex band structure that can be used for an arbitrary dependence of the material constants with frequency [START_REF] Laude | Evanescent Bloch waves and the complex band structure of phononic crystals[END_REF][START_REF] Moiseyenko | Material loss influence on the complex band structure and group velocity in phononic crystals[END_REF][START_REF] Wang | Wave propagation in two-dimensional viscoelastic metamaterials[END_REF], the complex eigenfrequency band structure introduced in the present paper does not capture any effect linked with the spatial attenuation of the Bloch waves as they propagate away from a source. Hence, the results we have obtained are independent of the local group velocity and do not reveal anything regarding frustrated evanescent Bloch waves or evanescent Bloch waves inside band gaps [START_REF] Laude | Evanescent Bloch waves and the complex band structure of phononic crystals[END_REF]. They essentially account for temporal damping of Bloch waves in crystals and include the contribution of local resonances.

There are further situations where the complex-eigenfrequency band structure could be useful and we indicate some of them as perspectives. In the case of a defect cavity embedded in a very large crystal, the method would give the quality factor of the resonance, if combined with a super-cell technique. Beyond time-harmonic excitations, transient or short pulse excitations are equally important for experiments. Since damped eigenmodes provide a complete basis for analysis of the frequency response function (FRF) of structures, the general methodology of the linear combination of damped eigenmodes can be combined with the complex-eigenfrequency band structure.

Air ρ = 1 .Figure 1 .

 11 Figure 1. Two-dimensional sonic crystal of rigid rods in air. The lattice constant is a = 1 mm. (a) Unit cell of a square lattice sonic crystal with cylindrical rods and d/a = 0.85, and (b) the corresponding complex-eigenfrequency band structure. (c) Unit cell of a hexagonal lattice sonic crystal with triangular rods and d/a = 0.7, and (d) the corresponding complex-eigenfrequency band structure. The color scale of the band diagrams correspond to the quality factor Q of each Bloch eigenstate.

Figure 2 .

 2 Figure 2. Two-dimensional phononic crystals composed of epoxy and steel. The lattice is hexagonal, the lattice constant is a = 1 mm and d/a = 0.7. Only epoxy is considered viscoelastic while viscous loss in steel is neglected. (a) Unit cell for epoxy matrix and cylindrical steel rods, and (b) the corresponding complex-eigenfrequency band structure. The large complete band gap is of the Bragg type. (c) Unit cell for steel matrix and cylindrical epoxy rods, and (d) the corresponding complex-eigenfrequency band structure. The color scale of the band diagrams correspond to the quality factor Q of each Bloch eigenstate.

Figure 3 .

 3 Figure 3. Two-dimensional phononic crystals composed of holes in silicon. The lattice constant is a = 1 µm. (a) Unit cell of a square lattice phononic crystal with d/a = 0.833 and (b) the corresponding complex-eigenfrequency band structure. (c) Unit cell of a hexagonal lattice sonic crystal with d/a = 0.7 and (d) the corresponding complex-eigenfrequency band structure. The color scale of the band diagrams correspond to the quality factor Q of each Bloch eigenstate.

Funding: This research was funded by the EIPHI Graduate School (contract ANR-17-EURE-0002), the French Investissements d'Avenir program, project ISITE-BFC (contract ANR-15-IDEX-03), and the National Natural Science Foundation of China (11702017 and 11532001).

Conflicts of Interest:

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.