Benoit Baudry
email: benoit.baudry@irisa.fr

Hanh Vu Le

Jean-Marc Jézéquel
email: jean-marc.jezequel@irisa.fr

Yves Le Traon
email: yves.le_traon@irisa.fr

Vu Le

Trustable components: Yet another mutation-based approach

Introduction

The Object-Oriented approach offers both strong encapsulation mechanisms and efficient operators for software reusability and extensibility. In a componentbased approach using a design-by-contract methodology, the following considerations make mutation analysis useful for several analysis levels:

-in a design-by-contract approach [START_REF] Jézéquel | Design-Patterns and Contract[END_REF][START_REF] Meyer | Applying design by contract[END_REF], components integrate "contracts" that are systematically derived from the specification. Contracts behave as executable assertions that automatically check the components consistency (pre-postconditions, class invariants). Based on mutation analysis, the efficiency of contracts can thus be estimated by their capacity of rejecting faulty implementation, and the enhancement of contracts can be guided. Then, and also based on a particular application of mutation analysis, the contribution of each component to the global system robustness and reliability can be estimated. -Components, to be reusable, are considered as an "organic" set of a specification, an implementation and embedded tests. With such self-testable component definition, all the difficulty consists of automatically improving embedded tests based on the basic test cases written by the tester/developer. Being given these basic test cases, we consider mutants programs as a population of preys and, conversely, a test set as a particular predator. This analogy leads to the application of genetic algorithms to enhance the original population of predators using as a fitness function the mutation score.

-Trustability [START_REF] Howden | Software Trustability[END_REF] is finally the result of the global packaging of a design-by-contract approach, component self-testability and mutation analysis for both tests & contracts improvement and qualification are In this paper, we propose a testing-for-trust methodology that helps checking the consistency of the component' s three facets, i.e., specification/ implementation and tests. The methodology is an original adaptation from mutation analysis principle [START_REF] Demillo | Hints on Test Data Selection : Help For The Practicing Programmer[END_REF]: the quality of a tests set is related to the proportion of faulty programs it detects. Faulty programs are generated by systematic fault injection in the original implementation. In our approach, we consider that contracts should provide most of the oracle functions: the question of the efficiency of contracts to detect anomalies in the implementation or in the provider environment is thus tackled and studied (Section 4). If the generation of a basic tests set is easy, improving its quality may require prohibitive efforts. In a logical continuity with our mutation analysis approach and tool, we describe how such a basic unit tests set, seen as a test seed, can be automatically improved using genetic algorithms to reach a better quality level.

Section 2 opens on methodological views and steps for building trustable component in our approach. Section 3 concentrates on the mutation testing process adapted to OO domain and the associated tool dedicated to the Eiffel programming language. The test quality estimate is presented as well as the automatic optimization of test cases using genetic algorithms (Section 4). Section 5 is devoted to an instructive case study that illustrates the feasibility and the benefits of such an approach. Section 6 presents a robustness measure, for a software component, based on a mutation analysis.

Test quality for trustable components

The methodology is based on an integrated design and test approach for OO software components, particularly adapted to a design-by-contract approach, where the specification is systematically derived into executable assertions (invariant properties, pre/postconditions of methods). Classes that serve for illustrating the approach are considered as basic unit components: a component can also be any class package that implements a set of well-defined functionality. Test suites are defined as being an "organic" part of software OO component. Indeed, a component is composed of its specification (documentation, methods signature, invariant properties, pre/ postconditions), one implementation and the test cases needed for testing it. This view of an OO component is illustrated under the triangle representation (cf. Figure 1). To a component specified functionality is added a new feature that enables it to test itself: the component is made self-testable. Self-testable components have the ability to launch their own unit tests as detailed in [START_REF] Le Traon | Self-testable components: from pragmatic tests to a design-for-testability methodology[END_REF].

From a methodological point of view, we argue that the trust we have in a component depends on the consistency between the specification (refined in executable contracts), the implementation and the test cases. The confrontation between these three facets leads to the improvement of each one. Before definitely embedding a test suite, the efficiency of test cases must be checked and estimated against implementation and specification, especially contracts. Tests are build from the specification of the component; they are a reflection of its precision. They are composed of two independent conceptual parts: test cases and oracles. Test cases execute the functions of the component. Embedded oracles -predicates for the fault detection decision -can either be provided by assertions included into the test cases or by executable contracts. In a design-by-contract approach, our experience is that most of the decisions are provided by contracts derived from the specification. The fact components' contracts are inefficient to d etect a fault exercised by the test cases reveals a lack of precision in the specification. The specification should be refined and new contracts added. The trust in the component is thus related to the test cases efficiency and the contracts "completeness". We can trust the implementation since we have tested it with a good test cases set, and we trust the specification because it is precise enough to derive efficient contracts as oracle functions.

Specification

Measure of Trust based on Consistency

Contract between the client and the component

Fig. 1. Trust based on triangle consistency

The question is thus to be able to measure this consistency. This quality estimate quantifies the trust one can have in a component. The chosen quality criteria proposed here is the proportion of injected faults the self-test detects when faults are systematically injected into the component implementation. This estimate is, in fact, derived from the mutation testing technique, which is adapted for OO classes. The main classical limitation for mutation analysis is the combinatorial expense.

The global component design-for-trust process consists of 6 steps that are presented in figure 2

Mutation testing technique for OO domain

Mutation testing is a testing technique that was first designed to create effective test data, with an important fault revealing power [START_REF] Offutt | An experimental evaluation of data flow and mutation testing[END_REF]. It has been originally proposed in 1978 [START_REF] Demillo | Hints on Test Data Selection : Help For The Practicing Programmer[END_REF] , and consists in creating a set of faulty versions or mutants of a program with the ultimate goal of designing a tests set that distinguishes the program from all its mutants. In practice, faults are modeled by a set of mutation operators where each operator represents a class of software faults. To create a mutant, it is sufficient to apply its associated operator to the original program.

A tests set is relatively adequate if it distinguishes the original program from all its non-equivalent mutants. Otherwise, a mutation score (MS) is associated to the test set to measure its effectiveness in terms of percentage of the revealed non-equivalent mutants. It is to be noted that a mutant is considered equivalent to the original program if there is no input data on which the mutant and the original program produce a different output. A benefit of the mutation score is that even if no error is found, it still measures how well the software has been tested giving the user information about the program test quality. It can be viewed as a kind of reliability assessment for the tested software.

A mutation analysis seems well adapted to the Object-Oriented domain for the following reasons: -methods body of a well designed OO component are generally shorter than for a procedural implementation, most of the control predicates being dispatched on the system dependencies: combinatorial explosion of a mutation analysis is thus limited; -in OO paradigm, the executed program is an object with a state (attributes values and recursively states of the referenced objects): in classical mutation analysis, the oracle is obtained by comparison between the explicit outputs of the original program and the mutant. In the case of OO programming, an oracle can easily be built by comparing the states of the initial program with the state of the mutant one (a deep comparison of the object states). In fact, to avoid the problem of stateless programs (or if the injected fault does not affect the state of the object under test) the object states that will be compared are the testing programs themselves: the testing program is an object, where all queries method calls on the class under test are caught by attributes of the testing class. With this solution an efficient oracle function compares testing objects attributes. This integrated mechanism significantly enlarge the spectrum of programs concerned by a mutation analysis (no specific instrumentation of the source code is needed)

In this paper, we are looking for a subset of mutation operators general enough to be applied to various OO languages (Java, C++, Eiffel etc) implying a limited computational expense, ensuring at least control-flow coverage of methods. Our current choice of mutation operators is the following:

EHF: Causes an exception when executed AOR: Replaces occurrences of "+" by "-" and viceversa. LOR: Each occurrence of one of the logical operators (and, or, nand, nor, xor) is replaced by each of the other operators; in addition, the expression is replaced by TRUE and FALSE. ROR: Each occurrence of one of the relational operators (<, >, <=, >=, =, /=) is replaced by each one of the other operators. NOR: Replaces each statement by the Null statement. VCP: Constants and variables values are slightly modified to emulate domain perturbation testing. Each constant or variable of arithmetic type is both incremented by one and decremented by one. Each boolean is replaced by its complement.

The operators introduced for the object-oriented domain are the following:

-MCP (Methods Call Replacement): Methods calls are replaced by a call to another method with the same signature. -RFI (Referencing Fault Insertion): Stuck-at void the reference of an object after its creation. Suppress a clone or copy instruction. Insert a clone instruction for each reference assignment. Operator RFI introduces object aliasing and object reference faults, specific to object-oriented programming.

Test selection process

