Development of Formal Components using the B method

The aim of this paper is to merge two approaches of software development. The first one is the component approach. Developping software components is now a new challenge in the software industry. The second approach is the formal one. These approaches are not so distant if we consider Bertrand Meyer’s opinion: a component without contracts can not be reused (more exactly, he said that it was more complicated to reuse such a component). One of the difficulties with the design by contract approach is to find the contracts. In some formal approach -we will use the B method in this paperthe software properties (the contracts) are expressed in the specifications. We present in this paper a tool we have developped to generate code in the spirit of the component approach from B specifications. Thus, we will see how we can link the notion of component and the B specifications.