<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards automatic smart contract generation from DEMO models: A case in logistics using Hyperledger</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Leonardo Abreu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Aveiro</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vítor Freitas</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ARDITI - Regional Agency for the Development of Research Technology and Innovation</institution>
          ,
          <addr-line>Funchal</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>NOVA - Universidade NOVA de Lisboa</institution>
          ,
          <addr-line>Lisboa</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Madeira</institution>
          ,
          <addr-line>Funchal</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we delve deeper into our prior work which proposed a method for automatically generating smart contracts from business models within the logistics industry, leveraging the Hyperledger Fabric blockchain platform. Building upon our previous contributions, which established a mapping from DEMO (Design and Engineering Methodology for Organizations) language to Hyperledger Chaincode using GO language and extended DEMO's Action Model Grammar, we now present a specific method, transpiling rules and file structure that underpins the automated smart contract generation. This detailed exposition comprehensively explains the flow logic and structural components necessary for translating business rules and processes into executable smart contract code. By presenting the core mechanics of our approach, we aim to ofer a foundational tool for enterprises seeking interoperability via distributed ledger technology, further combining the strengths of the DEMO methodology with smart contract functionalities. This research elucidates the nuances of design and implementation and serves as a practical guide for future applications in various business scenarios.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Enterprise engineering</kwd>
        <kwd>DEMO Action Model</kwd>
        <kwd>Blockchain</kwd>
        <kwd>Hyperledger Fabric</kwd>
        <kwd>Smart Contracts</kwd>
        <kwd>Logistics industry</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Distributed Ledger Technology (DLT) has introduced significant innovations like blockchain