The whole process for generating unit test cases includes the generation of mutants and the application of test cases against each mutant. The decision can be either the difference between the initial implementation' s output and the mutant' s output, or the contracts and embedded oracle function. The diagnosis on alive mutants consists in determining the reason of non detection: it may be due to the tests but also to incomplete specification (and particularly if contracts are used as oracle functions). It has to be noted that when the set of test cases is selected, the mutation score is fixed as well as the test quality of the component. Moreover, except for diagnosis, the process is completely automated.

The mutation analysis tool developed, called mutants slayer or µSlayer, is suitable for the Eiffel language.

This tool injects faults in a class under test (or a set of classes), executes selftests on each mutant program and delivers a diagnosis to determine which mutants were killed by tests. All the process is incremental (we do not start again the execution of already killed mutants for example) and is parameterized: the user for example selects the number and types of mutation he wants to apply at any step. The µSlayer tool is available from http://www.irisa.fr/pampa/.

Component and system test quality

The test quality of a component is simply obtained by computing the mutation score for the unit testing test suite executed with the self-test method.

The system test quality is defined as follows:

• let S be a system composed of n components

denoted C i , i ∈ [1..n],
• let d i be the number of dead mutants after applying the unit test sequence to C i , and m i the total number of mutants. The test quality (TQ), i. e. the mutation score MS, and the System Test Quality (STQ) are defined as follows :

