Embedded software is growing fast in size and complexity, leading to intimate mixture of complex architectures and complex control. Consequently, software specification requires modeling both structures and behaviour of systems. Unfortunately, existing languages do not integrate these aspects well, usually prioritizing one of them. It is common to develop a separate language for each of these facets.In this paper, we contribute Clafer: a small language that attempts to tackle this challenge. It combines rich structural modeling with state of the art behavioural formalisms. We are not aware of any other modeling language that seamlessly combines these facets common to system and software modeling.We show how Clafer, in a single unified syntax and semantics, allows capturing feature models (variability), component models, discrete control models (automata) and variability encompassing all these aspects. The language is built on top of first order logic with quantifiers over basic entities (for modeling structures) combined with linear temporal logic (for modeling behaviour). On top of this semantic foundation we build a simple but expressive syntax, enriched with carefully selected syntactic expansions that cover hierarchical modeling, associations, automata, scenarios, and Dwyer's property patterns.We evaluate Clafer using a power window case study, and comparing it against other notations that substantially overlap with its scope (SysML, AADL, Temporal OCL and Live Sequence Charts), discussing benefits and perils of using a single notation for the purpose.
ACM CCS 2012An implementation of the language in the Clafer compiler capable of desugaring the extended syntactic elements (transitions and property patterns) into the basic temporal logic expressions. 2 The parser is generated from a formal grammar specification, whereas the desugarer is implemented manually. A handful of publicly available models; few models combining variability and behaviour have been freely available before, despite their growing importance. Clafer with behaviour combines an established structural modeling paradigm (class diagrams) with a solid semantic model for behaviour (traces). It allows creation of "loose" models (underspecified, with variability, with uncertainty), and mixing looseness of the different aspects. It does not require compartmentalization of behaviour and structure, but allows it. It allows organizing behavioural specifications via structural modeling concepts. Finally, it allows introducing variability uniformly in all the above.We believe that a small language capturing diverse viewpoints can facilitate model driven development of high quality software in more domains and at lower cost than today. We also hope that it will influence design of future industry standards. A small language with unambiguous semantics makes it easier to develop formal analysis tools for models mixing structure, behaviour and variability. Last but not least, we believe that Clafer has good potential for teaching modeling. A small language ca...