[Paper Review] Chat2Code: Towards conversational concrete syntax for model specification and code generation, the case of smart contracts
This paper proposes Chat2Code, a conversational interface using chatbots as concrete syntax for Model-Driven Engineering (MDE), enabling non-technical users to generate smart contract code through natural language interactions. The approach leverages natural language processing to interpret user input, map diverse terminologies to formal model elements, and auto-generate platform-independent smart contract code, validated via a user experience survey showing 79% of participants reported above-average satisfaction.
The revolutionary potential of automatic code generation tools based on Model-Driven Engineering (MDE) frameworks has yet to be realized. Beyond their ability to help software professionals write more accurate, reusable code, they could make programming accessible for a whole new class of non-technical users. However, non-technical users have been slow to embrace these tools. This may be because their concrete syntax is often patterned after the operations of textual or graphical interfaces. The interfaces are common, but users would need more extensive, precise and detailed knowledge of them than they can be assumed to have, to use them as concrete syntax. Conversational interfaces (chatbots) offer a much more accessible way for non-technical users to generate code. In this paper, we discuss the basic challenge of integrating conversational agents within Model-Driven Engineering (MDE) frameworks, then turn to look at a specific application: the auto-generation of smart contract code in multiple languages by non-technical users, based on conversational syntax. We demonstrate how this can be done, and evaluate our approach by conducting user experience survey to assess the usability and functionality of the chatbot framework.
Motivation & Objective
- To address the usability gap in MDE tools by replacing traditional textual or graphical interfaces with conversational chatbots as concrete syntax.
- To enable non-technical users to specify domain models and generate accurate, reusable smart contract code through natural language interaction.
- To reduce the learning curve and cognitive load associated with mastering formal modeling notations and tools.
- To evaluate the usability and functionality of the chatbot-based framework in real-world development scenarios.
Proposed method
- Design a conversational concrete syntax layer that maps natural language input to formal model elements using NLP and intent recognition.
- Implement a chatbot framework, iContractBot, integrated with an EMF-based meta-model for smart contracts to support code generation across multiple blockchain platforms.
- Use the Xatkit framework to enable dialogue management, context tracking, and real-time feedback during model specification.
- Map diverse user terminologies (e.g., 'integer', 'number', 'float') to standardized data types in the domain model to handle linguistic ambiguity.
- Trace user conversations to model artifacts for validation, comparison, and feedback collection.
- Conduct a user experience survey with diverse participants (non-programmers and programmers) to evaluate usability and functionality.
Experimental results
Research questions
- RQ1Can chatbots serve as an effective and intuitive concrete syntax for domain-specific modeling in MDE frameworks?
- RQ2How well can a chatbot interpret and correct ambiguous or informal natural language input from non-technical users to generate correct model instances?
- RQ3To what extent does a conversational interface improve usability and user satisfaction compared to traditional modeling tools?
- RQ4How effective is the mapping of diverse user terminologies to formal model elements in maintaining specification accuracy?
- RQ5What are the key usability challenges and user preferences when using conversational interfaces for smart contract development?
Key findings
- Seventy-nine percent of survey participants across both technical and non-technical backgrounds reported an above-average overall experience using the iContractBot framework.
- The chatbot successfully interpreted and corrected informal or ambiguous user input, enabling accurate model and code generation despite linguistic variation.
- Non-technical users found the conversational interface significantly more accessible than traditional modeling tools, reducing the need for formal training.
- The framework demonstrated feasibility in generating platform-independent smart contract code from conversational input across multiple blockchain platforms.
- User feedback highlighted demand for hybrid conversational-graphical interfaces, template contracts, and auto-completion features, suggesting future enhancements.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.