(BC), providing a decentralized data system and ensuring consensus among participants [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Blockchain technology is valued for its ability to provide an immutable record for decentralized
transactions, suitable for financial transactions and also areas like smart contracts, civic services,
IoT, and more. It ofers businesses unparalleled reliability, transparency, and strong protection
against fraudulent activities. Furthermore, it aids in the automation of smart contracts [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        A Smart Contract (SCs) is a self-executing code on a blockchain platform designed to execute
the terms of a contract between parties without intermediaries. The terms are set and recorded on
the blockchain, ensuring they are consistently and immutably executed, ideal for parties without
an inherent trust basis [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. SCs utilizing BC technology can transform logistics management by
ofering a safe, streamlined, and clear method for monitoring items and dealings, culminating
in enhanced supply chain oversight [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        Hyperledger Fabric is an open-source BC framework that addresses the shortcomings of
conventional blockchains. It is implemented in over 400 samples, demonstrations, and operational
distributed ledger structures spanning various sectors and applications. Fabric presents a fresh
BC design focused on durability, adaptability, expandability, and privacy [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        The latest advancements in Enterprise Engineering (EE), include using DEMO (Design and
Engineering Methodology for Organizations) models for SCs deployments. This highlights the
integration of the Construction and Action Models from DEMO with BC technology to ensure
safe validation and transaction processing [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ].
      </p>
      <p>
        Utilizing the advantages of BC technology, like immutability and transparency, and combining
it with the design and evaluation strengths of the DEMO method, this strategy can result in the
optimized and efective application of business procedures. Specifically, this progression holds
considerable relevance for crafting and deploying smart contract-driven systems in large-scale
business scenarios, bolstering compatibility and growth potential [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        Even with the latest progress in combining the DEMO approach with SCs deployments,
present studies indicate that creating SCs from DEMO models (and designs using other modelling
languages) predominantly depends on hand-crafted coding. This scenario restricts the capacity
of Distributed Ledger Technologies (DLTs) when implementing DEMO-oriented information
systems, turning the contract creation process mainly manual task [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ].
      </p>
      <p>While there has been considerable progress in merging the DEMO standard with SCs
applications, a pressing need remains to advance the DEMO specification language. The aim
is to facilitate the automatic generation of DEMO-based SCs with little to no hand-crafted
coding, potentially eradicating manual coding completely. This advancement would boost the
capabilities of Distributed Ledger Technologies (DLTs) in deploying DEMO-focused information
systems, greatly diminishing manual work and the chance for mistakes in contract development,
thanks to early and comprehensive validation by business users and automating repetitive
coding tasks.</p>
      <p>SCs for Hyperledger Fabric can be automatically generated through the integration of DEMO
Action Rule (AR) Models and a Dynamic Search component of a DEMO based Low-Code Platform
(DLCP). This approach ofers significant advantages, including savings in time and resources,
as well as facilitating the automation of data validation and interaction with blockchain data.</p>
      <p>In this paper, we will examine a single transaction that involves numerous creations and
updates. We will also provide an example illustrating how to retrieve data from the blockchain
ledger. To this end, our method introduces two sets of rules, all of which have been employed
in a real-life project that confirmed the viability of this auto-generation process.</p>
      <p>Research presented in this paper occurred in the context of the LOGHyL (LOGistics
HyperLedger project – fictitious name for blind review purposes) initiative which employs blockchain
technology to address trust and collaboration issues in logistics. It ofers a digital platform using
SCs to record micro-hub transactions transparently, allowing stakeholders to access accurate
and trustworthy data. This boosts trust and promotes cooperation. Additionally, LOGHyL
emphasizes eco-friendly practices through circular economy principles. Overall, LOGHyL,
leveraging blockchain and SCs, aims to reshape the Micro-hubs paradigm, promoting a
sustainable and eficient system benefiting all involved parties. Micro-hubs are key logistical points
allowing coopetition among carriers, improving service, and reducing costs. However, trust
in data exchanges remains a challenge. By integrating key technologies, greener logistics is
achievable.</p>
      <p>We propose new necessary elements for DEMO Action Model and detail the file structure and
actions required to generate GO language methods of a SCs automatically. We can summarize
our research question as: How can the DEMO Action Rule Specification (ARS) language be
extended to enable automatic generation of SCs, specifically utilizing DEMO AR for transactions
and a DLCP Dynamic Search component for retrieving data from the blockchain ledger?</p>
    </sec>
    <sec id="sec-2">
      <title>2. Literature review</title>
      <p>
        In the modern global market, there is a pressing need for transparency in supply networks
within transportation and production businesses. The demand from consumers and regulators
for information about product origins, manufacturing, and movements necessitates robust
end-to-end traceability systems. While centralized monitoring has been common, decentralized
tracking methods are seen as more trustworthy, secure, and transparent. These methods
enhance data protection, reduce inaccuracies, and eliminate single failure points. Despite
the technical challenges they present, their benefits outweigh the drawbacks. Adopting such
systems allows firms to provide instant data to customers, reduces fraud risks, and ensures
regulatory compliance [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Open blockchains use digital currency and typically depend on “proof of work” (PoW) for
consensus. Conversely, private blockchains involve a set of identified members, ensuring secure
transactions among entities with shared goals but limited trust. Fabric, the first blockchain
platform of its kind, supports apps written in traditional programming languages. It employs
a unique execute-order-validate model, which involves running and checking a transaction,
organizing it via consensus and, finally, validating it based on application-specific trust standards
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        Developing SCs can be intricate and lengthy, necessitating profound knowledge of
programming languages and blockchain infrastructures. To address this, Choudhury et al. (2018)
suggested a technique utilizing domain-specific ontologies and semantic regulations to
automate the conversion of constraints from legal documents or protocols into SCs. This advanced
approach employs parsing and abstract syntax tree handling methods to automatically produce
SCs from defined requirements, easing the conversion of stipulations from legal contracts or
standards, and ensuring repeatability. The method’s success was showcased both by clinical
study guidelines and vehicle leasing conditions. The suggested approach can potentially be
adapted to diferent programming languages and blockchain systems, making it appealing for
enterprises and people wanting to simplify the SCs development process. By automating this
development, it becomes faster and more user-friendly, opening up avenues for various entities
to leverage the advantages of SCs [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        Aparicio et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] introduce an innovative approach that employs ontological models to
support the efective deployment of SCs within an enterprise’s blockchain framework. To
illustrate the practical application of their method, the authors delve into a case study centred
on the Rent-A-Car business model. Additionally, the research delves into the interplay between
Blockchain-based SCs and the DEMO Action Model, exploring the transformation of one into
the other. Central to the paper’s findings is the automated knowledge extraction from the
DEMO Action Model, which aids generating Blockchain SCs.
      </p>
      <p>
        Other previous work [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] discussed the usage of blockchain technology to streamline processes
between mistrusting organizations. Their study underscores the use of SCs in DEMO Action
Models and explores model-driven engineering for automatically generating these contracts. The
paper advocates for ontology-centric modelling techniques to ensure precise SCs specifications.
While a connection between Solidity Concepts and DEMO Action Model concepts is presented,
its optimization remains a topic for future research. The study uses a Rent-A-Car scenario for
validation but suggests broader testing across diferent Action Models. In essence,
ontologydriven approaches can enhance data standards, business processes, and blockchain management,
particularly in SCs, leading to better understanding and increased blockchain security.
      </p>
      <p>
        Tong et al. (2022) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] introduced an innovative approach to automate the creation of
SCs. Their framework, termed AI-assisted SCs Generation (AIASCG), facilitates collaboration
and negotiation on contract clauses among contracting parties from varied backgrounds and
languages. The method ofers a universal portrayal of contracts using machine natural language
(MNL), ensuring a mutual comprehension of contract commitments. Key to this proposal is an
AI-driven technique for word segmentation named Separation Inference (SpIn). SpIn is pivotal
to AIASCG, eficiently translating natural language sentences into intermediate MNL forms,
greatly minimizing the manual intervention in generating contracts.
      </p>
      <p>
        In Tallyn et al.’s study [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], the application of SCs in four urban delivery models was examined,
highlighting the balance between automation and the human touch necessary to maintain trust
during deliveries. The research underscores the importance of interpersonal relationships in
ensuring trust between delivery personnel and recipients.
      </p>
      <p>
        Kim and Laskowsky et al. [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] used the BC structure from the TOVE traceability ontology
to develop SCs for tracking physical goods in global supply chains. These contracts adhere
to traceability regulations based on ontology, emphasizing the ability of SCs to trace assets
throughout complex supply chains.
      </p>
      <p>We find a gap in the literature regarding practical solutions for the specific logistical needs
of circular economy procedures using blockchain in collaborative micro-hubs. A scalable
framework is needed to fully utilize this approach, enabling the creation and application of SCs
for all stakeholders in a cooperative and user-friendly way.</p>
      <p>Even with the advancements reported in the domain of SCs, there remain significant
barriers that preclude non-technical individuals from easily engaging in the SCs creation process.
The vast majority of frameworks and structures employed are complex and often dificult to
comprehend for the untrained eye. A notable observation from the literature is that the
methodology for elucidating and deploying these contracts largely relies on text-based explanations.
This particular mode of presentation can prove to be particularly daunting and perplexing for
individuals lacking technical expertise, highlighting a prominent discrepancy in the existing
literature.</p>
      <p>Our proposition centers on breaking down the barriers surrounding SCs generation through
the integration of visual component. By converting the traditionally text-heavy process into
a visual specification, we anticipate that users can more intuitively grasp the essence and
framework of the SCs. This visually-driven methodology doesn’t just demystify the complexities
but also fosters confidence among users. As they can see and interact with the visual elements,
they become more engaged in both the creation and comprehension of the SCs. Our emphasis on
visual components seeks to not only simplify but also democratize the SCs landscape, inviting
participation from a broader spectrum of individuals, irrespective of their technical prowess.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Bridging DEMO with GO smart contracts</title>
      <p>
        In this section, we elaborate on the procedure of generating Hyperledger Chaincode Go from
AR Models and DLCP Dynamic Search. Given the extensive nature of the implementation, we
provide a link [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] that contains the relevant code, facilitating a thorough examination. Before
delving in our most current contributions, we provide some context and summary of prior
research work in this line.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Research context</title>
        <p>
          The goal of implementing information systems is to enhance organizational eficiency. However,
success hinges on elements like system functionalities and organization’s attributes. DEMO
employs the PSI theory of Enterprise Ontology to dissect the core of an organization, forming
cohesive models and diagrams that mirror reality accurately [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. We introduce new language
elements for SCs creation from DEMO models, aiming for higher eficiency and reduced errors.
        </p>
        <p>
          In recent work/studies we extended and validated DEMO’s Models with improvements on the
representations of it is Fact, Process and Action Models [
          <xref ref-type="bibr" rid="ref17 ref18 ref19 ref20">17, 18, 19, 20</xref>
          ]. Regarding the Action
Rule Specification (ARS) language, a comprehensive and explicit specification of logical and
mathematical expressions, the specification of complex business rule logic and flow became
feasible [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. Such meticulousness is paramount in SCs, where minor mistakes can lead to
substantial repercussions.
        </p>
        <p>Furthermore, our proposal appeals to a broader spectrum by incorporating rules via a visual
programming language. This facilitates involvement from individuals with limited technical
backgrounds, enhancing the entire developmental phase. Our approach paves the way for future
SCs projects on the blockchain, by harnessing this synergistic blending of formal language and
visual programming.</p>
        <p>
          This paper extends prior work presented in [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ], where we focused on the development of an
initial prototype that gave us a valued initial insight on how to transpile DEMO ARS to SCs and
also helped us with an initial understand of what blocky components and grammar extension
we should need to successfully automatically generate SCs within the logistics industry context,
using the Hyperledger Fabric as our blockchain platform.
        </p>
        <p>That previous research gave us a good starting perspective for this paper, since that work
lead us directly in the direction of gaps that need to be tackled in the grammar specification
that need to be adjusted for specifics blockchain needs.</p>
        <p>In the previous work, we also demonstrated that DEMO Fact Model can be used for creating
asset models that will be stored on the blockchain.</p>
        <p>The study presented in this paper explores two specific scenarios derived from the “LOGHyL”
project. Firstly we are going to look at auction creation, where we will explore assets creation
and updates, each coupled with their relevant verifications. The second scenario that we will
look for is how can we fetch auctions from the ledger based on is state. The previous mentioned
scenarios will be categorically labelled as: “T01 – Create Auction” and “T02 – Fetch Open
Auctions”. These examples elucidate processes to asset creation and modification, while all the
validations are strictly validated, in the T01, furthermore T02 it is a good example of query
ledger.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. EBNF grammar specification</title>
        <p>In the realm of computer science, Extended Backus–Naur Form (EBNF) constitutes a spectrum
of meta-syntax languages, each variant capable of representing a context-free grammar. The
primary application of EBNF lies in its utility for the formal articulation of formal languages,
inclusive of programming languages utilized in computing.</p>
        <p>The subsequent section delineates tables that elucidate the syntax employed in the formulation
of Action Rules. The table is structured in the following manner: the left column enumerates
the concepts requiring definition, where a majority of these concepts correspond to specific
blocks in the system, and others relate to selectable fields within these blocks. Conversely, the
right column of the table is dedicated to providing the explicit definitions of these concepts.</p>
        <p>Additionally, this section introduces new components of our EBNF-based [22]. The
complete grammar, along with further details of these new components, will be presented in the
appendices, providing a comprehensive overview of the system’s syntax and its extensions."</p>
        <p>Before analyzing the upcoming tables that illustrate the grammar implemented by Extended
Backus–Naur Form (EBNF), it is important to acknowledge keynotes on this grammar:
• “( )” means grouping
• “[ ]” is for optional elements (zero or one time)
• “ ” is for optional elements (zero or more times)
• “|” means alternative
• “-” means Syntactic Exception. Separates a rule which must be used (on the left) from
the rule describing what is not allowed to be used (on the right) (“Consonant = Letter
- Vowel;”). If there’s nothing on the right, it can be interpreted only as something that
must be used (“OneOrMore = Something-;”).
• elements with UPPERCASE mean a terminal symbol with specific behavior assigned to
the system/dashboard.
when
local_endpoint_parameter
{local_endpoint_parameter |
local_endpoint_parameter_set}NOTE: defines the structure of the API Call’s request_body, defining
its parameters and/or parameter_sets.</p>
        <p>STRING documentation_description
{local_endpoint_parameter}NOTE: After specifying the set_name, it is needed to specify the
parameters that are to be inserted into it.
local_endpoint_success_response local_endpoint_error_response
NOTE: must have a behaviour selected for each one. One defined
in case the API call is carried out successfully, and one in case it
encounters any errors in the process.
local_endpoint_success_response_afected_object |
local_endpoint_success_response_queried_object | STRING
NOTE: When successful, it can return the
created/queried/updated/deleted object or simply a custom success message.</p>
        <p>NOTE: API Call CRUD operation that will be carried influences the
dropdown choices that will be present in the ‘response’ block. For
‘create’, we will have the ‘created object’, for ‘read’ we will have
the local_endpoint_success_response_queried_object, for ‘update’
we will have the ‘updated object’, and for ‘delete’ we will have the
‘deleted object’. Except for the ‘read’ crud operation, we have the
option to output a custom success message instead of the object.</p>
        <p>STRING {response_property |
response_set}NOTE: defines the returning object with the object’s name and the
properties/property_sets that should be returned inside it.</p>
        <p>STRING property
NOTE: has to be a property belonging to the object that was
created/updated/queried/deleted
STRING
{response_property}NOTE: defines the set name and the properties that should be
included in this response set.</p>
        <p>STRING
NOTE: the variable names defined in the ‘query records’ blocks
will appear here in a dropdown and the user must select which
ones to include in the api call’s response. Will return the objects
from the selected queries.</p>
        <p>STRING
NOTE: error message to be returned.
causal_link | assign_expression | user_input | edit_entity_instance
| user_output | produce_doc | if | while | for_each | post | get |
create_record | query_records | update_record | delete_record
property “=” (term | property_value)
[BLOCKCHAIN_EXECUTION]
property STRING</p>
        <p>NOTE: has to be an existent property specified in table property
validation_condition [NOT] validation_condition_type [ EXTRA_FIELD_1 [
EXTRA_FIELD_2 ] ] [user_output]
NOTE: The not, extrafield1 and extrafield2 fields will appear
depending on the validation_condition_type chosen. EXTRAFIELD1
and EXTRAFIELD2 examples are the min and max fields if the
validation_condition_type is “Belongs Range”.
validation_condition_type REQUIRED | IS_NUMBER | IS_INTEGER | EQUAL_TO |
MAX_WORD_LENGTH | LESS_EQUAL | HIGHER_EQUAL
| HIGHER_THAN | LESS_THAN | MIN_LENGTH |
BELONG_SRANGE | MAX_LENGTH | MIN_WORD_LENGTH
| HAS_CHARACTER | REG_EXPRESSION | HAS_WORD |</p>
        <p>IS_EMAIL | IS_URL | CUSTOM_VALIDATION
compute_expression term {compute_operator
term}compute_operator “+”| “-”|“*”|“/”</p>
        <p>NOTE: for now simple mathematical operators, later maybe more...
if IF condition</p>
        <p>THEN { action | rollback_transaction }
[ ELSE { action | rollback_transaction } - ]
condition ( ISTRUE | NOT
evaluated_expression | condition ) |
( AND|OR
{ evaluated_expression | condition }-)
NOTE: if condition is of type ISTRUE engine will evaluate the
expression; if condition is of type NOT, engine will evaluate either
the expression or condition; if it is of type AND or OR it will
accordingly evaluate the specified expressions/conditions
evaluated_expression comp_evaluated_expression | user_evaluated_expression
comp_evaluated_expression term logical_operator (term | property_value)
logical_operator “&lt;” | “&gt;” | “==” | “!=”
property_value STRING</p>
        <p>NOTE: must be a possible value of a property with 2 cases: 1)
value_type is enum and one can select all allowed values for the
selected property 2) value-type is prop_ref where possible values to
select will be the values associated with the property fk_property_id.
term constant | value | property | query | compute_expression |
produce_doc
constant STRING</p>
        <p>NOTE: Can be a constant defined on the system or can be a new
specification of a constant. In the latter case, the name, value and
value type of the constant to be created must also be specified.
value
value_type
for_each
set
create_record
entity_type
update_record
delete_record
rollback_transaction
value_type STRING
NOTE: free value inserted when editing the action rule. Must also
specify the value type when specifying the new value.</p>
        <p>TEXT | INTEGER_NUMBER | REAL_NUMBER | BOOLEAN |
ENUM | DATE | TIME
FOR_EACH set
{action}STRING
NOTE: set of elements. Has to be a name of a ‘parameter set’ defined
in the action rule’s ‘request body’ input.
entity_type {matching_property}- [ALLOW_DUPLICATES]
[BLOCKCHAIN_EXECUTION]
NOTE: Allows the creation of an entity in the system. ‘Allow
duplicates’ is a checkbox that will/won’t allow the insertion of
duplicate records of entities of the entity type selected.</p>
        <p>STRING
NOTE: has to be an existent entity_type specified in table ent_type
entity_type matching_id_property
matching_property[BLOCKCHAIN_EXECUTION]
NOTE: properties to be updated in the entity are the
matching_properties inserted. The matching_id_property is to know
which entity to update.
entity_type matching_id_property [BLOCKCHAIN_EXECUTION]
NOTE: will search for the selected entity type’s entity with the
received api call id and will delete that entity.</p>
        <p>STRING
NOTE: does a rollback on the current action rule’s transaction being
executed and returns the custom error message defined. NOTE: For
now, rollback_transaction is only used in blockchain action rules,
but in the future will be reused for general action rules.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. From DEMO modelling to Chaincode implementation: Ledger storage</title>
        <p>In this section, we will delve into the process of transpiling DEMO Action Models to blockchain
transactions encoded in SCs, encompassing multiple creations and updates. To illustrate this,
we will examine the creation of an auction, shedding light on the significance of each action
within the DEMO ARS.</p>
        <p>In the “LOGHyL” project, creating an auction involves conducting multiple validations and
establishing a relationship between a parcel and the auction itself. Specifically, this process
necessitates the creation of the “Auction_Has_Parcel” entity. This entity acts as a pivot table,
managing the many-to-many relationship between Auction and Parcel entities. Additionally, it
is imperative to alter the state of the parcel from “Pending” to “Auction”, indicating that the
parcel is part of an ongoing auction. Prior to making this update, a crucial validation step must
be taken to ensure that the parcel’s current state is indeed “Pending”.</p>
        <p>Now, we will dissect the AR into smaller segments to gain a deeper understanding of the
significance of each component within the AR, and to comprehend how it is transpiled into
Chaincode.</p>
        <p>The foundation of the AR is encapsulated in the “When” block, as illustrated in Fig. 1. This
segment explicitly outlines various critical components: the AR name, the parameters required
for the blockchain request, and the series of actions slated for execution. Additionally, it defines
the response mechanism, indicating whether the action has been successfully executed or if
any errors have emerged during the process.</p>
        <p>In Fig. 1 has said previously, we have a property that handles with the parameters that our
blockchain method have to receive in order to use it in the actions. We can have two types of
parameters:</p>
        <p>The “parameter” block symbolizes a singular value, as depicted in Fig. 2. The former illustrates
a parameter specification devoid of validation, while the latter demonstrates the inclusion of
validation for the corresponding parameter.</p>
        <p>The “parameter set” represents the second type of parameter, and it denotes a list of
parameters sharing the same structure. Utilizing this format streamlines the process of conveying
repetitive information, eliminating the need for multiple insertions of the same data type,
thereby enhancing intuitiveness and eficiency. Furthermore, validations can be incorporated
since the “set parameter” accommodates individual “parameter” as its properties, allowing for
comprehensive data integrity checks.</p>
        <p>Now, we will examine the Chaincode generated based on the “When”, “parameter” and “set
parameter” blocks. In the auction example, we encounter multiple “parameter” blocks associated
with the auction’s properties, as well as a “set parameter” block representing the parcels to be
included in the auction. The “When” block generates the fundamental structure of the method,
taking the aforementioned parameters as input for the base method.</p>
        <p>Listing 1: Pseudo Code of Creating Auction Main Method
func (s *SmartContract) AuctionCreateMain(stub shim.ChaincodeStubInterface,
auction models.Auction, parcels []string) pb.Response {
pseudoInitiateTransactionEnsureAtomicity()
//ADD ACTIONS HERE
(...)
return shim.Success(nil)
}</p>
        <p>In order to guarantee atomicity, we used a “StartTransaction” method provided by Stub
Chaincode Interface, it handles potential errors during the transaction, and ensures the transaction is
either rolled back if there were errors or committed if the transaction was successful.</p>
        <p>With the foundational method established, we can delve deeper into incorporating actions
within the DEMO AR, specifically for executing data writes on the ledger. To facilitate this, we
will introduce and discuss two blocks capable of writing data to the ledger: “create record” and
“assign expression”.</p>
        <p>As illustrated in Fig. 3, the “create record” block possesses several properties. The “entity
type” property defines the type of entity to be created on the ledger. The “allow duplicates”
property can be enabled if specific situations warrant the creation of duplicate records. Lastly,
the “property(ies)” property assigns values to various attributes of the auction. By employing
the “matching” block, one can link auction properties to parameters that were previously passed
to the AR under analysis, ensuring proper initialization and consistency in the data recorded on
the ledger.</p>
        <p>Now that we have all the necessary information that is needed in the block of creation, we
can check the Chaincode that will be generated every time we need to create a record on the</p>
        <p>It is observable that the auction is passed as an argument to the “AuctionCreate” function,
and there are consistently steps followed for each creation on the ledger.</p>
        <p>Firstly, a unique key is generated to create a composite key, which facilitates the
identification and retrieval of the record. Following this, the properties of the entity are validated.
This validation process is generated automatically, based on any validations specified in the
“parameter” component. After validation, a check is performed to verify if duplicate values are
permissible for this particular record. Subsequently, a document type (docType) property is
assigned to the entity, which aids in the categorization and querying of ledger records. Lastly,
the entity, along with all its validated properties and the assigned docType, is securely stored
on the ledger.</p>
        <p>To invoke this method from the main function, a specific code block needs to be integrated
into the “AuctionCreateMain” method. Here is how it will appear once this action has been
err = s.AuctionCreate(stub, auction)
if err != nil {
transactionError = true
return shim.Error(err.Error())</p>
        <p>Listing 3: Pseudo Code of Creating Auction Main Method with create auction added
In order to create the records for the entity that is responsible for the management of
manyto-many relation between auction and parcel, e need to add a new component to it the “for
each” block, this receives a set of parcels in this case and creates for each parcel a record of type
“Auction Has Parcel”, as showed in Fig. 4.</p>
        <p>The process of creating an ’auction’ entity and an ’auction has parcel’ entity difers in only
one specific aspect. This distinction lies in the adaptation of the generated function within
the ’for each’ loop to accommodate the ’Auction_Has_Parcel’ entity type. Specifically, in the
’AuctionCreateMain’ section under actions, an additional ’for each’ loop is incorporated. The
code snippet added to this loop is as follows:
Listing 4: Pseudo Code of Creating Auction Main Method with create auction has parcel added
for _, parcelId := range parcels {
err = s.AuctionHasParcelCreate(stub, auction.ID, parcelId)
if err != nil {
transactionError = true
return shim.Error(err.Error())
}
}</p>
        <p>To generate records for the entity that manages the many-to-many relationship between
auctions and parcels, it is necessary to incorporate the “for each” block. This block accepts a
set of parcels, and for each parcel, it creates a record of the type “Auction Has Parcel.” This
process is visually depicted in Fig. 4, illustrating how the “for each” block facilitates the eficient
creation of multiple relational records between auctions and parcels.</p>
        <p>The “assign expression” component is utilized for updating properties in existing records,
and it comprises several key properties. The “Scope” property determines the type of object to
be updated; in the example depicted in Fig. 5, the intention is to update an Entity record. The
“ent type” is specified as “Parcel”, indicating the entity type to be updated, and the “property”
is set to “State”, pinpointing the specific parcel property to be modified during the update
operation. On the right side of the equal sign, the desired value to be assigned to the updated
property is clearly presented. This configuration ensures precise and intentional updates to
record properties.</p>
        <p>Looking carefully at the component showed in Fig. 5, we can use all the information in that
component to perform the update using Chaincode, for that we will need to create the method
“ParcelAuctionStartUpdateState” with the following structure:</p>
        <p>Listing 5: Code of Updating Parcel State
func (s *SmartContract) ParcelAuctionStartUpdateState(stub
shim.ChaincodeStubInterface, parcelId string) error {
pseudoCreateCompositeKey()
pseudoReadEntity(COMPOSITE_KEY)
pseudoValidateParcelState(PARCEL_STATE)
parcel.State = models.State(models.ParcelStateAuction)
bytes, err := json.Marshal(parcel)
if err != nil {</p>
        <p>return err
}
_, err = s.UpsertEntityRecord(stub, compositeKey, bytes)
if err != nil {</p>
        <p>return err</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. From DEMO modelling to Chaincode implementation: Ledger reading</title>
        <p>The DLCP Dynamic Search component is a recent innovation in our DLCP, streamlining the
process of crafting queries to visualize data from various system entities. The user begins
by selecting the desired entity or entities through select boxes, defining the scope of their
query. Following this, they choose the specific properties they want to retrieve and designate
certain properties to serve as filters in the subsequent stage. In the final step, the user applies
these filters based on the properties they selected earlier. This intuitive three-step process
enables users to efortlessly design data queries that suit their preferences, all while requiring
no technical expertise.</p>
        <p>To better understand the DLCP Dynamic Search component, let’s explore an example where
a user wants to query all open auctions in the system. Initially, the user selects the “Auction”
entity. Following that, in the property selection phase, the “state” property is chosen as a filter.
Finally, the user specifies a filter condition, setting the “state” to “OPEN”. After saving these
preferences, a corresponding method is auto-generated in the SCs, adhering to a predefined
pattern to ensure consistent and accurate data retrieval.</p>
        <p>From the example provided earlier, and based on the information supplied by the user, we
can derive the query: {"selector": {"docType": "AUCTION", "state": "OPEN"}}. Utilizing this data,
we can translate the user-created input from the DLCP Dynamic Search into the corresponding
Chaincode, ensuring seamless interaction and data retrieval from the blockchain ledger.</p>
        <sec id="sec-3-4-1">
          <title>Listing 6: Query Open Auction</title>
          <p>queryString := ‘
{"selector":</p>
          <p>"{\"docType\":\"AUCTION\", \"state\":\"OPEN\"}
"}‘
resultsIterator, err := stub.GetQueryResult(queryString)</p>
          <p>As data accumulates within the ledger, retrieval operations can become increasingly
timeconsuming. To mitigate this latency, Hyperledger Fabric introduces the concept of the “State
Database”, the world state maintains the current attribute values of a business object as a
distinct ledger status. This is beneficial since applications typically need the present value
of an object. Traversing the entire blockchain to determine an object’s current value would
be ineficient, instead we can directly retrieve it from the “State Database”. While the “State
Database” provides a structured snapshot of the ledger’s information, search operations can still
experience latency, as data continues to amass. To counteract this, custom indexes are tailored
for each distinct query executed on the ledger. Specifically, for the “Query Open Auctions”
operation, the following index was automatically generated:</p>
        </sec>
        <sec id="sec-3-4-2">
          <title>Listing 7: Designing an Index to Access Open Auctions</title>
          <p>{</p>
          <p>This analysis demonstrates how data queries can be designed in the DLCP Dynamic Search
component, which can subsequently be seamlessly converted into Chaincode. Additionally,
performance considerations were discussed in the context of ledger searches. Enhancements
were made by adding indices to the Hyperledger’s “State Database”, optimizing the search
queries crafted for the SC.</p>
        </sec>
      </sec>
      <sec id="sec-3-5">
        <title>3.5. Structure of generated SC files</title>
        <p>In the endeavour to automate SC generation, it was imperative to conceive an intuitive method to
structure the output files resulting from the transformation of DEMO AR to Chaincode. For the
proposed structure (Fig. 6), each AR will generate a corresponding file within the "Chaincode"
directory. Simultaneously, individual entities will have their data models encapsulated in distinct
ifles located in the "Models" directory.</p>
        <p>This methodology is employed because users create each DEMO AR individually. If an error
occurs or a modification is necessary in a specific AR, it is more straightforward to pinpoint
and remove the generated file associated with that particular AR. Subsequently, a new file can
be created based on the alterations made to the AR. This process enhances the ease of error
correction and adjustment, leading to a more eficient and user-friendly experience.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results and discussion</title>
      <p>The findings of this research illustrate the feasibility of automatic SC generation for Hyperledger
Fabric using DEMO AR models and DLCP Dynamic Search. Such an approach ofers a multitude
of advantages, including enhanced eficiency in the creation process for intricate contracts,
thereby reducing both the time and resources required. Furthermore, it provides capabilities for
automated data validation, error handling, and interaction management within the blockchain.</p>
      <p>Through a detailed study of a specific transaction “Creation of Auction” and method to “Query
Open Auctions” we developed a SC in Go. Subsequent reverse engineering exercises further
reinforced the viability of automatic SC generation. Our exploration validated various automatic
generation scenarios encompassing aspects like data validation, relationships between system
entities, iterative processes among new transactions and existing blockchain data, sophisticated
blockchain queries, and robust error management.</p>
      <p>
        The AR models presented in figures above include many new elements for DEMO’s ARS
Language. For time and space reasons, we add these extensions to EBNF in the link [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
      <p>The insights garnered from this study suggest that leveraging the DEMO AR models can
be a wise strategy for automatic SC generation development. It streamlines the conception of
intricate contracts and provides insights into the organization of the resultant files.</p>
      <p>However, potential limitations should be acknowledged. The inherent expressiveness of the
DEMO language may constrain the crafting of more advanced contract logic. This realization
highlights the potential need to augment the DEMO language components to address
blockchaincentric challenges. By integrating these refinements, the proposed framework can evolve into a
holistic solution, thereby facilitating the development of increasingly intricate and versatile SC
within the blockchain.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions and future work</title>
      <p>This research showcases the promising potential of utilizing DEMO AR models for the automated
generation of SC, potentially saving significant time and resources in developing complex
contracts. This approach ofers automation in critical areas, such as data validation and error
management, and also ensures robust data interaction within the Blockchain. Additionally,
the study delves into aspects of performance in blockchain queries and proposes a structured
format for the files that will be generated automatically.</p>
      <p>Furthermore, the adaptability of this approach suggests applications across various business
sectors, provided there is an appropriate DEMO model to depict the business process. Such
versatility could spearhead innovations in SC development, possibly leading to broader blockchain
technology adoption.</p>
      <p>Regarding future work, one research line could be the integration of advanced functionalities
into automatically generated contracts. For instance, implementing more sophisticated filtering
mechanisms at the level of queries can ensure that blockchain data searches are conducted
more transparently Instead of merely returning a single entity, the system could retrieve
related entities, thereby providing a richer dataset. DLCP Dynamic Search holds significant
potential for aiding future developments in this area of research. As we increase this complexity,
it is imperative to consider performance aspects. Enhancing the system’s eficiency, while
maintaining its robustness, is crucial to ensure that users get timely and relevant information
without compromising speed and reliability, in the future, we aim to develop an optimized
method for creating indexes based on the queries specified through the DLCP Dynamic Search
component. Though DEMO models are adaptable, specific sectors might necessitate nuanced
grammatical rules or modifications. This implies that while our current foundational structure
of DEMO models for SCs can serve a broad range of subjects, there might be a need for further
tailored adjustments or refinements to cater to the unique requirements of blockchain.</p>
      <p>An innovative low-code platform grounded in DEMO is underway, aiming to transpile
DEMO models directly into GO code, simplifying blockchain implementation, facilitating the
architecture of involved entities and automating essential API code generation.</p>
      <p>The DEMO AR models could be pivotal in SC evolution, especially within the Hyperledger
Fabric environment. The merits of this methodology are evident, and further research should
broaden the capabilities of generated contracts and evaluate optimized approaches tailored to
each specific scenario.
contract generation: a case in logistics using hyperledger, 2023. URL: https://doi.org/10.
62036/ISD.2023.18. doi:https://doi.org/10.62036/ISD.2023.18.
[22] D. Aveiro, V. Freitas, A new action meta-model and grammar for a DEMO based low-code
platform rules processing engine, in: e. a. Cristine Grifo (Ed.), Advances in Enterprise
Engineering XVI - 12th Enterprise Engineering Working Conference, EEWC 2022, Leusden,
The Netherlands, November 2-3, 2022, volume 473 of LNBIP, Springer, 2022, pp. 33–52. URL:
https://doi.org/10.1007/978-3-031-34175-5_3. doi:10.1007/978-3-031-34175-5\_3.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Nakamoto</surname>
          </string-name>
          ,
          <article-title>Bitcoin: A Peer-to-Peer Electronic Cash System</article-title>
          , Cryptography Mailing list at https://metzdowd.com (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zheng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Dai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends</article-title>
          , in: 2017
          <source>IEEE International Congress on Big Data (BigData Congress)</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>557</fpage>
          -
          <lpage>564</lpage>
          . doi:
          <volume>10</volume>
          .1109/BigDataCongress.
          <year>2017</year>
          .
          <volume>85</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>N.</given-names>
            <surname>Szabo</surname>
          </string-name>
          , Smart Contracts :
          <article-title>Building Blocks for Digital Markets</article-title>
          ,
          <year>2018</year>
          . URL: https://www. semanticscholar.org/paper/Smart-Contracts-
          <article-title>%3A-Building-Blocks-for-Digital-Szabo/ 9b6cd3fe0bf5455dd44ea31422d015b003b5568f.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N. Álvarez</given-names>
            <surname>Díaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Herrera-Joancomartí</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Caballero-Gil</surname>
          </string-name>
          ,
          <article-title>Smart contracts based on blockchain for logistics management</article-title>
          ,
          <source>in: Proceedings of the 1st International Conference on Internet of Things and Machine Learning</source>
          , IML '17,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2017</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          . URL: https://dl.acm.org/doi/10.1145/3109761. 3158384. doi:
          <volume>10</volume>
          .1145/3109761.3158384.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>E.</given-names>
            <surname>Androulaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Barger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Bortnikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Cachin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Christidis</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. De Caro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Enyeart</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Ferris</surname>
            , G. Laventman,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Manevich</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Muralidharan</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Murthy</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Nguyen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Sethi</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Sorniotti</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Stathakopoulou</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Vukolić</surname>
            ,
            <given-names>S. W.</given-names>
          </string-name>
          <string-name>
            <surname>Cocco</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Yellick</surname>
          </string-name>
          ,
          <article-title>Hyperledger fabric: a distributed operating system for permissioned blockchains</article-title>
          ,
          <source>in: Proceedings of the Thirteenth EuroSys Conference</source>
          , EuroSys '18,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>15</lpage>
          . URL: https://dl.acm.org/doi/10.1145/ 3190508.3190538. doi:
          <volume>10</volume>
          .1145/3190508.3190538.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Aparício</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Guerreiro</surname>
          </string-name>
          , P. Sousa,
          <source>Automated DEMO Action Model Implementation using Blockchain Smart Contracts</source>
          ,
          <year>2020</year>
          . doi:
          <volume>10</volume>
          .5220/0010147602830290.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Aparício</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Guerreiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Sousa</surname>
          </string-name>
          ,
          <source>Decentralized Enforcement of DEMO Action Rules Using Blockchain Smart Contracts</source>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>B.</given-names>
            <surname>Hornáčková</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Skotnica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pergl</surname>
          </string-name>
          ,
          <article-title>Exploring a Role of Blockchain Smart Contracts in Enterprise Engineering:</article-title>
          8th Enterprise Engineering Working Conference,
          <string-name>
            <surname>EEWC</surname>
          </string-name>
          <year>2018</year>
          , Luxembourg, Luxembourg, May 28 - June 1,
          <year>2018</year>
          , Proceedings,
          <year>2019</year>
          , pp.
          <fpage>113</fpage>
          -
          <lpage>127</lpage>
          . doi:
          <volume>10</volume>
          . 1007/978-3-
          <fpage>030</fpage>
          -06097-
          <issue>8</issue>
          _
          <fpage>7</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>O.</given-names>
            <surname>Choudhury</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Rudolph</surname>
          </string-name>
          , I. Sylla,
          <string-name>
            <given-names>N.</given-names>
            <surname>Fairoza</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Das</surname>
          </string-name>
          ,
          <article-title>Auto-Generation of Smart Contracts from Domain-Specific Ontologies</article-title>
          and
          <string-name>
            <given-names>Semantic</given-names>
            <surname>Rules</surname>
          </string-name>
          ,
          <year>2018</year>
          . doi:
          <volume>10</volume>
          .1109/Cybermatics_
          <year>2018</year>
          .
          <year>2018</year>
          .
          <volume>00183</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Skotnica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pergl</surname>
          </string-name>
          ,
          <string-name>
            <surname>Das Contract - A Visual Domain Specific Language for Modeling Blockchain Smart Contracts</surname>
          </string-name>
          ,
          <year>2020</year>
          , pp.
          <fpage>149</fpage>
          -
          <lpage>166</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -37933-9_
          <fpage>10</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>E.</given-names>
            <surname>Tijan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Aksentijevic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ivanić</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jardas</surname>
          </string-name>
          ,
          <source>Blockchain Technology Implementation in Logistics, Sustainability</source>
          <volume>11</volume>
          (
          <year>2019</year>
          )
          <article-title>1185</article-title>
          . doi:
          <volume>10</volume>
          .3390/su11041185.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Tong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Tan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Qin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zhuo</surname>
          </string-name>
          ,
          <article-title>Smart Contract Generation Assisted by AI-Based Word Segmentation</article-title>
          ,
          <source>Applied Sciences</source>
          <volume>12</volume>
          (
          <year>2022</year>
          )
          <article-title>4773</article-title>
          . URL: https: //www.mdpi.com/2076-3417/12/9/4773. doi:
          <volume>10</volume>
          .3390/app12094773, number: 9 Publisher: Multidisciplinary Digital Publishing Institute.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>E.</given-names>
            <surname>Tallyn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Revans</surname>
          </string-name>
          , E. Morgan,
          <string-name>
            <given-names>K.</given-names>
            <surname>Fisken</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          Murray-Rust,
          <source>Enacting the Last Mile: Experiences of Smart Contracts in Courier Deliveries</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          . doi:
          <volume>10</volume>
          .1145/ 3411764.3445525.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>H.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Laskowski</surname>
          </string-name>
          ,
          <article-title>Toward an ontology-driven blockchain design for supply-chain provenance</article-title>
          ,
          <source>Intelligent Systems in Accounting, Finance and Management</source>
          <volume>25</volume>
          (
          <year>2018</year>
          )
          <fpage>18</fpage>
          -
          <lpage>27</lpage>
          . doi:
          <volume>10</volume>
          .1002/isaf.1424.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <article-title>Towards automatic smart contract generation from demo models: a case in logistics using hyperledger, 2023</article-title>
          . Url:https://bit.ly/loghl original-date:
          <fpage>2023</fpage>
          -09-25.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>D.</given-names>
            <surname>Aveiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Oliveira</surname>
          </string-name>
          ,
          <article-title>Towards DEMO model-based automatic generation of smart contracts</article-title>
          , in: e. a. Cristine Grifo (Ed.), Advances in Enterprise Engineering XVI - 12th Enterprise Engineering Working Conference,
          <string-name>
            <surname>EEWC</surname>
          </string-name>
          <year>2022</year>
          , Leusden,
          <source>The Netherlands, November 2-3</source>
          ,
          <year>2022</year>
          , volume
          <volume>473</volume>
          <source>of LNBIP</source>
          , Springer,
          <year>2022</year>
          , pp.
          <fpage>71</fpage>
          -
          <lpage>89</lpage>
          . URL: https://doi.org/10.1007/ 978-3-
          <fpage>031</fpage>
          -34175-
          <issue>5</issue>
          _5. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>031</fpage>
          -34175-5\_5.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pacheco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Aveiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Gouveia</surname>
          </string-name>
          ,
          <article-title>Towards the x-theory: An evaluation of the perceived quality and functionality of demo's process model</article-title>
          , in: D.
          <string-name>
            <surname>Aveiro</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          <string-name>
            <surname>Proper</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Guerreiro</surname>
          </string-name>
          , M. de Vries (Eds.), Advances in Enterprise Engineering XV, Springer International Publishing, Cham,
          <year>2022</year>
          , pp.
          <fpage>129</fpage>
          -
          <lpage>148</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pacheco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Aveiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Gouveia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <article-title>Evaluation of the perceived quality and functionality of fact model diagrams in demo</article-title>
          , in: D.
          <string-name>
            <surname>Aveiro</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          <string-name>
            <surname>Proper</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Guerreiro</surname>
          </string-name>
          , M. de Vries (Eds.), Advances in Enterprise Engineering XV, Springer International Publishing, Cham,
          <year>2022</year>
          , pp.
          <fpage>114</fpage>
          -
          <lpage>128</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Aveiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pacheco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Gouveia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Gouveia</surname>
          </string-name>
          ,
          <article-title>Validation of demo's conciseness quality and proposal of improvements to the process model</article-title>
          , in: D.
          <string-name>
            <surname>Aveiro</surname>
            , G. Guizzardi,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Pergl</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          <string-name>
            <surname>Proper</surname>
          </string-name>
          (Eds.), Advances in Enterprise Engineering XIV, Springer International Publishing, Cham,
          <year>2021</year>
          , pp.
          <fpage>133</fpage>
          -
          <lpage>152</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>B.</given-names>
            <surname>Gouveia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Aveiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pacheco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Gouveia</surname>
          </string-name>
          ,
          <article-title>Fact model in demo - urban law case and proposal of representation improvements</article-title>
          , in: D.
          <string-name>
            <surname>Aveiro</surname>
            , G. Guizzardi,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Pergl</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          <string-name>
            <surname>Proper</surname>
          </string-name>
          (Eds.), Advances in Enterprise Engineering XIV, Springer International Publishing, Cham,
          <year>2021</year>
          , pp.
          <fpage>173</fpage>
          -
          <lpage>190</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>D. P.</given-names>
            <surname>David Aveiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Leonardo</given-names>
            <surname>Abreu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Freitas</surname>
          </string-name>
          ,
          <article-title>Demo models based automatic smart</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>