i i m d ) , ( = i i T C TQ ∑ ∑ = = = n i n i S STQ 1 i 1 i m d ) (
These quality parameters are associated to each component and the global system test quality is computed and updated depending on the number of components actually integrated to the system.

In this paper, such a test quality estimate is considered as the main estimate of component' s trustability.

Test cases generation : genetic algorithms for test generation

In this section we present the results obtained after using a genetic algorithm as a way to automatically improve the basic test cases set in order to reach a better Test Quality level with limited effort. We begin with a population of mutant programs to be killed and a test cases pool. We randomly combine those test cases (or "gene pool") to build an initial population of test sets which are the predators of the mutant population. From this initial population, how can we mutate the "predators" test cases and cross them over in order to improve their ability to kill mutants programs? One of the major difficulties in genetic algorithms is the definition of a fitness function. In our case, this difficulty does not exist: the mutation score is the function that estimates the efficiency of a test case.

Genetic algorithms [START_REF] Goldberg | Genetic Algorithms in Search, Optimization and Machine Learning[END_REF] have been first developed by John Holland [START_REF] Holland | Robust algorithms for adaptation set in general formal framework[END_REF], whose goal was to rigorously explain natural systems and then design artificial systems based on natural mechanisms. So, genetic algorithms are optimization algorithms based on natural genetics and selection mechanisms. In nature, creatures which best fit their environment (which are able to avoid predators, which can handle coldness…) reproduce and, due to crossover and mutation, the next generation will fit better. This is just how a genetic algorithm works: it uses an objective criterion to select the fittest individuals in one population, it copies them and creates new individuals with pieces of the old ones.

For test optimization, the problem is modeled as follows:

Test:

1 test = 1 gene Gene: G = [

an initialization sequence, several method calls] = [I , S]

Individual: An individual is defined as a finite set of genes = {G 1 ,…,G m } The function we want to maximize is the one we use as the fitness function; in our problem, it is the mutation score.

Here are the three operators that manipulate the individuals and genes in our problem:

Case study

In this case study, the class package of the Pylon library (http://www.eiffelforum.org/archive/arnaud/pylon.htm) relating to the management of time was made self-testable. These classes are complex enough to illustrate the approach and obtain interesting results. The main class of this package is called p_date_time.e.

This study proceeds in two stages to help isolating the efforts of test data generation compared to those of oracle production. In real practice, the contracts -that should be effective as embedded oracle functions -can be improved in a continuous process: in this study, we voluntarily separate test generation stage from contract improvement one to compare the respective efforts. The last stage only aims to test the capacity of contracts to detect faults coming from provider classes. We call that capacity the "robustness" of the component against an infected environment.

The aims of this case study were: 1. estimating the test generation with genetic algorithms for reaching 100% mutation score, 2. appraising the initial efficiency of contracts and improve them using this approach, 3. estimating the robustness of a component embedded selftest to detect faults due to external infected provider classes. The last point aims at estimating whether a selftestable system, with high quality tests, is robust enough to detect new external faults due to integration or evolution. Indeed, each component' s selftest checks its own correctness but also some of its neighboring provider' s components. These crosschecking tests between dependent components increase the probability to detect faults in the global system. So the intuition is that 100 tests method calls per class in a 100 classes system make a high fault revealing power test of 10 000 tests for the whole system. The question is thus to estimate whether a selftest has or not a good probability to detect a fault due to one of its infected provider.

The analysis focuses on three classes: p_date_time.e, p_date.e and p_time.e.

For the classes that are studied here, this first stage of generation allowed to eliminate approximately 60 to 70% of the generated mutants. It corresponds to the test seed that can be used for automatic improvement through genetic algorithm optimization (see Section III.3). Figure 3 presents the curves of the mutation score growth as a function of the number of generated predators (one plot represents a generation step). To avoid the combinatorial expense, we limit the new mutated generation to the predators that have the best own mutation score (good candidates). The new generation of predators was thus target-guided (depends on the alive mutants) and controlled by the fitness function. Results are encouraging even if the CPU time remains important (2 days of execution time for the three components to reach more than 90 percent mutation score on a Pentium II). The main interest is that the test improvement process is automated. Then, the mutation score has been improved by analyzing the mutants one by one: equivalent mutants were suppressed and specific test cases were written for alive mutants to reach 100% mutation score. Concerning the improvement of contracts, the results on the initial quality of contracts used as oracles are given in Table 1. The table recapitulates the initial efficiency of contracts and then the final level they reached after improvement.

Fig.3. Genetic algorithm results for test optimization

The addition of new contracts thus improves significantly their capacity to detect internal faults (from 10 to 70 % for p_date, from 18 to 91 for p_time and from 9 to 70 for p_date_time). The fact that all faults are not detected by the improved contracts reveals the limit of contracts as oracle functions. The contracts associated with these methods are unable to detect faults disturbing the global state of a component. For example, a prune method of a stack cannot have trivial local contracts checking whether the element removed had been previously inserted by a put. In that case, a class invariant would be adapted to detect such faults.

Concerning the robustness of a component against an infected component, p_date.e and p_time.e have been infected and p_date_time client class selftest launched. Table 2 gives the percentage of mutants detected by the client class selftest p_date_time. It gives an index of the robustness of p_date_time against its infected providers. The numbers of methods used by p_date_time, and thus infected by our mutation tool, are given as well as number of generated mutants for each provider class. The results show however that 60-80% of faults related to the external environment is locally detected by the selftest of a component.

Reliability and Robustness of a designed by contract system

Based on mutation analysis, we propose a first approximation of the initial failure rate that could be used in a reliability model for initializing some of the initial constant parameters [START_REF] Lyu | Handbook of Software Reliability Engineering[END_REF][START_REF] Musa | Software Reliability: Measurement, Prediction, Application[END_REF]. We do not look for a new reliability model but the argumentation aims at bridging the gap between testing and initial reliability/robustness of a system in a design-by-contracts approach, with selftestable components.

Embedded contracts, as executable assertions derived from a specification, provide a mechanism to detect faults before they provoke a failure. We analyze the initial reliability of a system, tested using mutation analysis, and the robustness reached by a system using contractable components versus no contractable ones.

Let C i , i ∈ [1.

.n] be the n components of a system. Let 0 i F , the initial failure rate (after validation steps), i.e., the probability that a failure occurs in the component in the next statement execution. The initial reliability 0 i R of the component is thus:

0 0 1 i i F R - =
In a mutation analysis approach, the test cases have been executed against all the mutant programs. Recall that we consider a component as an organic set of a specification (contracts), an implementation and the embedded test sets. A component has a good behavior if its tests are able to detect failure coming from the implementation. So, the number of killed mutants represents a number of successful behavior of the component, since the known injected faults have been successfully detected by the selftest. To measure the initial reliability, the assumption is the following: we assume that if a new test case is executed, then a failure will certainly occur. With such an assumption if the number of statements executed before the faulty code is infected is i Nstat , then the initial failure probability is

i i Nstat F 1 0 = .
In this paper, we estimate i Nstat by multiplying the number of statements executed in the correct program by the number of killed mutants. It provides a satisfying approximation of the number of executed statements. So we have:

i i i K ts mu killed Nstat × ≅ tan _ #
, where K is the number of statements executed by the test set on the program.

The global initial reliability of a system composed of n components can thus be estimated in two ways depending on fault independence assumption. First, we can approximate the reliability by considering that failure events occurring in the system are independent. With such a (pessimistic) assumption, the initial reliability 0 R of a system is equal to :

∏ = = n i i R R 1 0 0 .
Another consideration would lead to a more realistic model, by considering that one statement will be executed at a time (indeed this no more true for parallel and distributed software). Under that optimistic assumption, we have the following initial reliability and failure rate:

∑ ∑ = = - = - = - = n i i n i i F Nstat F R 1 0 1 0 0 1 1 1 1 1 1
Both models provide boundaries of the initial reliability and failure rates.

Independently of the way these factors are measured, the robustness i Rob of a component C i is defined here as the probability that a fault is detected, assuming that this fault would provoke a failure if not detected by a contract or an equivalent mechanism. Conversely, the "weakness" i Weak of the component is equal to the probability that the fault is not detected. This probability corresponds to the percentage of faults detected by contracts. Indeed, if the component has been designed by contracts, then the detected fault can be retrieved, and a mechanism (such as exception handling and processing) will prevent a failure to occur. In the case of a component C i with no contracts, its robustness is equal to 0: 0

1 = - = i i Weak Rob .
A component isolated from the system has a basic robustness corresponding to the strength of its embedded contracts. A component plugged into a system has robustness enhanced by the fact that its clients will add their contracts to the fault detection. The notion of Test Dependency is thus introduced for determining the relation between a component and its client and heirs in a system.

Test dependency

i TD k C R C / )), 1 ( ( 1 _ ∏ - ⋅ - = k k i i i k Det Weak intoS Rob
Finally, the robustness ⋅ Rob of the system is thus equal to:

∑ = × - = - = n i i Weak_intoS re(i) Prob_failu Weak Rob 1 1 1
where re(i) Prob_failu is the probability the failure comes from the component C i knowing that a failure certainly occurs. This probability is approximated by the component' s complexity.

To conclude, considering that a fault detected by a contract allows the service continuity, the initial reliability of the system is also enhanced as follows:

Rob F R Weak F F R new new ⋅ + = ⋅ - = - = 0 0 0 0 0 ) ( 1 1
.

Fixing the values

The parameters of this model of robustness and initial reliability are easily fixed using mutation analysis. 0 0

1 i i F R - = with i i Nstat F 1 0 = = - = i i Weak Rob 1
percentage of mutants detected by contracts.

Illustration

To estimate (roughly) the gain in robustness of a system, we consider the SMDS system composed of 37 components, already studied in [START_REF] Le Traon | Efficient OO Integration and Regression Testing[END_REF] for optimizing integration testing. Here, we apply our robustness estimator for this system. The detailed model is not needed to understand the application to robustness. We fix the values as follows to appraise the global improvement in robustness of the system due to a systematic use of contracts: The initial failure rate of the system composed of 37 components is thus equal to Since it is obvious that a relationship exists between j i Det and the robustness, the figure 4 also displays the "robustness curve". To draw this curve, we have considered that . Here we have taken K equal to 0.8. So this curve really corresponds to the real global robustness evolution: during the development phase, the programmer will start with basic weak contracts and then enhance them. So during this period, the robustness of components and j i Det will grow together and so will the system' s robustness.

= - = i i Weak

Conclusion

The feasibility of components validation by mutation analysis and its utility to test generation have been studied as well has the robustness of trustable and self-testable components into an infected environment. The approach presented in this paper aims at providing a consistent framework for building trust into components. By measuring the quality of test cases (the revealing power of the test cases [START_REF] Voas | PIE: A Dynamic Failure-Based Technique[END_REF]) we seek to build trust in a component passing those test cases. The analysis also shows that a design-by-contract approach associated to the notion of embedded selftest significantly improves the robustness, and indirectly the reliability, of a final-product.

  g., embedded tests)

Fig. 2 .

 2 Fig. 2.The global testing-for-trust process

Fig. 4 .Figure 4

 44 Fig. 4. System Robustness depends on Components Robustness Figure 4 first shows four evolutions of the SMDS system robustness depending on the components robustness. The four curves correspond to four different j i Det values. This figure shows that contracts, by enhancing a component' s robustness and by enhancing the j i Det value, improve the global system' s robustness.Since it is obvious that a relationship exists between

Table 1 . Main results

 1

		p_date p_time p_date_time
	# generated mutants	673	275	199
	# equivalents	49	18	15
	mutants
	% mutants killed	10,3% 17,9%	8,%
	(initial contracts)
	% mutants killed	69,4% 91,4%	70,1%
	after contracts
	improvement

Table 2 . p_date_time robustness in an infected environment

 2

			Infected component	P_date	p_time
			Total number of methods	19	12
			Number of used/infected	14	11
			methods
			# generated mutants	350	161
			# equivalents		33	8
			# killed mutants	195	114
			% killed mutants	61%	74%
	mutation score	60 80 100				p_time p_date_time p_date
		0	50	100	150	200
			#test cases "predators"

  As a mean estimator, we consider that a test case is composed of mean 100 tests and that 200 mutants are generated for each of the component. A test approximately executes 10 statements.

	Rob 1					0.85,	j Det =0.7 i	and
	Prob_failu	re(i)	=	1	/	n	= 1/37.


R Fekih-Salem

J Harmand
email: harmand@supagro.inra.fr

C Lobry

A Rapaport
email: rapaport@supagro.inra.fr

T Sari

Extensions of the chemostat model with flocculation

Keywords: Chemostat, density dependent growth functions, flocculation

In this work, we study a model of the chemostat where the species are present in two forms, isolated and aggregated individuals, such as attached bacteria or bacteria in flocks. We show that our general model contains a lot of models that were previously considered in the literature. Assuming that flocculation and deflocculation dynamics are fast compared to the growth of the species, we construct a reduced chemostat-like model in which both the growth functions and the apparent dilution rate depend on the density of the species. We also show that such a model involving monotonic growth rates may exhibit bistability, while it may occur in the classical chemostat model, but when the growth rate is non monotonic.

Introduction

In culture of micro-organisms, the attachment of microbial individuals occurs frequently. The attachment can be either a "wall attachment" such as in the growth of biofilms or simply an aggregation such as in the formation of flocks or granules [START_REF] Costerton | Overview of microbial biofilms[END_REF][START_REF] Thomas | Flocculation modelling: A review[END_REF]. Flock or granule formation has a direct impact on growth dynamics, as the access to the substrate is limited for micro-organisms inside such structures. The mechanisms of attachment and detachment result from the coupling of hydrodynamics conditions and biological properties, but are not yet completely understood at the level of microbial individuals. Several attempts of computer models, using individual based representations, have been proposed and are under investigation for the simulation of these phenomenons, cf. for instance [START_REF]IWA Task Group on Biofilm Modeling Mathematical Modeling of Biofilms[END_REF][START_REF] Saravanan | Modeling anaerobic biofilm reactors, a review[END_REF]. At a macroscopic level, substrate limitation can be measured experimentally in biofilms or flocks [START_REF] Chiu | Oxygen diffusion and consumption in active aerobic granules of heterogeneous structure[END_REF][START_REF] Li | Micro-profiles of activated sludge floc determined using microelectrodes[END_REF][START_REF] Topiwala | Effect of wall growth in steady state continuous culture[END_REF]. A rough representation, suited to the macroscopic level, consists in splitting the overall biomass into two parts: a "planktonic biomass", composed of free individuals and an "attached biomass" composed of individuals that are tied together [START_REF] Kreikenbohm | Application of a two-compartment model to the wall growth of Pelobacter acidigallici under continuous culture conditions[END_REF]. This consideration leads to a significant change on the performances predicted by the models, compared to purely planktonic cultures. In a chemostat-like device, planktonic cells are expected to consume easily the substrates necessary for their growth, but are more keen to be carried out by the flow. On the contrary, cells among aggregates or biofilms have a more difficult access to the resources of the bulk fluid, but are more resistant to detachment induced by the hydrodynamical conditions. Therefore, mathematical models are expected to understand and predict the issues of these trade-offs. Several extensions of the well-known chemostat model [START_REF] Smith | The Theory of the Chemostat, Dynamics of Microbial Competition[END_REF], considering two compartments of free and attached biomass for each species have been proposed and studied in the literature. In models with wall attachment, attached biomass is assumed to be fixed while detached individuals return directly to the planktonic compartment [START_REF] Pilyugin | The simple chemostat with wall growth[END_REF][START_REF] Stemmons | Competition in a chemostat with wall attachment[END_REF]. In models with aggregation, aggregates are carried out by the flow but bacteria inside flocks are assumed to have no or reduced access to bulk resources [START_REF] Haegeman | Modeling Bacteria Flocculation as Density-Dependent Growth[END_REF][START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF].

Literature reports flocculation time scales of the order of 1 to 10 min [START_REF] Ding | Population balance modelling of activated sludge flocculation: Investigating the size dependence of aggregation, breakage and collision efficiency[END_REF][START_REF] Wahlberg | Influence of activated sludge flocculation time on secondary clarification[END_REF] to be compared with bacterial growth times of 1 h to 1 day, and with retention times of a few hours to a few days. Thus, considering that attachment and detachment processes may be fast compared to biological time, it is shown in [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF] that the reduced dynamics of such systems amounts to have a single biomass compartment for each strain but with a density dependent growth rate. This justifies the consideration of density dependent growth functions in the chemostat model, as already introduced in the literature in the field of mathematical ecology [START_REF] Arditi | Coupling in predator-prey dynamics: ratio-dependence[END_REF] or wastewater process engineering [START_REF] Harmand | Density-dependent kinetics models for a simple description of complex phenomena in macroscopic mass-balance modeling of bioreactors[END_REF]. In [START_REF] Leenheer | Crowding effects promote coexistence in the chemostat[END_REF][START_REF] Lobry | A new hypothesis to explain the coexistence of n species in the presence of a single resource[END_REF][START_REF] Lobry | Persistence in ecological models of competition for a single resource[END_REF][START_REF] Lobry | Sur un modèle densité-dépendant de compétition pour une resource[END_REF], it has been shown that this could lead to the coexistence of several species in competition on a same limiting resource, thus invalidating the Competitive Exclusion Principle [START_REF] Hardin | The competition exclusion principle[END_REF] (different mechanisms with considerations on the nutrient uptake could also lead to species coexistence [START_REF] Arino | Considerations on yield, nutrient uptake, cellular growth, and competition in chemostat models[END_REF]).

In [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF], the aggregates are assumed to have no biological growth (i.e. the attachment process is the only source of increase of the attached biomass). Aggregates are also assumed to be washed-out with the same dilution rate than planktonic cells. On the opposite, in wall attachment models, the attached biomass is not washed out at all. We believe that these two opposite cases (same dilution rate than planktonic biomass or no dilution rate) are too extreme to be fully realistic. In this paper, we revisit the chemostat model with two compartments, planktonic and aggregated biomass, but assuming that each biomass has its own growth rate and apparent dilution rate. This generalizes the two kind of models that we mentioned previously.

The paper is organized as follows. In the Section 2, the general model of the system under interest is presented. In particular, for specific choices of different kinetics and mortality terms, it is shown that this model captures in fact many models of literature. In Section 3, this general model is reduced assuming the attachment/detachment processes are fast with respect to others. In the Section 4, the reduced model is analyzed for a specific class of models while its extension to the multi-species case and its analysis are carried out in Sections 5 and 6, respectively. Finally, discussion and conclusions are drawn in the last section.

Modeling flocks or aggregates in the chemostat

Consider the following model of the chemostat in which a population of microorganisms compete for a single growth-limiting substrate [START_REF] Smith | The Theory of the Chemostat, Dynamics of Microbial Competition[END_REF][START_REF] Monod | La technique de culture continue[END_REF]:

Ṡ = D(S in -S) -kµ(S)x ẋ = (µ(S) -D x )x .
In these equations, S(t) denotes the concentration of the substrate at time t; x(t) denotes the concentration of the population of microorganisms at time t; µ(•) represents the per-capita growth rate of the population and so Y = 1/k is the growth yield; S in and D denote, respectively, the concentration of substrate in the feed bottle and the dilution rate of the chemostat; D x represents the removal rate of the population. Assume that the species is present in two forms: isolated or planktonic bacteria, of density u, and attached bacteria or flocks of bacteria, of density v. Isolated bacteria and flocks can stick together to form new flocks, with rate α(•)u, and flocks can split and liberate isolated bacteria, with rate β(•)v:

u α(•)u ---→ v, u β(•)v ← ---v.
One obtains the following equations :

   Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u -α(•)u + β(•)v v = (g(S) -D 1 )v + α(•)u -β(•)v . (1)
In these equations, S(t) denotes the concentration of the substrate at time t; u(t) and v(t) denote, respectively, the concentration of the population of planktonic microorganisms and flocks of bacteria at time t; f (S) and g(S) represent, respectively, the per-capita growth rate of the populations; S in and D denote, respectively, the concentration of substrate in the feed bottle and the dilution rate of the chemostat; D 0 and D 1 represent, respectively, the removal rate of the microorganisms. The dot in attachment rate α(•) and detachment rate β(•) means that these rates can depend on the state variables, so that system (1) recovers some of the models which were considered in the existing literature. For instance, the model of adaptive nutrient uptake, where u denotes the low growing cells and v denotes the fast growing cells considered in [START_REF] Tang | Population dynamics and competition in chemostat models with adaptative nutrient uptake[END_REF] is obtained with attachment and detachment rates depending only on S α(•) = α(S), β(•) = β(S).

The model of wall growth, where u denotes the density of planktonic bacteria, and v denotes the density of wall-attached bacteria, considered by Pilyugin and Waltman [START_REF] Pilyugin | The simple chemostat with wall growth[END_REF], is obtained with constant rates

α(•) = a, β(•) = b.
The Freter model [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF] is given by

   Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u -a(1 -W )u + bv + g(S)(1 -G(W ))v v = (g(S)G(W ) -D 1 -b)v + a(1 -W )u (2)
where W = v/v max and G(•) is decreasing. Notice that this model is a particular case of the model (1) with

α(•) = a(1 -W ), β(•) = b + g(S)(1 -G(W )) .
Actually, if v max = ∞ one obtains W = 0 and if G(0) = 1 then α(•) = a, β(•) = b, and ( 2) is simply the model of Pilyugin and Waltman [START_REF] Pilyugin | The simple chemostat with wall growth[END_REF].

A model with flocks of two bacteria has been considered in [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF] 

  Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u -au 2 + bv v = (g(S) -D 1 )v + au 2 -bv (3)
that is a particular case of model (1) obtained with

α(•) = au, β(•) = b.
This model has been studied by Haegeman and Rapaport [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF] in the case of g(•) = 0 where the bacteria in flocks are assumed to do not consume any substrate, and by Fekih-Salem and al [START_REF] Fekih-Salem | La flocculation et la coexistence dans le chemostat[END_REF] in the more general case of 0 g(•) f (•) where the bacteria in flocks consume less substrate than the isolated bacteria. This model has been also extended to the case of flocks with an arbitrary numbers of bacteria in [START_REF] Haegeman | Modeling Bacteria Flocculation as Density-Dependent Growth[END_REF].

In the present paper we will not consider the size or the number of bacteria in flocks in our model. We simply distinguish the biomass in flocks and the isolated biomass. The biomass of isolated bacteria is denoted by u and the biomass in flocks is denoted by v. Hence isolated bacteria and isolated bacteria or flocks can stick together to form new flocks, with rate a(u + v)u, where a is a constant, proportional to both the density of isolated bacteria, that is u, and the total biomass density, that is u + v, and flocks can split and liberate isolated bacteria, with rate bv, where b is a constant, proportional the their density v. Hence, taking

α(•) = a(u + v), β(•) = b in model (1)
, one obtains the following dynamical system

   Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u -a(u + v)u + bv v = (g(S) -D 1 )v + a(u + v)u -bv (4)
that we aim to study in the present paper, as well as its extensions to multi-species populations.

A two time scales dynamics

The general model for the flocculation is

   Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u -α(S, v, u)u + β(S, u, v)v v = (g(S) -D 1 )v + α(S, v, u)u -β(S, u, v)v .
If we assume that the dynamics of flocculation and deflocculation is much faster than the growth of the species, one can write the model the following way

         Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u - α(S, u, v) ε u + β(S, u, v) ε v v = (g(S) -D 1 )v + α(S, u, v) ε u - β(S, u, v) ε v (5)
where ε is expected to be a small non-negative number. Notice that the dynamics of the total biomass x = u + v is given by the equation

ẋ = (f (S) -D 0 )u + (g(S) -D 1 )v.
Thus, u and v are fast variables, while S and x are slow ones. The fast dynamics is given by

u ′ = -α(S, u, v)u + β(S, u, v)v ,
and the slow manifold is defined by the positive solutions of the system

α(S, u, v)u = β(S, u, v)v with u + v = x .
Hence one has

u = p(S, x)x, v = (1 -p(S, x))x.
Assuming that this slow manifold is asymptotically stable for the fast equation, the reduction of the system to the slow system gives an approximation of the solutions of (5) for arbitrarily small ε, in accordance with the theories of singular perturbations or variables aggregation [START_REF] O'malley | Singular perturbation methods for ordinary differential equations[END_REF][START_REF] Auger | Aggregation and Emergence in Systems of Ordinary Differential Equations[END_REF][START_REF] Sanchez | Two-time scales in spatially structured models of population dynamics: a semigroup approach[END_REF]. The reduced model is obtained by replacing the fast variables u and v in the equations of S and x:

Ṡ = D(S in -S) -µ(S, x)x ẋ = (µ(S, x) -d(S, x)) x (6)
where

µ(S, x) = p(S, x)f (S) + (1 -p(S, x))g(S), d(S, x) = p(S, x)D 0 + (1 -p(S, x))D 1 .
Notice that p(•) depends on functions α(.) and β(.). Consequently the growth function µ(•) is a density dependent growth function model, as already studied in [START_REF] Lobry | A new hypothesis to explain the coexistence of n species in the presence of a single resource[END_REF][START_REF] Lobry | Persistence in ecological models of competition for a single resource[END_REF][START_REF] Lobry | Sur un modèle densité-dépendant de compétition pour une resource[END_REF]. But, here the removal rates are replaced by a function d(•) that depends also on functions α(.) and β(.). This last property is new in the literature, to our knowledge.

For the slow and fast case of (3) one has, see [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF]

α(•) ε = a ε u, β(•) ε = b ε and p(x) = 2 1 + 1 + 4 a b x
.

The slow and fast case of ( 4) is given by

   Ṡ = D(S in -S) -f (S)u -g(S)v u = (f (S) -D 0 )u -a ε (u + v)u + b ε v v = (g(S) -D 1 )v + a ε (u + v)u -b ε v . ( 7
)
The slow manifold is defined by the positive solutions of the system

a(u + v)u = bv with u + v = x .
Hence one has

u = p(x)x, v = (1 -p(x))x, where p(x) = b b + ax .
Hence, the reduced model corresponding to ( 7) is given by

Ṡ = D(S in -S) -µ(S, x)x ẋ = (µ(S, x) -d(x)) x (8)
where

µ(S, x) = bf (S) + axg(S) b + ax , d(x) = bD 0 + axD 1 b + ax . (9)
In the rest of the section, we use Tikhonov's theory [START_REF] Lobry | On Tikhonov's theorem for convergence of solutions of slow and fast systems[END_REF][START_REF] Tikhonov | Systems of differential equations containing small parameters multiplying the derivatives[END_REF][START_REF] Wasow | Asymptotic Expansions for Ordinary Differential Equations[END_REF] (see also [START_REF] Khalil | Nonlinear Systems Third Edition[END_REF]), and we justify that the solutions of ( 7) are approximated by the solutions of the reduced model [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF][START_REF] Ginovart | Flocculation in brewing yeasts: A computer simulation study[END_REF].

Theorem 3.1 Let (S(t, ε), u(t, ε), v(t, ε
)) be the solution of [START_REF] Fekih-Salem | La flocculation et la coexistence dans le chemostat[END_REF] with initial condition (S 0 , u 0 , v 0 ) satisfying S 0 0, u 0 > 0, and v 0 0. Let (S(t), x(t)) be the solution of the reduced problem [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF] with initial conditions

S(0) = S 0 , x(t) = u 0 + v 0 . Then as ε → 0, S(t, ε) = S(t) + o(1), x(t, ε) = x(t) + o(1) (10)
uniformly for t ∈ [0, T ], and

u(t, ε) = b b + ax(t) x(t) + o(1), v(t, ε) = ax(t) b + ax(t) x(t) + o(1) (11)
uniformly for t ∈ [t 0 , T ], where 0 < t 0 < T are arbitrary but fixed and independent of ε. If the solution (S(t), x(t)) of the reduced problem converges to an asymptotically stable equilibrium, then we can put T = +∞ in the the approximations [START_REF] Haegeman | Modeling Bacteria Flocculation as Density-Dependent Growth[END_REF] and [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF] given.

Proof. In the variables S, x = u + v and u, system (7) is written

     Ṡ = D(S in -S) -f (S)u -g(S)(x -u) ẋ = f (S)u + g(S)(x -u) -D 0 u -D 1 (x -u) u = (f (S) -D 0 )u - a ε xu + b ε (x -u) . ( 12
)
This is a slow and fast system with two slow variables S and x and one fast variable, u. The fast equation is

u ′ = -axu + b(x -u) = bx -(ax + b)u. ( 13
)
The slow manifold (or quasi-steady-state) is given by

u = xp(x), where p(x) = b b + ax .
Since ax + b > 0 this slow manifold is globally asymptotically stable. Thus, the Tikhonov's Theorem [START_REF] Lobry | On Tikhonov's theorem for convergence of solutions of slow and fast systems[END_REF][START_REF] Tikhonov | Systems of differential equations containing small parameters multiplying the derivatives[END_REF][START_REF] Wasow | Asymptotic Expansions for Ordinary Differential Equations[END_REF] applies and asserts that after a fast transition toward the slow manifold, the solutions are approximated by a solution of the reduced equation, which is obtained by replacing the fast variable u in (12) by the quasi steady state u = xp(x). This reduced system is

Ṡ = D(S in -S) -(f (S)p(x) + g(S)(1 -p(x))) x ẋ = (f (S)p(x) + g(S)(1 -p(x)) -D 0 p(x) -D 1 (1 -p(x)))
x .

This is system [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF][START_REF] Ginovart | Flocculation in brewing yeasts: A computer simulation study[END_REF]. The approximations [START_REF] Haegeman | Modeling Bacteria Flocculation as Density-Dependent Growth[END_REF] and [START_REF] Haegeman | How flocculation can explain coexistence in the chemostat[END_REF] follow from the Tikhonov's Theorem. Recall that when the reduced problem has an asymptotically stable equilibrium, then these approximations hold for all t > 0 and not only on a compact interval [0, T ). Recall also that there is a boundary layer for the fast variables u and v, that is the approximations (11) hold only for t t 0 where t 0 > 0 can be arbitrarily small but fixed. Therefore, very quickly, the density v(t) of flocks tends to

a(x(0)) 2 b + ax(0) ,
and the density u(t) of planktonic bacteria tends toward bx(0) b + ax(0) .

These values depend only on the initial total biomass x(0) = u(0) + v(0), and on the ratio a/b between the rate of flocculation and deflocculation. After this boundary layer, one has a slow variation of the densities of flocks and isolated bacteria according to the density dependent reduced model [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF][START_REF] Ginovart | Flocculation in brewing yeasts: A computer simulation study[END_REF].

Study of the reduced model for one species

We consider in this section the mathematical analysis of the reduced model [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF]. We do not assume that the functions µ(S, x) and d(x) are of the particular form [START_REF] Ginovart | Flocculation in brewing yeasts: A computer simulation study[END_REF]. We assume that H0: µ(0, x) = 0 and µ(S, x) > 0 for all S > 0 and all x 0.

H1: ∂µ ∂S > 0 and ∂µ ∂x < 0 for all S > 0 and all x 0.

H2: d(0) = D 0 , d(+∞) = D 1 < D 0 D, d(x) > 0, d ′ (x) < 0 and [xd(x)] ′ > 0 for all x 0.
Let us denote by f (S) = µ(S, 0), and g(S) = µ(S, +∞).

The functions f (•) and g(•) are increasing and positive for all S > 0. If equations f (S) = D 0 and g(S) = D 1 have solutions, one lets λ 0 = f -1 (D 0 ), and λ 1 = g -1 (D 1 ).

Otherwise one lets λ k = +∞, k = 0, 1. We add the following assumption H3: If λ 0 < λ 1 , then for all S ∈ [λ 0 , λ 1 ) and x 0 one has d ′ (x) > ∂µ ∂x (S, x).

H4: If λ 1 < λ 0 , then for all S ∈ (λ 1 , λ 0 ] and x 0 one has d ′ (x) < ∂µ ∂x (S, x).

Lemma 4.1 Assumptions H0-H4 are satisfied in the case

µ(S, x) = f (S)p(x) + g(S)(1 -p(x)), d(x) = D 0 p(x) + D 1 (1 -p(x))
where f (•) > g(•) are increasing functions and p(x) is a decreasing functions such that p(0) = 1, p(+∞) = 0 with [xp(x)] ′ > 0. Proof. Since p ′ (x) < 0 and f (S) > g(S) for all S > 0, one has

∂µ ∂S = f ′ (S)p(x) + g ′ (S)(1 -p(x)) > 0, ∂µ ∂x = (f (S) -g(S))p ′ (x) < 0.
Thus H1 is satisfied. On the other hand

d ′ (x) = (D 0 -D 1 )p ′ (x) < 0, [xd(x)] ′ = D 1 + (D 0 -D 1 )[xp(x)] ′ > 0 since p ′ (x) < 0, [xp(x)] ′ > 0 and D 0 > D 1 . Thus H2 is satisfied. Moreover ∂µ ∂x (S, x) -d ′ (x) = [f (S) -D 0 + D 1 -g(S)]p ′ (x) < 0
for all S ∈ [λ 0 , λ 1 ) and x 0, since p ′ (x) < 0 and f (S) D 0 , D 1 > g(S) for λ 0 S < λ 1 , see Figure 1. Thus Assumption H3 is also satisfied. Similarly one has

f (S) g(S) f (S) g(S) D0 D1 D0 D1 λ0 λ1 λ0 λ1 S S
Figure 1: On the left, the case λ 0 < λ 1 . On the right, the case λ 1 < λ 0 .

∂µ ∂x (S, x) -d ′ (x) = [f (S) -D 0 + D 1 -g(S)]p ′ (x) > 0
for all S ∈ (λ 1 , λ 0 ] and x 0, since p ′ (x) < 0 and f (S) D 0 , D 1 < g(S) for λ 1 < S λ 0 , see Figure 1. Thus Assumption H4 is satisfied.

Notice that, if p(x) = b b+ax , then the properties of p(•) stated in the lemma are satisfied. Indeed

p ′ (x) = -ab (b + ax) 2 , [xp(x)] ′ = b 2 (b + ax) 2 .

Existence of equilibria

The equilibria of the system are solutions of the set of equations

D(S in -S) -µ(S, x)x = 0 (µ(S, x) -d(x))x = 0
The second equation is equivalent to x = 0 or µ(S, x) = d(x). If x = 0 then from the first equation one has S = S in . This is the washout equilibrium

E 0 = (S in , 0). If µ(S, x) = d(x)
Since ∂µ ∂S > 0, by the implicit function theorem, thus equation defines a function

S = φ(x), such that λ 0 = φ(0), and
φ ′ (x) = d ′ (x) - ∂µ ∂x (φ(x), x) ∂µ ∂S (φ(x), x)
.

The sign of φ ′ (•) is given by assumptions H1, H3 and H4. The cases λ 0 < λ 1 and λ 0 > λ 1 have to be distinguished. When λ 0 < λ 1 the function S = φ(x) is defined for all x 0 and satisfies

λ 0 = φ(0), λ 1 = φ(+∞), φ ′ (x) > 0.
The equilibria are the intersection points of the graphs of functions S = φ(x) and S = γ(x).

Since the first function is increasing and the second one is decreasing, there is a unique solution if λ 0 < S in , and no solution if λ 0 > S in , see Figure 2. When λ 1 < λ 0 the function S = φ(x) is defined for all x 0 and satisfies

λ 0 = φ(0), λ 1 = φ(+∞), φ ′ (x) < 0.
S = γ(x) λ0 λ1 S = φ(x) S = γ(x)

Sin λ0 λ1

Figure 3: Null-clines S = φ(x) and S = γ(x) in the case λ 0 > λ 1 . On the left, the case λ 0 < S in with at least one intersection point. On the right, the case λ 0 > S in with no intersection point. In the second case it is possible to have two intersection points, see Figure 4.

Both functions S = φ(x) and S = γ(x) are decreasing and

φ(0) = λ 0 , S in = γ(0).
Thus, if λ 0 < S in the graphs intersect at at least one non-negative point (see Figure 3). If λ 0 > S in , the graphs of functions S = φ(x) and S = γ(x) can interest or not (see Figures 3 and4).

Proposition 4.3 If λ 1 < λ 0 < S in , then there exists at least one positive equilibrium. Generically one has an odd number of positive equilibria. If λ 1 < S in < λ 0 , then the system has generically no positive equilibrium or an even number of positive equilibria. given by [START_REF] Horn | Morgenroth Simulation of Growth and Detachment in Biofilm Systems Under Defined Hydrodynamic Conditions[END_REF]. On the right, the corresponding nullclines S = φ(x) and S = γ(x) for the parameter values [START_REF]IWA Task Group on Biofilm Modeling Mathematical Modeling of Biofilms[END_REF], showing the existence of two positive equilibria in the case when λ 0 > S in .

Stability of equilibria

The Jacobian matrix of ( 8) is given by

J =    -D -x ∂µ ∂S (S, x) -x ∂µ ∂x (S, x) -µ(S, x) x ∂µ ∂S (S, x) µ(S, x) -d(x) + x ∂µ ∂x (S, x) -xd ′ (x)   
At washout E 0 = (S in , 0) this matrix is

J 0 = -D -f (S in ) 0 f (S in ) -D 0
The eigenvalues are -D and f (S in ) -D 0 . Hence one has the following result Proposition 4.4 If λ 0 < S in , then E 0 is unstable (saddle point). If λ 0 > S in , then E 0 is locally exponentially stable (stable node).

At a positive equilibrium E 1 = (S, x), one has necessarily µ(S, x) = d(x), and the Jacobian matrix is

J 1 =    -D -x ∂µ ∂S (S, x) -x ∂µ ∂x (S, x) -µ(S, x) x ∂µ ∂S (S, x) x ∂µ ∂x (S, x) -xd ′ (x)    The trace of J 1 is tr(J 1 ) = -D -x ∂µ ∂S (S, x) + x ∂µ ∂x (S, x) -xd ′ (x). Since [xd(x)] ′ = d(x) + xd ′ (x), one has tr(J 1 ) = -D + d(x) -x ∂µ ∂S (S, x) + x ∂µ ∂x (S, x) -[xd(x)] ′ < 0 since d(x) D, ∂µ ∂S > 0, ∂µ ∂x < 0 and [xd(x)] ′ > 0. The determinant of J 1 is det(J 1 ) = Dx d ′ (x) - ∂µ ∂x + x ∂µ ∂S [xd(x)] ′ .
One can write this determinant as

det(J 1 ) = Dx ∂µ ∂S    d ′ (x) - ∂µ ∂x ∂µ ∂S + [xd(x)] ′ D    = Dx ∂µ ∂S (φ ′ (x) -γ ′ (x)) .
Thus, If φ ′ (x) > γ ′ (x), then the determinant is positive and hence the eigenvalues are of negative real parts: the equilibrium E 1 is locally asymptotically stable. On the other hand, if φ ′ (x) < γ ′ (x), then the determinant is negative, and the eigenvalues are of opposite sign: the positive equilibrium is a saddle point. Thus we have shown the following result Proposition 4.5 The following cases occur.

1. If λ 0 < min(λ 1 , S in ), the unique positive equilibrium is locally asymptotically stable (and fulfills φ ′ (x) > 0 > γ ′ (x)).

2. If λ 1 < λ 0 there are possibilities of multiple positive equilibria, that are saddle points when φ ′ (x) < γ ′ (x) or stable nodes when φ ′ (x) > γ ′ (x):

-when λ 0 < S in , there exists at least one positive equilibrium and one has an odd number of equilibria which are alternatively stable and unstable, -when λ 0 > S in , there is no or an even number of equilibria which are alternatively stable and unstable.

One concludes that in the case λ 1 < λ 0 , the system can exhibits bi-stability of the washout equilibrium and a positive equilibrium. If the initial density of flocks is small enough, the solutions will converge to the washout equilibrium, otherwise it will converge to the positive equilibrium, see Figure 5. In this figure we notice that the washout equilibrium is stable together with the positive equilibrium corresponding the lowest value of S. The domains of attraction of the stable equilibria are separated by the stable separatrix of the positive saddle node. The simulations shown in Figures 4 and5 where obtained for [START_REF] Freter | An understanding of colonization resistance of the mammalian large intestine requires mathematical analysis[END_REF][START_REF] Ginovart | Flocculation in brewing yeasts: A computer simulation study[END_REF], with the following Monod functions

f (S) = 2 S 1 + S , g(S) = 1.5 S 0.8 + S ( 15
)
and the following values of the parameters 16), the system exhibits bi-stability.

