Assisted modelling over social networks with S OCIO Sara Pérez-Soler, Esther Guerra, Juan de Lara Modelling & Software Engineering Research Group http://miso.es Computer Science Department Universidad Autónoma de Madrid (Spain) e-mail: {sara.perezs, esther.guerra, juan.delara}@uam.es Abstract—Social networks are intensively used nowadays for In this tool demo paper, we describe our modelling bot both leisure and work. They have become a natural com- S OCIO [4] which works across several social networks like munication mechanism which helps users in coordinating and Twitter and Telegram. The tool interprets messages from collaborating in their daily life activities. To profit from their pervasive use, we propose S OCIO: a the social network using the Stanford NL parser [5], the modelling assistant that seamlessly integrates across several social WordNet [6] lexical database to identify synonyms, and an networks, like Telegram or Twitter. S OCIO is a modelling bot extensible set of domain requirements extraction rules [7] that that can interpret natural language sentences and create meta- are responsible for growing the model to reflect the messages models out of them. It provides traceability of design decisions information. The bot keeps track of all model changes and and statistics of user contributions. A video showcasing the tool is available at https://saraperezsoler.github.io/ModellingBot/. their provenance, and provides statistics of the participation Index Terms—Meta-modelling, modelling bots, social net- of each user and their percentage of model authorship. The works, natural language processing constructed models can be validated, and exported to the EMF format. While S OCIO has been designed to help in both I. I NTRODUCTION modelling and meta-modelling, the current version of the tool Social networks are becoming an important part of our daily only supports the creation of meta-models. digital lives, where we use them to keep in touch with friends The remaining of this paper is organized as follows. First, and organize leisure activities. They are also gaining relevance Section II describes our approach to NL processing, and Sec- as a mechanism to disseminate information and to cooperate tion III presents the architecture and main features of S OCIO. and coordinate in work tasks. In particular, social media is Next, Section IV compares with related research. Finally, increasingly used in software engineering, e.g., to support the Section V concludes with prospects for future work. formation of ecosystems around particular concepts and tech- nologies; to participate in online development communities; II. A PPROACH and to disseminate technologies and crowdsource content [1], [2]. The goal of our tool is to provide modelling assistance Given the widespread use of social networks, our goal is to integrated within widely used discussion and collaboration exploit them for collaborative modelling. Hence, we introduce mechanisms such as social networks. For this purpose, our the concept of modelling bot, able to interpret natural language modelling bot integrates seamlessly in the social network as (NL), assist users in creating models, and which integrates another participant, and the interaction with the bot is based with minimum disruption into the natural communication on NL to keep a “sense of flow” as there is no need to mechanism that micro-blogging based social networks – like switch tools for discussing and modelling. Figure 1 shows Twitter or Telegram – offer. Our approach is lightweight, as a scheme of our approach. At any moment, users can send it can be used in mobility and it does not require installing messages directed to the bot. The way to address the bot varies any dedicated modelling tool, but users can employ the social slightly depending on the particularities of the social network: network client they are familiar with. It can be used by teams in Twitter, the message needs to mention the username of of engineers, likely distributed, to create models and enhance the bot (@ModellingBot), while in Telegram, the bot must their global coordination. It fosters collaboration with domain belong to the modelling group and a command starting by experts, who might be unfamiliar with modelling tools, by “/” needs to be issued. The bot offers a suite of commands interpreting domain requirements expressed in NL. Finally, for model management (create a new model, show all existing it has the potential to facilitate the crowdsourcing of design models, update a model, validate a model, download a model) decisions. While bots are starting to be used to help in software and to obtain statistics. We will explain these commands in engineering activities like documentation or user support [3], Section III, while in the remainder of this section we will to our knowledge, ours is the first proposal for a modelling focus on the handling of NL messages expressing domain assistant bot. requirements. Messages not directed to the bot are just regular cross NL rules references parse applicable Meta-model tree rule required users updates trace model Parse message Find rule Derive actions Modify model Produce feedback Store traceability Fig. 1: Processing a NL message for model update messages used for discussion and coordination within the their effects can be undone and redone. Supported actions modelling session. include creating and removing classes, making them abstract When the bot receives a message, it uses the Stanford parser or concrete, adding and deleting features, and changing the to produce a parse tree. Each word in this tree is tagged type of a feature. After processing a message, the updated with its role in the sentence, like noun (singular or plural) or meta-model may lack some information, like the type of an verb (past, gerund, past participle, 3rd person singular present, attribute, or whether a feature is an attribute or a reference. non-3rd person singular present). We have created a set of These design decisions remain open and need to be resolved extraction rules that detect certain phrase structures of interest before the model is deemed valid. in the tree and deduce domain requirements that trigger model The message, the user issuing the message and the per- updates. The extraction rules are based on the work by Arora formed actions are stored in a traceability model. This allows and colleagues [7], adapted to our context. The rule set is keeping accurate record of the provenance and rationale of extensible, and we currently consider the following ones: every meta-model element, as well as generating different statistics. Once the meta-model and the trace model have been • Verb to be. These phrases may indicate a subclassing re- updated, the bot sends a picture of the meta-model to all users, lation (e.g., “users can be students or teachers”), the type where the impacted elements are highlighted in a different of a feature (e.g., “price is double”) or the abstractness colour. of a class (e.g., “course is abstract”). 1) Example.: Figure 2 illustrates the processing of several • Verb to have (and synonyms). These phrases identify NL messages used to build a meta-model for e-learning features (attributes or references) of a class. We also systems. The first sentence triggers the rule for the verb “to consider the Saxon genitive. be”, and results in the creation of two subclasses of Course. In • Transitive verbs. When a phrase with a verb, subject and the second sentence, the user uses a transitive verb (“courses direct object is identified, this rule triggers the creation are evaluated with a test”), which yields the creation of a of classes for the subject and direct object (if they do not new class Test and a reference evaluatedWith. The bot follows exist yet), and a reference for the verb. accepted naming conventions: upper camel case for classes • Contain (and synonyms). These phrases signal the need and lower camel case for features. Moreover, it also checks for a composition relation between two classes (e.g., “an the grammatical number of the words to assign an appropriate e-learning platform is made of courses”). cardinality to features (e.g., [0..1] in reference evaluatedWith). • Add (and synonyms). Imperative phrases using “add” or a synonym verb result in the creation of classes or III. T OOL SUPPORT features (e.g., “add name to user”). We have built a modelling bot called S OCIO to support the • Remove (and synonyms). Similar to the previous rule, presented approach. It works on Telegram and Twitter, though but for removing elements. it is designed to be extensible with further social networks and Each rule has a priority, equal to its position in the previous NL rules. The bot stores meta-models in Ecore format, and the list. In this way, if several rules are applicable, only the one traceability data as EMF models. The pictures of meta-models with the highest priority is selected. Then, the selected rule are generated with PlantUML. A video showcasing its use and checks the state of the meta-model and produces the necessary some examples are available at https://saraperezsoler.github.io/ meta-model update actions. In this step, rules make use of ModellingBot/. WordNet to detect synonyms, and take into account gram- Figure 3 shows some screenshots in the interaction with matical number to allow flexibility when referring to existing S OCIO to build and validate a meta-model for e-learning classes (e.g., an existing class “Teacher” can be referred later systems. In the first place (not shown), a Telegram group that as “Instructors”). The actions are generated explicitly so that includes the participants and the bot needs to be created. In “courses “courses are can be evaluated free or with a test” paid courses” Fig. 2: NL interaction sequence, and corresponding meta-model updates Figure 3a, the bot shows all available commands, and then, on platforms like Eclipse, which requires technical expertise. one participant creates a modelling project using the /newproject Instead, our approach integrates a modelling bot within a command. social network, so that users do not need to switch between In Figure 3b, a participant sends a NL message to the bot discussion, coordination and modelling tools. using the command /talk. The bot interprets the message to Social networks have been recognised to have a high-impact deduce domain requirements, updates the current meta-model research potential in software engineering [1], [11]. In fact, version accordingly, and returns a picture of the updated meta- we are witnessing an increasing use of bots to automate model with the created and updated elements highlighted in certain software engineering tasks, like DevOps activities or green. Figure 3c shows a similar interaction using Twitter. In user support bots [3]. The general goal of their use is to this case, the bot username (@ModellingBot) and the project improve efficiency (do things faster) and effectiveness (com- name (#learningplatform) need to be mentioned. The created plete tasks towards meaningful goals). S OCIO targets improving attribute (code) is shown in green. After some interactions, effectiveness of meta-model creation, lowering the barrier of one participant validates the model (Figure 3d), and the bot participation to non-technical people. reports there is an error because the type of attribute Paid- Several researchers have proposed different models of Course.price is missing. At any moment, the meta-model can be crowdsourcing for software design activities. For example, downloaded in Ecore format using command /get (Figure 4a). in [12], the authors use microtask crowdsourcing for parallelis- The downloaded meta-model can then be used within Eclipse ing the construction of morphological charts, a design tech- (Figure 4b). nique to represent decision points and alternative solutions. The interaction with S OCIO is recorded in a traceability Their experiments show the feasibility of using crowdsourcing model. This can be used to understand the rationale of every to generate a wide range of design solutions, though of varying decision and analyse user contributions. In particular, S OCIO quality. More generally, Hoang et al. [13] provide a set of offers the following statistics: messages sent by one or all recommendations on when to crowdsource decision-making, users, meta-model update actions done by one or all users, namely, when tasks can be performed through the internet, do and percentage of meta-model authorship. They are available not require a significant level of communication, and can be through the /history command (see Figure 5a). As an example, partitioned into smaller tasks. Moreover, to avoid low quality Figure 5b shows the number of messages directed to the outcomes, crowdsourced tasks should be easy to evaluate; bot from all users along time, while Figure 5c shows the in our case, live quality checks can be performed by both percentage of authorship. In addition, it is also possible to modelling and domain experts. Finally, platform availability is obtain a more detailed history of the messages sent by each also key in crowdsourced tasks; our proposal based on social user and their consequences. networks completely fulfils this requirement. Altogether, to the best of our knowledge, our proposal is IV. R ELATED WORK novel as modelling assistant bots have not been proposed up to now. There are several approaches for collaborative modelling or meta-modelling [8]. Some recent examples include Col- V. C ONCLUSIONS AND FUTURE WORK laboro [9] and SPACEclipse [10]. However, these works do not consider modelling assistants or NL as an interaction This paper has described S OCIO, a bot for assisted modelling mechanism, and they do not rely on social networks but over social networks. It works over Twitter and Telegram, (a) Creating a new project (b) Talking to the bot (c) Interaction through Twitter (d) Meta-model validation Fig. 3: Interaction with S OCIO interpreting NL sentences from different users to create a a participatory culture in software development,” IEEE Trans. Software meta-model in a collaborative way. The assistant seamlessly Eng., vol. 43, no. 2, pp. 185–204, 2017. [2] J. Whitehead, I. Mistrı́k, J. Grundy, and A. van der Hoek, “Collaborative integrates within the social network and keeps track of the software engineering: Concepts and techniques,” in Collab. Soft. Eng. model history and user contributions. Springer, 2010, pp. 1–30. We are currently improving some aspects of S OCIO, e.g., [3] M. D. Storey and A. Zagalsky, “Disrupting developer productivity one bot at a time,” in FSE. ACM, 2016, pp. 928–931. enhancing NL processing for more accurate deduction of [4] S. Pérez-Soler, E. Guerra, J. de Lara, and F. Jurado, “The rise of the cardinalities, enabling meta-model instantiation, and defining (modelling) bots: Towards assisted modelling via social networks,” in user roles with support for collaboration protocols. We also ASE. IEEE, 2017. plan to integrate other social networks and communication [5] M. Marneffe, B. Maccartney, and C. Manning, “Generating typed dependency parses from phrase structure parses,” in LREC, 2006. mechanisms, like speech recognition using Skype bots. [6] G. A. Miller, “Wordnet: A lexical database for english,” Comm. ACM, Acknowledgements. Work funded by the Spanish MINECO vol. 38, no. 11, pp. 39–41, 1995. (TIN2014-52129-R) and the R&D programme of Madrid [7] C. Arora, M. Sabetzadeh, L. C. Briand, and F. Zimmer, “Extracting domain models from natural-language requirements: Approach and (S2013/ICE-3006). industrial evaluation,” in MoDELS. ACM, 2016, pp. 250–260. [8] M. Renger, G. L. Kolfschoten, and G. de Vreede, “Challenges in col- R EFERENCES laborative modelling: A literature review and research agenda,” IJSPM, [1] M. D. Storey, A. Zagalsky, F. M. F. Filho, L. Singer, and D. M. vol. 4, no. 3/4, pp. 248–263, 2008. Germán, “How social and communication channels shape and challenge [9] J. L. C. Izquierdo and J. Cabot, “Collaboro: A collaborative (meta) (a) Downloading Ecore meta-model (b) Ecore meta-model in Eclipse Fig. 4: Obtaining the final meta-model (a) Selecting statistics (b) Messages sent by users (c) Percentage of authorship Fig. 5: Some process statistics modeling tool,” PeerJ Computer Science, vol. 2, p. e84, 2016. [12] E. Weidema, C. Lopez, S. Nayebaziz, F. Spanghero, and A. van der [10] J. Gallardo, C. Bravo, and M. A. Redondo, “A model-driven de- Hoek, “Toward microtask crowdsourcing software design work,” in CSI- velopment method for collaborative modeling tools,” J. Network and SE@ICSE, 2016, pp. 41–44. Computer Applications, vol. 35, no. 3, pp. 1086–1105, 2012. [13] N. H. Thuan, P. Antunes, and D. Johnstone, “Factors influencing the [11] A. Begel, R. DeLine, and T. Zimmermann, “Social media for software decision to crowdsource: A systematic literature review,” Information engineering,” in FoSER@FSE. ACM, 2010, pp. 33–38. Systems Frontiers, vol. 18, no. 1, pp. 47–68, 2016.