For designing complex and sociotechnical (System that strongly interact with humans (e.g., a ship is a large sociotechnical system).) systems, designers are in charge of the functional specification because they have an operational expert knowledge. However, these experts do not usually master the programming knowledge of those who design supervision systems. Complex and sociotechnical systems include supervision systems which comprise monitoring interfaces and associated control codes. In this paper we propose an approach that facilitates functional specification of supervision systems. This approach aims at exploiting Example Based Programming (EBP) to propose a specification tool, which contains a generalization module and an interface generation module. Our tool allows experts who are acting as non-professional software developers to describe high level system functional services from elementary services. These functional services contain elementary interactions and configuration data. Thus, the expert, involved in coding, avoids a lot of errors related to the interpretation of the functional specifications. Our aim is to capture expert knowledge on the system being designed in order to have verified and validated functional specifications, without having to train experts in formal methods.