D 0 = D = 1, D 1 = 0.5, a = 4, b = 1, S in = 0.9. ( 16

Flocculation with several species

We assume that n species are competing on a same limiting resource, and that each species is present in two forms: isolated bacteria, of density u i , and bacteria in flocks, of density v i , for i = 1 • • • n. We assume that isolated bacteria can stick with isolated bacteria with flocks to form new flocks, with rate α i (•)u i . We assume also that flocks can split and liberate isolated bacteria with rate β i (•)v i .

u i αi(•)ui ----→ v i , u i βi(•)vi ← ----v i .
Then the equations are

         Ṡ = D(S in -S) - n i=1 (f i (S)u i + g i (S)v i ) ui = (f i (S) -D 0i )u i -α i (•)u i + β i (•)v i , 1 i n vi = (g i (S) -D 1i )v i + α i (•)u i -β i (•)v i (17)
The dynamics of the total biomass densities

x i = u i + v i of the species i is ẋi = f i (S)u i + g i (S)v i -D 0i u i -D 1i v i .
We consider here the case where

α i (•) = n j=1 A ij x j , β i (•) = B i
where A ij and B i are non-negative constants.

Remark 5.1 By letting the functions α i (•) depending on x j with j = i, we implicitly consider that flocks or aggregates can incorporate individuals of different species.

The removal rate D 1i has to be interpreted as the sum of the removal rate of the aggregates and the mortality rate of each species i in its attached form.

Moreover, we assume that the dynamics of flocculation and deflocculation are fast compared with the dynamics of the growth of bacteria, that is

A ij = a ij ε , B i = b i ε .
In the variables S, x i , u i , the system is written

               Ṡ = D(S in -S) - n i=1 [f i (S)u i + g i (S)(x i -i )] ẋi = f i (S)u i + g i (S)(x i -u i ) -D 0i u i -D 1i (x i -u i ), i = 1 • • • n ui = (f i (S) -D 0i )u i - 1 ε n j=1 a ij x j u i + b i ε (x i -u i ) (18)
This is a slow/fast system with the variables S, x i are slow and the variables u i fast. The fast equations are

u ′ i = - n j=1 a ij x j u i + b i (x i -u i ), i = 1 • • • n (19)
where x i are considered as parameters. The slow manifold (or quasi steady-state) is given by

u i = b i x i b i + n j=1 a ij x j , i = 1 • • • n . (20)
Since one has n j=1 a ij x j > 0, for i = 1 • • • n, this slow manifold is globally asymptotically stable for [START_REF] Jones | Bacterial wall attachment in a flow reactor[END_REF]. Thus, the Tikhonov's Theorem [START_REF] Lobry | On Tikhonov's theorem for convergence of solutions of slow and fast systems[END_REF][START_REF] Tikhonov | Systems of differential equations containing small parameters multiplying the derivatives[END_REF][START_REF] Wasow | Asymptotic Expansions for Ordinary Differential Equations[END_REF] applies and asserts that, after a fast transition toward the slow manifold, the solutions are approximated by a solution of the reduced equation, which is obtained by replacing the fast variables u i in (18) by the quasi steady states [START_REF] Khalil | Nonlinear Systems Third Edition[END_REF]. One obtains the following reduced model

     Ṡ = D(S in -S) - n i=1 µ i (S, x)x i ẋi = (µ i (S, x) -d i (x)) x i , i = 1 • • • n (21)
where

µ i (S, x) = f i (S)p i (x) + g i (S)(1 -p i (x)), d i (x) = D 0i p i (x) + D 1i (1 -p i (x)), i = 1, • • • , n (22)
with

p i (x) = b i b i + n j=1 a ij x j , x = (x 1 , • • • , x n ). (23)
Hence, we have shown the following result

Theorem 5.2 Let (S(t, ε), u 1 (t, ε), v 1 (t, ε), • • • , u n (t, ε), v n (t, ε)
) be the solution of [START_REF] Jones | Microbial competition for nutrient and wall sites in plug flow[END_REF] with initial conditions S(0) 0 and u i (0) > 0, v i (0) 0, for 1 i n. Let S(t), x 1 (t), • • • , x n (t) be the solution of the reduced problem [START_REF] Kissel | Numerical simulation of mixed culture biofilm[END_REF] with initial conditions

S(0) = S(0), x i (t) = u i (0) + v i (0), 1 i n.
u i (t, ε) = b i x i (t) b i + n j=1 a ij x j (t) + o(1), v i (t, ε) = n j=1 a ij x j (t) x i (t) b i + n j=1 a ij x j (t) + o(1)
uniformly for t ∈ [t 0 , T ], where T > t 0 > 0 are arbitrarily fixed. If the solution of the reduced problem tends to an asymptotically stable equilibrium, then we can put T = +∞ in the approximations given above.

Since the planktonic bacteria have a better access to the substrate than the bacteria in flocks one assumes f i (S) > g i (S). Notice that one has ∂pi ∂xj < 0 for any i, j. Hence

∂µ i ∂x j = (f i (S) -g i (S)) ∂p i ∂x j < 0 with ∂µ i ∂S = f ′ i (S)p i (x) + g ′ i (S)(1 -p i (x)) > 0 .
As for the one species case this approach give a motivation to density dependent growth function models, that may lead to species coexistence [START_REF] Lobry | A new hypothesis to explain the coexistence of n species in the presence of a single resource[END_REF][START_REF] Lobry | Persistence in ecological models of competition for a single resource[END_REF][START_REF] Lobry | Sur un modèle densité-dépendant de compétition pour une resource[END_REF].

Study of the reduced model for several species

The results of this section apply to the reduced model [START_REF] Kissel | Numerical simulation of mixed culture biofilm[END_REF][START_REF] Kreft | Individual-based modelling of biofilms[END_REF][START_REF] Kreikenbohm | Application of a two-compartment model to the wall growth of Pelobacter acidigallici under continuous culture conditions[END_REF] in the particular case where the rate of attachment and detachment of species x i with species x j are negligible for i = j, that is to say a ij = 0 for i = j. In that case the function p i depends only on x i and is given by

p i (x) = b i b i + a ii x i
so that the growth function µ i and removal rates d i in [START_REF] Kissel | Numerical simulation of mixed culture biofilm[END_REF] depend only on x i . We consider then the model

     Ṡ = D(S in -S) - n i=1 µ i (S, x i )x i ẋi = [µ i (S, x i ) -d i (x i )]x i i = 1, • • • , n (24)
This model was studied in [START_REF] Lobry | A new hypothesis to explain the coexistence of n species in the presence of a single resource[END_REF], in the case when d i (x i ) = D. We do not assume that the functions µ i (S, x i ) and d i (x i ) are of the particular form given by [START_REF] Kreft | Individual-based modelling of biofilms[END_REF]. We assume that H5: µ i (0, x i ) = 0 and µ i (S, x i ) 0 for all S > 0 and all x i 0.

H6: ∂µ i ∂S > 0 and ∂µ i ∂x i < 0 for all S > 0 and all x i 0.

H7:

d i (0) = D 0i , d i (+∞) = D 1i < D 0i D, d i (x i ) > 0, d ′ i (x i ) < 0 and [x i d i (x i )]
′ > 0 for all x i 0. Let us denote by f i (S) = µ i (S, 0) and g i (S) = µ i (S, +∞).

The functions f i (.) and g i (.) are increasing and positive for all S > 0. If equations f i (S) = D 0i and g i (S) = D 1i have solutions, one let

λ 0i = f -1 i (D 0i
) and λ 1i = g -1 i (D 1i ) otherwise one let λ ki = +∞, k = 0, 1. As for the case of one species (see Assumption H3), we add the following assumption 13

Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013,1 ,292-306. The original publicatioin is available at http://www.sciencedirect.com doi:10.1016/j.jmaa.2012.07.055 H8: λ 0i < λ 1i for i = 1 • • • n. For all S ∈]λ 0i , λ 1i [ and x i 0, one has d ′ i (x i ) > ∂µi ∂xi (S, x i ). If the inequality λ 0i < λ 1i is reversed for some i = 1 • • • n, then the situation is much more difficult and will be studied in the future. Denote λ0 = max{λ 0i ; i = 1, • • • , n} and λ1 = min{λ 1i ; i = 1, • • • , n}.

We assume that H9: λ0 < min( λ1 , S in ).

We consider here the existence of a positive equilibrium. The equilibria of ( 24) are solutions of the set of equations

     D(S in -S) = n i=1 µ i (S, x i )x i µ i (S, x i ) = d i (x i ) or x i = 0 i = 1, • • • , n. (25)
Thus we have to solve the equations

µ i (S, x i ) = d i (x i ).
Since H6, by the implicit function theorem, this equation gives a function S = φ i (x i ) defined for all x i 0, such that φ i (0) = λ 0i , φ i (+∞) = λ 1i and

φ ′ i (x i ) = d ′ i (x i ) - ∂µ i ∂x i (S, x i ) ∂µ i ∂S (S, x i ) > 0.
The sign of φ ′ (•) is given by assumptions H8. We define the function X

i : S → X i (S) on [0, λ 1i [ by X i : [0, λ 1i [ -→ R + S -→ X i (S) = 0 if 0 S λ 0i x i = φ -1 i (S) if λ 0i S < λ 1i .
Let h i (S) = µ i (S, X i (S))X i (S). Since X i (•) is increasing over [λ 0i , λ 1i [, so is h i (•) over this interval. Indeed, one has

h ′ i (S) = ∂µ i ∂S + ∂µ i ∂x i X ′ i (S) X i (S) + µ i (S, X i (S)) X ′ i (S).
Moreover, for S ∈]λ 0i , λ 1i [, µ i (S, X i (S)) = d i (X i (S)) and

X ′ i (S) = ∂µ i ∂S (S, X i (S)) d ′ i (X i (S)) - ∂µ i ∂x i (S, X i (S)) > 0. Then h ′ i (S) = [d ′ i (X i (S)) X i (S) + d i (X i (S))] X ′ i (S), for S ∈]λ 0i , λ 1i [. Using H7, [d i (x i )x i ] ′ = d ′ i (x i )x i + d i (x i ) > 0, for x i 0. Hence the sign of h ′ i (S)
is the same as the sign of X ′ i (S), that is, h i (•) is increasing over [λ 0i , λ 1i [ (see Fig. 6). Consider now the function

H(S) = n i=1 h i (S) -D(S in -S).

Lemma 6.3 Consider the matrix

A =        -D -n i=1 a i c 1 c 2 • • • c n a 1 -b 1 0 • • • 0 a 2 0 -b 2 • • • 0 . . . . . . . . . . . . . . . a n 0 0 • • • -b n        (29)
Assume that D > 0 and for i = 1 • • • n, a i 0, b i > 0 and c i b i . Then all eigenvalues of A have negative real part.

Proof. Let λ be an eigenvalue of A and V

= (v 0 , v 1 , • • • , v n ) = 0 a corresponding eigenvector. Hence we have        -D - n i=1 a i v 0 + n i=1 c i v i = λv 0 a i v 0 -b i v i = λv i i = 1, • • • , n. (30)
Assume that α = Re(λ) 0. Since b i > 0, then λ + b i = 0. Therefore,

v i = a i v 0 λ + b i for i = 1 • • • n.
If v 0 = 0 then v i = 0 for i = 1 • • • n, so that V = 0 which is impossible. Thus v 0 = 0 and from the first equation of ( 30), we deduce, after simplification by v 0 that -D -

n i=1 a i + n i=1 a i c i λ + b i = λ.
Let λ = α + iβ. Taking real part of both sides one obtains

α = -D - n i=1 a i + n i=1 a i c i (b i + α) (b i + α) 2 + β 2 • Since c i b i and b i + α > 0 then c i (b i + α) (b i + α) 2 + β 2 b i (b i + α) (b i + α) 2 + β 2 b i (b i + α) (b i + α) 2 = b i b i + α 1.
Since a i 0 then

a i c i (b i + α) (b i + α) 2 + β 2
a i for i = 1 In this work, we considered a general model of a bio-process with three compartments involving the substrate, the planktonic and the attached biomass densities, respectively. Each compartment of the biomass is characterized by its own specific growth rate and apparent dilution rate, generalizing previous models of biofilms (with no dilution rate for the attached bacteria) or models of perfect flocks (with no growth rate for aggregated individuals). We have analyzed a class of such models with planktonic and structured biomass, under the assumption that attachment and detachment processes are fast compared to the biological scale. Notice that it is only under this assumption that the main results of the paper are valid, notably the fact that the three order model (1) can be reduced to the second order model [START_REF] Ding | Population balance modelling of activated sludge flocculation: Investigating the size dependence of aggregation, breakage and collision efficiency[END_REF]. If it is not the case, the analysis of the original three order model must be done to establish its qualitative behavior. Our study reveals two main characteristics of this model:

1. the reduced dynamics may exhibit a bi-stable behavior even though each growth function is monotonic.

This phenomenon is new and is usually met in the chemostat but when the growth function is nonmonotonic (such as the Haldane law);

2. for bio-processes in which part of the biomass is under a structured form (in flocks or biofilm), the macroscopic models (with reduced dynamics involving only the aggregated biomass and the substrate) should include a growth rate and an apparent dilution rate that are both density dependent. This result contributes to the actual debate in biotechnological engineering involving bio-processes with structured biomass, where it was not clear whether it is better to modify the growth rate functions or the hydrodynamical terms in the macroscopic equations of the system, to cope with the specificity due to the attachment process.

  , the first equation gives D(S in -S) = xd(x). Hence S = γ(x) := S in -xd(x) D . Since γ(0) = S in , and γ ′ (x) = -[xd(x)] ′ D < 0 the function γ(•) is decreasing. Thus one have to solve the equation µ(S, x) = d(x).

Figure 2 :Proposition 4 . 2

 242 Figure2: Null-clines S = φ(x) and S = γ(x) in the case λ 0 < λ 1 . On the left, the case λ 0 < S in with a unique intersection point. On the right, the case λ 0 > S in with no intersection point.

Figure 4 :

 4 Figure4: On the left, the growth functions f (•) and g(•) given by[START_REF] Horn | Morgenroth Simulation of Growth and Detachment in Biofilm Systems Under Defined Hydrodynamic Conditions[END_REF]. On the right, the corresponding nullclines S = φ(x) and S = γ(x) for the parameter values[START_REF]IWA Task Group on Biofilm Modeling Mathematical Modeling of Biofilms[END_REF], showing the existence of two positive equilibria in the case when λ 0 > S in .

Figure 5 :

 5 Figure 5: For the Monod functions (15) and the parameters values (16), the system exhibits bi-stability.

6

  Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013,1 ,292-306. The original publicatioin is available at http://www.sciencedirect.com doi:10.1016/j.jmaa.2012.07.055

8

  Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013,1 ,292-306. The original publicatioin is available at http://www.sciencedirect.com doi:10.1016/j.jmaa.2012.07.055

	S = φ(x)
	Sin

12

  Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013,1 ,292-306. The original publicatioin is available at http://www.sciencedirect.com doi:10.1016/j.jmaa.2012.07.055 (t, ε) = x i (t) + o(1), 1 i n uniformly for t ∈ [0, T ], and for all 1 i n, as ε → 0

	Then as ε → 0
	S(t, ε) = S(t) + o(1),	x i

  • • • n. Proposition 6.4 If E * exists, then it is locally exponentially stable.Proof. Since µ i (S * , x * i ) = d i (x * i ), the Jacobian of the system (24) at E * is of the form (29) where Since H6, a i > 0. Since H7,d i (x * i ) + x * i d ′ i (x * i ) > 0, then -d i (x * i ) < x * i d ′ i (x * i ) and hence c i < b i . Since H8, b i > 0.The result follows from Lemma 6.3. 16 Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013,1 ,292-306. The original publicatioin is available at http://www.sciencedirect.com doi:10.1016/j.jmaa.2012.07.055

	Hence					n	n
					α -D -	a i +	a i < 0
						i=1	i=1
	which contradicts α 0.
	Then, we state the following result :
	a i =	∂µ i ∂S	(S * , x * i )x * i	b i = -	∂µ i ∂x i	(S * , x * i )x * i + x * i d ′ i (x * i ), c i = -	∂µ i ∂x i	(S * , x * i )x * i -d i (x * i ).

Acknowledgments. This work has been supported by the DISCO (Multi-scale modelling bioDIversity Structure COupling in biofilms) project, granted by the French National Research Agency ANR (AAP215-SYSCOMM-2009).

Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013, Proof. Since h i (S) = 0 for S ∈ [0, λ 0i ] and h i (S) is increasing over [λ 0i , λ 1i [ (see Fig. 6), the function H(•) is increasing over (0, λ1 ), and

Hence, there exists a unique S * ∈]0, λ1 [ such that H(S * ) = 0. We have the following result : Proposition 6.2 Assume that H5-H9 hold. System [START_REF] Leenheer | Crowding effects promote coexistence in the chemostat[END_REF] has a unique positive equilibrium if and only if

Proof. A positive equilibrium

and

Equation ( 28) is equivalent to x * i = X i (S * ). Thus, ( 27) can be written

that is H(S * ) = 0. Since n i=1 h i (S * ) > 0, then one must have S * < S in and S * > λ0 .

Notice that λ0 < S * < λ1 and S * < S in are satisfied if H9 holds. Then, since H(S) est increasing over [0, λ1 [, λ0 < S * ⇐⇒ H( λ0 ) < H(S * ) = 0.

Therefore there exists a unique positive equilibrium S * exactly when H( λ0 ) < 0, which is equivalent to [START_REF] Lobry | A new hypothesis to explain the coexistence of n species in the presence of a single resource[END_REF].

We study now the asymptotic behavior of the positive equilibrium. First, we establish the following result :

Author-produced version of the article published in Journal of Mathematical Analysis and Applications, 2013,1 ,292-306. The original publicatioin is available at http://www.sciencedirect.com doi:10.1016/j.jmaa.2012.07.055